nuance-ui 0.2.7 → 0.2.8

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 (118) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +1 -1
  3. package/dist/runtime/components/action-icon/action-icon.vue +23 -23
  4. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +1 -1
  5. package/dist/runtime/components/box.vue +3 -3
  6. package/dist/runtime/components/button/button.d.vue.ts +5 -3
  7. package/dist/runtime/components/button/button.vue +43 -39
  8. package/dist/runtime/components/button/button.vue.d.ts +5 -3
  9. package/dist/runtime/components/calendar/calendar.d.vue.ts +1 -1
  10. package/dist/runtime/components/calendar/calendar.vue +60 -60
  11. package/dist/runtime/components/calendar/calendar.vue.d.ts +1 -1
  12. package/dist/runtime/components/calendar/types.d.ts +4 -3
  13. package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +7 -1
  14. package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +7 -1
  15. package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +3 -1
  16. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +3 -1
  17. package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -1
  18. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  19. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -1
  20. package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +3 -1
  21. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +3 -1
  22. package/dist/runtime/components/card/card-section.d.vue.ts +2 -1
  23. package/dist/runtime/components/card/card-section.vue.d.ts +2 -1
  24. package/dist/runtime/components/card/card.d.vue.ts +1 -0
  25. package/dist/runtime/components/card/card.vue.d.ts +1 -0
  26. package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +4 -1
  27. package/dist/runtime/components/checkbox/checkbox-card.vue +37 -37
  28. package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +4 -1
  29. package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +6 -0
  30. package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +6 -0
  31. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +12 -2
  32. package/dist/runtime/components/checkbox/checkbox.vue +139 -139
  33. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +12 -2
  34. package/dist/runtime/components/chip/chip-group.d.vue.ts +3 -0
  35. package/dist/runtime/components/chip/chip-group.vue.d.ts +3 -0
  36. package/dist/runtime/components/chip/chip.d.vue.ts +9 -0
  37. package/dist/runtime/components/chip/chip.vue +200 -200
  38. package/dist/runtime/components/chip/chip.vue.d.ts +9 -0
  39. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -0
  40. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -0
  41. package/dist/runtime/components/combobox/combobox-option.d.vue.ts +3 -0
  42. package/dist/runtime/components/combobox/combobox-option.vue.d.ts +3 -0
  43. package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -0
  44. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +29 -29
  45. package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -0
  46. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +8 -4
  47. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +8 -4
  48. package/dist/runtime/components/combobox/types.d.ts +11 -0
  49. package/dist/runtime/components/container.d.vue.ts +2 -0
  50. package/dist/runtime/components/container.vue.d.ts +2 -0
  51. package/dist/runtime/components/dialog/types.d.ts +1 -0
  52. package/dist/runtime/components/files/file-upload-button.d.vue.ts +4 -2
  53. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  54. package/dist/runtime/components/files/file-upload-button.vue.d.ts +4 -2
  55. package/dist/runtime/components/files/file-upload-icon.d.vue.ts +4 -2
  56. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  57. package/dist/runtime/components/files/file-upload-icon.vue.d.ts +4 -2
  58. package/dist/runtime/components/input/email-input.d.vue.ts +5 -5
  59. package/dist/runtime/components/input/email-input.vue +5 -6
  60. package/dist/runtime/components/input/email-input.vue.d.ts +5 -5
  61. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +8 -2
  62. package/dist/runtime/components/input/number-input.d.vue.ts +7 -5
  63. package/dist/runtime/components/input/number-input.vue +6 -2
  64. package/dist/runtime/components/input/number-input.vue.d.ts +7 -5
  65. package/dist/runtime/components/input/password-input.vue +1 -0
  66. package/dist/runtime/components/input/text-input.d.vue.ts +7 -5
  67. package/dist/runtime/components/input/text-input.vue +37 -34
  68. package/dist/runtime/components/input/text-input.vue.d.ts +7 -5
  69. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +7 -3
  70. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  71. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +7 -3
  72. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +4 -1
  73. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  74. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +4 -1
  75. package/dist/runtime/components/link/link-button.vue +1 -0
  76. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -4
  77. package/dist/runtime/components/nav-link/nav-link.vue +7 -3
  78. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -4
  79. package/dist/runtime/components/paper.d.vue.ts +3 -1
  80. package/dist/runtime/components/paper.vue +33 -33
  81. package/dist/runtime/components/paper.vue.d.ts +3 -1
  82. package/dist/runtime/components/progress/progress-section.d.vue.ts +1 -1
  83. package/dist/runtime/components/progress/progress-section.vue.d.ts +1 -1
  84. package/dist/runtime/components/select.d.vue.ts +2 -0
  85. package/dist/runtime/components/select.vue +63 -63
  86. package/dist/runtime/components/select.vue.d.ts +2 -0
  87. package/dist/runtime/components/table/types.d.ts +10 -1
  88. package/dist/runtime/components/table/ui/table-sortable-header.vue +1 -0
  89. package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -0
  90. package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -0
  91. package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -0
  92. package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -0
  93. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +36 -9
  94. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +36 -9
  95. package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +7 -3
  96. package/dist/runtime/components/tabs/tabs-tab.vue +7 -4
  97. package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +7 -3
  98. package/dist/runtime/components/text.d.vue.ts +6 -1
  99. package/dist/runtime/components/text.vue.d.ts +6 -1
  100. package/dist/runtime/components/textarea.d.vue.ts +7 -5
  101. package/dist/runtime/components/textarea.vue +6 -3
  102. package/dist/runtime/components/textarea.vue.d.ts +7 -5
  103. package/dist/runtime/components/title.d.vue.ts +5 -0
  104. package/dist/runtime/components/title.vue.d.ts +5 -0
  105. package/dist/runtime/components/transition.d.vue.ts +12 -2
  106. package/dist/runtime/components/transition.vue.d.ts +12 -2
  107. package/dist/runtime/components/tree/_ui/tree-item.d.vue.ts +1 -0
  108. package/dist/runtime/components/tree/_ui/tree-item.vue.d.ts +1 -0
  109. package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +8 -0
  110. package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +8 -0
  111. package/dist/runtime/components/tree/lib/context.d.ts +15 -0
  112. package/dist/runtime/components/tree/types.d.ts +9 -0
  113. package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +2 -0
  114. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  115. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +2 -0
  116. package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -0
  117. package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -0
  118. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import type { TreeItem } from '../types.js';
