diff --git a/dist/basecoat.css b/dist/basecoat.css index 7f28e12..3f828cf 100644 --- a/dist/basecoat.css +++ b/dist/basecoat.css @@ -8,7 +8,6 @@ --color-red-500: oklch(63.7% 0.237 25.331); --color-amber-50: oklch(98.7% 0.022 95.277); --color-amber-100: oklch(96.2% 0.059 95.617); - --color-amber-500: oklch(76.9% 0.188 70.08); --color-amber-900: oklch(41.4% 0.112 45.904); --color-amber-950: oklch(27.9% 0.077 45.635); --color-green-50: oklch(98.2% 0.018 155.826); @@ -16,14 +15,12 @@ --color-green-600: oklch(62.7% 0.194 149.214); --color-green-900: oklch(39.3% 0.095 152.535); --color-green-950: oklch(26.6% 0.065 152.934); - --color-cyan-500: oklch(71.5% 0.143 215.221); --color-blue-50: oklch(97% 0.014 254.604); --color-blue-500: oklch(62.3% 0.214 259.815); --color-blue-600: oklch(54.6% 0.245 262.881); --color-blue-700: oklch(48.8% 0.243 264.376); --color-blue-900: oklch(37.9% 0.146 265.522); --color-blue-950: oklch(28.2% 0.091 267.935); - --color-fuchsia-500: oklch(66.7% 0.295 322.15); --color-black: #000; --color-white: #fff; --spacing: 0.25rem; @@ -383,9 +380,18 @@ .h-svh { height: 100svh; } + .max-h-24 { + max-height: calc(var(--spacing) * 24); + } .max-h-64 { max-height: calc(var(--spacing) * 64); } + .max-h-96 { + max-height: calc(var(--spacing) * 96); + } + .max-h-\[200px\] { + max-height: 200px; + } .max-h-\[612px\] { max-height: 612px; } @@ -424,6 +430,9 @@ .w-\[150px\] { width: 150px; } + .w-\[180px\] { + width: 180px; + } .w-\[var\(--sidebar-width\)\] { width: var(--sidebar-width); } @@ -433,6 +442,9 @@ .max-w-\[300px\] { max-width: 300px; } + .max-w-lg { + max-width: var(--container-lg); + } .max-w-sm { max-width: var(--container-sm); } @@ -604,18 +616,9 @@ .bg-amber-50 { background-color: var(--color-amber-50); } - .bg-amber-500 { - background-color: var(--color-amber-500); - } .bg-background { background-color: var(--color-background); } - .bg-cyan-500 { - background-color: var(--color-cyan-500); - } - .bg-fuchsia-500 { - background-color: var(--color-fuchsia-500); - } .bg-muted { background-color: var(--color-muted); } @@ -625,37 +628,6 @@ .bg-sidebar-primary { background-color: var(--color-sidebar-primary); } - .bg-linear-to-bl { - --tw-gradient-position: to bottom left; - @supports (background-image: linear-gradient(in lab, red, red)) { - --tw-gradient-position: to bottom left in oklab; - } - background-image: linear-gradient(var(--tw-gradient-stops)); - } - .from-amber-500 { - --tw-gradient-from: var(--color-amber-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } - .from-cyan-500 { - --tw-gradient-from: var(--color-cyan-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } - .from-fuchsia-500 { - --tw-gradient-from: var(--color-fuchsia-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } - .to-amber-500 { - --tw-gradient-to: var(--color-amber-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } - .to-cyan-500 { - --tw-gradient-to: var(--color-cyan-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } - .to-fuchsia-500 { - --tw-gradient-to: var(--color-fuchsia-500); - --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); - } .object-cover { object-fit: cover; } @@ -2525,7 +2497,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - padding-block: calc(var(--spacing) * 6); + padding: calc(var(--spacing) * 6); font-size: var(--text-sm); line-height: var(--tw-leading, var(--text-sm--line-height)); } @@ -3461,48 +3433,6 @@ inherits: false; initial-value: solid; } -@property --tw-gradient-position { - syntax: "*"; - inherits: false; -} -@property --tw-gradient-from { - syntax: ""; - inherits: false; - initial-value: #0000; -} -@property --tw-gradient-via { - syntax: ""; - inherits: false; - initial-value: #0000; -} -@property --tw-gradient-to { - syntax: ""; - inherits: false; - initial-value: #0000; -} -@property --tw-gradient-stops { - syntax: "*"; - inherits: false; -} -@property --tw-gradient-via-stops { - syntax: "*"; - inherits: false; -} -@property --tw-gradient-from-position { - syntax: ""; - inherits: false; - initial-value: 0%; -} -@property --tw-gradient-via-position { - syntax: ""; - inherits: false; - initial-value: 50%; -} -@property --tw-gradient-to-position { - syntax: ""; - inherits: false; - initial-value: 100%; -} @property --tw-leading { syntax: "*"; inherits: false; @@ -3705,15 +3635,6 @@ --tw-space-y-reverse: 0; --tw-space-x-reverse: 0; --tw-border-style: solid; - --tw-gradient-position: initial; - --tw-gradient-from: #0000; - --tw-gradient-via: #0000; - --tw-gradient-to: #0000; - --tw-gradient-stops: initial; - --tw-gradient-via-stops: initial; - --tw-gradient-from-position: 0%; - --tw-gradient-via-position: 50%; - --tw-gradient-to-position: 100%; --tw-leading: initial; --tw-font-weight: initial; --tw-tracking: initial; diff --git a/dist/basecoat.tailwind.css b/dist/basecoat.tailwind.css index 8f927dd..30ab89a 100644 --- a/dist/basecoat.tailwind.css +++ b/dist/basecoat.tailwind.css @@ -521,7 +521,7 @@ @apply relative inline-flex; > [data-popover] { - @apply absolute bg-popover text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md z-50 w-max visible opacity-100 scale-100 min-w-full w-max transition-all; + @apply absolute bg-popover text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md z-50 visible opacity-100 scale-100 min-w-full w-max transition-all; &[aria-hidden='true'] { @apply invisible opacity-0 scale-95; @@ -620,7 +620,7 @@ /* Combobox */ [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before { - @apply flex items-center justify-center py-6 text-sm truncate; + @apply flex items-center justify-center p-6 text-sm truncate; } [role='listbox'][data-empty]:not(:has([data-value]:not([aria-hidden='true'])))::before { @apply content-[attr(data-empty)]; diff --git a/docs/_includes/components/dialog.njk b/docs/_includes/components/dialog.njk index bf34b64..7cdb5d0 100644 --- a/docs/_includes/components/dialog.njk +++ b/docs/_includes/components/dialog.njk @@ -65,7 +65,7 @@ $content: { ':inert'() { return !this.open }, '@click'(e) { e.target === this.$el && this.closeOnOverlayClick && this.hide() }, - '@keydown.escape.window'() { this.open && this.hide() }, + '@keydown.escape.prevent'() { this.open && this.hide() }, 'x-cloak': '' } })); @@ -123,7 +123,7 @@ {{ key }}="{{ value }}" {% endfor %} > - {{ caller() }} + {% if caller %}{{ caller() }}{% endif %} {% endif %} {% if footer %} diff --git a/docs/_includes/components/popover.njk b/docs/_includes/components/popover.njk index 44e2555..a0aaf5d 100644 --- a/docs/_includes/components/popover.njk +++ b/docs/_includes/components/popover.njk @@ -75,7 +75,7 @@ $content: { '@click'(e) { this.handleNavItemClick(e) }, - '@keydown.escape.window'() { this.handleEscape() }, + '@keydown.escape.prevent'() { this.handleEscape() }, '@keydown.down.prevent'() { this.nextNavItem() }, '@keydown.up.prevent'() { this.prevNavItem() }, '@keydown.home.prevent'() { this.focusNavItem(0) }, @@ -123,7 +123,7 @@ {{ key }}="{{ value }}" {% endfor %} > - {{ caller() }} + {% if caller %}{{ caller() }}{% endif %} {% endmacro %} diff --git a/docs/_includes/components/select.njk b/docs/_includes/components/select.njk index 08f4e36..a0ebb3a 100644 --- a/docs/_includes/components/select.njk +++ b/docs/_includes/components/select.njk @@ -118,7 +118,7 @@ $trigger: { '@click'() { this.open = !this.open; this.focusOnSelectedOption(); }, - '@keydown.escape.window'() { + '@keydown.escape.prevent'() { this.open = false; this.$refs.trigger.focus(); }, @@ -156,7 +156,7 @@ x-data="select('{{ name }}', '{{ selected }}')" @click.away="open = false" {% if id %}id="{{ id }}"{% endif %} - {% for key, value in trigger_attrs %} + {% for key, value in main_attrs %} {% if key != 'class' %}{{ key }}="{{ value }}"{% endif %} {% endfor %} > @@ -214,7 +214,7 @@ {{ key }}="{{ value }}" {% endfor %} > - {{ caller() }} + {% if caller %}{{ caller() }}{% endif %} {% if name %} diff --git a/docs/_includes/components/tabs.njk b/docs/_includes/components/tabs.njk index eb5a7e9..c9dcfa7 100644 --- a/docs/_includes/components/tabs.njk +++ b/docs/_includes/components/tabs.njk @@ -29,7 +29,7 @@ $menu: { '@click'(e) { this.handleMenuItemClick(e) }, - '@keydown.escape.window'() { this.handleEscape() }, + '@keydown.escape.prevent'() { this.handleEscape() }, '@keydown.down.prevent'() { this.nextItem() }, '@keydown.up.prevent'() { this.prevItem() }, '@keydown.home.prevent'() { this.focusItem(0) }, @@ -113,7 +113,7 @@ {{ key }}="{{ value }}" {% endfor %} > - {{ caller() }} + {% if caller %}{{ caller() }}{% endif %} {% endmacro %} diff --git a/docs/_includes/components/toast.njk b/docs/_includes/components/toast.njk index 455f0ec..8466ef2 100644 --- a/docs/_includes/components/toast.njk +++ b/docs/_includes/components/toast.njk @@ -44,7 +44,7 @@ $toast: { ['@mouseenter']() { this.$store.toaster.isPaused = true }, ['@mouseleave']() { this.$store.toaster.isPaused = false }, - ['@keydown.escape.window']() { this.close() }, + ['@keydown.escape.prevent']() { this.close() }, }, })); }); diff --git a/docs/_includes/partials/checkbox.njk b/docs/_includes/partials/checkbox.njk index 35e5210..9039d81 100644 --- a/docs/_includes/partials/checkbox.njk +++ b/docs/_includes/partials/checkbox.njk @@ -3,7 +3,7 @@

