@nuxt/ui 4.0.1 → 4.1.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/calendar.ts +221 -9
- package/.nuxt/ui/chat-message.ts +10 -3
- package/.nuxt/ui/command-palette.ts +12 -2
- package/.nuxt/ui/context-menu.ts +3 -1
- package/.nuxt/ui/dropdown-menu.ts +3 -1
- package/.nuxt/ui/empty.ts +83 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +12 -2
- package/.nuxt/ui/input-number.ts +25 -14
- package/.nuxt/ui/kbd.ts +1 -1
- package/.nuxt/ui/prose/code-tree.ts +1 -1
- package/.nuxt/ui/prose/img.ts +2 -1
- package/.nuxt/ui/select-menu.ts +12 -2
- package/.nuxt/ui/select.ts +4 -2
- package/.nuxt/ui/table.ts +8 -2
- package/.nuxt/ui/tree.ts +25 -11
- package/cli/templates.mjs +14 -2
- package/dist/module.d.mts +15 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +5 -2
- package/dist/runtime/components/Accordion.d.vue.ts +7 -1
- package/dist/runtime/components/Accordion.vue +4 -4
- package/dist/runtime/components/Accordion.vue.d.ts +7 -1
- package/dist/runtime/components/Alert.d.vue.ts +4 -4
- package/dist/runtime/components/Alert.vue +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/AuthForm.d.vue.ts +3 -1
- package/dist/runtime/components/AuthForm.vue +1 -1
- package/dist/runtime/components/AuthForm.vue.d.ts +3 -1
- package/dist/runtime/components/Avatar.d.vue.ts +5 -4
- package/dist/runtime/components/Avatar.vue +10 -3
- package/dist/runtime/components/Avatar.vue.d.ts +5 -4
- package/dist/runtime/components/Badge.d.vue.ts +9 -3
- package/dist/runtime/components/Badge.vue +3 -3
- package/dist/runtime/components/Badge.vue.d.ts +9 -3
- package/dist/runtime/components/Banner.d.vue.ts +4 -2
- package/dist/runtime/components/Banner.vue +1 -1
- package/dist/runtime/components/Banner.vue.d.ts +4 -2
- package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
- package/dist/runtime/components/BlogPost.vue +2 -2
- package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
- package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
- package/dist/runtime/components/BlogPosts.vue +8 -2
- package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
- package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
- package/dist/runtime/components/Breadcrumb.vue +8 -8
- package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
- package/dist/runtime/components/Button.d.vue.ts +9 -3
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Button.vue.d.ts +9 -3
- package/dist/runtime/components/Calendar.d.vue.ts +4 -0
- package/dist/runtime/components/Calendar.vue +3 -1
- package/dist/runtime/components/Calendar.vue.d.ts +4 -0
- package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
- package/dist/runtime/components/ChangelogVersion.vue +3 -3
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
- package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
- package/dist/runtime/components/ChangelogVersions.vue +2 -2
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
- package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
- package/dist/runtime/components/ChatMessage.vue +1 -1
- package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
- package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
- package/dist/runtime/components/ChatMessages.vue +24 -8
- package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
- package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
- package/dist/runtime/components/CommandPalette.vue +134 -68
- package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
- package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
- package/dist/runtime/components/ContextMenu.vue +2 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
- package/dist/runtime/components/ContextMenuContent.vue +21 -11
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
- package/dist/runtime/components/DashboardNavbar.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
- package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
- package/dist/runtime/components/DashboardSearch.vue +2 -2
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
- package/dist/runtime/components/DashboardSearchButton.vue +2 -2
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
- package/dist/runtime/components/DashboardSidebar.vue +4 -4
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
- package/dist/runtime/components/Drawer.vue +2 -5
- package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
- package/dist/runtime/components/DropdownMenu.vue +2 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
- package/dist/runtime/components/DropdownMenuContent.vue +21 -11
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
- package/dist/runtime/components/Empty.d.vue.ts +53 -0
- package/dist/runtime/components/Empty.vue +68 -0
- package/dist/runtime/components/Empty.vue.d.ts +53 -0
- package/dist/runtime/components/Error.d.vue.ts +0 -1
- package/dist/runtime/components/Error.vue +1 -1
- package/dist/runtime/components/Error.vue.d.ts +0 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +6 -1
- package/dist/runtime/components/FileUpload.vue +8 -7
- package/dist/runtime/components/FileUpload.vue.d.ts +6 -1
- package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
- package/dist/runtime/components/FooterColumns.vue +2 -2
- package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
- package/dist/runtime/components/Header.d.vue.ts +4 -1
- package/dist/runtime/components/Header.vue +3 -3
- package/dist/runtime/components/Header.vue.d.ts +4 -1
- package/dist/runtime/components/Input.d.vue.ts +9 -3
- package/dist/runtime/components/Input.vue +3 -3
- package/dist/runtime/components/Input.vue.d.ts +9 -3
- package/dist/runtime/components/InputMenu.d.vue.ts +40 -10
- package/dist/runtime/components/InputMenu.vue +117 -65
- package/dist/runtime/components/InputMenu.vue.d.ts +40 -10
- package/dist/runtime/components/InputNumber.d.vue.ts +4 -2
- package/dist/runtime/components/InputNumber.vue +7 -5
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -2
- package/dist/runtime/components/InputTags.d.vue.ts +10 -3
- package/dist/runtime/components/InputTags.vue +5 -5
- package/dist/runtime/components/InputTags.vue.d.ts +10 -3
- package/dist/runtime/components/Main.d.vue.ts +2 -4
- package/dist/runtime/components/Main.vue +1 -1
- package/dist/runtime/components/Main.vue.d.ts +2 -4
- package/dist/runtime/components/Modal.d.vue.ts +1 -4
- package/dist/runtime/components/Modal.vue +3 -6
- package/dist/runtime/components/Modal.vue.d.ts +1 -4
- package/dist/runtime/components/NavigationMenu.d.vue.ts +16 -4
- package/dist/runtime/components/NavigationMenu.vue +14 -7
- package/dist/runtime/components/NavigationMenu.vue.d.ts +16 -4
- package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
- package/dist/runtime/components/PageAnchors.vue +2 -2
- package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
- package/dist/runtime/components/PageCard.d.vue.ts +3 -1
- package/dist/runtime/components/PageCard.vue +1 -1
- package/dist/runtime/components/PageCard.vue.d.ts +3 -1
- package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
- package/dist/runtime/components/PageFeature.vue +1 -1
- package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
- package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
- package/dist/runtime/components/PageLinks.vue +2 -2
- package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
- package/dist/runtime/components/PageSection.d.vue.ts +3 -1
- package/dist/runtime/components/PageSection.vue +1 -1
- package/dist/runtime/components/PageSection.vue.d.ts +3 -1
- package/dist/runtime/components/Pagination.d.vue.ts +3 -1
- package/dist/runtime/components/Pagination.vue +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +3 -1
- package/dist/runtime/components/Popover.d.vue.ts +24 -23
- package/dist/runtime/components/Popover.vue +4 -4
- package/dist/runtime/components/Popover.vue.d.ts +24 -23
- package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
- package/dist/runtime/components/PricingPlan.vue +3 -3
- package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
- package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
- package/dist/runtime/components/PricingPlans.vue +7 -1
- package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
- package/dist/runtime/components/Select.d.vue.ts +20 -9
- package/dist/runtime/components/Select.vue +18 -9
- package/dist/runtime/components/Select.vue.d.ts +20 -9
- package/dist/runtime/components/SelectMenu.d.vue.ts +39 -11
- package/dist/runtime/components/SelectMenu.vue +114 -61
- package/dist/runtime/components/SelectMenu.vue.d.ts +39 -11
- package/dist/runtime/components/Separator.d.vue.ts +3 -1
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +3 -1
- package/dist/runtime/components/Slideover.d.vue.ts +1 -4
- package/dist/runtime/components/Slideover.vue +3 -6
- package/dist/runtime/components/Slideover.vue.d.ts +1 -4
- package/dist/runtime/components/Stepper.d.vue.ts +4 -1
- package/dist/runtime/components/Stepper.vue +1 -1
- package/dist/runtime/components/Stepper.vue.d.ts +4 -1
- package/dist/runtime/components/Table.d.vue.ts +21 -1
- package/dist/runtime/components/Table.vue +126 -60
- package/dist/runtime/components/Table.vue.d.ts +21 -1
- package/dist/runtime/components/Tabs.d.vue.ts +8 -3
- package/dist/runtime/components/Tabs.vue +3 -3
- package/dist/runtime/components/Tabs.vue.d.ts +8 -3
- package/dist/runtime/components/Textarea.d.vue.ts +9 -3
- package/dist/runtime/components/Textarea.vue +3 -3
- package/dist/runtime/components/Textarea.vue.d.ts +9 -3
- package/dist/runtime/components/Toast.d.vue.ts +4 -4
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/Toast.vue.d.ts +4 -4
- package/dist/runtime/components/Toaster.d.vue.ts +6 -0
- package/dist/runtime/components/Toaster.vue +6 -3
- package/dist/runtime/components/Toaster.vue.d.ts +6 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
- package/dist/runtime/components/Tooltip.vue +1 -1
- package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
- package/dist/runtime/components/Tree.d.vue.ts +43 -5
- package/dist/runtime/components/Tree.vue +169 -81
- package/dist/runtime/components/Tree.vue.d.ts +43 -5
- package/dist/runtime/components/User.d.vue.ts +3 -1
- package/dist/runtime/components/User.vue +1 -1
- package/dist/runtime/components/User.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentNavigation.vue +5 -5
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
- package/dist/runtime/components/content/ContentSearch.vue +4 -2
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentSurround.vue +4 -4
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
- package/dist/runtime/components/content/ContentToc.vue +2 -2
- package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
- package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Accordion.vue +3 -2
- package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
- package/dist/runtime/components/prose/CodeTree.vue +40 -36
- package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Collapsible.vue +2 -2
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.vue +14 -3
- package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Tabs.vue +3 -2
- package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
- package/dist/runtime/composables/useKbd.js +1 -1
- package/dist/runtime/composables/useToast.d.ts +3 -1
- package/dist/runtime/composables/useToast.js +4 -3
- package/dist/runtime/inertia/components/Link.vue +12 -7
- package/dist/runtime/locale/hr.d.ts +3 -0
- package/dist/runtime/locale/hr.js +129 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/types/index.d.ts +2 -1
- package/dist/runtime/types/index.js +2 -1
- package/dist/runtime/types/tv.d.ts +6 -0
- package/dist/shared/{ui.D-FDXAUi.mjs → ui.Cmctwxv6.mjs} +381 -48
- package/dist/unplugin.mjs +2 -1
- package/dist/vite.mjs +3 -2
- package/package.json +18 -17
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { pick } from '../../dist/runtime/utils/index.js';
|
|
2
2
|
import 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import { join } from 'pathe';
|
|
5
|
+
import { globSync } from 'tinyglobby';
|
|
6
|
+
import { kebabCase, camelCase, pascalCase } from 'scule';
|
|
4
7
|
import { genExport } from 'knitwork';
|
|
5
8
|
import colors from 'tailwindcss/colors';
|
|
6
|
-
import { addTypeTemplate, addTemplate, hasNuxtModule } from '@nuxt/kit';
|
|
9
|
+
import { addTypeTemplate, addTemplate, updateTemplates, hasNuxtModule, logger } from '@nuxt/kit';
|
|
7
10
|
import { defuFn, defu } from 'defu';
|
|
8
11
|
|
|
9
12
|
const icons = {
|
|
@@ -843,19 +846,25 @@ const calendar = (options) => ({
|
|
|
843
846
|
gridBody: "grid",
|
|
844
847
|
headCell: "rounded-md",
|
|
845
848
|
cell: "relative text-center",
|
|
846
|
-
cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-muted data-unavailable:line-through data-unavailable:text-muted data-unavailable:pointer-events-none data-
|
|
849
|
+
cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-muted data-unavailable:line-through data-unavailable:text-muted data-unavailable:pointer-events-none data-today:font-semibold data-[outside-view]:text-muted", options.theme.transitions && "transition"]
|
|
847
850
|
},
|
|
848
851
|
variants: {
|
|
849
852
|
color: {
|
|
850
853
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
851
854
|
headCell: `text-${color}`,
|
|
852
|
-
cellTrigger: `focus-visible:ring-${color}
|
|
855
|
+
cellTrigger: `focus-visible:ring-${color}`
|
|
853
856
|
}])),
|
|
854
857
|
neutral: {
|
|
855
858
|
headCell: "text-highlighted",
|
|
856
|
-
cellTrigger: "focus-visible:ring-inverted
|
|
859
|
+
cellTrigger: "focus-visible:ring-inverted"
|
|
857
860
|
}
|
|
858
861
|
},
|
|
862
|
+
variant: {
|
|
863
|
+
solid: "",
|
|
864
|
+
outline: "",
|
|
865
|
+
soft: "",
|
|
866
|
+
subtle: ""
|
|
867
|
+
},
|
|
859
868
|
size: {
|
|
860
869
|
xs: {
|
|
861
870
|
heading: "text-xs",
|
|
@@ -888,9 +897,59 @@ const calendar = (options) => ({
|
|
|
888
897
|
}
|
|
889
898
|
}
|
|
890
899
|
},
|
|
900
|
+
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
901
|
+
color,
|
|
902
|
+
variant: "solid",
|
|
903
|
+
class: {
|
|
904
|
+
cellTrigger: `data-[selected]:bg-${color} data-[selected]:text-inverted data-today:not-data-[selected]:text-${color} data-[highlighted]:bg-${color}/20 hover:not-data-[selected]:bg-${color}/20`
|
|
905
|
+
}
|
|
906
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
907
|
+
color,
|
|
908
|
+
variant: "outline",
|
|
909
|
+
class: {
|
|
910
|
+
cellTrigger: `data-[selected]:ring data-[selected]:ring-inset data-[selected]:ring-${color}/50 data-[selected]:text-${color} data-today:not-data-[selected]:text-${color} data-[highlighted]:bg-${color}/10 hover:not-data-[selected]:bg-${color}/10`
|
|
911
|
+
}
|
|
912
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
913
|
+
color,
|
|
914
|
+
variant: "soft",
|
|
915
|
+
class: {
|
|
916
|
+
cellTrigger: `data-[selected]:bg-${color}/10 data-[selected]:text-${color} data-today:not-data-[selected]:text-${color} data-[highlighted]:bg-${color}/20 hover:not-data-[selected]:bg-${color}/20`
|
|
917
|
+
}
|
|
918
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
919
|
+
color,
|
|
920
|
+
variant: "subtle",
|
|
921
|
+
class: {
|
|
922
|
+
cellTrigger: `data-[selected]:bg-${color}/10 data-[selected]:text-${color} data-[selected]:ring data-[selected]:ring-inset data-[selected]:ring-${color}/25 data-today:not-data-[selected]:text-${color} data-[highlighted]:bg-${color}/20 hover:not-data-[selected]:bg-${color}/20`
|
|
923
|
+
}
|
|
924
|
+
})), {
|
|
925
|
+
color: "neutral",
|
|
926
|
+
variant: "solid",
|
|
927
|
+
class: {
|
|
928
|
+
cellTrigger: "data-[selected]:bg-inverted data-[selected]:text-inverted data-today:not-data-[selected]:text-highlighted data-[highlighted]:bg-inverted/20 hover:not-data-[selected]:bg-inverted/10"
|
|
929
|
+
}
|
|
930
|
+
}, {
|
|
931
|
+
color: "neutral",
|
|
932
|
+
variant: "outline",
|
|
933
|
+
class: {
|
|
934
|
+
cellTrigger: "data-[selected]:ring data-[selected]:ring-inset data-[selected]:ring-accented data-[selected]:text-default data-[selected]:bg-default data-today:not-data-[selected]:text-highlighted data-[highlighted]:bg-inverted/10 hover:not-data-[selected]:bg-inverted/10"
|
|
935
|
+
}
|
|
936
|
+
}, {
|
|
937
|
+
color: "neutral",
|
|
938
|
+
variant: "soft",
|
|
939
|
+
class: {
|
|
940
|
+
cellTrigger: "data-[selected]:bg-elevated data-[selected]:text-default data-today:not-data-[selected]:text-highlighted data-[highlighted]:bg-inverted/20 hover:not-data-[selected]:bg-inverted/10"
|
|
941
|
+
}
|
|
942
|
+
}, {
|
|
943
|
+
color: "neutral",
|
|
944
|
+
variant: "subtle",
|
|
945
|
+
class: {
|
|
946
|
+
cellTrigger: "data-[selected]:bg-elevated data-[selected]:text-default data-[selected]:ring data-[selected]:ring-inset data-[selected]:ring-accented data-today:not-data-[selected]:text-highlighted data-[highlighted]:bg-inverted/20 hover:not-data-[selected]:bg-inverted/10"
|
|
947
|
+
}
|
|
948
|
+
}],
|
|
891
949
|
defaultVariants: {
|
|
892
950
|
size: "md",
|
|
893
|
-
color: "primary"
|
|
951
|
+
color: "primary",
|
|
952
|
+
variant: "solid"
|
|
894
953
|
}
|
|
895
954
|
});
|
|
896
955
|
|
|
@@ -1012,12 +1071,12 @@ const changelogVersions = {
|
|
|
1012
1071
|
const chatMessage = (options) => ({
|
|
1013
1072
|
slots: {
|
|
1014
1073
|
root: "group/message relative w-full",
|
|
1015
|
-
container: "relative flex items-start
|
|
1074
|
+
container: "relative flex items-start",
|
|
1016
1075
|
leading: "inline-flex items-center justify-center min-h-6",
|
|
1017
1076
|
leadingIcon: "shrink-0",
|
|
1018
1077
|
leadingAvatar: "shrink-0",
|
|
1019
1078
|
leadingAvatarSize: "",
|
|
1020
|
-
content: "relative text-pretty min-w-0",
|
|
1079
|
+
content: "relative text-pretty min-w-0 *:first:mt-0 *:last:mb-0",
|
|
1021
1080
|
actions: ["opacity-0 group-hover/message:opacity-100 absolute bottom-0 flex items-center", options.theme.transitions && "transition-opacity"]
|
|
1022
1081
|
},
|
|
1023
1082
|
variants: {
|
|
@@ -1043,7 +1102,7 @@ const chatMessage = (options) => ({
|
|
|
1043
1102
|
container: "rtl:justify-end"
|
|
1044
1103
|
},
|
|
1045
1104
|
right: {
|
|
1046
|
-
container: "ltr:justify-end ms-auto"
|
|
1105
|
+
container: "ltr:justify-end ms-auto max-w-[75%]"
|
|
1047
1106
|
}
|
|
1048
1107
|
},
|
|
1049
1108
|
leading: {
|
|
@@ -1101,6 +1160,12 @@ const chatMessage = (options) => ({
|
|
|
1101
1160
|
content: "px-2 py-1 rounded-lg min-h-8",
|
|
1102
1161
|
leading: "mt-1"
|
|
1103
1162
|
}
|
|
1163
|
+
}, {
|
|
1164
|
+
variant: "naked",
|
|
1165
|
+
side: "left",
|
|
1166
|
+
class: {
|
|
1167
|
+
content: "w-full"
|
|
1168
|
+
}
|
|
1104
1169
|
}],
|
|
1105
1170
|
defaultVariants: {
|
|
1106
1171
|
variant: "naked"
|
|
@@ -1508,11 +1573,11 @@ const commandPalette = (options) => ({
|
|
|
1508
1573
|
back: "p-0",
|
|
1509
1574
|
content: "relative overflow-hidden flex flex-col",
|
|
1510
1575
|
footer: "p-1",
|
|
1511
|
-
viewport: "relative
|
|
1576
|
+
viewport: "relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
|
|
1512
1577
|
group: "p-1 isolate",
|
|
1513
1578
|
empty: "py-6 text-center text-sm text-muted",
|
|
1514
1579
|
label: "p-1.5 text-xs font-semibold text-highlighted",
|
|
1515
|
-
item: "group relative w-full flex items-
|
|
1580
|
+
item: "group relative w-full flex items-start 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",
|
|
1516
1581
|
itemLeadingIcon: "shrink-0 size-5",
|
|
1517
1582
|
itemLeadingAvatar: "shrink-0",
|
|
1518
1583
|
itemLeadingAvatarSize: "2xs",
|
|
@@ -1523,12 +1588,22 @@ const commandPalette = (options) => ({
|
|
|
1523
1588
|
itemTrailingHighlightedIcon: "shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex",
|
|
1524
1589
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
|
|
1525
1590
|
itemTrailingKbdsSize: "md",
|
|
1591
|
+
itemWrapper: "flex-1 flex flex-col text-start min-w-0",
|
|
1526
1592
|
itemLabel: "truncate space-x-1 text-dimmed",
|
|
1593
|
+
itemDescription: "truncate text-muted",
|
|
1527
1594
|
itemLabelBase: "text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary",
|
|
1528
1595
|
itemLabelPrefix: "text-default",
|
|
1529
1596
|
itemLabelSuffix: "text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary"
|
|
1530
1597
|
},
|
|
1531
1598
|
variants: {
|
|
1599
|
+
virtualize: {
|
|
1600
|
+
true: {
|
|
1601
|
+
viewport: "p-1 isolate"
|
|
1602
|
+
},
|
|
1603
|
+
false: {
|
|
1604
|
+
viewport: "divide-y divide-default"
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1532
1607
|
active: {
|
|
1533
1608
|
true: {
|
|
1534
1609
|
item: "text-highlighted before:bg-elevated",
|
|
@@ -1558,7 +1633,7 @@ const contextMenu = (options) => ({
|
|
|
1558
1633
|
group: "p-1 isolate",
|
|
1559
1634
|
label: "w-full flex items-center font-semibold text-highlighted",
|
|
1560
1635
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
1561
|
-
item: "group relative w-full flex items-
|
|
1636
|
+
item: "group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1562
1637
|
itemLeadingIcon: "shrink-0",
|
|
1563
1638
|
itemLeadingAvatar: "shrink-0",
|
|
1564
1639
|
itemLeadingAvatarSize: "",
|
|
@@ -1566,7 +1641,9 @@ const contextMenu = (options) => ({
|
|
|
1566
1641
|
itemTrailingIcon: "shrink-0",
|
|
1567
1642
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
1568
1643
|
itemTrailingKbdsSize: "",
|
|
1644
|
+
itemWrapper: "flex-1 flex flex-col text-start min-w-0",
|
|
1569
1645
|
itemLabel: "truncate",
|
|
1646
|
+
itemDescription: "truncate text-muted",
|
|
1570
1647
|
itemLabelExternalIcon: "inline-block size-3 align-top text-dimmed"
|
|
1571
1648
|
},
|
|
1572
1649
|
variants: {
|
|
@@ -1928,7 +2005,7 @@ const dropdownMenu = (options) => ({
|
|
|
1928
2005
|
group: "p-1 isolate",
|
|
1929
2006
|
label: "w-full flex items-center font-semibold text-highlighted",
|
|
1930
2007
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
1931
|
-
item: "group relative w-full flex items-
|
|
2008
|
+
item: "group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1932
2009
|
itemLeadingIcon: "shrink-0",
|
|
1933
2010
|
itemLeadingAvatar: "shrink-0",
|
|
1934
2011
|
itemLeadingAvatarSize: "",
|
|
@@ -1936,7 +2013,9 @@ const dropdownMenu = (options) => ({
|
|
|
1936
2013
|
itemTrailingIcon: "shrink-0",
|
|
1937
2014
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
1938
2015
|
itemTrailingKbdsSize: "",
|
|
2016
|
+
itemWrapper: "flex-1 flex flex-col text-start min-w-0",
|
|
1939
2017
|
itemLabel: "truncate",
|
|
2018
|
+
itemDescription: "truncate text-muted",
|
|
1940
2019
|
itemLabelExternalIcon: "inline-block size-3 align-top text-dimmed"
|
|
1941
2020
|
},
|
|
1942
2021
|
variants: {
|
|
@@ -2027,6 +2106,74 @@ const dropdownMenu = (options) => ({
|
|
|
2027
2106
|
}
|
|
2028
2107
|
});
|
|
2029
2108
|
|
|
2109
|
+
const empty = {
|
|
2110
|
+
slots: {
|
|
2111
|
+
root: "relative flex flex-col items-center justify-center gap-4 rounded-lg p-4 sm:p-6 lg:p-8 min-w-0",
|
|
2112
|
+
header: "flex flex-col items-center gap-2 max-w-sm text-center",
|
|
2113
|
+
avatar: "shrink-0 mb-2",
|
|
2114
|
+
title: "text-highlighted text-pretty font-medium",
|
|
2115
|
+
description: "text-balance text-center",
|
|
2116
|
+
body: "flex flex-col items-center gap-4 max-w-sm",
|
|
2117
|
+
actions: "flex flex-wrap justify-center gap-2 shrink-0",
|
|
2118
|
+
footer: "flex flex-col items-center gap-2 max-w-sm"
|
|
2119
|
+
},
|
|
2120
|
+
variants: {
|
|
2121
|
+
size: {
|
|
2122
|
+
xs: {
|
|
2123
|
+
avatar: "size-8 text-base",
|
|
2124
|
+
title: "text-sm",
|
|
2125
|
+
description: "text-xs"
|
|
2126
|
+
},
|
|
2127
|
+
sm: {
|
|
2128
|
+
avatar: "size-9 text-lg",
|
|
2129
|
+
title: "text-sm",
|
|
2130
|
+
description: "text-xs"
|
|
2131
|
+
},
|
|
2132
|
+
md: {
|
|
2133
|
+
avatar: "size-10 text-xl",
|
|
2134
|
+
title: "text-base",
|
|
2135
|
+
description: "text-sm"
|
|
2136
|
+
},
|
|
2137
|
+
lg: {
|
|
2138
|
+
avatar: "size-11 text-[22px]",
|
|
2139
|
+
title: "text-base",
|
|
2140
|
+
description: "text-sm"
|
|
2141
|
+
},
|
|
2142
|
+
xl: {
|
|
2143
|
+
avatar: "size-12 text-2xl",
|
|
2144
|
+
title: "text-lg",
|
|
2145
|
+
description: "text-base"
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
variant: {
|
|
2149
|
+
solid: {
|
|
2150
|
+
root: "bg-inverted",
|
|
2151
|
+
title: "text-inverted",
|
|
2152
|
+
description: "text-dimmed"
|
|
2153
|
+
},
|
|
2154
|
+
outline: {
|
|
2155
|
+
root: "bg-default ring ring-default",
|
|
2156
|
+
description: "text-muted"
|
|
2157
|
+
},
|
|
2158
|
+
soft: {
|
|
2159
|
+
root: "bg-elevated/50",
|
|
2160
|
+
description: "text-toned"
|
|
2161
|
+
},
|
|
2162
|
+
subtle: {
|
|
2163
|
+
root: "bg-elevated/50 ring ring-default",
|
|
2164
|
+
description: "text-toned"
|
|
2165
|
+
},
|
|
2166
|
+
naked: {
|
|
2167
|
+
description: "text-muted"
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
defaultVariants: {
|
|
2172
|
+
variant: "outline",
|
|
2173
|
+
size: "md"
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
|
|
2030
2177
|
const error = {
|
|
2031
2178
|
slots: {
|
|
2032
2179
|
root: "min-h-[calc(100vh-var(--ui-header-height))] flex flex-col items-center justify-center text-center",
|
|
@@ -2494,12 +2641,12 @@ const inputMenu = (options) => {
|
|
|
2494
2641
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
2495
2642
|
arrow: "fill-default",
|
|
2496
2643
|
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",
|
|
2497
|
-
viewport: "relative
|
|
2644
|
+
viewport: "relative scroll-py-1 overflow-y-auto flex-1",
|
|
2498
2645
|
group: "p-1 isolate",
|
|
2499
2646
|
empty: "text-center text-muted",
|
|
2500
2647
|
label: "font-semibold text-highlighted",
|
|
2501
2648
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
2502
|
-
item: ["group relative w-full flex items-
|
|
2649
|
+
item: ["group relative w-full flex items-start 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"],
|
|
2503
2650
|
itemLeadingIcon: ["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default", options.theme.transitions && "transition-colors"],
|
|
2504
2651
|
itemLeadingAvatar: "shrink-0",
|
|
2505
2652
|
itemLeadingAvatarSize: "",
|
|
@@ -2507,7 +2654,9 @@ const inputMenu = (options) => {
|
|
|
2507
2654
|
itemLeadingChipSize: "",
|
|
2508
2655
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
2509
2656
|
itemTrailingIcon: "shrink-0",
|
|
2657
|
+
itemWrapper: "flex-1 flex flex-col min-w-0",
|
|
2510
2658
|
itemLabel: "truncate",
|
|
2659
|
+
itemDescription: "truncate text-muted",
|
|
2511
2660
|
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",
|
|
2512
2661
|
tagsItemText: "truncate",
|
|
2513
2662
|
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"],
|
|
@@ -2515,6 +2664,14 @@ const inputMenu = (options) => {
|
|
|
2515
2664
|
tagsInput: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
2516
2665
|
},
|
|
2517
2666
|
variants: {
|
|
2667
|
+
virtualize: {
|
|
2668
|
+
true: {
|
|
2669
|
+
viewport: "p-1 isolate"
|
|
2670
|
+
},
|
|
2671
|
+
false: {
|
|
2672
|
+
viewport: "divide-y divide-default"
|
|
2673
|
+
}
|
|
2674
|
+
},
|
|
2518
2675
|
multiple: {
|
|
2519
2676
|
true: {
|
|
2520
2677
|
root: "flex-wrap"
|
|
@@ -2652,6 +2809,12 @@ const inputNumber = (options) => {
|
|
|
2652
2809
|
},
|
|
2653
2810
|
highlight: {
|
|
2654
2811
|
true: ""
|
|
2812
|
+
},
|
|
2813
|
+
increment: {
|
|
2814
|
+
false: ""
|
|
2815
|
+
},
|
|
2816
|
+
decrement: {
|
|
2817
|
+
false: ""
|
|
2655
2818
|
}
|
|
2656
2819
|
},
|
|
2657
2820
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
@@ -2672,42 +2835,46 @@ const inputNumber = (options) => {
|
|
|
2672
2835
|
class: "ring ring-inset ring-inverted"
|
|
2673
2836
|
}, {
|
|
2674
2837
|
orientation: "horizontal",
|
|
2838
|
+
decrement: false,
|
|
2839
|
+
class: "text-start"
|
|
2840
|
+
}, {
|
|
2841
|
+
decrement: true,
|
|
2675
2842
|
size: "xs",
|
|
2676
|
-
class: "
|
|
2843
|
+
class: "ps-7"
|
|
2677
2844
|
}, {
|
|
2678
|
-
|
|
2845
|
+
decrement: true,
|
|
2679
2846
|
size: "sm",
|
|
2680
|
-
class: "
|
|
2847
|
+
class: "ps-8"
|
|
2681
2848
|
}, {
|
|
2682
|
-
|
|
2849
|
+
decrement: true,
|
|
2683
2850
|
size: "md",
|
|
2684
|
-
class: "
|
|
2851
|
+
class: "ps-9"
|
|
2685
2852
|
}, {
|
|
2686
|
-
|
|
2853
|
+
decrement: true,
|
|
2687
2854
|
size: "lg",
|
|
2688
|
-
class: "
|
|
2855
|
+
class: "ps-10"
|
|
2689
2856
|
}, {
|
|
2690
|
-
|
|
2857
|
+
decrement: true,
|
|
2691
2858
|
size: "xl",
|
|
2692
|
-
class: "
|
|
2859
|
+
class: "ps-11"
|
|
2693
2860
|
}, {
|
|
2694
|
-
|
|
2861
|
+
increment: true,
|
|
2695
2862
|
size: "xs",
|
|
2696
2863
|
class: "pe-7"
|
|
2697
2864
|
}, {
|
|
2698
|
-
|
|
2865
|
+
increment: true,
|
|
2699
2866
|
size: "sm",
|
|
2700
2867
|
class: "pe-8"
|
|
2701
2868
|
}, {
|
|
2702
|
-
|
|
2869
|
+
increment: true,
|
|
2703
2870
|
size: "md",
|
|
2704
2871
|
class: "pe-9"
|
|
2705
2872
|
}, {
|
|
2706
|
-
|
|
2873
|
+
increment: true,
|
|
2707
2874
|
size: "lg",
|
|
2708
2875
|
class: "pe-10"
|
|
2709
2876
|
}, {
|
|
2710
|
-
|
|
2877
|
+
increment: true,
|
|
2711
2878
|
size: "xl",
|
|
2712
2879
|
class: "pe-11"
|
|
2713
2880
|
}],
|
|
@@ -2768,7 +2935,7 @@ function replaceFocus$2(str) {
|
|
|
2768
2935
|
}
|
|
2769
2936
|
|
|
2770
2937
|
const kbd$1 = (options) => ({
|
|
2771
|
-
base: "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",
|
|
2938
|
+
base: "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans uppercase",
|
|
2772
2939
|
variants: {
|
|
2773
2940
|
color: {
|
|
2774
2941
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -4365,7 +4532,7 @@ const select = (options) => {
|
|
|
4365
4532
|
empty: "text-center text-muted",
|
|
4366
4533
|
label: "font-semibold text-highlighted",
|
|
4367
4534
|
separator: "-mx-1 my-1 h-px bg-border",
|
|
4368
|
-
item: ["group relative w-full flex items-
|
|
4535
|
+
item: ["group relative w-full flex items-start 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"],
|
|
4369
4536
|
itemLeadingIcon: ["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default", options.theme.transitions && "transition-colors"],
|
|
4370
4537
|
itemLeadingAvatar: "shrink-0",
|
|
4371
4538
|
itemLeadingAvatarSize: "",
|
|
@@ -4373,7 +4540,9 @@ const select = (options) => {
|
|
|
4373
4540
|
itemLeadingChipSize: "",
|
|
4374
4541
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
4375
4542
|
itemTrailingIcon: "shrink-0",
|
|
4376
|
-
|
|
4543
|
+
itemWrapper: "flex-1 flex flex-col min-w-0",
|
|
4544
|
+
itemLabel: "truncate",
|
|
4545
|
+
itemDescription: "truncate text-muted"
|
|
4377
4546
|
},
|
|
4378
4547
|
variants: {
|
|
4379
4548
|
...fieldGroupVariant,
|
|
@@ -4445,8 +4614,19 @@ const selectMenu = (options) => {
|
|
|
4445
4614
|
slots: {
|
|
4446
4615
|
input: "border-b border-default",
|
|
4447
4616
|
focusScope: "flex flex-col min-h-0",
|
|
4617
|
+
viewport: "relative scroll-py-1 overflow-y-auto flex-1",
|
|
4448
4618
|
content: (content) => [content, "origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"]
|
|
4449
4619
|
},
|
|
4620
|
+
variants: {
|
|
4621
|
+
virtualize: {
|
|
4622
|
+
true: {
|
|
4623
|
+
viewport: "p-1 isolate"
|
|
4624
|
+
},
|
|
4625
|
+
false: {
|
|
4626
|
+
viewport: "divide-y divide-default"
|
|
4627
|
+
}
|
|
4628
|
+
}
|
|
4629
|
+
},
|
|
4450
4630
|
compoundVariants: (prev) => prev.map((item) => ({
|
|
4451
4631
|
...item,
|
|
4452
4632
|
class: typeof item.class === "string" ? replaceFocus(item.class) : item.class
|
|
@@ -4948,10 +5128,10 @@ const _switch = (options) => ({
|
|
|
4948
5128
|
const table$1 = (options) => ({
|
|
4949
5129
|
slots: {
|
|
4950
5130
|
root: "relative overflow-auto",
|
|
4951
|
-
base: "min-w-full
|
|
5131
|
+
base: "min-w-full",
|
|
4952
5132
|
caption: "sr-only",
|
|
4953
5133
|
thead: "relative",
|
|
4954
|
-
tbody: "
|
|
5134
|
+
tbody: "[&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
|
|
4955
5135
|
tfoot: "relative",
|
|
4956
5136
|
tr: "data-[selected=true]:bg-elevated/50",
|
|
4957
5137
|
th: "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
@@ -4961,6 +5141,12 @@ const table$1 = (options) => ({
|
|
|
4961
5141
|
loading: "py-6 text-center"
|
|
4962
5142
|
},
|
|
4963
5143
|
variants: {
|
|
5144
|
+
virtualize: {
|
|
5145
|
+
false: {
|
|
5146
|
+
base: "overflow-clip",
|
|
5147
|
+
tbody: "divide-y divide-default"
|
|
5148
|
+
}
|
|
5149
|
+
},
|
|
4964
5150
|
pinned: {
|
|
4965
5151
|
true: {
|
|
4966
5152
|
th: "sticky bg-default/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
|
|
@@ -5512,16 +5698,21 @@ const tooltip = {
|
|
|
5512
5698
|
const tree = (options) => ({
|
|
5513
5699
|
slots: {
|
|
5514
5700
|
root: "relative isolate",
|
|
5515
|
-
item: "",
|
|
5516
|
-
listWithChildren: "
|
|
5701
|
+
item: "w-full",
|
|
5702
|
+
listWithChildren: "border-s border-default",
|
|
5517
5703
|
itemWithChildren: "ps-1.5 -ms-px",
|
|
5518
|
-
link: "relative group w-full flex items-center text-sm before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
5519
|
-
linkLeadingIcon: "shrink-0",
|
|
5704
|
+
link: "relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
5705
|
+
linkLeadingIcon: "shrink-0 relative",
|
|
5520
5706
|
linkLabel: "truncate",
|
|
5521
5707
|
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
5522
|
-
linkTrailingIcon: "shrink-0 transform transition-transform duration-200 group-data-
|
|
5708
|
+
linkTrailingIcon: "shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"
|
|
5523
5709
|
},
|
|
5524
5710
|
variants: {
|
|
5711
|
+
virtualize: {
|
|
5712
|
+
true: {
|
|
5713
|
+
root: "overflow-y-auto"
|
|
5714
|
+
}
|
|
5715
|
+
},
|
|
5525
5716
|
color: {
|
|
5526
5717
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
5527
5718
|
link: `focus-visible:before:ring-${color}`
|
|
@@ -5532,26 +5723,31 @@ const tree = (options) => ({
|
|
|
5532
5723
|
},
|
|
5533
5724
|
size: {
|
|
5534
5725
|
xs: {
|
|
5726
|
+
listWithChildren: "ms-4",
|
|
5535
5727
|
link: "px-2 py-1 text-xs gap-1",
|
|
5536
5728
|
linkLeadingIcon: "size-4",
|
|
5537
5729
|
linkTrailingIcon: "size-4"
|
|
5538
5730
|
},
|
|
5539
5731
|
sm: {
|
|
5732
|
+
listWithChildren: "ms-4.5",
|
|
5540
5733
|
link: "px-2.5 py-1.5 text-xs gap-1.5",
|
|
5541
5734
|
linkLeadingIcon: "size-4",
|
|
5542
5735
|
linkTrailingIcon: "size-4"
|
|
5543
5736
|
},
|
|
5544
5737
|
md: {
|
|
5738
|
+
listWithChildren: "ms-5",
|
|
5545
5739
|
link: "px-2.5 py-1.5 text-sm gap-1.5",
|
|
5546
5740
|
linkLeadingIcon: "size-5",
|
|
5547
5741
|
linkTrailingIcon: "size-5"
|
|
5548
5742
|
},
|
|
5549
5743
|
lg: {
|
|
5744
|
+
listWithChildren: "ms-5.5",
|
|
5550
5745
|
link: "px-3 py-2 text-sm gap-2",
|
|
5551
5746
|
linkLeadingIcon: "size-5",
|
|
5552
5747
|
linkTrailingIcon: "size-5"
|
|
5553
5748
|
},
|
|
5554
5749
|
xl: {
|
|
5750
|
+
listWithChildren: "ms-6",
|
|
5555
5751
|
link: "px-3 py-2 text-base gap-2",
|
|
5556
5752
|
linkLeadingIcon: "size-6",
|
|
5557
5753
|
linkTrailingIcon: "size-6"
|
|
@@ -5560,9 +5756,6 @@ const tree = (options) => ({
|
|
|
5560
5756
|
selected: {
|
|
5561
5757
|
true: {
|
|
5562
5758
|
link: "before:bg-elevated"
|
|
5563
|
-
},
|
|
5564
|
-
false: {
|
|
5565
|
-
link: ["hover:not-disabled:text-highlighted hover:not-disabled:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"]
|
|
5566
5759
|
}
|
|
5567
5760
|
},
|
|
5568
5761
|
disabled: {
|
|
@@ -5583,6 +5776,12 @@ const tree = (options) => ({
|
|
|
5583
5776
|
class: {
|
|
5584
5777
|
link: "text-highlighted"
|
|
5585
5778
|
}
|
|
5779
|
+
}, {
|
|
5780
|
+
selected: false,
|
|
5781
|
+
disabled: false,
|
|
5782
|
+
class: {
|
|
5783
|
+
link: ["hover:text-highlighted hover:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"]
|
|
5784
|
+
}
|
|
5586
5785
|
}],
|
|
5587
5786
|
defaultVariants: {
|
|
5588
5787
|
color: "primary",
|
|
@@ -5717,6 +5916,7 @@ const theme = {
|
|
|
5717
5916
|
dashboardToolbar: dashboardToolbar,
|
|
5718
5917
|
drawer: drawer,
|
|
5719
5918
|
dropdownMenu: dropdownMenu,
|
|
5919
|
+
empty: empty,
|
|
5720
5920
|
error: error,
|
|
5721
5921
|
fieldGroup: fieldGroup$1,
|
|
5722
5922
|
fileUpload: fileUpload,
|
|
@@ -6030,7 +6230,7 @@ const codeTree = (options) => ({
|
|
|
6030
6230
|
linkLeadingIcon: "size-4 shrink-0",
|
|
6031
6231
|
linkLabel: "truncate",
|
|
6032
6232
|
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
6033
|
-
linkTrailingIcon: "size-5 transform transition-transform duration-200 shrink-0 group-data-
|
|
6233
|
+
linkTrailingIcon: "size-5 transform transition-transform duration-200 shrink-0 group-data-expanded:rotate-180",
|
|
6034
6234
|
content: "overflow-hidden lg:col-span-2 flex flex-col [&>div]:my-0 [&>div]:flex-1 [&>div]:flex [&>div]:flex-col [&>div>div]:border-0 [&>div>pre]:border-b-0 [&>div>pre]:border-s-0 [&>div>pre]:border-e-0 [&>div>pre]:rounded-l-none [&>div>pre]:flex-1 [&>div]:overflow-y-auto"
|
|
6035
6235
|
},
|
|
6036
6236
|
variants: {
|
|
@@ -6119,7 +6319,8 @@ const img = {
|
|
|
6119
6319
|
slots: {
|
|
6120
6320
|
base: "rounded-md w-full",
|
|
6121
6321
|
overlay: "fixed inset-0 bg-default/75 backdrop-blur-sm will-change-opacity",
|
|
6122
|
-
content: "fixed inset-0 flex items-center justify-center cursor-zoom-out focus:outline-none
|
|
6322
|
+
content: "fixed inset-0 flex items-center justify-center cursor-zoom-out focus:outline-none",
|
|
6323
|
+
zoomedImage: "w-full h-auto max-w-[95vw] max-h-[95vh] object-contain rounded-md"
|
|
6123
6324
|
},
|
|
6124
6325
|
variants: {
|
|
6125
6326
|
zoom: {
|
|
@@ -6550,10 +6751,88 @@ const themeContent = {
|
|
|
6550
6751
|
contentToc: contentToc
|
|
6551
6752
|
};
|
|
6552
6753
|
|
|
6553
|
-
function
|
|
6754
|
+
async function buildComponentDependencyGraph(componentDir, prefix) {
|
|
6755
|
+
const dependencyGraph = /* @__PURE__ */ new Map();
|
|
6756
|
+
const componentFiles = globSync(["**/*.vue"], {
|
|
6757
|
+
cwd: componentDir,
|
|
6758
|
+
absolute: true
|
|
6759
|
+
});
|
|
6760
|
+
const componentPattern = new RegExp(`<${prefix}([A-Z][a-zA-Z]+)|\\b${prefix}([A-Z][a-zA-Z]+)\\b`, "g");
|
|
6761
|
+
for (const componentFile of componentFiles) {
|
|
6762
|
+
try {
|
|
6763
|
+
const content = await readFile(componentFile, "utf-8");
|
|
6764
|
+
const componentName = pascalCase(componentFile.split("/").pop().replace(".vue", ""));
|
|
6765
|
+
const dependencies = /* @__PURE__ */ new Set();
|
|
6766
|
+
const matches = content.matchAll(componentPattern);
|
|
6767
|
+
for (const match of matches) {
|
|
6768
|
+
const depName = match[1] || match[2];
|
|
6769
|
+
if (depName && depName !== componentName) {
|
|
6770
|
+
dependencies.add(depName);
|
|
6771
|
+
}
|
|
6772
|
+
}
|
|
6773
|
+
dependencyGraph.set(componentName, dependencies);
|
|
6774
|
+
} catch {
|
|
6775
|
+
}
|
|
6776
|
+
}
|
|
6777
|
+
return dependencyGraph;
|
|
6778
|
+
}
|
|
6779
|
+
function resolveComponentDependencies(component, dependencyGraph, resolved = /* @__PURE__ */ new Set()) {
|
|
6780
|
+
if (resolved.has(component)) {
|
|
6781
|
+
return resolved;
|
|
6782
|
+
}
|
|
6783
|
+
resolved.add(component);
|
|
6784
|
+
const dependencies = dependencyGraph.get(component);
|
|
6785
|
+
if (dependencies) {
|
|
6786
|
+
for (const dep of dependencies) {
|
|
6787
|
+
resolveComponentDependencies(dep, dependencyGraph, resolved);
|
|
6788
|
+
}
|
|
6789
|
+
}
|
|
6790
|
+
return resolved;
|
|
6791
|
+
}
|
|
6792
|
+
async function detectUsedComponents(rootDir, prefix, componentDir, includeComponents) {
|
|
6793
|
+
const detectedComponents = /* @__PURE__ */ new Set();
|
|
6794
|
+
if (includeComponents && includeComponents.length > 0) {
|
|
6795
|
+
for (const component of includeComponents) {
|
|
6796
|
+
detectedComponents.add(component);
|
|
6797
|
+
}
|
|
6798
|
+
}
|
|
6799
|
+
const appFiles = globSync(["**/*.{vue,ts,js,tsx,jsx}"], {
|
|
6800
|
+
cwd: rootDir,
|
|
6801
|
+
ignore: ["node_modules/**", ".nuxt/**", "dist/**"]
|
|
6802
|
+
});
|
|
6803
|
+
const componentPattern = new RegExp(`<${prefix}([A-Z][a-zA-Z]+)|\\b${prefix}([A-Z][a-zA-Z]+)\\b`, "g");
|
|
6804
|
+
for (const file of appFiles) {
|
|
6805
|
+
try {
|
|
6806
|
+
const filePath = join(rootDir, file);
|
|
6807
|
+
const content = await readFile(filePath, "utf-8");
|
|
6808
|
+
const matches = content.matchAll(componentPattern);
|
|
6809
|
+
for (const match of matches) {
|
|
6810
|
+
const componentName = match[1] || match[2];
|
|
6811
|
+
if (componentName) {
|
|
6812
|
+
detectedComponents.add(componentName);
|
|
6813
|
+
}
|
|
6814
|
+
}
|
|
6815
|
+
} catch {
|
|
6816
|
+
}
|
|
6817
|
+
}
|
|
6818
|
+
if (detectedComponents.size === 0) {
|
|
6819
|
+
return void 0;
|
|
6820
|
+
}
|
|
6821
|
+
const dependencyGraph = await buildComponentDependencyGraph(componentDir, prefix);
|
|
6822
|
+
const allComponents = /* @__PURE__ */ new Set();
|
|
6823
|
+
for (const component of detectedComponents) {
|
|
6824
|
+
const resolved = resolveComponentDependencies(component, dependencyGraph);
|
|
6825
|
+
for (const resolvedComponent of resolved) {
|
|
6826
|
+
allComponents.add(resolvedComponent);
|
|
6827
|
+
}
|
|
6828
|
+
}
|
|
6829
|
+
return allComponents;
|
|
6830
|
+
}
|
|
6831
|
+
function getTemplates(options, uiConfig, nuxt, resolve) {
|
|
6554
6832
|
const templates = [];
|
|
6555
6833
|
let hasProse = false;
|
|
6556
6834
|
let hasContent = false;
|
|
6835
|
+
let previousDetectedComponents;
|
|
6557
6836
|
function writeThemeTemplate(theme2, path) {
|
|
6558
6837
|
for (const component in theme2) {
|
|
6559
6838
|
templates.push({
|
|
@@ -6594,6 +6873,50 @@ function getTemplates(options, uiConfig, nuxt) {
|
|
|
6594
6873
|
});
|
|
6595
6874
|
}
|
|
6596
6875
|
}
|
|
6876
|
+
async function getSources() {
|
|
6877
|
+
let sources = "";
|
|
6878
|
+
if (!!nuxt && !!resolve && options.experimental?.componentDetection) {
|
|
6879
|
+
const detectedComponents = await detectUsedComponents(
|
|
6880
|
+
nuxt.options.rootDir,
|
|
6881
|
+
options.prefix,
|
|
6882
|
+
resolve("./runtime/components"),
|
|
6883
|
+
Array.isArray(options.experimental.componentDetection) ? options.experimental.componentDetection : void 0
|
|
6884
|
+
);
|
|
6885
|
+
if (detectedComponents && detectedComponents.size > 0) {
|
|
6886
|
+
if (previousDetectedComponents) {
|
|
6887
|
+
const newComponents = Array.from(detectedComponents).filter(
|
|
6888
|
+
(component) => !previousDetectedComponents.has(component)
|
|
6889
|
+
);
|
|
6890
|
+
if (newComponents.length > 0) {
|
|
6891
|
+
logger.success(`Nuxt UI detected new components: ${newComponents.join(", ")}`);
|
|
6892
|
+
}
|
|
6893
|
+
} else {
|
|
6894
|
+
logger.success(`Nuxt UI detected ${detectedComponents.size} components in use (including dependencies)`);
|
|
6895
|
+
}
|
|
6896
|
+
previousDetectedComponents = detectedComponents;
|
|
6897
|
+
const sourcesList = [];
|
|
6898
|
+
if (hasProse) {
|
|
6899
|
+
sourcesList.push('@source "./ui/prose";');
|
|
6900
|
+
}
|
|
6901
|
+
for (const component of detectedComponents) {
|
|
6902
|
+
const kebabComponent = kebabCase(component);
|
|
6903
|
+
const camelComponent = camelCase(component);
|
|
6904
|
+
if (hasContent && themeContent[camelComponent]) {
|
|
6905
|
+
sourcesList.push(`@source "./ui/content/${kebabComponent}.ts";`);
|
|
6906
|
+
} else if (theme[camelComponent]) {
|
|
6907
|
+
sourcesList.push(`@source "./ui/${kebabComponent}.ts";`);
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
sources = sourcesList.join("\n");
|
|
6911
|
+
} else {
|
|
6912
|
+
if (!previousDetectedComponents || previousDetectedComponents.size > 0) {
|
|
6913
|
+
logger.info("Nuxt UI detected no components in use, including all components");
|
|
6914
|
+
}
|
|
6915
|
+
previousDetectedComponents = /* @__PURE__ */ new Set();
|
|
6916
|
+
}
|
|
6917
|
+
}
|
|
6918
|
+
return sources || '@source "./ui";';
|
|
6919
|
+
}
|
|
6597
6920
|
if (!!nuxt && (hasNuxtModule("@nuxtjs/mdc") || options.mdc || (hasNuxtModule("@nuxt/content") || options.content))) {
|
|
6598
6921
|
hasProse = true;
|
|
6599
6922
|
const path = "prose";
|
|
@@ -6612,7 +6935,9 @@ function getTemplates(options, uiConfig, nuxt) {
|
|
|
6612
6935
|
templates.push({
|
|
6613
6936
|
filename: "ui.css",
|
|
6614
6937
|
write: true,
|
|
6615
|
-
getContents: () =>
|
|
6938
|
+
getContents: async () => {
|
|
6939
|
+
const sources = await getSources();
|
|
6940
|
+
return `${sources}
|
|
6616
6941
|
|
|
6617
6942
|
@theme static {
|
|
6618
6943
|
--color-old-neutral-50: ${colors.neutral[50]};
|
|
@@ -6677,7 +7002,8 @@ function getTemplates(options, uiConfig, nuxt) {
|
|
|
6677
7002
|
--fill-default: var(--ui-border);
|
|
6678
7003
|
--fill-inverted: var(--ui-border-inverted);
|
|
6679
7004
|
}
|
|
6680
|
-
|
|
7005
|
+
`;
|
|
7006
|
+
}
|
|
6681
7007
|
});
|
|
6682
7008
|
templates.push({
|
|
6683
7009
|
filename: "ui/index.ts",
|
|
@@ -6743,7 +7069,7 @@ export {}
|
|
|
6743
7069
|
return templates;
|
|
6744
7070
|
}
|
|
6745
7071
|
function addTemplates(options, nuxt, resolve) {
|
|
6746
|
-
const templates = getTemplates(options, nuxt.options.appConfig.ui, nuxt);
|
|
7072
|
+
const templates = getTemplates(options, nuxt.options.appConfig.ui, nuxt, resolve);
|
|
6747
7073
|
for (const template of templates) {
|
|
6748
7074
|
if (template.filename.endsWith(".d.ts")) {
|
|
6749
7075
|
addTypeTemplate(template);
|
|
@@ -6754,6 +7080,13 @@ function addTemplates(options, nuxt, resolve) {
|
|
|
6754
7080
|
nuxt.hook("prepare:types", ({ references }) => {
|
|
6755
7081
|
references.push({ path: resolve("./runtime/types/app.config.d.ts") });
|
|
6756
7082
|
});
|
|
7083
|
+
if (options.experimental?.componentDetection && nuxt.options.dev) {
|
|
7084
|
+
nuxt.hook("builder:watch", async (_, path) => {
|
|
7085
|
+
if (/\.(?:vue|ts|js|tsx|jsx)$/.test(path)) {
|
|
7086
|
+
await updateTemplates({ filter: (template) => template.filename === "ui.css" });
|
|
7087
|
+
}
|
|
7088
|
+
});
|
|
7089
|
+
}
|
|
6757
7090
|
}
|
|
6758
7091
|
|
|
6759
7092
|
export { getDefaultUiConfig as a, addTemplates as b, defaultOptions as d, getTemplates as g, resolveColors as r };
|