nuance-ui 0.2.36 → 0.3.1

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 (75) hide show
  1. package/dist/module.d.mts +3 -0
  2. package/dist/module.d.ts +3 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +5 -3
  5. package/dist/runtime/app-config.d.ts +4 -0
  6. package/dist/runtime/components/accordion/accordion-header.d.vue.ts +28 -0
  7. package/dist/runtime/components/accordion/accordion-header.vue +79 -0
  8. package/dist/runtime/components/accordion/accordion-header.vue.d.ts +28 -0
  9. package/dist/runtime/components/accordion/accordion-item.d.vue.ts +18 -0
  10. package/dist/runtime/components/accordion/accordion-item.vue +44 -0
  11. package/dist/runtime/components/accordion/accordion-item.vue.d.ts +18 -0
  12. package/dist/runtime/components/accordion/accordion-panel.d.vue.ts +18 -0
  13. package/dist/runtime/components/accordion/accordion-panel.vue +40 -0
  14. package/dist/runtime/components/accordion/accordion-panel.vue.d.ts +18 -0
  15. package/dist/runtime/components/accordion/accordion.d.vue.ts +61 -0
  16. package/dist/runtime/components/accordion/accordion.module.css +1 -0
  17. package/dist/runtime/components/accordion/accordion.vue +91 -0
  18. package/dist/runtime/components/accordion/accordion.vue.d.ts +61 -0
  19. package/dist/runtime/components/accordion/index.d.ts +6 -0
  20. package/dist/runtime/components/accordion/index.js +4 -0
  21. package/dist/runtime/components/accordion/lib/context.d.ts +34 -0
  22. package/dist/runtime/components/accordion/lib/context.js +9 -0
  23. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +11 -1
  24. package/dist/runtime/components/action-icon/action-icon.module.css +1 -1
  25. package/dist/runtime/components/action-icon/action-icon.vue +20 -5
  26. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +11 -1
  27. package/dist/runtime/components/button/button.d.vue.ts +8 -0
  28. package/dist/runtime/components/button/button.module.css +1 -1
  29. package/dist/runtime/components/button/button.vue +17 -4
  30. package/dist/runtime/components/button/button.vue.d.ts +8 -0
  31. package/dist/runtime/components/collapse.d.vue.ts +65 -0
  32. package/dist/runtime/components/collapse.vue +144 -0
  33. package/dist/runtime/components/collapse.vue.d.ts +65 -0
  34. package/dist/runtime/components/date-time-picker.d.vue.ts +2 -2
  35. package/dist/runtime/components/date-time-picker.vue.d.ts +2 -2
  36. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +5 -0
  37. package/dist/runtime/components/drawer/drawer-close-button.vue +5 -0
  38. package/dist/runtime/components/files/file-upload-button.vue +4 -0
  39. package/dist/runtime/components/files/file-upload-icon.vue +5 -0
  40. package/dist/runtime/components/index.d.ts +2 -2
  41. package/dist/runtime/components/index.js +1 -1
  42. package/dist/runtime/components/input/date-picker.d.vue.ts +2 -2
  43. package/dist/runtime/components/input/date-picker.vue.d.ts +2 -2
  44. package/dist/runtime/components/link/lib.d.ts +2 -2
  45. package/dist/runtime/components/link/link-button.vue +4 -0
  46. package/dist/runtime/components/modal/modal-close-button.vue +5 -0
  47. package/dist/runtime/components/nav-link/nav-icon-link.d.vue.ts +5 -11
  48. package/dist/runtime/components/nav-link/nav-icon-link.vue +12 -8
  49. package/dist/runtime/components/nav-link/nav-icon-link.vue.d.ts +5 -11
  50. package/dist/runtime/components/table/ui/table-sortable-header.vue +4 -0
  51. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
  52. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
  53. package/dist/runtime/components/text.vue +1 -1
  54. package/dist/runtime/components/theme-toggle.vue +5 -0
  55. package/dist/runtime/composables/use-config.d.ts +1 -0
  56. package/dist/runtime/composables/use-config.js +2 -1
  57. package/dist/runtime/utils/const/active-variants.d.ts +11 -0
  58. package/dist/runtime/utils/const/active-variants.js +9 -0
  59. package/dist/runtime/utils/const/index.d.ts +1 -0
  60. package/dist/runtime/utils/const/index.js +1 -0
  61. package/package.json +1 -1
  62. package/dist/runtime/components/accordion.d.vue.ts +0 -79
  63. package/dist/runtime/components/accordion.vue +0 -44
  64. package/dist/runtime/components/accordion.vue.d.ts +0 -79
  65. package/dist/runtime/components/collapsible/collapsible-content.d.vue.ts +0 -18
  66. package/dist/runtime/components/collapsible/collapsible-content.vue +0 -76
  67. package/dist/runtime/components/collapsible/collapsible-content.vue.d.ts +0 -18
  68. package/dist/runtime/components/collapsible/collapsible-root.d.vue.ts +0 -42
  69. package/dist/runtime/components/collapsible/collapsible-root.vue +0 -41
  70. package/dist/runtime/components/collapsible/collapsible-root.vue.d.ts +0 -42
  71. package/dist/runtime/components/collapsible/collapsible-trigger.d.vue.ts +0 -13
  72. package/dist/runtime/components/collapsible/collapsible-trigger.vue +0 -20
  73. package/dist/runtime/components/collapsible/collapsible-trigger.vue.d.ts +0 -13
  74. package/dist/runtime/components/collapsible/index.d.ts +0 -3
  75. package/dist/runtime/components/collapsible/index.js +0 -1
@@ -1,76 +0,0 @@
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>
@@ -1,18 +0,0 @@
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
- };
@@ -1,42 +0,0 @@
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
- };
@@ -1,41 +0,0 @@
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>
@@ -1,42 +0,0 @@
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
- };
@@ -1,13 +0,0 @@
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
- };
@@ -1,20 +0,0 @@
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>
@@ -1,13 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
1
- export type * from './collapsible-content.vue';
2
- export { type CollapsibleRootProps, useCollapsibleState } from './collapsible-root.vue.js';
3
- export type * from './collapsible-trigger.vue';
@@ -1 +0,0 @@
1
- export { useCollapsibleState } from "./collapsible-root.vue";