nuance-ui 0.2.7 → 0.2.9

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 (172) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/action-icon/action-icon-group.vue +3 -3
  5. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +1 -1
  6. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +1 -1
  7. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  8. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  9. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  10. package/dist/runtime/components/app-shell/app-shell-main.vue +18 -18
  11. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  12. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  13. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  14. package/dist/runtime/components/breadcrumbs.vue +78 -78
  15. package/dist/runtime/components/button/button.d.vue.ts +5 -3
  16. package/dist/runtime/components/button/button.vue +7 -3
  17. package/dist/runtime/components/button/button.vue.d.ts +5 -3
  18. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  19. package/dist/runtime/components/calendar/calendar.d.vue.ts +1 -1
  20. package/dist/runtime/components/calendar/calendar.vue.d.ts +1 -1
  21. package/dist/runtime/components/calendar/types.d.ts +4 -3
  22. package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +7 -1
  23. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  24. package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +7 -1
  25. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  26. package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +3 -1
  27. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  28. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +3 -1
  29. package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -1
  30. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -1
  31. package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +3 -1
  32. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  33. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +3 -1
  34. package/dist/runtime/components/card/card-section.d.vue.ts +2 -1
  35. package/dist/runtime/components/card/card-section.vue +3 -3
  36. package/dist/runtime/components/card/card-section.vue.d.ts +2 -1
  37. package/dist/runtime/components/card/card.d.vue.ts +1 -0
  38. package/dist/runtime/components/card/card.vue +3 -3
  39. package/dist/runtime/components/card/card.vue.d.ts +1 -0
  40. package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +4 -1
  41. package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +4 -1
  42. package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +6 -0
  43. package/dist/runtime/components/checkbox/checkbox-indicator.vue +117 -117
  44. package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +6 -0
  45. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +12 -2
  46. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +12 -2
  47. package/dist/runtime/components/chip/chip-group.d.vue.ts +3 -0
  48. package/dist/runtime/components/chip/chip-group.vue +2 -2
  49. package/dist/runtime/components/chip/chip-group.vue.d.ts +3 -0
  50. package/dist/runtime/components/chip/chip.d.vue.ts +9 -0
  51. package/dist/runtime/components/chip/chip.vue.d.ts +9 -0
  52. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  53. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  54. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -0
  55. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  56. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -0
  57. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  58. package/dist/runtime/components/combobox/combobox-option.d.vue.ts +3 -0
  59. package/dist/runtime/components/combobox/combobox-option.vue +22 -22
  60. package/dist/runtime/components/combobox/combobox-option.vue.d.ts +3 -0
  61. package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -0
  62. package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -0
  63. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +8 -4
  64. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  65. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +8 -4
  66. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  67. package/dist/runtime/components/combobox/types.d.ts +11 -0
  68. package/dist/runtime/components/container.d.vue.ts +2 -0
  69. package/dist/runtime/components/container.vue +8 -8
  70. package/dist/runtime/components/container.vue.d.ts +2 -0
  71. package/dist/runtime/components/date-time-picker.d.vue.ts +3 -3
  72. package/dist/runtime/components/date-time-picker.vue +66 -66
  73. package/dist/runtime/components/date-time-picker.vue.d.ts +3 -3
  74. package/dist/runtime/components/dialog/types.d.ts +1 -0
  75. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  76. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  77. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  78. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  79. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  80. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  81. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  82. package/dist/runtime/components/files/file-upload-button.d.vue.ts +4 -2
  83. package/dist/runtime/components/files/file-upload-button.vue.d.ts +4 -2
  84. package/dist/runtime/components/files/file-upload-icon.d.vue.ts +4 -2
  85. package/dist/runtime/components/files/file-upload-icon.vue.d.ts +4 -2
  86. package/dist/runtime/components/input/date-picker.vue +85 -85
  87. package/dist/runtime/components/input/email-input.d.vue.ts +5 -5
  88. package/dist/runtime/components/input/email-input.vue +21 -22
  89. package/dist/runtime/components/input/email-input.vue.d.ts +5 -5
  90. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +8 -2
  91. package/dist/runtime/components/input/number-input.d.vue.ts +7 -5
  92. package/dist/runtime/components/input/number-input.vue +136 -132
  93. package/dist/runtime/components/input/number-input.vue.d.ts +7 -5
  94. package/dist/runtime/components/input/password-input.vue +29 -28
  95. package/dist/runtime/components/input/text-input.d.vue.ts +7 -5
  96. package/dist/runtime/components/input/text-input.vue +6 -3
  97. package/dist/runtime/components/input/text-input.vue.d.ts +7 -5
  98. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +7 -3
  99. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +7 -3
  100. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +4 -1
  101. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +4 -1
  102. package/dist/runtime/components/link/link-button.vue +17 -16
  103. package/dist/runtime/components/link/link.vue +10 -10
  104. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  105. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  106. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  107. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  108. package/dist/runtime/components/modal/modal-header.vue +3 -3
  109. package/dist/runtime/components/modal/modal-root.vue +13 -13
  110. package/dist/runtime/components/modal/modal-title.vue +3 -3
  111. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  112. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -4
  113. package/dist/runtime/components/nav-link/nav-link.vue +135 -131
  114. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -4
  115. package/dist/runtime/components/paper.d.vue.ts +3 -1
  116. package/dist/runtime/components/paper.vue.d.ts +3 -1
  117. package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
  118. package/dist/runtime/components/popover/popover-target.vue +8 -8
  119. package/dist/runtime/components/popover/popover.vue +1 -1
  120. package/dist/runtime/components/progress/progress-label.vue +3 -3
  121. package/dist/runtime/components/progress/progress-root.vue +3 -3
  122. package/dist/runtime/components/progress/progress-section.d.vue.ts +1 -1
  123. package/dist/runtime/components/progress/progress-section.vue +8 -8
  124. package/dist/runtime/components/progress/progress-section.vue.d.ts +1 -1
  125. package/dist/runtime/components/progress/progress.vue +9 -9
  126. package/dist/runtime/components/renderless/renderless.vue +3 -3
  127. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  128. package/dist/runtime/components/select.d.vue.ts +2 -0
  129. package/dist/runtime/components/select.vue.d.ts +2 -0
  130. package/dist/runtime/components/switch/switch-group.vue +16 -16
  131. package/dist/runtime/components/table/table.d.ts +30 -30
  132. package/dist/runtime/components/table/types.d.ts +10 -1
  133. package/dist/runtime/components/table/ui/table-sortable-header.vue +12 -11
  134. package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -0
  135. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  136. package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -0
  137. package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -0
  138. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  139. package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -0
  140. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +36 -9
  141. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  142. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +36 -9
  143. package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +7 -3
  144. package/dist/runtime/components/tabs/tabs-tab.vue +25 -22
  145. package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +7 -3
  146. package/dist/runtime/components/text.d.vue.ts +6 -1
  147. package/dist/runtime/components/text.vue +67 -67
  148. package/dist/runtime/components/text.vue.d.ts +6 -1
  149. package/dist/runtime/components/textarea.d.vue.ts +7 -5
  150. package/dist/runtime/components/textarea.vue +38 -35
  151. package/dist/runtime/components/textarea.vue.d.ts +7 -5
  152. package/dist/runtime/components/title.d.vue.ts +5 -0
  153. package/dist/runtime/components/title.vue +14 -14
  154. package/dist/runtime/components/title.vue.d.ts +5 -0
  155. package/dist/runtime/components/transition.d.vue.ts +12 -2
  156. package/dist/runtime/components/transition.vue +3 -3
  157. package/dist/runtime/components/transition.vue.d.ts +12 -2
  158. package/dist/runtime/components/tree/_ui/tree-item.d.vue.ts +1 -0
  159. package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
  160. package/dist/runtime/components/tree/_ui/tree-item.vue.d.ts +1 -0
  161. package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +8 -0
  162. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  163. package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +8 -0
  164. package/dist/runtime/components/tree/lib/context.d.ts +15 -0
  165. package/dist/runtime/components/tree/types.d.ts +9 -0
  166. package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +2 -0
  167. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +2 -0
  168. package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -0
  169. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  170. package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -0
  171. package/dist/runtime/styles/dark-theme.css +1 -1
  172. package/package.json +1 -1
