Skip to content

Commit

Permalink
feat(Listbox): config redesign and implementation, fix mdx classname …
Browse files Browse the repository at this point in the history
…statements
  • Loading branch information
driss-chelouati committed Dec 8, 2023
1 parent 9b9ebda commit 0fa7012
Show file tree
Hide file tree
Showing 55 changed files with 1,096 additions and 697 deletions.
12 changes: 6 additions & 6 deletions src/plugins/components/accordion/accordion.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ Accordions can have a plus indicator.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -115,7 +115,7 @@ Accordions can have a plus indicator.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/autocomplete/autocomplete.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ Autocompletes have images displayed inside result items.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -231,7 +231,7 @@ Autocompletes have images displayed inside result items.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/components/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default plugin.withOptions(
[`.${prefix}autocomplete-label, .${prefix}label-float`]: {
[`@apply ${prefix}label`]: {},
},
//Autocomplete:label float
//Label:float
[`.${prefix}label-float`]: {
//Base
[`@apply pointer-events-none absolute inline-flex select-none items-center leading-none`]:
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/avatar-group/avatar-group.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ Avatars can have different sizes and different shapes. The below examples shows

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -94,7 +94,7 @@ Avatars can have different sizes and different shapes. The below examples shows
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/avatar/avatar.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ Avatars have a badge slot that serves as wrapper for the optional badge element.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -279,7 +279,7 @@ Avatars have a badge slot that serves as wrapper for the optional badge element.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/breadcrumb/breadcrumb.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Breadcrumbs allow you to quickly identify the path to the current web page.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -43,7 +43,7 @@ Breadcrumbs allow you to quickly identify the path to the current web page.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/button-action/button-action.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ Action buttons have a default slot that serves as wrapper for their inner conten

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -119,7 +119,7 @@ Action buttons have a default slot that serves as wrapper for their inner conten
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/button-close/button-close.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ Close buttons can have different colors. Below is an example of the danger color

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -143,7 +143,7 @@ Close buttons can have different colors. Below is an example of the danger color
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/button-group/button-group.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ Button groups have a default slot that serves as wrapper for their inner content

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -88,7 +88,7 @@ Button groups have a default slot that serves as wrapper for their inner content
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/button-icon/button-icon.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ Icon buttons have a default slot that serves as wrapper for their inner content.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -129,7 +129,7 @@ Icon buttons have a default slot that serves as wrapper for their inner content.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/card/card.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ Cards have a default slot that serves as wrapper for their inner content.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -168,7 +168,7 @@ Cards have a default slot that serves as wrapper for their inner content.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/checkbox/checkbox.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ Checkboxes can be shown in a disabled state.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -142,7 +142,7 @@ Checkboxes can be shown in a disabled state.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/dropdown-divider/dropdown-divider.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Dropdown dividers allow to efficiently separate dropdown items.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -43,7 +43,7 @@ Dropdown dividers allow to efficiently separate dropdown items.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/dropdown-item/dropdown-item.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ Dropdown items have an end slot where you can put an action or whatever else you

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -118,7 +118,7 @@ Dropdown items have an end slot where you can put an action or whatever else you
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/components/dropdown/dropdown.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ Dropdown items have an end slot where you can put an action.

### Default config

<div class="relative">
<details class="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary class="list-none cursor-pointer">
<span class="font-sans text-slate-500">View configuration options</span>
<div className="relative">
<details className="relative bg-slate-50 border border-slate-200 rounded-lg p-4 [&>summary>svg]:open:-rotate-180">
<summary className="list-none cursor-pointer">
<span className="font-sans text-slate-500">View configuration options</span>
<svg
class="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
className="w-5 h-5 text-slate-500 absolute top-5 end-4 transition-transform duration-300"
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
Expand All @@ -158,7 +158,7 @@ Dropdown items have an end slot where you can put an action.
</svg>
</summary>

<div class="!mt-4">
<div className="!mt-4">
<pre >
{JSON.stringify(defaultConfig, null, 2)}
</pre>
Expand Down
Loading

0 comments on commit 0fa7012

Please sign in to comment.