@nuxt/ui 3.0.0-alpha.8 → 3.0.0-alpha.9
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/button.ts +1 -1
- package/.nuxt/ui/card.ts +1 -1
- package/.nuxt/ui/carousel.ts +2 -2
- package/.nuxt/ui/container.ts +1 -1
- package/.nuxt/ui/index.ts +2 -0
- package/.nuxt/ui/input-menu.ts +3 -3
- package/.nuxt/ui/input-number.ts +204 -0
- package/.nuxt/ui/input.ts +2 -2
- package/.nuxt/ui/navigation-menu.ts +1 -1
- package/.nuxt/ui/pin-input.ts +145 -0
- package/.nuxt/ui/select-menu.ts +8 -13
- package/.nuxt/ui/select.ts +2 -2
- package/.nuxt/ui/table.ts +1 -0
- package/.nuxt/ui/tabs.ts +1 -1
- package/.nuxt/ui/textarea.ts +2 -2
- package/.nuxt/ui/toaster.ts +1 -1
- package/.nuxt/ui/tooltip.ts +1 -1
- package/README.md +52 -12
- package/cli/commands/{init.mjs → make/component.mjs} +4 -4
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +2 -2
- package/cli/templates.mjs +46 -1
- package/cli/utils.mjs +14 -0
- package/dist/chunks/component-meta.cjs +7320 -3335
- package/dist/chunks/component-meta.mjs +7320 -3335
- package/dist/client/devtools/200.html +1 -1
- package/dist/client/devtools/404.html +1 -1
- package/dist/client/devtools/_nuxt/{hKiujHsR.js → BDC8ywlR.js} +1 -1
- package/dist/client/devtools/_nuxt/{DM3_wAgz.js → BT004Uxp.js} +22 -31
- package/dist/client/devtools/_nuxt/{Bj9hdafK.js → C1H2Soz3.js} +1 -1
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/client/devtools/_nuxt/builds/meta/f98c13ea-d751-4b37-8ce3-94e99708745f.json +1 -0
- package/dist/client/devtools/_nuxt/entry.Bx6WJjrx.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.Cq4qshcf.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.ax1aM34m.css +1 -0
- package/dist/client/devtools/index.html +1 -1
- package/dist/module.cjs +13 -12
- package/dist/module.json +1 -1
- package/dist/module.mjs +13 -12
- package/dist/runtime/components/Alert.vue +4 -1
- package/dist/runtime/components/App.vue +11 -5
- package/dist/runtime/components/Breadcrumb.vue +8 -3
- package/dist/runtime/components/Carousel.vue +11 -7
- package/dist/runtime/components/CommandPalette.vue +5 -3
- package/dist/runtime/components/ContextMenuContent.vue +2 -0
- package/dist/runtime/components/DropdownMenuContent.vue +2 -0
- package/dist/runtime/components/Form.vue +18 -20
- package/dist/runtime/components/FormField.vue +7 -3
- package/dist/runtime/components/InputMenu.vue +97 -21
- package/dist/runtime/components/InputNumber.vue +192 -0
- package/dist/runtime/components/Link.vue +19 -5
- package/dist/runtime/components/Modal.vue +12 -3
- package/dist/runtime/components/NavigationMenu.vue +4 -2
- package/dist/runtime/components/Pagination.vue +12 -5
- package/dist/runtime/components/PinInput.vue +96 -0
- package/dist/runtime/components/Popover.vue +17 -1
- package/dist/runtime/components/Select.vue +1 -1
- package/dist/runtime/components/SelectMenu.vue +106 -30
- package/dist/runtime/components/Slideover.vue +12 -3
- package/dist/runtime/components/Table.vue +11 -1
- package/dist/runtime/components/Textarea.vue +1 -1
- package/dist/runtime/components/Toast.vue +4 -1
- package/dist/runtime/components/Toaster.vue +22 -14
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/useFormField.d.ts +4 -1
- package/dist/runtime/composables/useFormField.js +1 -1
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/ar.d.ts +2 -0
- package/dist/runtime/locale/ar.js +47 -0
- package/dist/runtime/locale/cs.d.ts +2 -0
- package/dist/runtime/locale/cs.js +46 -0
- package/dist/runtime/locale/de.d.ts +2 -0
- package/dist/runtime/locale/de.js +46 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +46 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +46 -0
- package/dist/runtime/locale/fa_ir.d.ts +2 -0
- package/dist/runtime/locale/fa_ir.js +47 -0
- package/dist/runtime/locale/fr.d.ts +2 -0
- package/dist/runtime/locale/fr.js +46 -0
- package/dist/runtime/locale/index.d.ts +12 -0
- package/dist/runtime/locale/index.js +12 -0
- package/dist/runtime/locale/it.d.ts +2 -0
- package/dist/runtime/locale/it.js +46 -0
- package/dist/runtime/locale/pl.d.ts +2 -0
- package/dist/runtime/locale/pl.js +46 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +46 -0
- package/dist/runtime/locale/zh_hans.d.ts +2 -0
- package/dist/runtime/locale/zh_hans.js +46 -0
- package/dist/runtime/locale/zh_hant.d.ts +2 -0
- package/dist/runtime/locale/zh_hant.js +46 -0
- package/dist/runtime/types/form.d.ts +7 -2
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/locale.d.ts +48 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/utils/form.d.ts +5 -9
- package/dist/runtime/utils/form.js +115 -50
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/shared/{ui.BU7wzH0D.cjs → ui.BPnAe4QS.cjs} +194 -36
- package/dist/shared/{ui.BufKhDiD.mjs → ui.d52SSCwA.mjs} +194 -36
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.d.cts +5 -3
- package/dist/unplugin.d.mts +5 -3
- package/dist/unplugin.d.ts +5 -3
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +33 -26
- package/dist/client/devtools/_nuxt/builds/meta/e6b425f7-b919-4014-915b-0ea07c316790.json +0 -1
- package/dist/client/devtools/_nuxt/entry.DaJP-ZMB.css +0 -24
- package/dist/client/devtools/_nuxt/error-404.B0Nmv3fV.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.C8fgTxVz.css +0 -1
|
@@ -5,20 +5,22 @@ import { addTypeTemplate, addTemplate } from '@nuxt/kit';
|
|
|
5
5
|
import { defuFn, defu } from 'defu';
|
|
6
6
|
|
|
7
7
|
const icons = {
|
|
8
|
+
arrowLeft: "i-lucide-arrow-left",
|
|
9
|
+
arrowRight: "i-lucide-arrow-right",
|
|
10
|
+
check: "i-lucide-check",
|
|
8
11
|
chevronDoubleLeft: "i-lucide-chevrons-left",
|
|
9
12
|
chevronDoubleRight: "i-lucide-chevrons-right",
|
|
10
13
|
chevronDown: "i-lucide-chevron-down",
|
|
11
14
|
chevronLeft: "i-lucide-chevron-left",
|
|
12
15
|
chevronRight: "i-lucide-chevron-right",
|
|
13
|
-
arrowLeft: "i-lucide-arrow-left",
|
|
14
|
-
arrowRight: "i-lucide-arrow-right",
|
|
15
|
-
check: "i-lucide-check",
|
|
16
16
|
close: "i-lucide-x",
|
|
17
17
|
ellipsis: "i-lucide-ellipsis",
|
|
18
18
|
external: "i-lucide-arrow-up-right",
|
|
19
19
|
loading: "i-lucide-refresh-ccw",
|
|
20
20
|
minus: "i-lucide-minus",
|
|
21
|
-
|
|
21
|
+
plus: "i-lucide-plus",
|
|
22
|
+
search: "i-lucide-search",
|
|
23
|
+
chevronUp: "i-lucide-chevron-up"
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
const getDefaultUiConfig = (colors) => ({
|
|
@@ -502,7 +504,7 @@ const button = (options) => ({
|
|
|
502
504
|
})), {
|
|
503
505
|
color: "neutral",
|
|
504
506
|
variant: "solid",
|
|
505
|
-
class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/
|
|
507
|
+
class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/90 disabled:bg-[var(--ui-bg-inverted)] aria-disabled:bg-[var(--ui-bg-inverted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
|
|
506
508
|
}, {
|
|
507
509
|
color: "neutral",
|
|
508
510
|
variant: "outline",
|
|
@@ -566,7 +568,7 @@ const button = (options) => ({
|
|
|
566
568
|
|
|
567
569
|
const card = {
|
|
568
570
|
slots: {
|
|
569
|
-
root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow",
|
|
571
|
+
root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow-sm",
|
|
570
572
|
header: "p-4 sm:px-6",
|
|
571
573
|
body: "p-4 sm:p-6",
|
|
572
574
|
footer: "p-4 sm:px-6"
|
|
@@ -591,8 +593,8 @@ const carousel = (options) => ({
|
|
|
591
593
|
vertical: {
|
|
592
594
|
container: "flex-col -mt-4",
|
|
593
595
|
item: "pt-4",
|
|
594
|
-
prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
595
|
-
next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90"
|
|
596
|
+
prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90",
|
|
597
|
+
next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90"
|
|
596
598
|
},
|
|
597
599
|
horizontal: {
|
|
598
600
|
container: "flex-row -ms-4",
|
|
@@ -786,7 +788,7 @@ const commandPalette = (options) => ({
|
|
|
786
788
|
});
|
|
787
789
|
|
|
788
790
|
const container = {
|
|
789
|
-
base: "max-w-
|
|
791
|
+
base: "max-w-[var(--ui-container)] mx-auto px-4 sm:px-6 lg:px-8"
|
|
790
792
|
};
|
|
791
793
|
|
|
792
794
|
const contextMenu = (options) => ({
|
|
@@ -1141,8 +1143,8 @@ const input = (options) => ({
|
|
|
1141
1143
|
outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1142
1144
|
soft: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg-elevated)]/50",
|
|
1143
1145
|
subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1144
|
-
ghost: "text-[var(--ui-text-highlighted)] hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1145
|
-
none: "text-[var(--ui-text-highlighted)]"
|
|
1146
|
+
ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1147
|
+
none: "text-[var(--ui-text-highlighted)] bg-transparent"
|
|
1146
1148
|
},
|
|
1147
1149
|
color: {
|
|
1148
1150
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1273,7 +1275,7 @@ const inputMenu = (options) => {
|
|
|
1273
1275
|
true: {
|
|
1274
1276
|
root: "flex-wrap",
|
|
1275
1277
|
base: "",
|
|
1276
|
-
tagsInput: "border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1278
|
+
tagsInput: "border-0 bg-transparent placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1277
1279
|
},
|
|
1278
1280
|
false: {
|
|
1279
1281
|
base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
@@ -1351,6 +1353,116 @@ const inputMenu = (options) => {
|
|
|
1351
1353
|
}, input(options));
|
|
1352
1354
|
};
|
|
1353
1355
|
|
|
1356
|
+
const inputNumber = (options) => {
|
|
1357
|
+
const input$1 = input(options);
|
|
1358
|
+
return {
|
|
1359
|
+
slots: {
|
|
1360
|
+
root: "relative inline-flex items-center",
|
|
1361
|
+
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
1362
|
+
increment: "absolute flex items-center",
|
|
1363
|
+
decrement: "absolute flex items-center"
|
|
1364
|
+
},
|
|
1365
|
+
variants: {
|
|
1366
|
+
color: {
|
|
1367
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
1368
|
+
neutral: ""
|
|
1369
|
+
},
|
|
1370
|
+
size: {
|
|
1371
|
+
xs: "px-2 py-1 text-xs gap-1",
|
|
1372
|
+
sm: "px-2.5 py-1.5 text-xs gap-1.5",
|
|
1373
|
+
md: "px-2.5 py-1.5 text-sm gap-1.5",
|
|
1374
|
+
lg: "px-3 py-2 text-sm gap-2",
|
|
1375
|
+
xl: "px-3 py-2 text-base gap-2"
|
|
1376
|
+
},
|
|
1377
|
+
variant: {
|
|
1378
|
+
...input$1.variants.variant
|
|
1379
|
+
},
|
|
1380
|
+
disabled: {
|
|
1381
|
+
true: {
|
|
1382
|
+
increment: "opacity-75 cursor-not-allowed",
|
|
1383
|
+
decrement: "opacity-75 cursor-not-allowed"
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
orientation: {
|
|
1387
|
+
horizontal: {
|
|
1388
|
+
base: "text-center",
|
|
1389
|
+
increment: "inset-y-0 end-0 pe-1",
|
|
1390
|
+
decrement: "inset-y-0 start-0 ps-1"
|
|
1391
|
+
},
|
|
1392
|
+
vertical: {
|
|
1393
|
+
increment: "top-0 end-0 pe-1 [&>button]:py-0 scale-80",
|
|
1394
|
+
decrement: "bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
highlight: {
|
|
1398
|
+
true: ""
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1402
|
+
color,
|
|
1403
|
+
variant: ["outline", "subtle"],
|
|
1404
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
|
|
1405
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
1406
|
+
color,
|
|
1407
|
+
highlight: true,
|
|
1408
|
+
class: `ring ring-inset ring-[var(--ui-${color})]`
|
|
1409
|
+
})), {
|
|
1410
|
+
color: "neutral",
|
|
1411
|
+
variant: ["outline", "subtle"],
|
|
1412
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
|
|
1413
|
+
}, {
|
|
1414
|
+
color: "neutral",
|
|
1415
|
+
highlight: true,
|
|
1416
|
+
class: "ring ring-inset ring-[var(--ui-border-inverted)]"
|
|
1417
|
+
}, {
|
|
1418
|
+
orientation: "horizontal",
|
|
1419
|
+
size: "xs",
|
|
1420
|
+
class: "px-7"
|
|
1421
|
+
}, {
|
|
1422
|
+
orientation: "horizontal",
|
|
1423
|
+
size: "sm",
|
|
1424
|
+
class: "px-8"
|
|
1425
|
+
}, {
|
|
1426
|
+
orientation: "horizontal",
|
|
1427
|
+
size: "md",
|
|
1428
|
+
class: "px-9"
|
|
1429
|
+
}, {
|
|
1430
|
+
orientation: "horizontal",
|
|
1431
|
+
size: "lg",
|
|
1432
|
+
class: "px-10"
|
|
1433
|
+
}, {
|
|
1434
|
+
orientation: "horizontal",
|
|
1435
|
+
size: "xl",
|
|
1436
|
+
class: "px-11"
|
|
1437
|
+
}, {
|
|
1438
|
+
orientation: "vertical",
|
|
1439
|
+
size: "xs",
|
|
1440
|
+
class: "pe-7"
|
|
1441
|
+
}, {
|
|
1442
|
+
orientation: "vertical",
|
|
1443
|
+
size: "sm",
|
|
1444
|
+
class: "pe-8"
|
|
1445
|
+
}, {
|
|
1446
|
+
orientation: "vertical",
|
|
1447
|
+
size: "md",
|
|
1448
|
+
class: "pe-9"
|
|
1449
|
+
}, {
|
|
1450
|
+
orientation: "vertical",
|
|
1451
|
+
size: "lg",
|
|
1452
|
+
class: "pe-10"
|
|
1453
|
+
}, {
|
|
1454
|
+
orientation: "vertical",
|
|
1455
|
+
size: "xl",
|
|
1456
|
+
class: "pe-11"
|
|
1457
|
+
}],
|
|
1458
|
+
defaultVariants: {
|
|
1459
|
+
size: "md",
|
|
1460
|
+
color: "primary",
|
|
1461
|
+
variant: "outline"
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1354
1466
|
const kbd = {
|
|
1355
1467
|
base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
|
|
1356
1468
|
variants: {
|
|
@@ -1423,7 +1535,7 @@ const navigationMenu = (options) => ({
|
|
|
1423
1535
|
linkLeadingAvatar: "shrink-0",
|
|
1424
1536
|
linkLeadingAvatarSize: "2xs",
|
|
1425
1537
|
linkTrailing: "ms-auto inline-flex",
|
|
1426
|
-
linkTrailingBadge: "shrink-0 rounded",
|
|
1538
|
+
linkTrailingBadge: "shrink-0 rounded-[calc(var(--ui-radius)]",
|
|
1427
1539
|
linkTrailingBadgeSize: "sm",
|
|
1428
1540
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1429
1541
|
linkLabel: "truncate",
|
|
@@ -1622,6 +1734,68 @@ const pagination = {
|
|
|
1622
1734
|
}
|
|
1623
1735
|
};
|
|
1624
1736
|
|
|
1737
|
+
const pinInput = (options) => ({
|
|
1738
|
+
slots: {
|
|
1739
|
+
root: "relative inline-flex items-center gap-1.5",
|
|
1740
|
+
base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"]
|
|
1741
|
+
},
|
|
1742
|
+
variants: {
|
|
1743
|
+
size: {
|
|
1744
|
+
xs: {
|
|
1745
|
+
base: "size-6 text-xs"
|
|
1746
|
+
},
|
|
1747
|
+
sm: {
|
|
1748
|
+
base: "size-7 text-xs"
|
|
1749
|
+
},
|
|
1750
|
+
md: {
|
|
1751
|
+
base: "size-8 text-sm"
|
|
1752
|
+
},
|
|
1753
|
+
lg: {
|
|
1754
|
+
base: "size-9 text-sm"
|
|
1755
|
+
},
|
|
1756
|
+
xl: {
|
|
1757
|
+
base: "size-10 text-base"
|
|
1758
|
+
}
|
|
1759
|
+
},
|
|
1760
|
+
variant: {
|
|
1761
|
+
outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1762
|
+
soft: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg-elevated)]/50",
|
|
1763
|
+
subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1764
|
+
ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1765
|
+
none: "text-[var(--ui-text-highlighted)] bg-transparent"
|
|
1766
|
+
},
|
|
1767
|
+
color: {
|
|
1768
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
1769
|
+
neutral: ""
|
|
1770
|
+
},
|
|
1771
|
+
highlight: {
|
|
1772
|
+
true: ""
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1776
|
+
color,
|
|
1777
|
+
variant: ["outline", "subtle"],
|
|
1778
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
|
|
1779
|
+
})), ...(options.theme.colors || []).map((color) => ({
|
|
1780
|
+
color,
|
|
1781
|
+
highlight: true,
|
|
1782
|
+
class: `ring ring-inset ring-[var(--ui-${color})]`
|
|
1783
|
+
})), {
|
|
1784
|
+
color: "neutral",
|
|
1785
|
+
variant: ["outline", "subtle"],
|
|
1786
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
|
|
1787
|
+
}, {
|
|
1788
|
+
color: "neutral",
|
|
1789
|
+
highlight: true,
|
|
1790
|
+
class: "ring ring-inset ring-[var(--ui-border-inverted)]"
|
|
1791
|
+
}],
|
|
1792
|
+
defaultVariants: {
|
|
1793
|
+
size: "md",
|
|
1794
|
+
color: "primary",
|
|
1795
|
+
variant: "outline"
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
|
|
1625
1799
|
const popover = {
|
|
1626
1800
|
slots: {
|
|
1627
1801
|
content: "bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none",
|
|
@@ -2017,26 +2191,7 @@ const selectMenu = (options) => {
|
|
|
2017
2191
|
slots: {
|
|
2018
2192
|
value: "truncate",
|
|
2019
2193
|
placeholder: "truncate text-[var(--ui-text-dimmed)]",
|
|
2020
|
-
input: "
|
|
2021
|
-
},
|
|
2022
|
-
variants: {
|
|
2023
|
-
size: {
|
|
2024
|
-
xs: {
|
|
2025
|
-
input: "text-xs px-2 py-1"
|
|
2026
|
-
},
|
|
2027
|
-
sm: {
|
|
2028
|
-
input: "text-xs px-2.5 py-1.5"
|
|
2029
|
-
},
|
|
2030
|
-
md: {
|
|
2031
|
-
input: "text-sm px-2.5 py-1.5"
|
|
2032
|
-
},
|
|
2033
|
-
lg: {
|
|
2034
|
-
input: "text-sm px-3 py-2"
|
|
2035
|
-
},
|
|
2036
|
-
xl: {
|
|
2037
|
-
input: "text-base px-3 py-2"
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2194
|
+
input: "border-b border-[var(--ui-border)]"
|
|
2040
2195
|
}
|
|
2041
2196
|
}, select(options));
|
|
2042
2197
|
};
|
|
@@ -2408,6 +2563,7 @@ const table = (options) => ({
|
|
|
2408
2563
|
slots: {
|
|
2409
2564
|
root: "relative overflow-auto",
|
|
2410
2565
|
base: "min-w-full overflow-clip",
|
|
2566
|
+
caption: "sr-only",
|
|
2411
2567
|
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-[var(--ui-border-accented)]",
|
|
2412
2568
|
tbody: "divide-y divide-[var(--ui-border)]",
|
|
2413
2569
|
tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
|
|
@@ -2507,7 +2663,7 @@ const tabs = (options) => ({
|
|
|
2507
2663
|
pill: {
|
|
2508
2664
|
list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
|
|
2509
2665
|
trigger: "flex-1 w-full",
|
|
2510
|
-
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-
|
|
2666
|
+
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
|
|
2511
2667
|
},
|
|
2512
2668
|
link: {
|
|
2513
2669
|
list: "border-[var(--ui-border)]",
|
|
@@ -2666,7 +2822,7 @@ const toast = (options) => ({
|
|
|
2666
2822
|
const toaster = {
|
|
2667
2823
|
slots: {
|
|
2668
2824
|
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
|
|
2669
|
-
base: "absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible 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"
|
|
2825
|
+
base: "pointer-events-auto absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible 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"
|
|
2670
2826
|
},
|
|
2671
2827
|
variants: {
|
|
2672
2828
|
position: {
|
|
@@ -2722,7 +2878,7 @@ const toaster = {
|
|
|
2722
2878
|
|
|
2723
2879
|
const tooltip = {
|
|
2724
2880
|
slots: {
|
|
2725
|
-
content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] 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]",
|
|
2881
|
+
content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow-sm rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] 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]",
|
|
2726
2882
|
arrow: "fill-[var(--ui-border)]",
|
|
2727
2883
|
text: "truncate",
|
|
2728
2884
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
@@ -2754,11 +2910,13 @@ const theme = {
|
|
|
2754
2910
|
formField: formField,
|
|
2755
2911
|
input: input,
|
|
2756
2912
|
inputMenu: inputMenu,
|
|
2913
|
+
inputNumber: inputNumber,
|
|
2757
2914
|
kbd: kbd,
|
|
2758
2915
|
link: link,
|
|
2759
2916
|
modal: modal,
|
|
2760
2917
|
navigationMenu: navigationMenu,
|
|
2761
2918
|
pagination: pagination,
|
|
2919
|
+
pinInput: pinInput,
|
|
2762
2920
|
popover: popover,
|
|
2763
2921
|
progress: progress,
|
|
2764
2922
|
radioGroup: radioGroup,
|
package/dist/unplugin.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const unplugin = require('unplugin');
|
|
|
6
6
|
const AutoImport = require('unplugin-auto-import');
|
|
7
7
|
const defu = require('defu');
|
|
8
8
|
const tailwind = require('@tailwindcss/vite');
|
|
9
|
-
const templates = require('./shared/ui.
|
|
9
|
+
const templates = require('./shared/ui.BPnAe4QS.cjs');
|
|
10
10
|
const tinyglobby = require('tinyglobby');
|
|
11
11
|
const knitwork = require('knitwork');
|
|
12
12
|
const MagicString = require('magic-string');
|
package/dist/unplugin.d.cts
CHANGED
|
@@ -7,20 +7,22 @@ import '@nuxt/schema';
|
|
|
7
7
|
import '../dist/runtime/types/index.js';
|
|
8
8
|
|
|
9
9
|
declare const _default: {
|
|
10
|
+
arrowLeft: string;
|
|
11
|
+
arrowRight: string;
|
|
12
|
+
check: string;
|
|
10
13
|
chevronDoubleLeft: string;
|
|
11
14
|
chevronDoubleRight: string;
|
|
12
15
|
chevronDown: string;
|
|
13
16
|
chevronLeft: string;
|
|
14
17
|
chevronRight: string;
|
|
15
|
-
arrowLeft: string;
|
|
16
|
-
arrowRight: string;
|
|
17
|
-
check: string;
|
|
18
18
|
close: string;
|
|
19
19
|
ellipsis: string;
|
|
20
20
|
external: string;
|
|
21
21
|
loading: string;
|
|
22
22
|
minus: string;
|
|
23
|
+
plus: string;
|
|
23
24
|
search: string;
|
|
25
|
+
chevronUp: string;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone';
|
package/dist/unplugin.d.mts
CHANGED
|
@@ -7,20 +7,22 @@ import '@nuxt/schema';
|
|
|
7
7
|
import '../dist/runtime/types/index.js';
|
|
8
8
|
|
|
9
9
|
declare const _default: {
|
|
10
|
+
arrowLeft: string;
|
|
11
|
+
arrowRight: string;
|
|
12
|
+
check: string;
|
|
10
13
|
chevronDoubleLeft: string;
|
|
11
14
|
chevronDoubleRight: string;
|
|
12
15
|
chevronDown: string;
|
|
13
16
|
chevronLeft: string;
|
|
14
17
|
chevronRight: string;
|
|
15
|
-
arrowLeft: string;
|
|
16
|
-
arrowRight: string;
|
|
17
|
-
check: string;
|
|
18
18
|
close: string;
|
|
19
19
|
ellipsis: string;
|
|
20
20
|
external: string;
|
|
21
21
|
loading: string;
|
|
22
22
|
minus: string;
|
|
23
|
+
plus: string;
|
|
23
24
|
search: string;
|
|
25
|
+
chevronUp: string;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone';
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -7,20 +7,22 @@ import '@nuxt/schema';
|
|
|
7
7
|
import '../dist/runtime/types/index.js';
|
|
8
8
|
|
|
9
9
|
declare const _default: {
|
|
10
|
+
arrowLeft: string;
|
|
11
|
+
arrowRight: string;
|
|
12
|
+
check: string;
|
|
10
13
|
chevronDoubleLeft: string;
|
|
11
14
|
chevronDoubleRight: string;
|
|
12
15
|
chevronDown: string;
|
|
13
16
|
chevronLeft: string;
|
|
14
17
|
chevronRight: string;
|
|
15
|
-
arrowLeft: string;
|
|
16
|
-
arrowRight: string;
|
|
17
|
-
check: string;
|
|
18
18
|
close: string;
|
|
19
19
|
ellipsis: string;
|
|
20
20
|
external: string;
|
|
21
21
|
loading: string;
|
|
22
22
|
minus: string;
|
|
23
|
+
plus: string;
|
|
23
24
|
search: string;
|
|
25
|
+
chevronUp: string;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone';
|
package/dist/unplugin.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { createUnplugin } from 'unplugin';
|
|
|
4
4
|
import AutoImport from 'unplugin-auto-import';
|
|
5
5
|
import { defu } from 'defu';
|
|
6
6
|
import tailwind from '@tailwindcss/vite';
|
|
7
|
-
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.
|
|
7
|
+
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.d52SSCwA.mjs';
|
|
8
8
|
import { globSync } from 'tinyglobby';
|
|
9
9
|
import { genSafeVariableName } from 'knitwork';
|
|
10
10
|
import MagicString from 'magic-string';
|
package/dist/vite.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('unplugin');
|
|
|
7
7
|
require('unplugin-auto-import');
|
|
8
8
|
require('defu');
|
|
9
9
|
require('@tailwindcss/vite');
|
|
10
|
-
require('./shared/ui.
|
|
10
|
+
require('./shared/ui.BPnAe4QS.cjs');
|
|
11
11
|
require('../dist/runtime/utils/index.js');
|
|
12
12
|
require('scule');
|
|
13
13
|
require('@nuxt/kit');
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
3
|
"description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "3.0.0-alpha.9",
|
|
5
|
+
"packageManager": "pnpm@9.13.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/nuxt/ui.git"
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
"./vue-plugin": {
|
|
31
31
|
"types": "./vue-plugin.d.ts"
|
|
32
32
|
},
|
|
33
|
-
"./runtime/*": "./dist/runtime/*"
|
|
33
|
+
"./runtime/*": "./dist/runtime/*",
|
|
34
|
+
"./locale": {
|
|
35
|
+
"types": "./dist/runtime/locale/index.d.ts",
|
|
36
|
+
"import": "./dist/runtime/locale/index.js"
|
|
37
|
+
}
|
|
34
38
|
},
|
|
35
39
|
"imports": {
|
|
36
40
|
"#build/ui/*": "./.nuxt/ui/*.ts"
|
|
@@ -51,6 +55,7 @@
|
|
|
51
55
|
"build": "nuxt-module-build build && pnpm devtools:build",
|
|
52
56
|
"prepack": "pnpm build",
|
|
53
57
|
"dev": "DEV=true nuxi dev playground",
|
|
58
|
+
"dev:vue": "DEV=true vite playground-vue",
|
|
54
59
|
"dev:build": "nuxi build playground",
|
|
55
60
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && nuxi prepare devtools && vite build playground-vue",
|
|
56
61
|
"devtools": "NUXT_UI_DEVTOOLS_LOCAL=true nuxi dev playground",
|
|
@@ -64,59 +69,60 @@
|
|
|
64
69
|
"typecheck": "vue-tsc --noEmit && nuxi typecheck playground && nuxi typecheck docs && nuxi typecheck devtools && cd playground-vue && vue-tsc --noEmit",
|
|
65
70
|
"test": "vitest",
|
|
66
71
|
"test:vue": "vitest -c vitest.vue.config.ts",
|
|
72
|
+
"test:vue:build": "vite build playground-vue",
|
|
67
73
|
"release": "release-it --preRelease=alpha --npm.tag=next"
|
|
68
74
|
},
|
|
69
75
|
"dependencies": {
|
|
70
76
|
"@iconify/vue": "^4.1.2",
|
|
77
|
+
"@internationalized/number": "^3.5.4",
|
|
71
78
|
"@nuxt/devtools-kit": "^1.6.0",
|
|
72
79
|
"@nuxt/fonts": "^0.10.2",
|
|
73
|
-
"@nuxt/icon": "^1.
|
|
80
|
+
"@nuxt/icon": "^1.8.1",
|
|
74
81
|
"@nuxt/kit": "^3.14.159",
|
|
75
82
|
"@nuxt/schema": "^3.14.159",
|
|
76
83
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
77
|
-
"@tailwindcss/postcss": "4.0.0-alpha.
|
|
78
|
-
"@tailwindcss/vite": "4.0.0-alpha.
|
|
84
|
+
"@tailwindcss/postcss": "4.0.0-alpha.34",
|
|
85
|
+
"@tailwindcss/vite": "4.0.0-alpha.34",
|
|
79
86
|
"@tanstack/vue-table": "^8.20.5",
|
|
80
87
|
"@unhead/vue": "^1.11.11",
|
|
81
88
|
"@vueuse/core": "^11.2.0",
|
|
82
89
|
"@vueuse/integrations": "^11.2.0",
|
|
83
90
|
"consola": "^3.2.3",
|
|
84
91
|
"defu": "^6.1.4",
|
|
85
|
-
"embla-carousel-auto-height": "^8.
|
|
86
|
-
"embla-carousel-auto-scroll": "^8.
|
|
87
|
-
"embla-carousel-autoplay": "^8.
|
|
88
|
-
"embla-carousel-class-names": "^8.
|
|
89
|
-
"embla-carousel-fade": "^8.
|
|
90
|
-
"embla-carousel-vue": "^8.
|
|
92
|
+
"embla-carousel-auto-height": "^8.4.0",
|
|
93
|
+
"embla-carousel-auto-scroll": "^8.4.0",
|
|
94
|
+
"embla-carousel-autoplay": "^8.4.0",
|
|
95
|
+
"embla-carousel-class-names": "^8.4.0",
|
|
96
|
+
"embla-carousel-fade": "^8.4.0",
|
|
97
|
+
"embla-carousel-vue": "^8.4.0",
|
|
91
98
|
"embla-carousel-wheel-gestures": "^8.0.1",
|
|
92
|
-
"fast-deep-equal": "^3.1.3",
|
|
93
99
|
"fuse.js": "^7.0.0",
|
|
94
100
|
"get-port-please": "^3.1.2",
|
|
95
101
|
"knitwork": "^1.1.0",
|
|
96
|
-
"magic-string": "^0.30.
|
|
97
|
-
"mlly": "^1.7.
|
|
102
|
+
"magic-string": "^0.30.13",
|
|
103
|
+
"mlly": "^1.7.3",
|
|
98
104
|
"ohash": "^1.1.4",
|
|
99
105
|
"pathe": "^1.1.2",
|
|
100
|
-
"radix-vue": "^1.9.
|
|
106
|
+
"radix-vue": "^1.9.10",
|
|
101
107
|
"scule": "^1.3.0",
|
|
102
108
|
"sirv": "^3.0.0",
|
|
103
|
-
"tailwind-variants": "^0.
|
|
104
|
-
"tailwindcss": "4.0.0-alpha.
|
|
109
|
+
"tailwind-variants": "^0.3.0",
|
|
110
|
+
"tailwindcss": "4.0.0-alpha.34",
|
|
105
111
|
"tinyglobby": "^0.2.10",
|
|
106
|
-
"unplugin": "^1.
|
|
107
|
-
"unplugin-auto-import": "^0.18.
|
|
112
|
+
"unplugin": "^1.16.0",
|
|
113
|
+
"unplugin-auto-import": "^0.18.5",
|
|
108
114
|
"unplugin-vue-components": "^0.27.4",
|
|
109
115
|
"vaul-vue": "^0.2.0"
|
|
110
116
|
},
|
|
111
117
|
"devDependencies": {
|
|
112
|
-
"@nuxt/eslint-config": "^0.
|
|
118
|
+
"@nuxt/eslint-config": "^0.7.1",
|
|
113
119
|
"@nuxt/module-builder": "^0.8.4",
|
|
114
120
|
"@nuxt/test-utils": "^3.14.4",
|
|
115
|
-
"@release-it/conventional-changelog": "^9.0.
|
|
116
|
-
"@standard-schema/spec": "1.0.0-beta.
|
|
121
|
+
"@release-it/conventional-changelog": "^9.0.3",
|
|
122
|
+
"@standard-schema/spec": "1.0.0-beta.3",
|
|
117
123
|
"@vue/test-utils": "^2.4.6",
|
|
118
|
-
"embla-carousel": "^8.
|
|
119
|
-
"eslint": "^9.
|
|
124
|
+
"embla-carousel": "^8.4.0",
|
|
125
|
+
"eslint": "^9.15.0",
|
|
120
126
|
"happy-dom": "^15.7.4",
|
|
121
127
|
"joi": "^17.13.3",
|
|
122
128
|
"knitwork": "^1.1.0",
|
|
@@ -125,7 +131,7 @@
|
|
|
125
131
|
"release-it": "^17.10.0",
|
|
126
132
|
"superstruct": "^2.0.2",
|
|
127
133
|
"valibot": "^0.42.1",
|
|
128
|
-
"vitest": "^2.1.
|
|
134
|
+
"vitest": "^2.1.5",
|
|
129
135
|
"vitest-environment-nuxt": "^1.0.1",
|
|
130
136
|
"vue-tsc": "^2.1.10",
|
|
131
137
|
"yup": "^1.4.0",
|
|
@@ -136,6 +142,7 @@
|
|
|
136
142
|
},
|
|
137
143
|
"resolutions": {
|
|
138
144
|
"@nuxt/ui": "workspace:*",
|
|
145
|
+
"@nuxt/content": "3.0.0-alpha.5",
|
|
139
146
|
"happy-dom": "14.12.3",
|
|
140
147
|
"rollup": "^4.24.0"
|
|
141
148
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"e6b425f7-b919-4014-915b-0ea07c316790","timestamp":1730987910432,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|