nuance-ui 0.2.35 → 0.2.36

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.
Files changed (47) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/accordion.d.vue.ts +79 -0
  3. package/dist/runtime/components/accordion.vue +44 -0
  4. package/dist/runtime/components/accordion.vue.d.ts +79 -0
  5. package/dist/runtime/components/collapsible/collapsible-content.d.vue.ts +18 -0
  6. package/dist/runtime/components/collapsible/collapsible-content.vue +76 -0
  7. package/dist/runtime/components/collapsible/collapsible-content.vue.d.ts +18 -0
  8. package/dist/runtime/components/collapsible/collapsible-root.d.vue.ts +42 -0
  9. package/dist/runtime/components/collapsible/collapsible-root.vue +41 -0
  10. package/dist/runtime/components/collapsible/collapsible-root.vue.d.ts +42 -0
  11. package/dist/runtime/components/collapsible/collapsible-trigger.d.vue.ts +13 -0
  12. package/dist/runtime/components/collapsible/collapsible-trigger.vue +20 -0
  13. package/dist/runtime/components/collapsible/collapsible-trigger.vue.d.ts +13 -0
  14. package/dist/runtime/components/collapsible/index.d.ts +3 -0
  15. package/dist/runtime/components/collapsible/index.js +1 -0
  16. package/dist/runtime/components/dialog/ui/dialog-close-button.d.vue.ts +2 -2
  17. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +9 -11
  18. package/dist/runtime/components/dialog/ui/dialog-close-button.vue.d.ts +2 -2
  19. package/dist/runtime/components/dialog/ui/dialog-footer.d.vue.ts +2 -2
  20. package/dist/runtime/components/dialog/ui/dialog-footer.vue +3 -5
  21. package/dist/runtime/components/dialog/ui/dialog-footer.vue.d.ts +2 -2
  22. package/dist/runtime/components/dialog/ui/dialog-header.d.vue.ts +2 -2
  23. package/dist/runtime/components/dialog/ui/dialog-header.vue +3 -5
  24. package/dist/runtime/components/dialog/ui/dialog-header.vue.d.ts +2 -2
  25. package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +2 -2
  26. package/dist/runtime/components/dialog/ui/dialog-root.vue +23 -25
  27. package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +2 -2
  28. package/dist/runtime/components/dialog/ui/dialog-section.d.vue.ts +2 -2
  29. package/dist/runtime/components/dialog/ui/dialog-section.vue +3 -5
  30. package/dist/runtime/components/dialog/ui/dialog-section.vue.d.ts +2 -2
  31. package/dist/runtime/components/dialog/ui/dialog-title.d.vue.ts +2 -2
  32. package/dist/runtime/components/dialog/ui/dialog-title.vue +3 -5
  33. package/dist/runtime/components/dialog/ui/dialog-title.vue.d.ts +2 -2
  34. package/dist/runtime/components/index.d.ts +2 -0
  35. package/dist/runtime/components/index.js +1 -0
  36. package/dist/runtime/components/link/lib.d.ts +2 -2
  37. package/dist/runtime/components/scroll-area.vue +2 -1
  38. package/dist/runtime/components/select.d.vue.ts +2 -2
  39. package/dist/runtime/components/select.vue.d.ts +2 -2
  40. package/dist/runtime/components/table/ui/table.vue +1 -1
  41. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
  42. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
  43. package/dist/runtime/components/transition.d.vue.ts +10 -0
  44. package/dist/runtime/components/transition.vue +14 -3
  45. package/dist/runtime/components/transition.vue.d.ts +10 -0
  46. package/dist/runtime/modals/modals-provider.vue +8 -10
  47. package/package.json +3 -3
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.2.35",
7
+ "version": "0.2.36",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -0,0 +1,79 @@
1
+ import type { Classes, NuanceRadius } from '@nui/types';
2
+ import type { TitleProps } from './title.vue.js';
3
+ export interface AccordionItem {
4
+ label?: string;
5
+ slot?: string;
6
+ content?: string;
7
+ disabled?: boolean;
8
+ /** Iconify icon */
9
+ icon?: string;
10
+ /** Iconify icon */
11
+ trailingIcon?: string;
12
+ /**
13
+ * A unique value for the accordion item. Defaults to the index.
14
+ * Also used as the Vue `key` for this item, so providing a stable value prevents
15
+ * accordion content (and its local state) from remounting when items are added, removed,
16
+ * or reordered.
17
+ */
18
+ value?: string;
19
+ }
20
+ type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
21
+ export interface AccordionProps<Multiple extends boolean = false> {
22
+ /** If set, multiple items can be opened at the same time @default false */
23
+ multiple?: Multiple;
24
+ /** If set, arrow keys loop through items (first to last and last to first) @default true */
25
+ loop?: boolean;
26
+ /** @default 'default' */
27
+ variant?: AccordionVariant;
28
+ /** Transition duration in ms @default 200 */
29
+ transitionDuration?: number;
30
+ /** If set, chevron rotation is disabled @default false */
31
+ disableChevronRotation?: boolean;
32
+ /** Position of the chevron relative to the item label @default right */
33
+ chevronPosition?: 'left' | 'right';
34
+ /** Size of the chevron icon container @default auto */
35
+ chevronSize?: number | string;
36
+ /**
37
+ * Size of the default chevron icon. Ignored when `chevron` prop is set.
38
+ * Use `chevronSize` instead when using custom chevron.
39
+ * @default 16
40
+ */
41
+ chevronIconSize?: number | string;
42
+ /**
43
+ * Sets heading level (h2-h6) for `Accordion.Control` elements.
44
+ * Wraps each control in the corresponding heading tag, recommended to meet WAI-ARIA accessibility requirements.
45
+ * Has no visual effect.
46
+ */
47
+ order?: TitleProps['order'];
48
+ /** Custom chevron icon */
49
+ chevron?: string;
50
+ /**
51
+ * Key of `theme.radius` or any valid CSS value to set border-radius.
52
+ * Numbers are converted to rem.
53
+ * @default theme.defaultRadius */
54
+ radius?: NuanceRadius;
55
+ /**
56
+ * If set to `false`, panels are unmounted when collapsed.
57
+ * By default, panels stay mounted when collapsed. @default true
58
+ */
59
+ keepMounted?: boolean;
60
+ classes?: Classes<'root' | 'content' | 'item' | 'panel' | 'icon' | 'chevron' | 'label' | 'itemTitle' | 'control'>;
61
+ }
62
+ declare const _default: typeof __VLS_export;
63
+ export default _default;
64
+ declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
65
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<AccordionProps<Multiple>> & (typeof globalThis extends {
66
+ __VLS_PROPS_FALLBACK: infer P;
67
+ } ? P : {});
68
+ expose: (exposed: {}) => void;
69
+ attrs: any;
70
+ slots: {};
71
+ emit: {};
72
+ }>) => import("vue").VNode & {
73
+ __ctx?: Awaited<typeof __VLS_setup>;
74
+ };
75
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
76
+ [K in keyof T]: T[K];
77
+ } : {
78
+ [K in keyof T as K]: T[K];
79
+ }) & {};
@@ -0,0 +1,44 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { getRadius, getSize, useVarsResolver } from "#imports";
7
+ import Box from "./box.vue";
8
+ const {
9
+ transitionDuration,
10
+ chevronSize,
11
+ radius
12
+ } = defineProps({
13
+ multiple: { type: null, required: false },
14
+ loop: { type: Boolean, required: false },
15
+ variant: { type: String, required: false },
16
+ transitionDuration: { type: Number, required: false },
17
+ disableChevronRotation: { type: Boolean, required: false },
18
+ chevronPosition: { type: String, required: false },
19
+ chevronSize: { type: [Number, String], required: false },
20
+ chevronIconSize: { type: [Number, String], required: false },
21
+ order: { type: String, required: false },
22
+ chevron: { type: String, required: false },
23
+ radius: { type: [String, Number], required: false },
24
+ keepMounted: { type: Boolean, required: false },
25
+ classes: { type: Object, required: false }
26
+ });
27
+ const style = useVarsResolver(() => ({
28
+ root: {
29
+ "--accordion-transition-duration": transitionDuration === void 0 ? void 0 : `${transitionDuration}ms`,
30
+ "--accordion-chevron-size": chevronSize === void 0 ? void 0 : getSize(chevronSize),
31
+ "--accordion-radius": radius === void 0 ? void 0 : getRadius(radius)
32
+ }
33
+ }));
34
+ </script>
35
+
36
+ <template>
37
+ <Box :style='style.root'>
38
+ accordion
39
+ </Box>
40
+ </template>
41
+
42
+ <style module>
43
+ .root{--accordion-radius:var(--radius-default)}.panel{overflow-wrap:break-word}.content{padding:var(--spacing-md);padding-top:calc(var(--spacing-xs)/2)}.itemTitle{margin:0;padding:0;width:100%}.control{align-items:center;background-color:transparent;color:var(--color-bright);cursor:pointer;display:flex;flex-direction:row-reverse;opacity:1;padding-inline:var(--spacing-md);width:100%}.control:where([data-chevron-position=left]){flex-direction:row;padding-inline-start:0}.control:where(:disabled,[data-disabled]){cursor:not-allowed;opacity:.4}.control--contained:where(:not(:disabled,[data-disabled])),.control--default:where(:not(:disabled,[data-disabled])){@mixin hover{@mixin where-light{background-color:var(--color-gray-0)}@mixin where-dark{background-color:var(--color-dark-6)}}}.label{color:inherit;flex:1;font-weight:var(--font-weight-regular);overflow:hidden;padding-bottom:var(--spacing-sm);padding-top:var(--spacing-sm);text-overflow:ellipsis}.chevron{align-items:center;display:flex;justify-content:flex-start;min-width:var(--accordion-chevron-size,rem(15px));transform:rotate(0deg);transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,rem(15px))}.chevron:where([data-rotate]){transform:rotate(180deg)}.chevron:where([data-position=left]){margin-inline-end:var(--spacing-md);margin-inline-start:var(--spacing-md)}.icon{align-items:center;display:flex;justify-content:center;margin-inline-end:var(--spacing-sm)}.icon:where([data-chevron-position=left]){margin-inline-end:0;margin-inline-start:var(--spacing-lg)}.item{@mixin where-light{--item-border-color:var(--color-gray-3);--item-filled-color:var(--color-gray-0)}@mixin where-dark{--item-border-color:var(--color-dark-4);--item-filled-color:var(--color-dark-6)}}.item--default{border-bottom:1px solid var(--item-border-color)}.item--contained{border:1px solid var(--item-border-color);transition:background-color .15s ease}.item--contained:where([data-active]){background-color:var(--item-filled-color)}.item--contained:first-of-type,.item--contained:first-of-type>[data-accordion-control]{border-start-end-radius:var(--accordion-radius);border-start-start-radius:var(--accordion-radius)}.item--contained:last-of-type,.item--contained:last-of-type>[data-accordion-control]{border-end-end-radius:var(--accordion-radius);border-end-start-radius:var(--accordion-radius)}.item--contained+.item--contained{border-top:0}.item--filled{border-radius:var(--accordion-radius)}.item--filled:where([data-active]){background-color:var(--item-filled-color)}.item--separated{background-color:var(--item-filled-color);border:1px solid transparent;border-radius:var(--accordion-radius);transition:background-color .15s ease}.item--separated[data-active]{border-color:var(--item-border-color);@mixin where-light{background-color:var(--color-white)}@mixin where-dark{background-color:var(--color-dark-7)}}.item--separated+.item--separated{margin-top:var(--spacing-md)}
44
+ </style>
@@ -0,0 +1,79 @@
1
+ import type { Classes, NuanceRadius } from '@nui/types';
2
+ import type { TitleProps } from './title.vue.js';
3
+ export interface AccordionItem {
4
+ label?: string;
5
+ slot?: string;
6
+ content?: string;
7
+ disabled?: boolean;
8
+ /** Iconify icon */
9
+ icon?: string;
10
+ /** Iconify icon */
11
+ trailingIcon?: string;
12
+ /**
13
+ * A unique value for the accordion item. Defaults to the index.
14
+ * Also used as the Vue `key` for this item, so providing a stable value prevents
15
+ * accordion content (and its local state) from remounting when items are added, removed,
16
+ * or reordered.
17
+ */
18
+ value?: string;
19
+ }
20
+ type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
21
+ export interface AccordionProps<Multiple extends boolean = false> {
22
+ /** If set, multiple items can be opened at the same time @default false */
23
+ multiple?: Multiple;
24
+ /** If set, arrow keys loop through items (first to last and last to first) @default true */
25
+ loop?: boolean;
26
+ /** @default 'default' */
27
+ variant?: AccordionVariant;
28
+ /** Transition duration in ms @default 200 */
29
+ transitionDuration?: number;
30
+ /** If set, chevron rotation is disabled @default false */
31
+ disableChevronRotation?: boolean;
32
+ /** Position of the chevron relative to the item label @default right */
33
+ chevronPosition?: 'left' | 'right';
34
+ /** Size of the chevron icon container @default auto */
35
+ chevronSize?: number | string;
36
+ /**
37
+ * Size of the default chevron icon. Ignored when `chevron` prop is set.
38
+ * Use `chevronSize` instead when using custom chevron.
39
+ * @default 16
40
+ */
41
+ chevronIconSize?: number | string;
42
+ /**
43
+ * Sets heading level (h2-h6) for `Accordion.Control` elements.
44
+ * Wraps each control in the corresponding heading tag, recommended to meet WAI-ARIA accessibility requirements.
45
+ * Has no visual effect.
46
+ */
47
+ order?: TitleProps['order'];
48
+ /** Custom chevron icon */
49
+ chevron?: string;
50
+ /**
51
+ * Key of `theme.radius` or any valid CSS value to set border-radius.
52
+ * Numbers are converted to rem.
53
+ * @default theme.defaultRadius */
54
+ radius?: NuanceRadius;
55
+ /**
56
+ * If set to `false`, panels are unmounted when collapsed.
57
+ * By default, panels stay mounted when collapsed. @default true
58
+ */
59
+ keepMounted?: boolean;
60
+ classes?: Classes<'root' | 'content' | 'item' | 'panel' | 'icon' | 'chevron' | 'label' | 'itemTitle' | 'control'>;
61
+ }
62
+ declare const _default: typeof __VLS_export;
63
+ export default _default;
64
+ declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
65
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<AccordionProps<Multiple>> & (typeof globalThis extends {
66
+ __VLS_PROPS_FALLBACK: infer P;
67
+ } ? P : {});
68
+ expose: (exposed: {}) => void;
69
+ attrs: any;
70
+ slots: {};
71
+ emit: {};
72
+ }>) => import("vue").VNode & {
73
+ __ctx?: Awaited<typeof __VLS_setup>;
74
+ };
75
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
76
+ [K in keyof T]: T[K];
77
+ } : {
78
+ [K in keyof T as K]: T[K];
79
+ }) & {};
@@ -0,0 +1,18 @@
1
+ import type { BoxProps } from '../box.vue.js';
2
+ export interface CollapsibleContentProps extends BoxProps {
3
+ /**
4
+ * Used to force mounting when more control is needed. Useful when
5
+ * controlling animation with Vue animation libraries.
6
+ */
7
+ forceMount?: boolean;
8
+ }
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CollapsibleContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
12
+ default?: (props: {}) => any;
13
+ }>;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,76 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { unrefElement, useEventListener } from "@vueuse/core";
7
+ import { computed, onMounted, ref, shallowRef, useTemplateRef, watch } from "vue";
8
+ import Box from "../box.vue";
9
+ import { useCollapsibleState } from "./collapsible-root.vue";
10
+ const props = defineProps({
11
+ forceMount: { type: Boolean, required: false },
12
+ is: { type: null, required: false },
13
+ mod: { type: [Object, Array, null], required: false }
14
+ });
15
+ const ctx = useCollapsibleState();
16
+ const el = useTemplateRef("el");
17
+ const width = ref(0);
18
+ const height = ref(0);
19
+ const isMountAnimationPrevented = ref(ctx.open.value);
20
+ const savedStyle = shallowRef();
21
+ watch(() => ctx.open.value, () => {
22
+ const node = unrefElement(el);
23
+ if (!node)
24
+ return;
25
+ if (!savedStyle.value) {
26
+ savedStyle.value = {
27
+ transitionDuration: node.style.transitionDuration,
28
+ animationName: node.style.animationName
29
+ };
30
+ }
31
+ node.style.transitionDuration = "0s";
32
+ node.style.animationName = "none";
33
+ height.value = node.scrollHeight;
34
+ width.value = node.scrollWidth;
35
+ if (!isMountAnimationPrevented.value) {
36
+ requestAnimationFrame(() => {
37
+ node.style.transitionDuration = savedStyle.value.transitionDuration;
38
+ node.style.animationName = savedStyle.value.animationName;
39
+ });
40
+ }
41
+ }, { immediate: true, flush: "post" });
42
+ onMounted(() => {
43
+ requestAnimationFrame(() => {
44
+ isMountAnimationPrevented.value = false;
45
+ });
46
+ });
47
+ const isPresent = computed(() => props.forceMount || ctx.open.value);
48
+ const dataState = computed(() => {
49
+ if (isMountAnimationPrevented.value)
50
+ return void 0;
51
+ return ctx.open.value ? "open" : "closed";
52
+ });
53
+ useEventListener(el, "beforematch", () => {
54
+ requestAnimationFrame(() => ctx.onOpenToggle());
55
+ });
56
+ </script>
57
+
58
+ <template>
59
+ <Box
60
+ v-if='ctx.unmountOnHide.value ? isPresent : true'
61
+ v-bind='$attrs'
62
+ :id='ctx.contentId'
63
+ ref='el'
64
+ :hidden='isPresent ? void 0 : ctx.unmountOnHide.value ? void 0 : "until-found"'
65
+ :mod='[{
66
+ disabled: ctx.disabled,
67
+ state: dataState
68
+ }, mod]'
69
+ :style='{
70
+ "--collapsible-content-height": `${height}px`,
71
+ "--collapsible-content-width": `${width}px`
72
+ }'
73
+ >
74
+ <slot />
75
+ </Box>
76
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { BoxProps } from '../box.vue.js';
2
+ export interface CollapsibleContentProps extends BoxProps {
3
+ /**
4
+ * Used to force mounting when more control is needed. Useful when
5
+ * controlling animation with Vue animation libraries.
6
+ */
7
+ forceMount?: boolean;
8
+ }
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CollapsibleContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
12
+ default?: (props: {}) => any;
13
+ }>;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,42 @@
1
+ import type { Ref } from 'vue';
2
+ import type { BoxProps } from '../box.vue.js';
3
+ export interface CollapsibleRootProps extends BoxProps {
4
+ /**
5
+ * The open state of the collapsible when it is initially rendered.
6
+ * Use when you do not need to control its open state.
7
+ */
8
+ defaultOpen?: boolean;
9
+ /** When `true`, prevents the user from interacting with the collapsible. */
10
+ disabled?: boolean;
11
+ /** When `true`, the element will be unmounted on closed state. */
12
+ unmountOnHide?: boolean;
13
+ }
14
+ interface CollapsibleRootContext {
15
+ contentId: string;
16
+ disabled?: Ref<boolean>;
17
+ open: Ref<boolean>;
18
+ unmountOnHide: Ref<boolean>;
19
+ onOpenToggle: () => void;
20
+ }
21
+ export declare const useCollapsibleState: () => CollapsibleRootContext;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CollapsibleRootProps & {
25
+ open?: boolean;
26
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ "update:open": (value: boolean) => any;
28
+ }, string, import("vue").PublicProps, Readonly<CollapsibleRootProps & {
29
+ open?: boolean;
30
+ }> & Readonly<{
31
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
33
+ default?: (props: {
34
+ /** Current open state */
35
+ open: boolean;
36
+ }) => any;
37
+ }>;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,41 @@
1
+ <script>
2
+ import { toRefs } from "vue";
3
+ import { createStrictInjection } from "#imports";
4
+ import Box from "../box.vue";
5
+ const injectionKey = /* @__PURE__ */ Symbol("collapsible-ctx");
6
+ const [useProvide, useInject] = createStrictInjection((state) => state, {
7
+ name: "CollapsibleRoot",
8
+ injectionKey
9
+ });
10
+ export const useCollapsibleState = useInject;
11
+ </script>
12
+
13
+ <script setup>
14
+ const props = defineProps({
15
+ defaultOpen: { type: Boolean, required: false },
16
+ disabled: { type: Boolean, required: false },
17
+ unmountOnHide: { type: Boolean, required: false },
18
+ is: { type: null, required: false },
19
+ mod: { type: [Object, Array, null], required: false }
20
+ });
21
+ defineSlots();
22
+ const open = defineModel("open", { type: Boolean, ...{ default: false } });
23
+ const { disabled, unmountOnHide } = toRefs(props);
24
+ useProvide({
25
+ contentId: "",
26
+ disabled,
27
+ open,
28
+ unmountOnHide,
29
+ onOpenToggle: () => {
30
+ if (disabled.value)
31
+ return;
32
+ open.value = !open.value;
33
+ }
34
+ });
35
+ </script>
36
+
37
+ <template>
38
+ <Box :mod='[{ disabled, open: open ? "open" : "closed" }, mod]'>
39
+ <slot :open='open' />
40
+ </Box>
41
+ </template>
@@ -0,0 +1,42 @@
1
+ import type { Ref } from 'vue';
2
+ import type { BoxProps } from '../box.vue.js';
3
+ export interface CollapsibleRootProps extends BoxProps {
4
+ /**
5
+ * The open state of the collapsible when it is initially rendered.
6
+ * Use when you do not need to control its open state.
7
+ */
8
+ defaultOpen?: boolean;
9
+ /** When `true`, prevents the user from interacting with the collapsible. */
10
+ disabled?: boolean;
11
+ /** When `true`, the element will be unmounted on closed state. */
12
+ unmountOnHide?: boolean;
13
+ }
14
+ interface CollapsibleRootContext {
15
+ contentId: string;
16
+ disabled?: Ref<boolean>;
17
+ open: Ref<boolean>;
18
+ unmountOnHide: Ref<boolean>;
19
+ onOpenToggle: () => void;
20
+ }
21
+ export declare const useCollapsibleState: () => CollapsibleRootContext;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CollapsibleRootProps & {
25
+ open?: boolean;
26
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ "update:open": (value: boolean) => any;
28
+ }, string, import("vue").PublicProps, Readonly<CollapsibleRootProps & {
29
+ open?: boolean;
30
+ }> & Readonly<{
31
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
33
+ default?: (props: {
34
+ /** Current open state */
35
+ open: boolean;
36
+ }) => any;
37
+ }>;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_10: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_10) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ <script setup>
2
+ import Renderless from "../renderless/renderless.vue";
3
+ import { useCollapsibleState } from "./collapsible-root.vue";
4
+ const ctx = useCollapsibleState();
5
+ </script>
6
+
7
+ <template>
8
+ <Renderless
9
+ :mod='{
10
+ disabled: ctx.disabled?.value,
11
+ state: ctx.open.value ? "open" : "closed"
12
+ }'
13
+ :aria-controls='ctx.contentId'
14
+ :aria-expanded='ctx.open.value'
15
+ :disabled='ctx.disabled?.value'
16
+ @click='ctx.onOpenToggle()'
17
+ >
18
+ <slot />
19
+ </Renderless>
20
+ </template>
@@ -0,0 +1,13 @@
1
+ declare var __VLS_10: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_10) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,3 @@
1
+ export type * from './collapsible-content.vue';
2
+ export { type CollapsibleRootProps, useCollapsibleState } from './collapsible-root.vue.js';
3
+ export type * from './collapsible-trigger.vue';
@@ -0,0 +1 @@
1
+ export { useCollapsibleState } from "./collapsible-root.vue";
@@ -1,7 +1,7 @@
1
1
  import type { ActionIconProps } from '../../action-icon/index.js';
