@nuxt/ui 2.8.1 → 2.10.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/README.md +1 -0
- package/dist/module.d.mts +1411 -1092
- package/dist/module.d.ts +1411 -1092
- package/dist/module.json +1 -1
- package/dist/module.mjs +55 -11
- package/dist/runtime/components/data/Table.vue +47 -32
- package/dist/runtime/components/data/Table.vue.d.ts +22 -14
- package/dist/runtime/components/elements/Accordion.vue +33 -28
- package/dist/runtime/components/elements/Accordion.vue.d.ts +25 -18
- package/dist/runtime/components/elements/Alert.vue +22 -18
- package/dist/runtime/components/elements/Alert.vue.d.ts +26 -19
- package/dist/runtime/components/elements/Avatar.vue +22 -16
- package/dist/runtime/components/elements/Avatar.vue.d.ts +28 -19
- package/dist/runtime/components/elements/AvatarGroup.d.ts +17 -8
- package/dist/runtime/components/elements/AvatarGroup.mjs +18 -13
- package/dist/runtime/components/elements/Badge.vue +21 -17
- package/dist/runtime/components/elements/Badge.vue.d.ts +28 -19
- package/dist/runtime/components/elements/Button.vue +22 -18
- package/dist/runtime/components/elements/Button.vue.d.ts +28 -19
- package/dist/runtime/components/elements/ButtonGroup.d.ts +17 -8
- package/dist/runtime/components/elements/ButtonGroup.mjs +22 -15
- package/dist/runtime/components/elements/Dropdown.vue +45 -37
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +22 -17
- package/dist/runtime/components/elements/Kbd.vue +16 -12
- package/dist/runtime/components/elements/Kbd.vue.d.ts +20 -12
- package/dist/runtime/components/elements/Link.vue +18 -5
- package/dist/runtime/components/elements/Meter.vue +166 -0
- package/dist/runtime/components/elements/Meter.vue.d.ts +123 -0
- package/dist/runtime/components/elements/MeterGroup.d.ts +78 -0
- package/dist/runtime/components/elements/MeterGroup.mjs +172 -0
- package/dist/runtime/components/elements/Progress.vue +284 -0
- package/dist/runtime/components/elements/Progress.vue.d.ts +2 -0
- package/dist/runtime/components/forms/Checkbox.vue +27 -17
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +33 -15
- package/dist/runtime/components/forms/Form.vue +34 -9
- package/dist/runtime/components/forms/Form.vue.d.ts +2 -1
- package/dist/runtime/components/forms/FormGroup.vue +51 -27
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +23 -15
- package/dist/runtime/components/forms/Input.vue +41 -29
- package/dist/runtime/components/forms/Input.vue.d.ts +51 -24
- package/dist/runtime/components/forms/Radio.vue +32 -21
- package/dist/runtime/components/forms/Radio.vue.d.ts +36 -18
- package/dist/runtime/components/forms/RadioGroup.vue +136 -0
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +118 -0
- package/dist/runtime/components/forms/Range.vue +26 -16
- package/dist/runtime/components/forms/Range.vue.d.ts +37 -18
- package/dist/runtime/components/forms/Select.vue +34 -26
- package/dist/runtime/components/forms/Select.vue.d.ts +42 -24
- package/dist/runtime/components/forms/SelectMenu.vue +104 -89
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +53 -33
- package/dist/runtime/components/forms/Textarea.vue +43 -31
- package/dist/runtime/components/forms/Textarea.vue.d.ts +50 -23
- package/dist/runtime/components/forms/Toggle.vue +26 -15
- package/dist/runtime/components/forms/Toggle.vue.d.ts +31 -12
- package/dist/runtime/components/layout/Card.vue +15 -10
- package/dist/runtime/components/layout/Card.vue.d.ts +17 -9
- package/dist/runtime/components/layout/Container.vue +15 -10
- package/dist/runtime/components/layout/Container.vue.d.ts +17 -9
- package/dist/runtime/components/layout/Divider.vue +107 -0
- package/dist/runtime/components/layout/Divider.vue.d.ts +82 -0
- package/dist/runtime/components/layout/Skeleton.vue +15 -10
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +17 -9
- package/dist/runtime/components/navigation/CommandPalette.vue +57 -38
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +24 -23
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -1
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +3 -4
- package/dist/runtime/components/navigation/Pagination.vue +129 -64
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +70 -25
- package/dist/runtime/components/navigation/Tabs.vue +17 -14
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +18 -11
- package/dist/runtime/components/navigation/VerticalNavigation.vue +15 -13
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +20 -16
- package/dist/runtime/components/overlays/ContextMenu.vue +21 -11
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +20 -11
- package/dist/runtime/components/overlays/Modal.vue +16 -14
- package/dist/runtime/components/overlays/Modal.vue.d.ts +18 -11
- package/dist/runtime/components/overlays/Notification.vue +25 -15
- package/dist/runtime/components/overlays/Notification.vue.d.ts +25 -19
- package/dist/runtime/components/overlays/Notifications.vue +19 -13
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +22 -14
- package/dist/runtime/components/overlays/Popover.vue +39 -22
- package/dist/runtime/components/overlays/Popover.vue.d.ts +32 -11
- package/dist/runtime/components/overlays/Slideover.vue +15 -13
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +18 -11
- package/dist/runtime/components/overlays/Tooltip.vue +31 -23
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +19 -11
- package/dist/runtime/composables/useFormGroup.d.ts +12 -2
- package/dist/runtime/composables/useFormGroup.mjs +21 -4
- package/dist/runtime/composables/usePopper.d.ts +3 -3
- package/dist/runtime/composables/usePopper.mjs +47 -31
- package/dist/runtime/composables/useToast.d.ts +3 -3
- package/dist/runtime/composables/useUI.d.ts +10 -0
- package/dist/runtime/composables/useUI.mjs +24 -0
- package/dist/runtime/types/avatar.d.ts +10 -4
- package/dist/runtime/types/badge.d.ts +14 -0
- package/dist/runtime/types/button.d.ts +10 -3
- package/dist/runtime/types/command-palette.d.ts +3 -1
- package/dist/runtime/types/form.d.ts +18 -4
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/link.d.ts +1 -0
- package/dist/runtime/types/meter.d.ts +5 -0
- package/dist/runtime/types/notification.d.ts +5 -3
- package/dist/runtime/types/popper.d.ts +1 -0
- package/dist/runtime/types/progress.d.ts +4 -0
- package/dist/runtime/types/tabs.d.ts +1 -0
- package/dist/runtime/types/utils.d.ts +11 -0
- package/dist/runtime/ui.config.d.ts +1470 -0
- package/dist/runtime/{app.config.mjs → ui.config.mjs} +313 -97
- package/dist/runtime/utils/index.d.ts +5 -11
- package/dist/runtime/utils/index.mjs +21 -9
- package/dist/runtime/utils/lodash.d.ts +2 -0
- package/dist/runtime/utils/lodash.mjs +23 -0
- package/dist/runtime/utils/uid.d.ts +1 -0
- package/dist/runtime/utils/uid.mjs +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +27 -29
- package/dist/runtime/app.config.d.ts +0 -1203
- package/dist/runtime/utils/StateEmitter.d.ts +0 -17
- package/dist/runtime/utils/StateEmitter.mjs +0 -21
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
[x: number]: any;
|
|
8
|
-
[x: symbol]: any;
|
|
9
|
-
} | (number | boolean | any[] | Record<never, any> | null | undefined))[]>(source: Source, ...defaults: Defaults) => import("defu").Defu<Source, Defaults>;
|
|
10
|
-
export declare const hexToRgb: (hex: string) => string | null;
|
|
11
|
-
export declare const getSlotsChildren: (slots: any) => any;
|
|
1
|
+
import type { Strategy } from '../types';
|
|
2
|
+
export declare function mergeConfig<T>(strategy: Strategy, ...configs: any[]): T;
|
|
3
|
+
export declare function hexToRgb(hex: string): string | null;
|
|
4
|
+
export declare function getSlotsChildren(slots: any): any;
|
|
5
|
+
export * from './lodash';
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { createDefu } from "defu";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defu, createDefu } from "defu";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
const customTwMerge = extendTailwindMerge({
|
|
4
|
+
classGroups: {
|
|
5
|
+
icons: [(classPart) => /^i-/.test(classPart)]
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
const defuTwMerge = createDefu((obj, key, value, namespace) => {
|
|
9
|
+
if (namespace !== "default" && typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) {
|
|
10
|
+
obj[key] = customTwMerge(obj[key], value);
|
|
6
11
|
return true;
|
|
7
12
|
}
|
|
8
13
|
});
|
|
9
|
-
export
|
|
14
|
+
export function mergeConfig(strategy, ...configs) {
|
|
15
|
+
if (strategy === "override") {
|
|
16
|
+
return defu({}, ...configs);
|
|
17
|
+
}
|
|
18
|
+
return defuTwMerge({}, ...configs);
|
|
19
|
+
}
|
|
20
|
+
export function hexToRgb(hex) {
|
|
10
21
|
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
11
22
|
hex = hex.replace(shorthandRegex, function(_, r, g, b) {
|
|
12
23
|
return r + r + g + g + b + b;
|
|
13
24
|
});
|
|
14
25
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
15
26
|
return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : null;
|
|
16
|
-
}
|
|
17
|
-
export
|
|
27
|
+
}
|
|
28
|
+
export function getSlotsChildren(slots) {
|
|
18
29
|
let children = slots.default?.();
|
|
19
30
|
if (children.length) {
|
|
20
31
|
children = children.flatMap((c) => {
|
|
@@ -30,4 +41,5 @@ export const getSlotsChildren = (slots) => {
|
|
|
30
41
|
}).filter(Boolean);
|
|
31
42
|
}
|
|
32
43
|
return children;
|
|
33
|
-
}
|
|
44
|
+
}
|
|
45
|
+
export * from "./lodash.mjs";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function omit(object, keysToOmit) {
|
|
2
|
+
const result = { ...object };
|
|
3
|
+
for (const key of keysToOmit) {
|
|
4
|
+
delete result[key];
|
|
5
|
+
}
|
|
6
|
+
return result;
|
|
7
|
+
}
|
|
8
|
+
export function get(object, path, defaultValue) {
|
|
9
|
+
if (typeof path === "string") {
|
|
10
|
+
path = path.split(".").map((key) => {
|
|
11
|
+
const numKey = Number(key);
|
|
12
|
+
return isNaN(numKey) ? key : numKey;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
let result = object;
|
|
16
|
+
for (const key of path) {
|
|
17
|
+
if (result === void 0 || result === null) {
|
|
18
|
+
return defaultValue;
|
|
19
|
+
}
|
|
20
|
+
result = result[key];
|
|
21
|
+
}
|
|
22
|
+
return result !== void 0 ? result : defaultValue;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uid(): string;
|
package/dist/types.d.mts
CHANGED
|
@@ -12,4 +12,4 @@ declare module 'nuxt/schema' {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
export {
|
|
15
|
+
export { accordion, alert, avatar, avatarGroup, badge, button, buttonGroup, card, checkbox, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
|
package/dist/types.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ declare module 'nuxt/schema' {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
export {
|
|
15
|
+
export { accordion, alert, avatar, avatarGroup, badge, button, buttonGroup, card, checkbox, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"repository": "https://github.com/nuxt/ui",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
@@ -18,56 +18,54 @@
|
|
|
18
18
|
"node": ">=v16.20.2"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "nuxt-module-build",
|
|
21
|
+
"build": "nuxt-module-build build",
|
|
22
22
|
"prepack": "pnpm build",
|
|
23
23
|
"dev": "nuxi dev docs",
|
|
24
24
|
"play": "nuxi dev playground",
|
|
25
25
|
"build:docs": "nuxi generate docs",
|
|
26
26
|
"lint": "eslint .",
|
|
27
27
|
"lint:fix": "eslint . --fix",
|
|
28
|
-
"typecheck": "nuxi typecheck",
|
|
29
|
-
"prepare": "nuxi prepare docs",
|
|
28
|
+
"typecheck": "vue-tsc --noEmit && nuxi typecheck docs",
|
|
29
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare docs",
|
|
30
30
|
"release": "release-it"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@egoist/tailwindcss-icons": "^1.
|
|
33
|
+
"@egoist/tailwindcss-icons": "^1.4.0",
|
|
34
|
+
"@headlessui/tailwindcss": "^0.2.0",
|
|
34
35
|
"@headlessui/vue": "^1.7.16",
|
|
35
|
-
"@iconify-json/heroicons": "^1.1.
|
|
36
|
-
"@nuxt/kit": "^3.
|
|
36
|
+
"@iconify-json/heroicons": "^1.1.13",
|
|
37
|
+
"@nuxt/kit": "^3.8.0",
|
|
37
38
|
"@nuxtjs/color-mode": "^3.3.0",
|
|
38
|
-
"@nuxtjs/tailwindcss": "^6.8.
|
|
39
|
+
"@nuxtjs/tailwindcss": "^6.8.1",
|
|
39
40
|
"@popperjs/core": "^2.11.8",
|
|
40
41
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
41
42
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
42
43
|
"@tailwindcss/forms": "^0.5.6",
|
|
43
44
|
"@tailwindcss/typography": "^0.5.10",
|
|
44
|
-
"@vueuse/core": "^10.
|
|
45
|
-
"@vueuse/integrations": "^10.
|
|
46
|
-
"@vueuse/math": "^10.
|
|
47
|
-
"defu": "^6.1.
|
|
45
|
+
"@vueuse/core": "^10.5.0",
|
|
46
|
+
"@vueuse/integrations": "^10.5.0",
|
|
47
|
+
"@vueuse/math": "^10.5.0",
|
|
48
|
+
"defu": "^6.1.3",
|
|
48
49
|
"fuse.js": "^6.6.2",
|
|
49
|
-
"
|
|
50
|
+
"ohash": "^1.1.3",
|
|
51
|
+
"pathe": "^1.1.1",
|
|
52
|
+
"scule": "^1.0.0",
|
|
50
53
|
"tailwind-merge": "^1.14.0",
|
|
51
|
-
"tailwindcss": "^3.3.
|
|
54
|
+
"tailwindcss": "^3.3.5"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
54
57
|
"@nuxt/eslint-config": "^0.2.0",
|
|
55
|
-
"@nuxt/module-builder": "^0.5.
|
|
56
|
-
"@release-it/conventional-changelog": "^7.0.
|
|
57
|
-
"eslint": "^8.
|
|
58
|
-
"joi": "^17.
|
|
59
|
-
"nuxt": "^3.
|
|
60
|
-
"release-it": "^16.1
|
|
58
|
+
"@nuxt/module-builder": "^0.5.2",
|
|
59
|
+
"@release-it/conventional-changelog": "^7.0.2",
|
|
60
|
+
"eslint": "^8.52.0",
|
|
61
|
+
"joi": "^17.11.0",
|
|
62
|
+
"nuxt": "^3.8.0",
|
|
63
|
+
"release-it": "^16.2.1",
|
|
61
64
|
"typescript": "^5.2.2",
|
|
62
65
|
"unbuild": "^2.0.0",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
},
|
|
68
|
-
"pnpm": {
|
|
69
|
-
"patchedDependencies": {
|
|
70
|
-
"nuxt-component-meta@0.5.3": "patches/nuxt-component-meta@0.5.3.patch"
|
|
71
|
-
}
|
|
66
|
+
"valibot": "^0.19.0",
|
|
67
|
+
"vue-tsc": "^1.8.21",
|
|
68
|
+
"yup": "^1.3.2",
|
|
69
|
+
"zod": "^3.22.4"
|
|
72
70
|
}
|
|
73
71
|
}
|