@@ -3,13 +3,23 @@ import type { InlineInputProps } from '../input/index.js';
3
3
  export interface CheckboxProps extends Omit<InlineInputProps, 'id'> {
4
4
  /** Id used to bind input and label, auto-generated if not provided */
5
5
  id?: string;
6
+ /** Color from theme */
6
7
  color?: NuanceColor;
8
+ /** Icon color */
7
9
  iconColor?: NuanceColor;
8
- /** Visual variant @default 'filled' */
10
+ /**
11
+ * Visual variant
12
+ * @default `'filled'`
13
+ */
9
14
  variant?: 'filled' | 'outline';
15
+ /** Border radius */
10
16
  radius?: NuanceSize;
11
- /** Component size @default 'sm' */
17
+ /**
18
+ * Component size
19
+ * @default `'sm'`
20
+ */
12
21
  size?: NuanceSize;
22
+ /** Value used in checkbox group context */
13
23
  value?: string;
14
24
  }
15
25
  type __VLS_Props = CheckboxProps;
@@ -1,7 +1,10 @@
1
1
  import type { ChipGroupValue } from './lib.js';
2
2
  export interface ChipGroupProps<T extends boolean = false> {
3
+ /** Form input name */
3
4
  name: string;
5
+ /** Allows selecting multiple chips at once */
4
6
  multiple?: T;
7
+ /** Disables all chips in the group */
5
8
  disabled?: boolean;
6
9
  }
