@nuxt/ui 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/avatar.ts +1 -1
- package/.nuxt/ui/card.ts +1 -1
- package/.nuxt/ui/carousel.ts +1 -1
- package/.nuxt/ui/checkbox-group.ts +1 -1
- package/.nuxt/ui/command-palette.ts +1 -0
- package/.nuxt/ui/context-menu.ts +2 -1
- package/.nuxt/ui/drawer.ts +1 -1
- package/.nuxt/ui/dropdown-menu.ts +2 -1
- package/.nuxt/ui/index.ts +2 -0
- package/.nuxt/ui/input-menu.ts +26 -12
- package/.nuxt/ui/input-tags.ts +310 -0
- package/.nuxt/ui/modal.ts +1 -1
- package/.nuxt/ui/navigation-menu.ts +43 -34
- package/.nuxt/ui/radio-group.ts +1 -1
- package/.nuxt/ui/select-menu.ts +13 -8
- package/.nuxt/ui/select.ts +13 -8
- package/.nuxt/ui/table.ts +3 -2
- package/.nuxt/ui/timeline.ts +321 -0
- package/.nuxt/ui/toaster.ts +1 -1
- package/.nuxt/ui/tooltip.ts +1 -1
- package/.nuxt/ui.css +4 -1
- package/cli/templates.mjs +7 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Alert.vue +0 -1
- package/dist/runtime/components/Avatar.vue +10 -2
- package/dist/runtime/components/Avatar.vue.d.ts +2 -0
- package/dist/runtime/components/Calendar.vue +4 -1
- package/dist/runtime/components/Carousel.vue +1 -2
- package/dist/runtime/components/Checkbox.vue +1 -1
- package/dist/runtime/components/CommandPalette.vue +80 -16
- package/dist/runtime/components/CommandPalette.vue.d.ts +32 -8
- package/dist/runtime/components/ContextMenuContent.vue +58 -56
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +4 -20
- package/dist/runtime/components/Drawer.vue +15 -1
- package/dist/runtime/components/DropdownMenuContent.vue +60 -58
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +4 -20
- package/dist/runtime/components/Form.vue +6 -6
- package/dist/runtime/components/Form.vue.d.ts +12 -11
- package/dist/runtime/components/Input.vue +1 -0
- package/dist/runtime/components/Input.vue.d.ts +7 -0
- package/dist/runtime/components/InputMenu.vue +3 -3
- package/dist/runtime/components/InputMenu.vue.d.ts +4 -4
- package/dist/runtime/components/InputNumber.vue +3 -2
- package/dist/runtime/components/InputNumber.vue.d.ts +1 -1
- package/dist/runtime/components/InputTags.vue +159 -0
- package/dist/runtime/components/InputTags.vue.d.ts +183 -0
- package/dist/runtime/components/Modal.vue +16 -15
- package/dist/runtime/components/Modal.vue.d.ts +17 -4
- package/dist/runtime/components/NavigationMenu.vue +85 -26
- package/dist/runtime/components/NavigationMenu.vue.d.ts +30 -17
- package/dist/runtime/components/OverlayProvider.vue +2 -2
- package/dist/runtime/components/Pagination.vue +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +0 -1
- package/dist/runtime/components/PinInput.vue +4 -3
- package/dist/runtime/components/PinInput.vue.d.ts +22 -19
- package/dist/runtime/components/Popover.vue +4 -0
- package/dist/runtime/components/Popover.vue.d.ts +1 -0
- package/dist/runtime/components/Progress.vue +2 -1
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.vue +2 -2
- package/dist/runtime/components/Select.vue +26 -7
- package/dist/runtime/components/Select.vue.d.ts +107 -1
- package/dist/runtime/components/SelectMenu.vue +27 -8
- package/dist/runtime/components/SelectMenu.vue.d.ts +105 -1
- package/dist/runtime/components/Slideover.vue +23 -15
- package/dist/runtime/components/Slideover.vue.d.ts +17 -4
- package/dist/runtime/components/Table.vue +7 -1
- package/dist/runtime/components/Table.vue.d.ts +10 -8
- package/dist/runtime/components/Tabs.vue +13 -2
- package/dist/runtime/components/Tabs.vue.d.ts +4 -1
- package/dist/runtime/components/Textarea.vue +4 -1
- package/dist/runtime/components/Textarea.vue.d.ts +11 -4
- package/dist/runtime/components/Timeline.vue +92 -0
- package/dist/runtime/components/Timeline.vue.d.ts +70 -0
- package/dist/runtime/components/Toast.vue +4 -5
- package/dist/runtime/components/Tree.vue +3 -2
- package/dist/runtime/components/Tree.vue.d.ts +1 -1
- package/dist/runtime/composables/defineLocale.d.ts +2 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.js +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +2 -1
- package/dist/runtime/composables/useOverlay.js +7 -6
- package/dist/runtime/locale/ar.js +2 -1
- package/dist/runtime/locale/az.js +2 -1
- package/dist/runtime/locale/bg.js +2 -1
- package/dist/runtime/locale/bn.js +2 -1
- package/dist/runtime/locale/ca.js +2 -1
- package/dist/runtime/locale/ckb.js +2 -1
- package/dist/runtime/locale/cs.js +2 -1
- package/dist/runtime/locale/da.js +2 -1
- package/dist/runtime/locale/de.js +2 -1
- package/dist/runtime/locale/el.js +2 -1
- package/dist/runtime/locale/en.js +2 -1
- package/dist/runtime/locale/es.js +2 -1
- package/dist/runtime/locale/et.js +2 -1
- package/dist/runtime/locale/fa_ir.js +2 -1
- package/dist/runtime/locale/fi.js +2 -1
- package/dist/runtime/locale/fr.js +2 -1
- package/dist/runtime/locale/he.js +2 -1
- package/dist/runtime/locale/hi.js +2 -1
- package/dist/runtime/locale/hu.js +2 -1
- package/dist/runtime/locale/hy.js +2 -1
- package/dist/runtime/locale/id.js +2 -1
- package/dist/runtime/locale/index.d.ts +7 -2
- package/dist/runtime/locale/index.js +7 -2
- package/dist/runtime/locale/it.js +2 -1
- package/dist/runtime/locale/ja.js +2 -1
- package/dist/runtime/locale/kk.js +2 -1
- package/dist/runtime/locale/km.js +2 -1
- package/dist/runtime/locale/ko.js +2 -1
- package/dist/runtime/locale/ky.d.ts +3 -0
- package/dist/runtime/locale/ky.js +55 -0
- package/dist/runtime/locale/lb.d.ts +3 -0
- package/dist/runtime/locale/lb.js +55 -0
- package/dist/runtime/locale/lt.d.ts +3 -0
- package/dist/runtime/locale/lt.js +55 -0
- package/dist/runtime/locale/mn.d.ts +3 -0
- package/dist/runtime/locale/mn.js +55 -0
- package/dist/runtime/locale/ms.d.ts +3 -0
- package/dist/runtime/locale/ms.js +55 -0
- package/dist/runtime/locale/nb_no.js +2 -1
- package/dist/runtime/locale/nl.js +2 -1
- package/dist/runtime/locale/pl.js +2 -1
- package/dist/runtime/locale/pt.js +2 -1
- package/dist/runtime/locale/pt_br.js +2 -1
- package/dist/runtime/locale/ro.js +2 -1
- package/dist/runtime/locale/ru.js +2 -1
- package/dist/runtime/locale/sk.js +2 -1
- package/dist/runtime/locale/sl.js +2 -1
- package/dist/runtime/locale/sv.js +2 -1
- package/dist/runtime/locale/th.js +2 -1
- package/dist/runtime/locale/tj.js +2 -1
- package/dist/runtime/locale/tr.js +2 -1
- package/dist/runtime/locale/ug_cn.js +2 -1
- package/dist/runtime/locale/uk.js +2 -1
- package/dist/runtime/locale/ur.js +2 -1
- package/dist/runtime/locale/uz.js +2 -1
- package/dist/runtime/locale/vi.js +2 -1
- package/dist/runtime/locale/zh_cn.js +2 -1
- package/dist/runtime/locale/zh_tw.js +2 -1
- package/dist/runtime/types/form.d.ts +11 -10
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/locale.d.ts +1 -0
- package/dist/runtime/types/utils.d.ts +3 -0
- package/dist/shared/{ui.BvUP-pSb.mjs → ui.BPVxSPGY.mjs} +332 -62
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +35 -36
|
@@ -21,7 +21,7 @@ const icons = {
|
|
|
21
21
|
external: "i-lucide-arrow-up-right",
|
|
22
22
|
folder: "i-lucide-folder",
|
|
23
23
|
folderOpen: "i-lucide-folder-open",
|
|
24
|
-
loading: "i-lucide-
|
|
24
|
+
loading: "i-lucide-loader-circle",
|
|
25
25
|
minus: "i-lucide-minus",
|
|
26
26
|
plus: "i-lucide-plus",
|
|
27
27
|
search: "i-lucide-search"
|
|
@@ -169,7 +169,7 @@ const alert = (options) => ({
|
|
|
169
169
|
|
|
170
170
|
const avatar = {
|
|
171
171
|
slots: {
|
|
172
|
-
root: "inline-flex items-center justify-center shrink-0 select-none
|
|
172
|
+
root: "inline-flex items-center justify-center shrink-0 select-none rounded-full align-middle bg-elevated",
|
|
173
173
|
image: "h-full w-full rounded-[inherit] object-cover",
|
|
174
174
|
fallback: "font-medium leading-none text-muted truncate",
|
|
175
175
|
icon: "text-muted shrink-0"
|
|
@@ -680,7 +680,7 @@ const calendar = (options) => ({
|
|
|
680
680
|
|
|
681
681
|
const card = {
|
|
682
682
|
slots: {
|
|
683
|
-
root: "rounded-lg",
|
|
683
|
+
root: "rounded-lg overflow-hidden",
|
|
684
684
|
header: "p-4 sm:px-6",
|
|
685
685
|
body: "p-4 sm:p-6",
|
|
686
686
|
footer: "p-4 sm:px-6"
|
|
@@ -736,7 +736,7 @@ const carousel = (options) => ({
|
|
|
736
736
|
},
|
|
737
737
|
active: {
|
|
738
738
|
true: {
|
|
739
|
-
dot: "bg-inverted"
|
|
739
|
+
dot: "data-[state=active]:bg-inverted"
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
742
|
}
|
|
@@ -930,7 +930,7 @@ const checkboxGroup = (options) => ({
|
|
|
930
930
|
orientation: "horizontal",
|
|
931
931
|
variant: "table",
|
|
932
932
|
class: {
|
|
933
|
-
item: "first-of-type:rounded-
|
|
933
|
+
item: "first-of-type:rounded-s-lg last-of-type:rounded-e-lg",
|
|
934
934
|
fieldset: "gap-0 -space-x-px"
|
|
935
935
|
}
|
|
936
936
|
},
|
|
@@ -1081,6 +1081,7 @@ const commandPalette = (options) => ({
|
|
|
1081
1081
|
root: "flex flex-col min-h-0 min-w-0 divide-y divide-default",
|
|
1082
1082
|
input: "[&>input]:h-12",
|
|
1083
1083
|
close: "",
|
|
1084
|
+
back: "p-0",
|
|
1084
1085
|
content: "relative overflow-hidden flex flex-col",
|
|
1085
1086
|
viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
|
|
1086
1087
|
group: "p-1 isolate",
|
|
@@ -1127,7 +1128,8 @@ const container = {
|
|
|
1127
1128
|
|
|
1128
1129
|
const contextMenu = (options) => ({
|
|
1129
1130
|
slots: {
|
|
1130
|
-
content: "min-w-32 bg-default shadow-lg rounded-md ring ring-default
|
|
1131
|
+
content: "min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",
|
|
1132
|
+
viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
1131
1133
|
group: "p-1 isolate",
|
|
1132
1134
|
label: "w-full flex items-center font-semibold text-highlighted",
|
|
1133
1135
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
@@ -1263,7 +1265,7 @@ const drawer = (options) => ({
|
|
|
1263
1265
|
},
|
|
1264
1266
|
inset: {
|
|
1265
1267
|
true: {
|
|
1266
|
-
content: "rounded-lg after:hidden"
|
|
1268
|
+
content: "rounded-lg after:hidden overflow-hidden"
|
|
1267
1269
|
}
|
|
1268
1270
|
}
|
|
1269
1271
|
},
|
|
@@ -1332,7 +1334,8 @@ const drawer = (options) => ({
|
|
|
1332
1334
|
|
|
1333
1335
|
const dropdownMenu = (options) => ({
|
|
1334
1336
|
slots: {
|
|
1335
|
-
content: "min-w-32 bg-default shadow-lg rounded-md ring ring-default
|
|
1337
|
+
content: "min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",
|
|
1338
|
+
viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
1336
1339
|
arrow: "fill-default",
|
|
1337
1340
|
group: "p-1 isolate",
|
|
1338
1341
|
label: "w-full flex items-center font-semibold text-highlighted",
|
|
@@ -1636,10 +1639,10 @@ const inputMenu = (options) => {
|
|
|
1636
1639
|
base: () => ["rounded-md", options.theme.transitions && "transition-colors"],
|
|
1637
1640
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1638
1641
|
arrow: "fill-default",
|
|
1639
|
-
content: "max-h-60 w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto",
|
|
1640
|
-
viewport: "divide-y divide-default scroll-py-1",
|
|
1642
|
+
content: "max-h-60 w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",
|
|
1643
|
+
viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
1641
1644
|
group: "p-1 isolate",
|
|
1642
|
-
empty: "
|
|
1645
|
+
empty: "text-center text-muted",
|
|
1643
1646
|
label: "font-semibold text-highlighted",
|
|
1644
1647
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
1645
1648
|
item: ["group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
@@ -1654,14 +1657,13 @@ const inputMenu = (options) => {
|
|
|
1654
1657
|
tagsItem: "px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1655
1658
|
tagsItemText: "truncate",
|
|
1656
1659
|
tagsItemDelete: ["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
|
|
1657
|
-
tagsItemDeleteIcon: "",
|
|
1658
|
-
tagsInput: ""
|
|
1660
|
+
tagsItemDeleteIcon: "shrink-0",
|
|
1661
|
+
tagsInput: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1659
1662
|
},
|
|
1660
1663
|
variants: {
|
|
1661
1664
|
multiple: {
|
|
1662
1665
|
true: {
|
|
1663
|
-
root: "flex-wrap"
|
|
1664
|
-
tagsInput: "border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1666
|
+
root: "flex-wrap"
|
|
1665
1667
|
},
|
|
1666
1668
|
false: {
|
|
1667
1669
|
base: "w-full border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
@@ -1677,7 +1679,8 @@ const inputMenu = (options) => {
|
|
|
1677
1679
|
itemLeadingChipSize: "sm",
|
|
1678
1680
|
itemTrailingIcon: "size-4",
|
|
1679
1681
|
tagsItem: "text-[10px]/3",
|
|
1680
|
-
tagsItemDeleteIcon: "size-3"
|
|
1682
|
+
tagsItemDeleteIcon: "size-3",
|
|
1683
|
+
empty: "p-1 text-xs"
|
|
1681
1684
|
},
|
|
1682
1685
|
sm: {
|
|
1683
1686
|
label: "p-1.5 text-[10px]/3 gap-1.5",
|
|
@@ -1688,7 +1691,8 @@ const inputMenu = (options) => {
|
|
|
1688
1691
|
itemLeadingChipSize: "sm",
|
|
1689
1692
|
itemTrailingIcon: "size-4",
|
|
1690
1693
|
tagsItem: "text-[10px]/3",
|
|
1691
|
-
tagsItemDeleteIcon: "size-3"
|
|
1694
|
+
tagsItemDeleteIcon: "size-3",
|
|
1695
|
+
empty: "p-1.5 text-xs"
|
|
1692
1696
|
},
|
|
1693
1697
|
md: {
|
|
1694
1698
|
label: "p-1.5 text-xs gap-1.5",
|
|
@@ -1699,7 +1703,8 @@ const inputMenu = (options) => {
|
|
|
1699
1703
|
itemLeadingChipSize: "md",
|
|
1700
1704
|
itemTrailingIcon: "size-5",
|
|
1701
1705
|
tagsItem: "text-xs",
|
|
1702
|
-
tagsItemDeleteIcon: "size-3.5"
|
|
1706
|
+
tagsItemDeleteIcon: "size-3.5",
|
|
1707
|
+
empty: "p-1.5 text-sm"
|
|
1703
1708
|
},
|
|
1704
1709
|
lg: {
|
|
1705
1710
|
label: "p-2 text-xs gap-2",
|
|
@@ -1710,7 +1715,8 @@ const inputMenu = (options) => {
|
|
|
1710
1715
|
itemLeadingChipSize: "md",
|
|
1711
1716
|
itemTrailingIcon: "size-5",
|
|
1712
1717
|
tagsItem: "text-xs",
|
|
1713
|
-
tagsItemDeleteIcon: "size-3.5"
|
|
1718
|
+
tagsItemDeleteIcon: "size-3.5",
|
|
1719
|
+
empty: "p-2 text-sm"
|
|
1714
1720
|
},
|
|
1715
1721
|
xl: {
|
|
1716
1722
|
label: "p-2 text-sm gap-2",
|
|
@@ -1721,11 +1727,20 @@ const inputMenu = (options) => {
|
|
|
1721
1727
|
itemLeadingChipSize: "lg",
|
|
1722
1728
|
itemTrailingIcon: "size-6",
|
|
1723
1729
|
tagsItem: "text-sm",
|
|
1724
|
-
tagsItemDeleteIcon: "size-4"
|
|
1730
|
+
tagsItemDeleteIcon: "size-4",
|
|
1731
|
+
empty: "p-2 text-base"
|
|
1725
1732
|
}
|
|
1726
1733
|
}
|
|
1727
1734
|
},
|
|
1728
|
-
compoundVariants: [
|
|
1735
|
+
compoundVariants: [{
|
|
1736
|
+
variant: "soft",
|
|
1737
|
+
multiple: true,
|
|
1738
|
+
class: "has-focus:bg-elevated"
|
|
1739
|
+
}, {
|
|
1740
|
+
variant: "ghost",
|
|
1741
|
+
multiple: true,
|
|
1742
|
+
class: "has-focus:bg-elevated"
|
|
1743
|
+
}, ...(options.theme.colors || []).map((color) => ({
|
|
1729
1744
|
color,
|
|
1730
1745
|
multiple: true,
|
|
1731
1746
|
variant: ["outline", "subtle"],
|
|
@@ -1850,6 +1865,54 @@ const inputNumber = (options) => {
|
|
|
1850
1865
|
};
|
|
1851
1866
|
};
|
|
1852
1867
|
|
|
1868
|
+
const inputTags = (options) => {
|
|
1869
|
+
return defuFn({
|
|
1870
|
+
slots: {
|
|
1871
|
+
root: (prev) => [prev, "flex-wrap"],
|
|
1872
|
+
base: () => ["rounded-md", options.theme.transitions && "transition-colors"],
|
|
1873
|
+
item: 'px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75 wrap-anywhere data-[state="active"]:bg-accented',
|
|
1874
|
+
itemText: "",
|
|
1875
|
+
itemDelete: ["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
|
|
1876
|
+
itemDeleteIcon: "shrink-0",
|
|
1877
|
+
input: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1878
|
+
},
|
|
1879
|
+
variants: {
|
|
1880
|
+
size: {
|
|
1881
|
+
xs: {
|
|
1882
|
+
item: "text-[10px]/3",
|
|
1883
|
+
itemDeleteIcon: "size-3"
|
|
1884
|
+
},
|
|
1885
|
+
sm: {
|
|
1886
|
+
item: "text-[10px]/3",
|
|
1887
|
+
itemDeleteIcon: "size-3"
|
|
1888
|
+
},
|
|
1889
|
+
md: {
|
|
1890
|
+
item: "text-xs",
|
|
1891
|
+
itemDeleteIcon: "size-3.5"
|
|
1892
|
+
},
|
|
1893
|
+
lg: {
|
|
1894
|
+
item: "text-xs",
|
|
1895
|
+
itemDeleteIcon: "size-3.5"
|
|
1896
|
+
},
|
|
1897
|
+
xl: {
|
|
1898
|
+
item: "text-sm",
|
|
1899
|
+
itemDeleteIcon: "size-4"
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
variant: (prev) => Object.fromEntries(
|
|
1903
|
+
Object.entries(prev).map(([key, value]) => [key, replaceFocus(value)])
|
|
1904
|
+
)
|
|
1905
|
+
},
|
|
1906
|
+
compoundVariants: (prev) => prev.map((item) => ({
|
|
1907
|
+
...item,
|
|
1908
|
+
class: typeof item.class === "string" ? replaceFocus(item.class) : item.class
|
|
1909
|
+
}))
|
|
1910
|
+
}, input(options));
|
|
1911
|
+
};
|
|
1912
|
+
function replaceFocus(str) {
|
|
1913
|
+
return str.replace(/focus:/g, "has-focus:").replace(/focus-visible:/g, "has-focus-visible:");
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1853
1916
|
const kbd = {
|
|
1854
1917
|
base: "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",
|
|
1855
1918
|
variants: {
|
|
@@ -1912,7 +1975,7 @@ const modal = {
|
|
|
1912
1975
|
content: "inset-0"
|
|
1913
1976
|
},
|
|
1914
1977
|
false: {
|
|
1915
|
-
content: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] rounded-lg shadow-lg ring ring-default"
|
|
1978
|
+
content: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] rounded-lg shadow-lg ring ring-default overflow-hidden"
|
|
1916
1979
|
}
|
|
1917
1980
|
}
|
|
1918
1981
|
}
|
|
@@ -1928,24 +1991,25 @@ const navigationMenu = (options) => ({
|
|
|
1928
1991
|
linkLeadingIcon: "shrink-0 size-5",
|
|
1929
1992
|
linkLeadingAvatar: "shrink-0",
|
|
1930
1993
|
linkLeadingAvatarSize: "2xs",
|
|
1931
|
-
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1994
|
+
linkTrailing: "group ms-auto inline-flex gap-1.5 items-center",
|
|
1932
1995
|
linkTrailingBadge: "shrink-0",
|
|
1933
1996
|
linkTrailingBadgeSize: "sm",
|
|
1934
1997
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1935
1998
|
linkLabel: "truncate",
|
|
1936
1999
|
linkLabelExternalIcon: "inline-block size-3 align-top text-dimmed",
|
|
1937
|
-
childList: "",
|
|
2000
|
+
childList: "isolate",
|
|
2001
|
+
childLabel: "text-xs text-highlighted",
|
|
1938
2002
|
childItem: "",
|
|
1939
|
-
childLink: "group size-full
|
|
1940
|
-
childLinkWrapper: "
|
|
2003
|
+
childLink: "group relative size-full flex items-start text-start text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
2004
|
+
childLinkWrapper: "min-w-0",
|
|
1941
2005
|
childLinkIcon: "size-5 shrink-0",
|
|
1942
|
-
childLinkLabel: "
|
|
2006
|
+
childLinkLabel: "truncate",
|
|
1943
2007
|
childLinkLabelExternalIcon: "inline-block size-3 align-top text-dimmed",
|
|
1944
|
-
childLinkDescription: "text-
|
|
2008
|
+
childLinkDescription: "text-muted",
|
|
1945
2009
|
separator: "px-2 h-px bg-border",
|
|
1946
2010
|
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
1947
2011
|
viewport: "relative overflow-hidden bg-default shadow-lg rounded-md ring ring-default h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] z-[1]",
|
|
1948
|
-
content: "
|
|
2012
|
+
content: "",
|
|
1949
2013
|
indicator: "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[2] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
|
|
1950
2014
|
arrow: "relative top-[50%] size-2.5 rotate-45 border border-default bg-default z-[1] rounded-xs"
|
|
1951
2015
|
},
|
|
@@ -1953,11 +2017,11 @@ const navigationMenu = (options) => ({
|
|
|
1953
2017
|
color: {
|
|
1954
2018
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1955
2019
|
link: `focus-visible:before:ring-${color}`,
|
|
1956
|
-
childLink: `focus-visible:
|
|
2020
|
+
childLink: `focus-visible:before:ring-${color}`
|
|
1957
2021
|
}])),
|
|
1958
2022
|
neutral: {
|
|
1959
2023
|
link: "focus-visible:before:ring-inverted",
|
|
1960
|
-
childLink: "focus-visible:
|
|
2024
|
+
childLink: "focus-visible:before:ring-inverted"
|
|
1961
2025
|
}
|
|
1962
2026
|
},
|
|
1963
2027
|
highlightColor: {
|
|
@@ -1974,11 +2038,16 @@ const navigationMenu = (options) => ({
|
|
|
1974
2038
|
list: "flex items-center",
|
|
1975
2039
|
item: "py-2",
|
|
1976
2040
|
link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
1977
|
-
childList: "grid p-2"
|
|
2041
|
+
childList: "grid p-2",
|
|
2042
|
+
childLink: "px-3 py-2 gap-2 before:inset-x-px before:inset-y-0",
|
|
2043
|
+
childLinkLabel: "font-medium",
|
|
2044
|
+
content: "absolute top-0 left-0 w-full max-h-[70vh] overflow-y-auto"
|
|
1978
2045
|
},
|
|
1979
2046
|
vertical: {
|
|
1980
2047
|
root: "flex-col",
|
|
1981
|
-
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
2048
|
+
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
|
|
2049
|
+
childLabel: "px-1.5 py-0.5",
|
|
2050
|
+
childLink: "p-1.5 gap-1.5 before:inset-y-px before:inset-x-0"
|
|
1982
2051
|
}
|
|
1983
2052
|
},
|
|
1984
2053
|
contentOrientation: {
|
|
@@ -1992,13 +2061,13 @@ const navigationMenu = (options) => ({
|
|
|
1992
2061
|
},
|
|
1993
2062
|
active: {
|
|
1994
2063
|
true: {
|
|
1995
|
-
childLink: "bg-elevated text-highlighted",
|
|
2064
|
+
childLink: "before:bg-elevated text-highlighted",
|
|
1996
2065
|
childLinkIcon: "text-default"
|
|
1997
2066
|
},
|
|
1998
2067
|
false: {
|
|
1999
2068
|
link: "text-muted",
|
|
2000
2069
|
linkLeadingIcon: "text-dimmed",
|
|
2001
|
-
childLink: ["hover:bg-elevated/50 text-default hover:text-highlighted", options.theme.transitions && "transition-colors"],
|
|
2070
|
+
childLink: ["hover:before:bg-elevated/50 text-default hover:text-highlighted", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
2002
2071
|
childLinkIcon: ["text-dimmed group-hover:text-default", options.theme.transitions && "transition-colors"]
|
|
2003
2072
|
}
|
|
2004
2073
|
},
|
|
@@ -2030,6 +2099,21 @@ const navigationMenu = (options) => ({
|
|
|
2030
2099
|
childList: "gap-1",
|
|
2031
2100
|
content: "w-60"
|
|
2032
2101
|
}
|
|
2102
|
+
}, {
|
|
2103
|
+
orientation: "vertical",
|
|
2104
|
+
collapsed: false,
|
|
2105
|
+
class: {
|
|
2106
|
+
childList: "ms-5 border-s border-default",
|
|
2107
|
+
childItem: "ps-1.5 -ms-px",
|
|
2108
|
+
content: "data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"
|
|
2109
|
+
}
|
|
2110
|
+
}, {
|
|
2111
|
+
orientation: "vertical",
|
|
2112
|
+
collapsed: true,
|
|
2113
|
+
class: {
|
|
2114
|
+
link: "px-1.5",
|
|
2115
|
+
content: "shadow-sm rounded-sm min-h-6 p-1"
|
|
2116
|
+
}
|
|
2033
2117
|
}, {
|
|
2034
2118
|
orientation: "horizontal",
|
|
2035
2119
|
highlight: true,
|
|
@@ -2104,6 +2188,7 @@ const navigationMenu = (options) => ({
|
|
|
2104
2188
|
variant: "pill",
|
|
2105
2189
|
active: true,
|
|
2106
2190
|
highlight: true,
|
|
2191
|
+
disabled: false,
|
|
2107
2192
|
class: {
|
|
2108
2193
|
link: ["hover:before:bg-elevated/50", options.theme.transitions && "before:transition-colors"]
|
|
2109
2194
|
}
|
|
@@ -2156,19 +2241,6 @@ const navigationMenu = (options) => ({
|
|
|
2156
2241
|
class: {
|
|
2157
2242
|
link: "after:bg-inverted"
|
|
2158
2243
|
}
|
|
2159
|
-
}, {
|
|
2160
|
-
orientation: "vertical",
|
|
2161
|
-
collapsed: false,
|
|
2162
|
-
class: {
|
|
2163
|
-
childList: "ms-5 border-s border-default",
|
|
2164
|
-
childItem: "ps-1.5 -ms-px"
|
|
2165
|
-
}
|
|
2166
|
-
}, {
|
|
2167
|
-
orientation: "vertical",
|
|
2168
|
-
collapsed: true,
|
|
2169
|
-
class: {
|
|
2170
|
-
link: "px-1.5"
|
|
2171
|
-
}
|
|
2172
2244
|
}],
|
|
2173
2245
|
defaultVariants: {
|
|
2174
2246
|
color: "primary",
|
|
@@ -2595,7 +2667,7 @@ const radioGroup = (options) => ({
|
|
|
2595
2667
|
orientation: "horizontal",
|
|
2596
2668
|
variant: "table",
|
|
2597
2669
|
class: {
|
|
2598
|
-
item: "first-of-type:rounded-
|
|
2670
|
+
item: "first-of-type:rounded-s-lg last-of-type:rounded-e-lg",
|
|
2599
2671
|
fieldset: "gap-0 -space-x-px"
|
|
2600
2672
|
}
|
|
2601
2673
|
},
|
|
@@ -2660,10 +2732,10 @@ const select = (options) => {
|
|
|
2660
2732
|
value: "truncate pointer-events-none",
|
|
2661
2733
|
placeholder: "truncate text-dimmed",
|
|
2662
2734
|
arrow: "fill-default",
|
|
2663
|
-
content: "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto",
|
|
2664
|
-
viewport: "divide-y divide-default scroll-py-1",
|
|
2735
|
+
content: "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
|
|
2736
|
+
viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
2665
2737
|
group: "p-1 isolate",
|
|
2666
|
-
empty: "
|
|
2738
|
+
empty: "text-center text-muted",
|
|
2667
2739
|
label: "font-semibold text-highlighted",
|
|
2668
2740
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
2669
2741
|
item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
@@ -2686,7 +2758,8 @@ const select = (options) => {
|
|
|
2686
2758
|
itemLeadingAvatarSize: "3xs",
|
|
2687
2759
|
itemLeadingChip: "size-4",
|
|
2688
2760
|
itemLeadingChipSize: "sm",
|
|
2689
|
-
itemTrailingIcon: "size-4"
|
|
2761
|
+
itemTrailingIcon: "size-4",
|
|
2762
|
+
empty: "p-1 text-xs"
|
|
2690
2763
|
},
|
|
2691
2764
|
sm: {
|
|
2692
2765
|
label: "p-1.5 text-[10px]/3 gap-1.5",
|
|
@@ -2695,7 +2768,8 @@ const select = (options) => {
|
|
|
2695
2768
|
itemLeadingAvatarSize: "3xs",
|
|
2696
2769
|
itemLeadingChip: "size-4",
|
|
2697
2770
|
itemLeadingChipSize: "sm",
|
|
2698
|
-
itemTrailingIcon: "size-4"
|
|
2771
|
+
itemTrailingIcon: "size-4",
|
|
2772
|
+
empty: "p-1.5 text-xs"
|
|
2699
2773
|
},
|
|
2700
2774
|
md: {
|
|
2701
2775
|
label: "p-1.5 text-xs gap-1.5",
|
|
@@ -2704,7 +2778,8 @@ const select = (options) => {
|
|
|
2704
2778
|
itemLeadingAvatarSize: "2xs",
|
|
2705
2779
|
itemLeadingChip: "size-5",
|
|
2706
2780
|
itemLeadingChipSize: "md",
|
|
2707
|
-
itemTrailingIcon: "size-5"
|
|
2781
|
+
itemTrailingIcon: "size-5",
|
|
2782
|
+
empty: "p-1.5 text-sm"
|
|
2708
2783
|
},
|
|
2709
2784
|
lg: {
|
|
2710
2785
|
label: "p-2 text-xs gap-2",
|
|
@@ -2713,7 +2788,8 @@ const select = (options) => {
|
|
|
2713
2788
|
itemLeadingAvatarSize: "2xs",
|
|
2714
2789
|
itemLeadingChip: "size-5",
|
|
2715
2790
|
itemLeadingChipSize: "md",
|
|
2716
|
-
itemTrailingIcon: "size-5"
|
|
2791
|
+
itemTrailingIcon: "size-5",
|
|
2792
|
+
empty: "p-2 text-sm"
|
|
2717
2793
|
},
|
|
2718
2794
|
xl: {
|
|
2719
2795
|
label: "p-2 text-sm gap-2",
|
|
@@ -2722,7 +2798,8 @@ const select = (options) => {
|
|
|
2722
2798
|
itemLeadingAvatarSize: "xs",
|
|
2723
2799
|
itemLeadingChip: "size-6",
|
|
2724
2800
|
itemLeadingChipSize: "lg",
|
|
2725
|
-
itemTrailingIcon: "size-6"
|
|
2801
|
+
itemTrailingIcon: "size-6",
|
|
2802
|
+
empty: "p-2 text-base"
|
|
2726
2803
|
}
|
|
2727
2804
|
}
|
|
2728
2805
|
}
|
|
@@ -3232,11 +3309,12 @@ const table = (options) => ({
|
|
|
3232
3309
|
root: "relative overflow-auto",
|
|
3233
3310
|
base: "min-w-full overflow-clip",
|
|
3234
3311
|
caption: "sr-only",
|
|
3235
|
-
thead: "relative
|
|
3312
|
+
thead: "relative",
|
|
3236
3313
|
tbody: "divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
|
|
3237
3314
|
tr: "data-[selected=true]:bg-elevated/50",
|
|
3238
3315
|
th: "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
3239
3316
|
td: "p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",
|
|
3317
|
+
separator: "absolute z-[1] left-0 w-full h-px bg-(--ui-border-accented)",
|
|
3240
3318
|
empty: "py-6 text-center text-sm text-muted",
|
|
3241
3319
|
loading: "py-6 text-center"
|
|
3242
3320
|
},
|
|
@@ -3254,7 +3332,7 @@ const table = (options) => ({
|
|
|
3254
3332
|
},
|
|
3255
3333
|
loading: {
|
|
3256
3334
|
true: {
|
|
3257
|
-
thead: "after:absolute after:
|
|
3335
|
+
thead: "after:absolute after:z-[1] after:h-px"
|
|
3258
3336
|
}
|
|
3259
3337
|
},
|
|
3260
3338
|
loadingAnimation: {
|
|
@@ -3481,6 +3559,193 @@ const textarea = (options) => {
|
|
|
3481
3559
|
}, input(options));
|
|
3482
3560
|
};
|
|
3483
3561
|
|
|
3562
|
+
const timeline = (options) => ({
|
|
3563
|
+
slots: {
|
|
3564
|
+
root: "flex gap-1.5",
|
|
3565
|
+
item: "group relative flex flex-1 gap-3",
|
|
3566
|
+
container: "relative flex items-center gap-1.5",
|
|
3567
|
+
indicator: "group-data-[state=completed]:text-inverted group-data-[state=active]:text-inverted text-muted",
|
|
3568
|
+
separator: "flex-1 rounded-full bg-elevated",
|
|
3569
|
+
wrapper: "w-full",
|
|
3570
|
+
date: "text-dimmed text-xs/5",
|
|
3571
|
+
title: "font-medium text-highlighted text-sm",
|
|
3572
|
+
description: "text-muted text-wrap text-sm"
|
|
3573
|
+
},
|
|
3574
|
+
variants: {
|
|
3575
|
+
orientation: {
|
|
3576
|
+
horizontal: {
|
|
3577
|
+
root: "flex-row w-full",
|
|
3578
|
+
item: "flex-col",
|
|
3579
|
+
separator: "h-0.5"
|
|
3580
|
+
},
|
|
3581
|
+
vertical: {
|
|
3582
|
+
root: "flex-col",
|
|
3583
|
+
container: "flex-col",
|
|
3584
|
+
separator: "w-0.5"
|
|
3585
|
+
}
|
|
3586
|
+
},
|
|
3587
|
+
color: {
|
|
3588
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
3589
|
+
indicator: `group-data-[state=completed]:bg-${color} group-data-[state=active]:bg-${color}`
|
|
3590
|
+
}])),
|
|
3591
|
+
neutral: {
|
|
3592
|
+
indicator: "group-data-[state=completed]:bg-inverted group-data-[state=active]:bg-inverted"
|
|
3593
|
+
}
|
|
3594
|
+
},
|
|
3595
|
+
size: {
|
|
3596
|
+
"3xs": "",
|
|
3597
|
+
"2xs": "",
|
|
3598
|
+
"xs": "",
|
|
3599
|
+
"sm": "",
|
|
3600
|
+
"md": "",
|
|
3601
|
+
"lg": "",
|
|
3602
|
+
"xl": "",
|
|
3603
|
+
"2xl": "",
|
|
3604
|
+
"3xl": ""
|
|
3605
|
+
},
|
|
3606
|
+
reverse: {
|
|
3607
|
+
true: ""
|
|
3608
|
+
}
|
|
3609
|
+
},
|
|
3610
|
+
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
3611
|
+
color,
|
|
3612
|
+
reverse: false,
|
|
3613
|
+
class: {
|
|
3614
|
+
separator: `group-data-[state=completed]:bg-${color}`
|
|
3615
|
+
}
|
|
3616
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
3617
|
+
color,
|
|
3618
|
+
reverse: true,
|
|
3619
|
+
class: {
|
|
3620
|
+
separator: `group-data-[state=active]:bg-${color} group-data-[state=completed]:bg-${color}`
|
|
3621
|
+
}
|
|
3622
|
+
})), {
|
|
3623
|
+
color: "neutral",
|
|
3624
|
+
reverse: false,
|
|
3625
|
+
class: {
|
|
3626
|
+
separator: "group-data-[state=completed]:bg-inverted"
|
|
3627
|
+
}
|
|
3628
|
+
}, {
|
|
3629
|
+
color: "neutral",
|
|
3630
|
+
reverse: true,
|
|
3631
|
+
class: {
|
|
3632
|
+
separator: "group-data-[state=active]:bg-inverted group-data-[state=completed]:bg-inverted"
|
|
3633
|
+
}
|
|
3634
|
+
}, {
|
|
3635
|
+
orientation: "horizontal",
|
|
3636
|
+
size: "3xs",
|
|
3637
|
+
class: {
|
|
3638
|
+
wrapper: "pe-4.5"
|
|
3639
|
+
}
|
|
3640
|
+
}, {
|
|
3641
|
+
orientation: "horizontal",
|
|
3642
|
+
size: "2xs",
|
|
3643
|
+
class: {
|
|
3644
|
+
wrapper: "pe-5"
|
|
3645
|
+
}
|
|
3646
|
+
}, {
|
|
3647
|
+
orientation: "horizontal",
|
|
3648
|
+
size: "xs",
|
|
3649
|
+
class: {
|
|
3650
|
+
wrapper: "pe-5.5"
|
|
3651
|
+
}
|
|
3652
|
+
}, {
|
|
3653
|
+
orientation: "horizontal",
|
|
3654
|
+
size: "sm",
|
|
3655
|
+
class: {
|
|
3656
|
+
wrapper: "pe-6"
|
|
3657
|
+
}
|
|
3658
|
+
}, {
|
|
3659
|
+
orientation: "horizontal",
|
|
3660
|
+
size: "md",
|
|
3661
|
+
class: {
|
|
3662
|
+
wrapper: "pe-6.5"
|
|
3663
|
+
}
|
|
3664
|
+
}, {
|
|
3665
|
+
orientation: "horizontal",
|
|
3666
|
+
size: "lg",
|
|
3667
|
+
class: {
|
|
3668
|
+
wrapper: "pe-7"
|
|
3669
|
+
}
|
|
3670
|
+
}, {
|
|
3671
|
+
orientation: "horizontal",
|
|
3672
|
+
size: "xl",
|
|
3673
|
+
class: {
|
|
3674
|
+
wrapper: "pe-7.5"
|
|
3675
|
+
}
|
|
3676
|
+
}, {
|
|
3677
|
+
orientation: "horizontal",
|
|
3678
|
+
size: "2xl",
|
|
3679
|
+
class: {
|
|
3680
|
+
wrapper: "pe-8"
|
|
3681
|
+
}
|
|
3682
|
+
}, {
|
|
3683
|
+
orientation: "horizontal",
|
|
3684
|
+
size: "3xl",
|
|
3685
|
+
class: {
|
|
3686
|
+
wrapper: "pe-8.5"
|
|
3687
|
+
}
|
|
3688
|
+
}, {
|
|
3689
|
+
orientation: "vertical",
|
|
3690
|
+
size: "3xs",
|
|
3691
|
+
class: {
|
|
3692
|
+
wrapper: "-mt-0.5 pb-4.5"
|
|
3693
|
+
}
|
|
3694
|
+
}, {
|
|
3695
|
+
orientation: "vertical",
|
|
3696
|
+
size: "2xs",
|
|
3697
|
+
class: {
|
|
3698
|
+
wrapper: "pb-5"
|
|
3699
|
+
}
|
|
3700
|
+
}, {
|
|
3701
|
+
orientation: "vertical",
|
|
3702
|
+
size: "xs",
|
|
3703
|
+
class: {
|
|
3704
|
+
wrapper: "mt-0.5 pb-5.5"
|
|
3705
|
+
}
|
|
3706
|
+
}, {
|
|
3707
|
+
orientation: "vertical",
|
|
3708
|
+
size: "sm",
|
|
3709
|
+
class: {
|
|
3710
|
+
wrapper: "mt-1 pb-6"
|
|
3711
|
+
}
|
|
3712
|
+
}, {
|
|
3713
|
+
orientation: "vertical",
|
|
3714
|
+
size: "md",
|
|
3715
|
+
class: {
|
|
3716
|
+
wrapper: "mt-1.5 pb-6.5"
|
|
3717
|
+
}
|
|
3718
|
+
}, {
|
|
3719
|
+
orientation: "vertical",
|
|
3720
|
+
size: "lg",
|
|
3721
|
+
class: {
|
|
3722
|
+
wrapper: "mt-2 pb-7"
|
|
3723
|
+
}
|
|
3724
|
+
}, {
|
|
3725
|
+
orientation: "vertical",
|
|
3726
|
+
size: "xl",
|
|
3727
|
+
class: {
|
|
3728
|
+
wrapper: "mt-2.5 pb-7.5"
|
|
3729
|
+
}
|
|
3730
|
+
}, {
|
|
3731
|
+
orientation: "vertical",
|
|
3732
|
+
size: "2xl",
|
|
3733
|
+
class: {
|
|
3734
|
+
wrapper: "mt-3 pb-8"
|
|
3735
|
+
}
|
|
3736
|
+
}, {
|
|
3737
|
+
orientation: "vertical",
|
|
3738
|
+
size: "3xl",
|
|
3739
|
+
class: {
|
|
3740
|
+
wrapper: "mt-3.5 pb-8.5"
|
|
3741
|
+
}
|
|
3742
|
+
}],
|
|
3743
|
+
defaultVariants: {
|
|
3744
|
+
size: "md",
|
|
3745
|
+
color: "primary"
|
|
3746
|
+
}
|
|
3747
|
+
});
|
|
3748
|
+
|
|
3484
3749
|
const toast = (options) => ({
|
|
3485
3750
|
slots: {
|
|
3486
3751
|
root: "relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5 focus:outline-none",
|
|
@@ -3531,7 +3796,7 @@ const toast = (options) => ({
|
|
|
3531
3796
|
const toaster = {
|
|
3532
3797
|
slots: {
|
|
3533
3798
|
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
|
|
3534
|
-
base: "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:
|
|
3799
|
+
base: "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:opacity-0 data-[front=false]:*:transition-opacity data-[front=false]:*:duration-100 data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
|
|
3535
3800
|
},
|
|
3536
3801
|
variants: {
|
|
3537
3802
|
position: {
|
|
@@ -3587,7 +3852,7 @@ const toaster = {
|
|
|
3587
3852
|
|
|
3588
3853
|
const tooltip = {
|
|
3589
3854
|
slots: {
|
|
3590
|
-
content: "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",
|
|
3855
|
+
content: "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",
|
|
3591
3856
|
arrow: "fill-default",
|
|
3592
3857
|
text: "truncate",
|
|
3593
3858
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
@@ -3704,6 +3969,7 @@ const theme = {
|
|
|
3704
3969
|
input: input,
|
|
3705
3970
|
inputMenu: inputMenu,
|
|
3706
3971
|
inputNumber: inputNumber,
|
|
3972
|
+
inputTags: inputTags,
|
|
3707
3973
|
kbd: kbd,
|
|
3708
3974
|
link: link,
|
|
3709
3975
|
modal: modal,
|
|
@@ -3724,6 +3990,7 @@ const theme = {
|
|
|
3724
3990
|
table: table,
|
|
3725
3991
|
tabs: tabs,
|
|
3726
3992
|
textarea: textarea,
|
|
3993
|
+
timeline: timeline,
|
|
3727
3994
|
toast: toast,
|
|
3728
3995
|
toaster: toaster,
|
|
3729
3996
|
tooltip: tooltip,
|
|
@@ -3769,7 +4036,7 @@ function getTemplates(options, uiConfig) {
|
|
|
3769
4036
|
write: true,
|
|
3770
4037
|
getContents: () => `@source "./ui";
|
|
3771
4038
|
|
|
3772
|
-
@theme
|
|
4039
|
+
@theme static {
|
|
3773
4040
|
--color-old-neutral-50: ${colors.neutral[50]};
|
|
3774
4041
|
--color-old-neutral-100: ${colors.neutral[100]};
|
|
3775
4042
|
--color-old-neutral-200: ${colors.neutral[200]};
|
|
@@ -3781,6 +4048,9 @@ function getTemplates(options, uiConfig) {
|
|
|
3781
4048
|
--color-old-neutral-800: ${colors.neutral[800]};
|
|
3782
4049
|
--color-old-neutral-900: ${colors.neutral[900]};
|
|
3783
4050
|
--color-old-neutral-950: ${colors.neutral[950]};
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
@theme default inline {
|
|
3784
4054
|
${[...(options.theme?.colors || []).filter((color) => !colors[color]), "neutral"].map((color) => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((shade) => `--color-${color}-${shade}: var(--ui-color-${color}-${shade});`).join("\n ")).join("\n ")}
|
|
3785
4055
|
${options.theme?.colors?.map((color) => `--color-${color}: var(--ui-${color});`).join("\n ")}
|
|
3786
4056
|
--radius-xs: calc(var(--ui-radius) * 0.5);
|