2
- declare var __VLS_16: {};
2
+ declare var __VLS_10: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_16) => any;
4
+ default?: (props: typeof __VLS_10) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
7
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -25,15 +25,13 @@ const resolvedIcon = computed(() => icon ?? icons.close);
25
25
  </script>
26
26
 
27
27
  <template>
28
- <ClientOnly>
29
- <ActionIcon
30
- :icon='resolvedIcon'
31
- :variant
32
- tabindex='0'
33
- v-bind='props'
34
- @click='close'
35
- >
36
- <slot />
37
- </ActionIcon>
38
- </ClientOnly>
28
+ <ActionIcon
29
+ :icon='resolvedIcon'
30
+ :variant
31
+ tabindex='0'
32
+ v-bind='props'
33
+ @click='close'
34
+ >
35
+ <slot />
36
+ </ActionIcon>
39
37
  </template>
@@ -1,7 +1,7 @@
1
1
  import type { ActionIconProps } from '../../action-icon/index.js';
2
- declare var __VLS_16: {};
2
+ declare var __VLS_10: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_16) => any;
4
+ default?: (props: typeof __VLS_10) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
7
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,9 @@
1
1
  import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogFooterProps extends BoxProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -8,9 +8,7 @@ const { is = "footer", mod } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <ClientOnly>