2
2
  export interface TreeItemProps extends TreeItem {
3
+ /** Nesting depth, starting at 1 for root items */
3
4
  level: number;
4
5
  }
5
6
  declare const __VLS_export: import("vue").DefineComponent<TreeItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TreeItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -2,13 +2,21 @@ import type { ButtonProps } from '@nui/components';
2
2
  import type { RovingFocusProps } from '../../roving-focus/roving-focus.vue.js';
3
3
  import type { TreeFilter, TreeIconResolver, TreeLoader, TreeModels } from '../types.js';
4
4
  export type TreeRootProps = RovingFocusProps & {
5
+ /** Resolves the icon for a given tree item */
5
6
  iconResolver?: TreeIconResolver;
7
+ /** If set, selected items can be deleted with the Delete key */
6
8
  removable?: boolean;
9
+ /** If set, multiple items can be selected */
7
10
  selectable?: boolean;
11
+ /** Async loader for branch data */
8
12
  loadBranch: TreeLoader;
13
+ /** Filters which items are rendered */
9
14
  filter?: TreeFilter;
15
+ /** Visual variant */
10
16
  variant?: ButtonProps['variant'];
17
+ /** Color from theme */
11
18
  color?: ButtonProps['color'];
19
+ /** Component size */
12
20
  size?: ButtonProps['size'];
13
21
  };
14
22
  type __VLS_Props = TreeRootProps;
@@ -2,13 +2,21 @@ import type { ButtonProps } from '@nui/components';
2
2
  import type { RovingFocusProps } from '../../roving-focus/roving-focus.vue.js';
3
3
  import type { TreeFilter, TreeIconResolver, TreeLoader, TreeModels } from '../types.js';
4
4
  export type TreeRootProps = RovingFocusProps & {
5
+ /** Resolves the icon for a given tree item */
5
6
  iconResolver?: TreeIconResolver;
7
+ /** If set, selected items can be deleted with the Delete key */
6
8
  removable?: boolean;
9
+ /** If set, multiple items can be selected */
7
10
  selectable?: boolean;
11
+ /** Async loader for branch data */
8
12
  loadBranch: TreeLoader;
13
+ /** Filters which items are rendered */
9
14
  filter?: TreeFilter;
15
+ /** Visual variant */
10
16
  variant?: ButtonProps['variant'];
17
+ /** Color from theme */
11
18
  color?: ButtonProps['color'];
19
+ /** Component size */
12
20
  size?: ButtonProps['size'];
13
21
  };
14
22
  type __VLS_Props = TreeRootProps;
@@ -4,22 +4,37 @@ import type { TreeFilter, TreeIconResolver, TreeLoader } from '../types.js';
4
4
  type EventType = 'select' | 'expand';
5
5
  type SelectMode = 'single' | 'multiple' | 'range';