7
10
  declare const __VLS_export: <T 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<{
@@ -15,6 +15,6 @@ useProvideChipGroupState({ multiple, value, disabled });
15
15
  </script>
16
16
 
17
17
  <template>
18
- <slot />
19
- <VisuallyHiddenInput v-model='value' :name />
18
+ <slot />
19
+ <VisuallyHiddenInput v-model='value' :name />
20
20
  </template>
@@ -1,7 +1,10 @@
1
1
  import type { ChipGroupValue } from './lib.js';
2
2
  export interface ChipGroupProps<T extends boolean = false> {
3
+ /** Form input name */
3
4
  name: string;
5
+ /** Allows selecting multiple chips at once */
4
6
  multiple?: T;
7
+ /** Disables all chips in the group */
5
8
  disabled?: boolean;
6
9
  }
7
10
  declare const __VLS_export: <T 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<{
@@ -1,15 +1,24 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  export interface ChipProps {
3
+ /** Border radius */
3
4
  radius?: NuanceRadius;
5
+ /** Component size */
4
6
  size?: NuanceSize;
7
+ /** Input type used when rendered without a group */
5
8
  type?: 'radio' | 'checkbox';
9
+ /** Color from theme */
6
10
  color?: NuanceColor;
7
11
  /** Id used to bind input and label, auto-generated if not provided */
8
12
  id?: string;
13
+ /** Visual variant */
9
14
  variant?: 'filled' | 'outline' | 'light';
15
+ /** Value used in chip group context */
10
16
  value?: string;
17
+ /** Check icon name */
11
18
  icon?: string;
19
+ /** Shows the check icon when the chip is checked */
12
20
  hideIcon?: boolean;
21
+ /** Disables the component */
13
22
  disabled?: boolean;
14
23
  }
15
24
  type __VLS_Props = ChipProps;
@@ -1,15 +1,24 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  export interface ChipProps {
3
+ /** Border radius */
3
4
  radius?: NuanceRadius;
5
+ /** Component size */
4
6
  size?: NuanceSize;
7
+ /** Input type used when rendered without a group */
5
8
  type?: 'radio' | 'checkbox';
9
+ /** Color from theme */
6
10
  color?: NuanceColor;
7
11
  /** Id used to bind input and label, auto-generated if not provided */
8
12
  id?: string;
13
+ /** Visual variant */
9
14
  variant?: 'filled' | 'outline' | 'light';
15
+ /** Value used in chip group context */
10
16
  value?: string;
17
+ /** Check icon name */
11
18
  icon?: string;
19
+ /** Shows the check icon when the chip is checked */
12
20
  hideIcon?: boolean;
21
+ /** Disables the component */
13
22
  disabled?: boolean;
14
23
  }
15
24
  type __VLS_Props = ChipProps;
@@ -13,21 +13,21 @@ const style = computed(() => ({
13
13
  </script>
14
14
 
15
15
  <template>
16
- <PopoverDropdown :class='$style.dropdown'>
17
- <Box
18
- :id='store.listId'
19
- role='presentation'
20
- :class='css.dropdown'
21
- :style
22
- v-bind='$attrs'
23
- >
24
- <slot />
25
- </Box>
26
- </PopoverDropdown>
16
+ <PopoverDropdown :class='$style.dropdown'>
17
+ <Box
18
+ :id='store.listId'
19
+ role='presentation'
20
+ :class='css.dropdown'
21
+ :style
22
+ v-bind='$attrs'
23
+ >
24
+ <slot />
25
+ </Box>
26
+ </PopoverDropdown>
27
27
  </template>
28
28
 
29
29
  <style module lang="postcss">
30
- .dropdown {
31
- padding: 0;
32
- }
30
+ .dropdown {
31
+ padding: 0;
32
+ }
33
33
  </style>
@@ -8,7 +8,7 @@ const { is, mod } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Box :is :mod :class='css.empty'>
12
- <slot />
13
- </Box>
11
+ <Box :is :mod :class='css.empty'>
12
+ <slot />
13
+ </Box>
14
14
  </template>
@@ -3,6 +3,7 @@ import type { ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './ty
3
3
  export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
4
  /** Group label */
5
5
  label?: string;
6
+ /** Group data including items */
6
7
  data: ComboboxItemGroup<Value, Ext>;
7
8
  }
8
9
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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<{
@@ -25,25 +25,25 @@ const value = defineModel("value", { type: [String, Array, null] });
25
25
  </script>
26
26
 
27
27
  <template>
28
- <Box :class='css.group' role='group' :aria-labelledby='label ? uid : void 0' :mod>
29
- <div v-if='label || $slots?.label' :id='uid' :class='css.groupLabel'>
30
- <slot name='label'>
31
- {{ label }}
32
- </slot>
33
- </div>
34
-
35
- <ComboboxOption
36
- v-for='item in data.items'
37
- :key='item.value'
38
- :data='item'
39
- :icon-position
40
- :with-check-icon
41
- :check-icon
42
- :checked='isValueChecked(value, item.value)'
43
- >
44
- <template v-if='$slots.option' #default='props'>
45
- <slot name='option' v-bind='props' />
46
- </template>
47
- </ComboboxOption>
48
- </Box>
28
+ <Box :class='css.group' role='group' :aria-labelledby='label ? uid : void 0' :mod>
29
+ <div v-if='label || $slots?.label' :id='uid' :class='css.groupLabel'>
30
+ <slot name='label'>
31
+ {{ label }}
32
+ </slot>
33
+ </div>
34
+
35
+ <ComboboxOption
36
+ v-for='item in data.items'
37
+ :key='item.value'
38
+ :data='item'
39
+ :icon-position
40
+ :with-check-icon
41
+ :check-icon
42
+ :checked='isValueChecked(value, item.value)'
43
+ >
44
+ <template v-if='$slots.option' #default='props'>
45
+ <slot name='option' v-bind='props' />
46
+ </template>
47
+ </ComboboxOption>
48
+ </Box>
49
49
  </template>
@@ -3,6 +3,7 @@ import type { ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './ty
3
3
  export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
4
  /** Group label */
5
5
  label?: string;
6
+ /** Group data including items */
6
7
  data: ComboboxItemGroup<Value, Ext>;
7
8
  }
8
9
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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<{
@@ -9,7 +9,7 @@ const { labelledBy, mod } = defineProps({
9
9
  </script>
10
10
 
11
11
  <template>
12
- <Box :class='css.options' role='listbox' :aria-labelledby='labelledBy' :mod>
13
- <slot />
14
- </Box>
12
+ <Box :class='css.options' role='listbox' :aria-labelledby='labelledBy' :mod>
13
+ <slot />
14
+ </Box>
15
15
  </template>
@@ -1,8 +1,11 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { ComboboxItem, ComboboxItemExt, ComboboxItemProps } from './types.js';
3
3
  export interface ComboboxOptionProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
+ /** Option data */
4
5
  data: ComboboxItem<Value, Ext>;
6
+ /** Whether this option is the active (highlighted) option */
5
7
  checked: boolean;
8
+ /** Whether this option is selected in the current value */
6
9
  selected?: boolean;
7
10
  }
8
11
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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<{
@@ -37,26 +37,26 @@ const mod = computed(() => [
37
37
  </script>
38
38
 
39
39
  <template>
40
- <Box
41
- :class='css.option'
42
- data-combobox-option
43
- :mod
44
- role='option'
45
- :aria-selected='checked'
46
- @mousedown='() => !data?.disabled && onOptionSubmit?.(data.value, data)'
47
- >
48
- <slot :with-check-icon :icon-position :data :checked>
49
- <Icon
50
- v-if='checked && withCheckIcon && iconPosition === "left"'
51
- :class='css.optionCheck'
52
- :name='data?.icon ?? checkIcon'
53
- />
54
- <span>{{ data.label }}</span>
55
- <Icon
56
- v-if='checked && withCheckIcon && iconPosition === "right"'
57
- :class='css.optionCheck'
58
- :name='data?.icon ?? checkIcon'
59
- />
60
- </slot>
61
- </Box>
40
+ <Box
41
+ :class='css.option'
42
+ data-combobox-option
43
+ :mod
44
+ role='option'
45
+ :aria-selected='checked'
46
+ @mousedown='() => !data?.disabled && onOptionSubmit?.(data.value, data)'
47
+ >
48
+ <slot :with-check-icon :icon-position :data :checked>
49
+ <Icon
50
+ v-if='checked && withCheckIcon && iconPosition === "left"'
51
+ :class='css.optionCheck'
52
+ :name='data?.icon ?? checkIcon'
53
+ />
54
+ <span>{{ data.label }}</span>
55
+ <Icon
56
+ v-if='checked && withCheckIcon && iconPosition === "right"'
57
+ :class='css.optionCheck'
58
+ :name='data?.icon ?? checkIcon'
59
+ />
60
+ </slot>
61
+ </Box>
62
62
  </template>
@@ -1,8 +1,11 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { ComboboxItem, ComboboxItemExt, ComboboxItemProps } from './types.js';
3
3
  export interface ComboboxOptionProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
+ /** Option data */
4
5
  data: ComboboxItem<Value, Ext>;
6
+ /** Whether this option is the active (highlighted) option */
5
7
  checked: boolean;
8
+ /** Whether this option is selected in the current value */
6
9
  selected?: boolean;
7
10
  }
8
11
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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,15 +1,25 @@
1
1
  import type { FilterOptionsInput } from './lib/utils/index.js';
2
2
  import type { ComboboxItemExt, ComboboxOption } from './types.js';
3
3
  export interface ComboboxOptionsDropdownProps<Value extends string = string, Ext extends ComboboxItemExt = object> {
4
+ /** List of options to render */
4
5
  data: ComboboxOption<Value, Ext>[];
6
+ /** Custom filter function applied to the options list */
5
7
  filter?: (input: FilterOptionsInput<Value, Ext>) => ComboboxOption<Value, Ext>[];
8
+ /** Maximum number of options to display */
6
9
  limit?: number;
10
+ /** Maximum height of the dropdown */
7
11
  maxDropdownHeight?: number | string;
12
+ /** Filters options by the current search value */
8
13
  filterOptions?: boolean;
14
+ /** Text shown when no options match the search */
9
15
  nothingFoundMessage?: string;
16
+ /** Id of the element that labels the options list */
10
17
  labelId: string | undefined;
18
+ /** Shows a check icon next to the selected option */
11
19
  withCheckIcon?: boolean;
20
+ /** Position of the check icon relative to the label */
12
21
  iconPosition?: 'left' | 'right';
22
+ /** Icon name for the check mark */
13
23
  checkIcon?: string;
14
24
  }
15
25
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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,15 +1,25 @@
1
1
  import type { FilterOptionsInput } from './lib/utils/index.js';
2
2
  import type { ComboboxItemExt, ComboboxOption } from './types.js';
3
3
  export interface ComboboxOptionsDropdownProps<Value extends string = string, Ext extends ComboboxItemExt = object> {
4
+ /** List of options to render */
4
5
  data: ComboboxOption<Value, Ext>[];
6
+ /** Custom filter function applied to the options list */
5
7
  filter?: (input: FilterOptionsInput<Value, Ext>) => ComboboxOption<Value, Ext>[];
8
+ /** Maximum number of options to display */
6
9
  limit?: number;
10
+ /** Maximum height of the dropdown */
7
11
  maxDropdownHeight?: number | string;
12
+ /** Filters options by the current search value */
8
13
  filterOptions?: boolean;
14
+ /** Text shown when no options match the search */
9
15
  nothingFoundMessage?: string;
16
+ /** Id of the element that labels the options list */
10
17
  labelId: string | undefined;
18
+ /** Shows a check icon next to the selected option */
11
19
  withCheckIcon?: boolean;
20
+ /** Position of the check icon relative to the label */
12
21
  iconPosition?: 'left' | 'right';
22
+ /** Icon name for the check mark */
13
23
  checkIcon?: string;
14
24
  }
15
25
  declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__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<{
@@ -3,14 +3,18 @@ import type { CSSProperties } from 'vue';
3
3
  import type { PopoverProps } from '../popover/index.js';
4
4
  import type { ComboboxStore } from './lib/use-combobox/index.js';
5
5
  export interface ComboboxProps extends PopoverProps {
6
+ /** External combobox store; creates an internal one if omitted */
6
7
  store?: ComboboxStore;
7
- /** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
8
+ /** Loops arrow-key navigation from last item to first and back */
8
9
  loop?: boolean;
9
- /** Controls items `font-size` and `padding` @default `'sm'` */
10
+ /**
11
+ * Component size
12
+ * @default `'sm'`
13
+ */
10
14
  size?: NuanceSize;
11
- /** Controls `padding` of the dropdown @default `4` */
15
+ /** Padding token for the dropdown */
12
16
  dropdownPadding?: NuanceSize | CSSProperties['padding'];
13
- /** Determines whether the `Combobox` value can be changed */
17
+ /** Prevents value changes */
14
18
  readOnly?: boolean;
15
19
  }
16
20
  type __VLS_Props = ComboboxProps;
@@ -51,7 +51,7 @@ useProvideComboboxState({
51
51
  </script>
52
52
 
53
53
  <template>
54
- <Popover v-bind='rest' v-model:open='opened'>
55
- <slot />
56
- </Popover>
54
+ <Popover v-bind='rest' v-model:open='opened'>
55
+ <slot />
56
+ </Popover>
57
57
  </template>
@@ -3,14 +3,18 @@ import type { CSSProperties } from 'vue';
3
3
  import type { PopoverProps } from '../popover/index.js';
4
4
  import type { ComboboxStore } from './lib/use-combobox/index.js';
5
5
  export interface ComboboxProps extends PopoverProps {
6
+ /** External combobox store; creates an internal one if omitted */
6
7
  store?: ComboboxStore;
7
- /** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
8
+ /** Loops arrow-key navigation from last item to first and back */
8
9
  loop?: boolean;
9
- /** Controls items `font-size` and `padding` @default `'sm'` */
10
+ /**
11
+ * Component size
12
+ * @default `'sm'`
13
+ */
10
14
  size?: NuanceSize;
11
- /** Controls `padding` of the dropdown @default `4` */
15
+ /** Padding token for the dropdown */
12
16
  dropdownPadding?: NuanceSize | CSSProperties['padding'];
13
- /** Determines whether the `Combobox` value can be changed */
17
+ /** Prevents value changes */
14
18
  readOnly?: boolean;
15
19
  }
16
20
  type __VLS_Props = ComboboxProps;
@@ -26,7 +26,7 @@ const { store: { targetRef } } = useComboboxState();
26
26
  </script>
27
27
 
28
28
  <template>
29
- <PopoverTarget ref='targetRef' v-bind='aria' disable>
30
- <slot />
31
- </PopoverTarget>
29
+ <PopoverTarget ref='targetRef' v-bind='aria' disable>
30
+ <slot />
31
+ </PopoverTarget>
32
32
  </template>
@@ -4,17 +4,25 @@ interface BaseComboboxFields {
4
4
  disabled?: boolean;
5
5
  icon?: string;
6
6
  }
7
+ /** Extra fields allowed on a combobox item beyond the base fields */
7
8
  export type ComboboxItemExt = Omit<object, keyof BaseComboboxFields>;
9
+ /** Single selectable option */
8
10
  export type ComboboxItem<Value extends string = string, Ext extends ComboboxItemExt = object> = BaseComboboxFields & {
9
11
  value: Value;
10
12
  } & Ext;
13
+ /** Grouped set of combobox items */
11
14
  export interface ComboboxItemGroup<_Value extends string = string, Ext extends ComboboxItemExt = object> {
15
+ /** Group label */
12
16
  group: string;
17
+ /** Group icon */
13
18
  icon?: string;
14
19
  items: ComboboxItem<any, Ext>[];
15
20
  }
21
+ /** A flat item or a group of items */
16
22
  export type ComboboxOption<Value extends string = string, Ext extends ComboboxItemExt = object> = ComboboxItem<Value, Ext> | ComboboxItemGroup<Value, Ext>;
23
+ /** Full list of combobox options */
17
24
  export type ComboboxData<Value extends string = string, Ext extends ComboboxItemExt = object> = ComboboxOption<Value, Ext>[];
25
+ /** Source that triggered a dropdown open/close event */
18
26
  export type ComboboxDropdownEventSource = 'keyboard' | 'mouse' | 'unknown';
19
27
  export interface ComboboxRootEmits {
20
28
  clear: [];
@@ -27,8 +35,11 @@ export interface ComboboxRootEmits {
27
35
  submit: [string, ComboboxItem];
28
36
  }
29
37
  export interface ComboboxItemProps {
38
+ /** Shows a check icon next to the selected option */
30
39
  withCheckIcon?: boolean;
40
+ /** Icon name for the check mark */
31
41
  checkIcon?: string;
42
+ /** Position of the check icon relative to the label */
32
43
  iconPosition?: 'left' | 'right';
33
44
  }
34
45
  export {};
@@ -1,7 +1,9 @@
1
1
  import type { NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from './box.vue.js';
3
3
  export interface ContainerProps extends BoxProps {
4
+ /** Component size */
4
5
  size?: NuanceSize | string | number;
6
+ /** Removes max-width constraint */
5
7
  fluid?: boolean;
6
8
  }
7
9
  declare var __VLS_8: {};
@@ -20,14 +20,14 @@ const _mod = computed(() => [{ fluid }, mod]);
20
20
  </script>
21
21
 
22
22
  <template>
23
- <Box
24
- :is
25
- :style
26
- :mod='_mod'
27
- :class='$style.root'
28
- >
29
- <slot />
30
- </Box>
23
+ <Box
24
+ :is
25
+ :style
26
+ :mod='_mod'
27
+ :class='$style.root'
28
+ >
29
+ <slot />
30
+ </Box>
31
31
  </template>
32
32
 
33
33
  <style module>
@@ -1,7 +1,9 @@
1
1
  import type { NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from './box.vue.js';
3
3
  export interface ContainerProps extends BoxProps {
4
+ /** Component size */
4
5
  size?: NuanceSize | string | number;
6
+ /** Removes max-width constraint */
5
7
  fluid?: boolean;
6
8
  }
7
9
  declare var __VLS_8: {};
@@ -20,7 +20,7 @@ export interface DatePickerProps extends ButtonInputProps, Pick<TimePickerProps,
20
20
  type __VLS_Props = DatePickerProps;
21
21
  type __VLS_ModelProps = {
22
22
  /** ISO string */
23
- modelValue?: string | Date;
23
+ modelValue?: string | Date | null;
24
24
  };
25
25
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
26
26
  declare var __VLS_24: {}, __VLS_32: {}, __VLS_43: {}, __VLS_46: {}, __VLS_49: {};
@@ -39,7 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
39
39
  select: (date: import("./calendar/index.js").Selection) => any;
40
40
  close: () => any;
41
41
  next: () => any;
42
- "update:modelValue": (value: string | Date | undefined) => any;
42
+ "update:modelValue": (value: string | Date | null | undefined) => any;
43
43
  prev: () => any;
44
44
  level: () => any;
45
45
  open: () => any;
@@ -47,7 +47,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
47
47
  onSelect?: ((date: import("./calendar/index.js").Selection) => any) | undefined;
48
48
  onClose?: (() => any) | undefined;
49
49
  onNext?: (() => any) | undefined;
50
- "onUpdate:modelValue"?: ((value: string | Date | undefined) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((value: string | Date | null | undefined) => any) | undefined;
51
51
  onPrev?: (() => any) | undefined;
52
52
  onLevel?: (() => any) | undefined;
53
53
  onOpen?: (() => any) | undefined;