Checkbox

-
+
diff --git a/docs/_includes/partials/select.njk b/docs/_includes/partials/select.njk index 971b84c..ce3384a 100644 --- a/docs/_includes/partials/select.njk +++ b/docs/_includes/partials/select.njk @@ -2,55 +2,69 @@

Select

-
-
- +
+
+
+ + +
- {% call select( - selected="cyan" - ) %} - -
- Colors -
- - Fuchsia -
-
- - Cyan -
-
- - Amber +
+
+ {% call select(trigger_attrs={"class": "w-[180px]"}) %} +
+ Fruits +
Apple
+
Banana
+
Blueberry
+
+
+ Grapes +
Pineapple
+
+ {% endcall %} + + {% call select( + trigger_attrs={"class": "w-[180px]"}, + listbox_attrs={"class": "scrollbar overflow-y-auto max-h-64"} + ) %} + {% for i in range(0, 99) %} +
Item {{ i }}
+ {% endfor %} + {% endcall %} + + {% call select(trigger_attrs={"disabled": "disabled", "class": "w-[180px]"}) %} +
Disabled
+ {% endcall %} + + + {% call select(trigger_attrs={'class': 'w-[180px]'}) %} +
+ {% lucide "chart-bar", {"class": "text-muted-foreground"} %} + Bar +
+
+ {% lucide "chart-line", {"class": "text-muted-foreground"} %} + Line +
+
+ {% lucide "chart-pie", {"class": "text-muted-foreground"} %} + Pie +
+ {% endcall %}
-
- Gradients -
- - Amber to Cyan -
-
- - Cyan to Amber -
-
- - Amber to Fuchsia -
-
- {% endcall %} +
\ No newline at end of file