6
6
  export interface TreeContext {
7
+ /** Ref to the root `<ul>` element */
7
8
  root: ShallowRef<HTMLUListElement | null>;
9
+ /** Path of the active (focused) item */
8
10
  active: ModelRef<string | null>;
11
+ /** Paths of selected items */
9
12
  selected: ModelRef<string[]>;
13
+ /** Paths of expanded directory items */
10
14
  expanded: ModelRef<string[]>;
15
+ /** Resolves the icon for a given tree item */
11
16
  iconResolver: TreeIconResolver;
17
+ /** Async loader for branch data */
12
18
  loadBranch: TreeLoader;
19
+ /** Filters which items are rendered */
13
20
  filter?: TreeFilter;
21
+ /** Whether multiple items can be selected */
14
22
  selectable: boolean;
23
+ /** Visual variant */
15
24
  variant: ButtonProps['variant'];
25
+ /** Color from theme */
16
26
  color: ButtonProps['color'];
27
+ /** Component size */
17
28
  size: ButtonProps['size'];
18
29
  }
19
30
  export interface TreeState extends Omit<TreeContext, 'root'> {
31
+ /** Toggles selection or expansion state of an item */
20
32
  toggle: (type: EventType, path: string, mode?: SelectMode) => void;
33
+ /** Activates selection or expansion for an item */
21
34
  on: ((type: 'expand', path: string) => void) & ((type: 'select', path: string, mode?: SelectMode) => void);
35
+ /** Deactivates selection or expansion for an item */
22
36
  off: (type: EventType, path: string) => void;
37
+ /** Sets the active (focused) item path */
23
38
  setActive: (path: string | null) => void;
24
39
  }
25
40
  export declare const useProvideTreeState: (args_0: TreeContext) => TreeState;
@@ -1,17 +1,25 @@
1
1
  import type { NuanceColor } from '@nui/types';
2
2
  import type { Ref } from 'vue';
3
3
  export interface TreeModels {
4
+ /** Path of the active (focused) item */
4
5
  active: string | null;
6
+ /** Flat tree data */
5
7
  tree: TreeItem[];
8
+ /** Paths of selected items */
6
9
  selected: string[];
10
+ /** Paths of expanded directory items */
7
11
  expanded: string[];
8
12
  }
9
13
  export interface TreeEmits {
14
+ /** Fired when selected items are deleted */
10
15
  delete: [path: string[]];
11
16
  }
12
17
  export interface TreeLoaderResult {
18
+ /** Loaded branch data */
13
19
  data: Ref<TreeItem[] | undefined>;
20
+ /** Whether the branch is loading */
14
21
  pending: Ref<boolean>;
22
+ /** Triggers data fetching */
15
23
  execute: () => Promise<unknown>;
16
24
  }
17
25
  /**
@@ -49,6 +57,7 @@ export interface TreeItem {
49
57
  * @default `file`
50
58
  */
51
59
  type?: TreeItemType;
60
+ /** Nested child items */
52
61
  children?: TreeItem[];
53
62
  }
54
63
  export type TreeIconResolver = (type: TreeItemType, name?: string, path?: string, disabled?: boolean) => {
@@ -2,7 +2,9 @@ import type { VisuallyHiddenProps } from './visually-hidden.vue.js';
2
2
  export interface VisuallyHiddenInputProps extends VisuallyHiddenProps {
3
3
  /** Input name */
4
4
  name?: string;
5
+ /** Marks the input as required */
5
6
  required?: boolean;
7
+ /** Disables the input */
6
8
  disabled?: boolean;
7
9
  }
8
10
  declare const __VLS_export: <T>(__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<{
@@ -12,5 +12,5 @@ const value = defineModel({ type: null });
12
12
  </script>
13
13
 
14
14
  <template>
15
- <VisuallyHidden v-bind='{ ...props, ...$attrs }' is='input' v-model='value' />
15
+ <VisuallyHidden v-bind='{ ...props, ...$attrs }' is='input' v-model='value' />
16
16
  </template>
@@ -2,7 +2,9 @@ import type { VisuallyHiddenProps } from './visually-hidden.vue.js';
2
2
  export interface VisuallyHiddenInputProps extends VisuallyHiddenProps {
3
3
  /** Input name */
4
4
  name?: string;
5
+ /** Marks the input as required */
5
6
  required?: boolean;
7
+ /** Disables the input */
6
8
  disabled?: boolean;
7
9
  }
8
10
  declare const __VLS_export: <T>(__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<{
@@ -1,5 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  export interface VisuallyHiddenProps extends BoxProps {
3
+ /** Controls accessibility behaviour: `'focusable'` adds `aria-hidden`, `'fully-hidden'` removes from tab order */
3
4
  feature?: 'focusable' | 'fully-hidden';
4
5
  }
5
6
  declare var __VLS_8: {};
@@ -1,5 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  export interface VisuallyHiddenProps extends BoxProps {
3
+ /** Controls accessibility behaviour: `'focusable'` adds `aria-hidden`, `'fully-hidden'` removes from tab order */
3
4
  feature?: 'focusable' | 'fully-hidden';
4
5
  }
5
6
  declare var __VLS_8: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "A modern Vue UI library inspired by the best of the React ecosystem.",
5
5
  "repository": {
6
6
  "type": "git",