12
- <Box :is :mod :class='css.footer'>
13
- <slot />
14
- </Box>
15
- </ClientOnly>
11
+ <Box :is :mod :class='css.footer'>
12
+ <slot />
13
+ </Box>
16
14
  </template>
@@ -1,9 +1,9 @@
1
1
  import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogFooterProps extends BoxProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,9 @@
1
1
  import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogHeaderProps extends BoxProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -8,9 +8,7 @@ const { is = "header", mod } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <ClientOnly>
12
- <Box :is :mod :class='css.header'>
13
- <slot />
14
- </Box>
15
- </ClientOnly>
11
+ <Box :is :mod :class='css.header'>
12
+ <slot />
13
+ </Box>
16
14
  </template>
@@ -1,9 +1,9 @@
1
1
  import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogHeaderProps extends BoxProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -36,9 +36,9 @@ type __VLS_ModelProps = {
36
36
  'open'?: DialogModel['open'];
37
37
  };
38
38
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
39
- declare var __VLS_38: {};
39
+ declare var __VLS_31: {};
40
40
  type __VLS_Slots = {} & {
41
- default?: (props: typeof __VLS_38) => any;
41
+ default?: (props: typeof __VLS_31) => any;
42
42
  };
43
43
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
44
  close: () => any;
