@nuxt/ui 2.18.7 → 2.19.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/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/data/Table.vue +82 -27
- package/dist/runtime/components/data/Table.vue.d.ts +45 -37
- package/dist/runtime/components/elements/AvatarGroup.js +2 -2
- package/dist/runtime/components/elements/Carousel.vue +1 -1
- package/dist/runtime/components/elements/Dropdown.vue +6 -2
- package/dist/runtime/components/elements/MeterGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Progress.vue +1 -1
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +1 -1
- package/dist/runtime/components/forms/Form.vue +104 -43
- package/dist/runtime/components/forms/Form.vue.d.ts +5 -3
- package/dist/runtime/components/forms/Input.vue +5 -2
- package/dist/runtime/components/forms/Input.vue.d.ts +3 -0
- package/dist/runtime/components/forms/InputMenu.vue +419 -8
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +19 -0
- package/dist/runtime/components/forms/Radio.vue.d.ts +1 -1
- package/dist/runtime/components/forms/RadioGroup.vue +3 -4
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +1 -1
- package/dist/runtime/components/forms/SelectMenu.vue +501 -11
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +30 -2
- package/dist/runtime/components/forms/Textarea.vue +7 -4
- package/dist/runtime/components/forms/Textarea.vue.d.ts +3 -0
- package/dist/runtime/components/layout/Divider.vue +1 -1
- package/dist/runtime/components/layout/Divider.vue.d.ts +5 -2
- package/dist/runtime/components/navigation/CommandPalette.vue +1 -1
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Pagination.vue +4 -4
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Tabs.vue +1 -1
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +6 -2
- package/dist/runtime/components/overlays/Modal.vue +1 -1
- package/dist/runtime/components/overlays/Notifications.vue +1 -1
- package/dist/runtime/components/overlays/Popover.vue +6 -2
- package/dist/runtime/composables/defineShortcuts.js +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
- package/dist/runtime/composables/useUI.js +1 -1
- package/dist/runtime/plugins/modals.js +1 -1
- package/dist/runtime/plugins/slideovers.js +1 -1
- package/dist/runtime/types/accordion.d.ts +1 -1
- package/dist/runtime/types/alert.d.ts +4 -4
- package/dist/runtime/types/avatar.d.ts +3 -3
- package/dist/runtime/types/badge.d.ts +3 -3
- package/dist/runtime/types/button.d.ts +3 -5
- package/dist/runtime/types/chip.d.ts +2 -2
- package/dist/runtime/types/command-palette.d.ts +2 -2
- package/dist/runtime/types/component.d.ts +3 -3
- package/dist/runtime/types/divider.d.ts +3 -3
- package/dist/runtime/types/dropdown.d.ts +1 -1
- package/dist/runtime/types/form-group.d.ts +2 -2
- package/dist/runtime/types/form.d.ts +7 -2
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/input.d.ts +3 -3
- package/dist/runtime/types/kbd.d.ts +2 -2
- package/dist/runtime/types/meter.d.ts +2 -2
- package/dist/runtime/types/modal.d.ts +2 -2
- package/dist/runtime/types/notification.d.ts +1 -1
- package/dist/runtime/types/progress.d.ts +2 -2
- package/dist/runtime/types/range.d.ts +3 -3
- package/dist/runtime/types/select.d.ts +3 -3
- package/dist/runtime/types/table.d.ts +18 -0
- package/dist/runtime/types/textarea.d.ts +3 -3
- package/dist/runtime/types/toggle.d.ts +3 -3
- package/dist/runtime/types/utils.d.ts +2 -2
- package/dist/runtime/ui.config/data/table.d.ts +1 -0
- package/dist/runtime/ui.config/data/table.js +1 -0
- package/dist/runtime/ui.config/elements/avatar.js +15 -15
- package/dist/runtime/ui.config/elements/button.js +25 -25
- package/dist/runtime/ui.config/elements/buttonGroup.js +1 -1
- package/dist/runtime/ui.config/elements/chip.js +5 -5
- package/dist/runtime/ui.config/elements/meter.js +20 -20
- package/dist/runtime/ui.config/elements/meterGroup.js +1 -1
- package/dist/runtime/ui.config/elements/progress.js +18 -18
- package/dist/runtime/ui.config/forms/formGroup.js +5 -6
- package/dist/runtime/ui.config/forms/input.js +40 -40
- package/dist/runtime/ui.config/forms/inputMenu.d.ts +6 -0
- package/dist/runtime/ui.config/forms/inputMenu.js +7 -1
- package/dist/runtime/ui.config/forms/range.js +20 -20
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +9 -0
- package/dist/runtime/ui.config/forms/selectMenu.js +10 -1
- package/dist/runtime/ui.config/forms/toggle.js +20 -20
- package/dist/runtime/ui.config/layout/divider.d.ts +1 -0
- package/dist/runtime/ui.config/layout/divider.js +12 -11
- package/dist/runtime/ui.config/navigation/horizontalNavigation.js +1 -1
- package/dist/runtime/ui.config/navigation/verticalNavigation.js +1 -1
- package/dist/runtime/ui.config/popper.js +0 -1
- package/dist/runtime/utils/colors.js +7 -7
- package/dist/runtime/utils/index.js +4 -4
- package/dist/runtime/utils/lodash.js +1 -1
- package/package.json +21 -19
|
@@ -16,19 +16,19 @@ export default {
|
|
|
16
16
|
size: {
|
|
17
17
|
horizontal: {
|
|
18
18
|
"2xs": "border-t",
|
|
19
|
-
xs: "border-t-[2px]",
|
|
20
|
-
sm: "border-t-[3px]",
|
|
21
|
-
md: "border-t-[4px]",
|
|
22
|
-
lg: "border-t-[5px]",
|
|
23
|
-
xl: "border-t-[6px]"
|
|
19
|
+
"xs": "border-t-[2px]",
|
|
20
|
+
"sm": "border-t-[3px]",
|
|
21
|
+
"md": "border-t-[4px]",
|
|
22
|
+
"lg": "border-t-[5px]",
|
|
23
|
+
"xl": "border-t-[6px]"
|
|
24
24
|
},
|
|
25
25
|
vertical: {
|
|
26
26
|
"2xs": "border-s",
|
|
27
|
-
xs: "border-s-[2px]",
|
|
28
|
-
sm: "border-s-[3px]",
|
|
29
|
-
md: "border-s-[4px]",
|
|
30
|
-
lg: "border-s-[5px]",
|
|
31
|
-
xl: "border-s-[6px]"
|
|
27
|
+
"xs": "border-s-[2px]",
|
|
28
|
+
"sm": "border-s-[3px]",
|
|
29
|
+
"md": "border-s-[4px]",
|
|
30
|
+
"lg": "border-s-[5px]",
|
|
31
|
+
"xl": "border-s-[6px]"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
type: {
|
|
@@ -46,6 +46,7 @@ export default {
|
|
|
46
46
|
},
|
|
47
47
|
label: "text-sm",
|
|
48
48
|
default: {
|
|
49
|
-
size: "2xs"
|
|
49
|
+
size: "2xs",
|
|
50
|
+
type: "solid"
|
|
50
51
|
}
|
|
51
52
|
};
|
|
@@ -4,6 +4,5 @@ export const arrow = {
|
|
|
4
4
|
rounded: "before:rounded-sm",
|
|
5
5
|
background: "before:bg-gray-200 dark:before:bg-gray-800",
|
|
6
6
|
shadow: "before:shadow",
|
|
7
|
-
// eslint-disable-next-line quotes
|
|
8
7
|
placement: `group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1`
|
|
9
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { omit } from "./lodash.js";
|
|
2
1
|
import { kebabCase, camelCase, upperFirst } from "scule";
|
|
3
2
|
import defaultColors from "tailwindcss/colors.js";
|
|
3
|
+
import { omit } from "./lodash.js";
|
|
4
4
|
const colorsToExclude = [
|
|
5
5
|
"inherit",
|
|
6
6
|
"transparent",
|
|
@@ -206,11 +206,11 @@ const safelistByComponent = {
|
|
|
206
206
|
}]
|
|
207
207
|
};
|
|
208
208
|
const safelistComponentAliasesMap = {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
USelect: "UInput",
|
|
210
|
+
USelectMenu: "UInput",
|
|
211
|
+
UTextarea: "UInput",
|
|
212
|
+
URadioGroup: "URadio",
|
|
213
|
+
UMeterGroup: "UMeter"
|
|
214
214
|
};
|
|
215
215
|
const colorsAsRegex = (colors) => colors.join("|");
|
|
216
216
|
export const excludeColors = (colors) => {
|
|
@@ -270,7 +270,7 @@ export const generateSafelist = (colors, globalColors) => {
|
|
|
270
270
|
};
|
|
271
271
|
export const customSafelistExtractor = (prefix, content, colors, safelistColors) => {
|
|
272
272
|
const classes = [];
|
|
273
|
-
const regex = /<([A-Za-z][A-Za-z0-9]*(?:-[A-Za-z][A-Za-z0-9]*)*)\s+(?![^>]*:color\b)[^>]*\bcolor=["']([^"']+)["'][^>]*>/
|
|
273
|
+
const regex = /<([A-Za-z][A-Za-z0-9]*(?:-[A-Za-z][A-Za-z0-9]*)*)\s+(?![^>]*:color\b)[^>]*\bcolor=["']([^"']+)["'][^>]*>/g;
|
|
274
274
|
const matches = content.matchAll(regex);
|
|
275
275
|
const components = Object.keys(safelistByComponent).map((component) => `${prefix}${component.charAt(0).toUpperCase() + component.slice(1)}`);
|
|
276
276
|
for (const match of matches) {
|
|
@@ -3,7 +3,7 @@ import { extendTailwindMerge } from "tailwind-merge";
|
|
|
3
3
|
const customTwMerge = extendTailwindMerge({
|
|
4
4
|
extend: {
|
|
5
5
|
classGroups: {
|
|
6
|
-
icons: [(classPart) =>
|
|
6
|
+
icons: [(classPart) => classPart.startsWith("i-")]
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
});
|
|
@@ -44,7 +44,7 @@ export function hexToRgb(hex) {
|
|
|
44
44
|
return r + r + g + g + b + b;
|
|
45
45
|
});
|
|
46
46
|
const result = rxHex.exec(hex);
|
|
47
|
-
return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : null;
|
|
47
|
+
return result ? `${Number.parseInt(result[1], 16)} ${Number.parseInt(result[2], 16)} ${Number.parseInt(result[3], 16)}` : null;
|
|
48
48
|
}
|
|
49
49
|
export function getSlotsChildren(slots) {
|
|
50
50
|
let children = slots.default?.();
|
|
@@ -64,8 +64,8 @@ export function getSlotsChildren(slots) {
|
|
|
64
64
|
return children || [];
|
|
65
65
|
}
|
|
66
66
|
export function looseToNumber(val) {
|
|
67
|
-
const n = parseFloat(val);
|
|
68
|
-
return isNaN(n) ? val : n;
|
|
67
|
+
const n = Number.parseFloat(val);
|
|
68
|
+
return Number.isNaN(n) ? val : n;
|
|
69
69
|
}
|
|
70
70
|
export * from "./lodash.js";
|
|
71
71
|
export * from "./link.js";
|
|
@@ -9,7 +9,7 @@ export function get(object, path, defaultValue) {
|
|
|
9
9
|
if (typeof path === "string") {
|
|
10
10
|
path = path.split(".").map((key) => {
|
|
11
11
|
const numKey = Number(key);
|
|
12
|
-
return isNaN(numKey) ? key : numKey;
|
|
12
|
+
return Number.isNaN(numKey) ? key : numKey;
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
let result = object;
|
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": "2.
|
|
5
|
-
"packageManager": "pnpm@9.12.
|
|
4
|
+
"version": "2.19.0",
|
|
5
|
+
"packageManager": "pnpm@9.12.3",
|
|
6
6
|
"repository": "nuxt/ui",
|
|
7
7
|
"homepage": "https://ui.nuxt.com",
|
|
8
8
|
"type": "module",
|
|
@@ -35,49 +35,51 @@
|
|
|
35
35
|
"@headlessui/tailwindcss": "^0.2.1",
|
|
36
36
|
"@headlessui/vue": "^1.7.23",
|
|
37
37
|
"@iconify-json/heroicons": "^1.2.1",
|
|
38
|
-
"@nuxt/icon": "^1.
|
|
39
|
-
"@nuxt/kit": "^3.
|
|
40
|
-
"@nuxtjs/color-mode": "^3.5.
|
|
41
|
-
"@nuxtjs/tailwindcss": "^6.12.
|
|
38
|
+
"@nuxt/icon": "^1.6.1",
|
|
39
|
+
"@nuxt/kit": "^3.14.0",
|
|
40
|
+
"@nuxtjs/color-mode": "^3.5.2",
|
|
41
|
+
"@nuxtjs/tailwindcss": "^6.12.2",
|
|
42
42
|
"@popperjs/core": "^2.11.8",
|
|
43
43
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
44
44
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
45
45
|
"@tailwindcss/forms": "^0.5.9",
|
|
46
46
|
"@tailwindcss/typography": "^0.5.15",
|
|
47
|
-
"@vueuse/core": "^11.
|
|
48
|
-
"@vueuse/integrations": "^11.
|
|
49
|
-
"@vueuse/math": "^11.
|
|
47
|
+
"@vueuse/core": "^11.2.0",
|
|
48
|
+
"@vueuse/integrations": "^11.2.0",
|
|
49
|
+
"@vueuse/math": "^11.2.0",
|
|
50
50
|
"defu": "^6.1.4",
|
|
51
51
|
"fuse.js": "^7.0.0",
|
|
52
52
|
"ohash": "^1.1.4",
|
|
53
53
|
"pathe": "^1.1.2",
|
|
54
54
|
"scule": "^1.3.0",
|
|
55
|
-
"tailwind-merge": "^2.5.
|
|
56
|
-
"tailwindcss": "^3.4.
|
|
55
|
+
"tailwind-merge": "^2.5.4",
|
|
56
|
+
"tailwindcss": "^3.4.14"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@nuxt/eslint-config": "^0.
|
|
59
|
+
"@nuxt/eslint-config": "^0.6.1",
|
|
60
60
|
"@nuxt/module-builder": "^0.8.4",
|
|
61
|
-
"@nuxt/test-utils": "^3.14.
|
|
62
|
-
"@release-it/conventional-changelog": "^
|
|
61
|
+
"@nuxt/test-utils": "^3.14.4",
|
|
62
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
|
63
63
|
"@vue/test-utils": "^2.4.6",
|
|
64
|
-
"eslint": "^
|
|
64
|
+
"eslint": "^9.14.0",
|
|
65
65
|
"happy-dom": "^14.12.3",
|
|
66
66
|
"joi": "^17.13.3",
|
|
67
|
-
"nuxt": "^3.
|
|
68
|
-
"release-it": "^17.
|
|
67
|
+
"nuxt": "^3.14.0",
|
|
68
|
+
"release-it": "^17.10.0",
|
|
69
|
+
"superstruct": "^2.0.2",
|
|
69
70
|
"unbuild": "^2.0.0",
|
|
70
71
|
"valibot": "^0.42.1",
|
|
71
72
|
"valibot30": "npm:valibot@0.30.0",
|
|
72
73
|
"valibot31": "npm:valibot@0.31.0",
|
|
73
|
-
"vitest": "^2.1.
|
|
74
|
+
"vitest": "^2.1.4",
|
|
74
75
|
"vitest-environment-nuxt": "^1.0.1",
|
|
75
|
-
"vue-tsc": "^2.1.
|
|
76
|
+
"vue-tsc": "^2.1.10",
|
|
76
77
|
"yup": "^1.4.0",
|
|
77
78
|
"zod": "^3.23.8"
|
|
78
79
|
},
|
|
79
80
|
"resolutions": {
|
|
80
81
|
"@nuxt/ui": "workspace:*",
|
|
82
|
+
"@nuxt/content": "2.13.2",
|
|
81
83
|
"@nuxtjs/mdc": "0.9.0"
|
|
82
84
|
}
|
|
83
85
|
}
|