@@ -71,29 +71,27 @@ const style = computed(() => ({
71
71
  </script>
72
72
 
73
73
  <template>
74
- <ClientOnly>
75
- <Teleport :disabled='!withinPortal' :to='portalTarget'>
76
- <Box
77
- is='dialog'
78
- ref='dialogRef'
79
- :class='[css.root, classes?.root]'
80
- :mod='[{ "without-overlay": withoutOverlay }, mod]'
81
- :style
82
- @click='overlayClick'
83
- @close='$emit("close")'
84
- @cancel.prevent='opened = false'
85
- >
86
- <NTransition :name='transition'>
87
- <Box
88
- is='section'
89
- v-if='opened'
90
- :class='[css.content, classes?.content]'
91
- v-bind='$attrs'
92
- >
93
- <slot />
94
- </Box>
95
- </NTransition>
96
- </Box>
97
- </Teleport>
98
- </ClientOnly>
74
+ <Teleport :disabled='!withinPortal' :to='portalTarget'>
75
+ <Box
76
+ is='dialog'
77
+ ref='dialogRef'
78
+ :class='[css.root, classes?.root]'
79
+ :mod='[{ "without-overlay": withoutOverlay }, mod]'
80
+ :style
81
+ @click='overlayClick'
82
+ @close='$emit("close")'
83
+ @cancel.prevent='opened = false'
84
+ >
85
+ <NTransition :name='transition'>
86
+ <Box
87
+ is='section'
88
+ v-if='opened'
89
+ :class='[css.content, classes?.content]'
90
+ v-bind='$attrs'
91
+ >
92
+ <slot />
93
+ </Box>
94
+ </NTransition>
95
+ </Box>
96
+ </Teleport>
99
97
  </template>
@@ -36,9 +36,9 @@ type __VLS_ModelProps = {
36
36
  'open'?: DialogModel['open'];
37
37
  };
38
38
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
39
- declare var __VLS_38: {};
39
+ declare var __VLS_31: {};
40
40
  type __VLS_Slots = {} & {
41
- default?: (props: typeof __VLS_38) => any;
41
+ default?: (props: typeof __VLS_31) => any;
42
42
  };
43
43
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
44
  close: () => any;
@@ -2,9 +2,9 @@ import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogSectionProps extends BoxProps {
3
3
  bordered?: boolean;
4
4
  }
5
- declare var __VLS_14: {};
5
+ declare var __VLS_8: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_14) => any;
7
+ default?: (props: typeof __VLS_8) => any;
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -9,9 +9,7 @@ const { is = "section", bordered, mod } = defineProps({
9
9
  </script>
10
10
 
11
11
  <template>
12
- <ClientOnly>
13
- <Box :is :mod='[{ bordered }, mod]' :class='css.section'>
14
- <slot />
15
- </Box>
16
- </ClientOnly>
12
+ <Box :is :mod='[{ bordered }, mod]' :class='css.section'>
13
+ <slot />
14
+ </Box>
17
15
  </template>
@@ -2,9 +2,9 @@ import type { BoxProps } from '../../box.vue.js';
2
2
  export interface DialogSectionProps extends BoxProps {
3
3
  bordered?: boolean;
4
4
  }
5
- declare var __VLS_14: {};
5
+ declare var __VLS_8: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_14) => any;
7
+ default?: (props: typeof __VLS_8) => any;
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,9 @@
1
1
  import type { TitleProps } from '../../title.vue.js';
2
2
  export interface DialogTitleProps extends TitleProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -21,9 +21,7 @@ const { size = "md", lh = "1", ...props } = defineProps({
21
21
  </script>
22
22
 
23
23
  <template>
24
- <ClientOnly>
25
- <Title :class='css.title' :lh :size v-bind='props'>
26
- <slot />
27
- </Title>
28
- </ClientOnly>
24
+ <Title :class='css.title' :lh :size v-bind='props'>
25
+ <slot />
26
+ </Title>
29
27
  </template>
@@ -1,9 +1,9 @@
1
1
  import type { TitleProps } from '../../title.vue.js';
2
2
  export interface DialogTitleProps extends TitleProps {
3
3
  }
4
- declare var __VLS_14: {};
4
+ declare var __VLS_8: {};
5
5
  type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_14) => any;
6
+ default?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,3 +1,4 @@
1
+ export type * from './accordion.vue';
1
2
  export * from './action-icon/index.js';
2
3
  export * from './app-shell/index.js';
3
4
  export * from './avatar/index.js';
@@ -10,6 +11,7 @@ export * from './calendar/index.js';
10
11
  export * from './card/index.js';
11
12
  export * from './checkbox/index.js';
12
13
  export * from './chip/index.js';
14
+ export * from './collapsible/index.js';
13
15
  export * from './combobox/index.js';
14
16
  export type * from './container.vue';
15
17
  export type * from './date-time-picker.vue';
@@ -6,6 +6,7 @@ export * from "./calendar/index.js";
6
6
  export * from "./card/index.js";
7
7
  export * from "./checkbox/index.js";
8
8
  export * from "./chip/index.js";
9
+ export * from "./collapsible/index.js";
9
10
  export * from "./combobox/index.js";
10
11
  export * from "./dialog/index.js";
11
12
  export * from "./drawer/index.js";
@@ -1,5 +1,5 @@
1
1
  import type { NuxtLinkProps } from '#app';
2
2
  export declare function pickLinkProps<T extends NuxtLinkProps>(props: T): {
3
- link: Pick<T, "replace" | "to" | "target" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
4
- rest: Omit<T, "replace" | "to" | "target" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
3
+ link: Pick<T, "replace" | "target" | "to" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
4
+ rest: Omit<T, "replace" | "target" | "to" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
5
5
  };
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
+ import { useVarsResolver } from "@nui/composables";
3
+ import { getSize } from "@nui/utils";
2
4
  import { useResizeObserver } from "@vueuse/core";
3
- import { getSize, useVarsResolver } from "#imports";
4
5
  import { computed, onBeforeUnmount, onMounted, ref, useTemplateRef } from "vue";
5
6
  import Box from "./box.vue";
6
7
  const {
@@ -40,8 +40,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
40
40
  onSubmit?: ((args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => any) | undefined;
41
41
  "onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
42
42
  onOpen?: ((args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => any) | undefined;
43
- "onUpdate:search"?: ((value: string) => any) | undefined;
44
43
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
44
+ "onUpdate:search"?: ((value: string) => any) | undefined;
45
45
  }> & (typeof globalThis extends {
46
46
  __VLS_PROPS_FALLBACK: infer P;
47
47
  } ? P : {});
@@ -63,7 +63,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
63
63
  } & {
64
64
  rightSection?: (props: {}) => any;
65
65
  };
66
- emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:search", value: string) => void) & ((event: "update:open", value: boolean) => void));
66
+ emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:open", value: boolean) => void) & ((event: "update:search", value: string) => void));
67
67
  }>) => import("vue").VNode & {
68
68
  __ctx?: Awaited<typeof __VLS_setup>;
69
69
  };
@@ -40,8 +40,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
40
40
  onSubmit?: ((args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => any) | undefined;
41
41
  "onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
42
42
  onOpen?: ((args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => any) | undefined;
43
- "onUpdate:search"?: ((value: string) => any) | undefined;
44
43
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
44
+ "onUpdate:search"?: ((value: string) => any) | undefined;
45
45
  }> & (typeof globalThis extends {
46
46
  __VLS_PROPS_FALLBACK: infer P;
47
47
  } ? P : {});
@@ -63,7 +63,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
63
63
  } & {
64
64
  rightSection?: (props: {}) => any;
65
65
  };
66
- emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:search", value: string) => void) & ((event: "update:open", value: boolean) => void));
66
+ emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:open", value: boolean) => void) & ((event: "update:search", value: string) => void));
67
67
  }>) => import("vue").VNode & {
68
68
  __ctx?: Awaited<typeof __VLS_setup>;
69
69
  };
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { useVarsResolver } from "@nui/composables";
2
3
  import { getThemeColor } from "@nui/utils";
3
4
  import {
4
5
  FlexRender,
@@ -9,7 +10,6 @@ import {
9
10
  useVueTable
10
11
  } from "@tanstack/vue-table";
11
12
  import { reactivePick, unrefElement } from "@vueuse/core";
12
- import { useVarsResolver } from "#imports";
13
13
  import { computed, ref, useTemplateRef, watch } from "vue";
14
14
  import Box from "../../box.vue";
15
15
  import { createRowHandlers, processColumns, resolveValue, valueUpdater } from "../lib";
@@ -62,8 +62,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
62
62
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
63
63
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
64
64
  }>, {
65
- variant: TabsVariant;
66
65
  orientation: "vertical" | "horizontal";
66
+ variant: TabsVariant;
67
67
  placement: "left" | "right";
68
68
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
69
69
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -62,8 +62,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
62
62
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
63
63
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
64
64
  }>, {
65
- variant: TabsVariant;
66
65
  orientation: "vertical" | "horizontal";
66
+ variant: TabsVariant;
67
67
  placement: "left" | "right";
68
68
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
69
69
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -15,6 +15,16 @@ export interface TransitionProps {
15
15
  * @default `0`
16
16
  */
17
17
  delay?: number;
18
+ /**
19
+ * Controls the timing sequence of leaving/entering transitions.
20
+ * Default behavior is simultaneous.
21
+ */
22
+ mode?: 'in-out' | 'out-in' | 'default';
23
+ /**
24
+ * Whether to apply transition on initial render.
25
+ * Default: false
26
+ */
27
+ appear?: boolean;
18
28
  }
19
29
  declare var __VLS_9: {};
20
30
  type __VLS_Slots = {} & {
@@ -3,11 +3,15 @@ import { computed } from "vue";
3
3
  const {
4
4
  name = "pop-bottom-left",
5
5
  duration = 250,
6
- delay
6
+ delay,
7
+ appear,
8
+ mode
7
9
  } = defineProps({
8
10
  name: { type: String, required: false },
9
11
  duration: { type: Number, required: false },
10
- delay: { type: Number, required: false }
12
+ delay: { type: Number, required: false },
13
+ mode: { type: String, required: false },
14
+ appear: { type: Boolean, required: false }
11
15
  });
12
16
  const emit = defineEmits(["afterLeave"]);
13
17
  const style = computed(() => ({
@@ -17,7 +21,14 @@ const style = computed(() => ({
17
21
  </script>
18
22
 
19
23
  <template>
20
- <Transition :class='$style.root' :style :name @after-leave='() => emit("afterLeave")'>
24
+ <Transition
25
+ :class='$style.root'
26
+ :style
27
+ :name
28
+ :mode
29
+ :appear
30
+ @after-leave='() => emit("afterLeave")'
31
+ >
21
32
  <slot />
22
33
  </Transition>
23
34
  </template>
@@ -15,6 +15,16 @@ export interface TransitionProps {
15
15
  * @default `0`
16
16
  */
17
17
  delay?: number;
18
+ /**
19
+ * Controls the timing sequence of leaving/entering transitions.
20
+ * Default behavior is simultaneous.
21
+ */
22
+ mode?: 'in-out' | 'out-in' | 'default';
23
+ /**
24
+ * Whether to apply transition on initial render.
25
+ * Default: false
26
+ */
27
+ appear?: boolean;
18
28
  }
19
29
  declare var __VLS_9: {};
20
30
  type __VLS_Slots = {} & {
@@ -3,14 +3,12 @@ import { $modals } from "./modal-manager";
3
3
  </script>
4
4
 
5
5
  <template>
6
- <ClientOnly>
7
- <div id='nui-modals-root'>
8
- <component
9
- :is='entry.component'
10
- v-for='[id, entry] in $modals.modals'
11
- :key='id'
12
- v-bind='entry.props'
13
- />
14
- </div>
15
- </ClientOnly>
6
+ <div id='nui-modals-root'>
7
+ <component
8
+ :is='entry.component'
9
+ v-for='[id, entry] in $modals.modals'
10
+ :key='id'
11
+ v-bind='entry.props'
12
+ />
13
+ </div>
16
14
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
4
4
  "description": "A modern Nuxt UI library inspired by the best of the React ecosystem.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -77,11 +77,11 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@antfu/eslint-config": "^8.2.0",
81
- "@nuxt/icon": "^2.2.1",
80
+ "@antfu/eslint-config": "^9.1.0",
82
81
  "@nuxt/devtools": "^3.1.1",
83
82
  "@nuxt/eslint": "1.10.0",
84
83
  "@nuxt/eslint-config": "^1.13.0",
84
+ "@nuxt/icon": "^2.2.1",
85
85
  "@nuxt/image": "^2.0.0",
86
86
  "@nuxt/module-builder": "^1.0.2",
87
87
  "@nuxt/schema": "^4.4.2",