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
@@ -17,77 +17,76 @@ const style = computed(() => ({
17
17
  </script>
18
18
 
19
19
  <template>
20
- <div
21
- :id='id'
22
- ref='dropdownRef'
23
- popover
24
- :style='{ ...floatingStyles, ...style }'
25
- :class='$style.dropdown'
26
- @toggle='onToggle'
27
- >
28
- <slot />
29
- <span
30
- v-if='withArrow'
31
- ref='arrowRef'
32
- :class='$style.arrow'
33
- :style='arrowStyles'
34
- />
35
- </div>
20
+ <div
21
+ :id='id'
22
+ ref='dropdownRef'
23
+ popover
24
+ :style='{ ...floatingStyles, ...style }'
25
+ :class='$style.dropdown'
26
+ @toggle='onToggle'
27
+ >
28
+ <slot />
29
+ <span
30
+ v-if='withArrow'
31
+ ref='arrowRef'
32
+ :class='$style.arrow'
33
+ :style='arrowStyles'
34
+ />
35
+ </div>
36
36
  </template>
37
37
 
38
38
  <style module lang="postcss">
39
- .dropdown {
40
- --popover-radius: var(--radius-default);
41
- --popover-shadow: none;
42
-
43
- overflow: visible;
44
-
45
- padding: var(--spacing-xs) var(--spacing-sm);
46
- border: 1px solid var(--popover-border-color);
47
- border-radius: var(--popover-radius);
48
-
49
- color: var(--color-text);
50
-
51
- opacity: 0;
52
- box-shadow: var(--popover-shadow);
53
-
54
- transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
55
-
56
-
57
- &:popover-open {
58
- opacity: 1;
59
-
60
- @starting-style {
61
- opacity: 0;
62
- }
63
- }
64
-
65
- @mixin where-light {
66
- --popover-border-color: var(--color-gray-2);
67
-
68
- background-color: var(--color-white);
69
- }
70
-
71
- @mixin where-dark {
72
- --popover-border-color: var(--color-dark-4);
73
-
74
- background-color: var(--color-dark-6);
75
- }
76
- }
77
-
78
- .arrow {
79
- --arrow-size: 7px;
80
- --arrow-radius: 0px;
81
- --arrow-placement: calc(var(--arrow-size) / 2 * -1);
82
-
83
- position: absolute;
84
- transform: rotate(45deg);
85
-
86
- width: var(--arrow-size);
87
- height: var(--arrow-size);
88
-
89
- border: 1px solid var(--popover-border-color);
90
-
91
- background-color: inherit;
92
- }
39
+ .dropdown {
40
+ --popover-radius: var(--radius-default);
41
+ --popover-shadow: none;
42
+
43
+ overflow: visible;
44
+
45
+ padding: var(--spacing-xs) var(--spacing-sm);
46
+ border: 1px solid var(--popover-border-color);
47
+ border-radius: var(--popover-radius);
48
+
49
+ color: var(--color-text);
50
+
51
+ opacity: 0;
52
+ box-shadow: var(--popover-shadow);
53
+
54
+ transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
55
+
56
+ &:popover-open {
57
+ opacity: 1;
58
+
59
+ @starting-style {
60
+ opacity: 0;
61
+ }
62
+ }
63
+
64
+ @mixin where-light {
65
+ --popover-border-color: var(--color-gray-2);
66
+
67
+ background-color: var(--color-white);
68
+ }
69
+
70
+ @mixin where-dark {
71
+ --popover-border-color: var(--color-dark-4);
72
+
73
+ background-color: var(--color-dark-6);
74
+ }
75
+ }
76
+
77
+ .arrow {
78
+ --arrow-size: 7px;
79
+ --arrow-radius: 0px;
80
+ --arrow-placement: calc(var(--arrow-size) / 2 * -1);
81
+
82
+ position: absolute;
83
+ transform: rotate(45deg);
84
+
85
+ width: var(--arrow-size);
86
+ height: var(--arrow-size);
87
+
88
+ border: 1px solid var(--popover-border-color);
89
+
90
+ background-color: inherit;
91
+ }
93
92
  </style>
@@ -8,12 +8,12 @@ const { id, store: { targetRef, opened }, disabled } = usePopoverState();
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Renderless
12
- ref='targetRef'
13
- :disabled
14
- :popovertarget='id'
15
- @click.stop.prevent='!disable && !disabled && (opened = !opened)'
16
- >
17
- <slot />
18
- </Renderless>
11
+ <Renderless
12
+ ref='targetRef'
13
+ :disabled
14
+ :popovertarget='id'
15
+ @click.stop.prevent='!disable && !disabled && (opened = !opened)'
16
+ >
17
+ <slot />
18
+ </Renderless>
19
19
  </template>
@@ -75,5 +75,5 @@ useProvidePopoverState({
75
75
  </script>
76
76
 
77
77
  <template>
78
- <slot />
78
+ <slot />
79
79
  </template>
@@ -8,7 +8,7 @@ const props = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Box v-bind='props' :class='css.label'>
12
- <slot />
13
- </Box>
11
+ <Box v-bind='props' :class='css.label'>
12
+ <slot />
13
+ </Box>
14
14
  </template>
@@ -25,7 +25,7 @@ const style = computed(() => ({
25
25
  </script>
26
26
 
27
27
  <template>
28
- <Box :style :class='css.root' :mod='[{ orientation }, mod]'>
29
- <slot />
30
- </Box>
28
+ <Box :style :class='css.root' :mod='[{ orientation }, mod]'>
29
+ <slot />
30
+ </Box>
31
31
  </template>
@@ -3,7 +3,7 @@ import type { NuanceColor } from '@nui/types';
3
3
  export interface ProgressSectionProps extends BoxProps {
4
4
  /** Determines whether `aria-*` props should be added to the root element @default `true` */
5
5
  withAria?: boolean;
6
- /** Key of `theme.colors` or any valid CSS value @default `theme.primaryColor` */
6
+ /** Color from theme */
7
7
  color?: NuanceColor;
8
8
  /** If set, the section has stripes @default `false` */
9
9
  striped?: boolean;
@@ -33,12 +33,12 @@ const style = computed(() => useStyleResolver((theme) => ({
33
33
  </script>
34
34
 
35
35
  <template>
36
- <Box
37
- :style
38
- v-bind='ariaAttributes'
39
- :class='css.section'
40
- :mod='[{ striped: striped || animated, animated }, mod]'
41
- >
42
- <slot />
43
- </Box>
36
+ <Box
37
+ :style
38
+ v-bind='ariaAttributes'
39
+ :class='css.section'
40
+ :mod='[{ striped: striped || animated, animated }, mod]'
41
+ >
42
+ <slot />
43
+ </Box>
44
44
  </template>
@@ -3,7 +3,7 @@ import type { NuanceColor } from '@nui/types';
3
3
  export interface ProgressSectionProps extends BoxProps {
4
4
  /** Determines whether `aria-*` props should be added to the root element @default `true` */
5
5
  withAria?: boolean;
6
- /** Key of `theme.colors` or any valid CSS value @default `theme.primaryColor` */
6
+ /** Color from theme */
7
7
  color?: NuanceColor;
8
8
  /** If set, the section has stripes @default `false` */
9
9
  striped?: boolean;
@@ -27,13 +27,13 @@ const value = defineModel({ type: Number, ...{ required: true } });
27
27
  </script>
28
28
 
29
29
  <template>
30
- <ProgressRoot :size :radius :orientation :transition-duration :mod>
31
- <ProgressSection
32
- v-model='value'
33
- :striped
34
- :animated
35
- :color
36
- :with-aria
37
- />
38
- </ProgressRoot>
30
+ <ProgressRoot :size :radius :orientation :transition-duration :mod>
31
+ <ProgressSection
32
+ v-model='value'
33
+ :striped
34
+ :animated
35
+ :color
36
+ :with-aria
37
+ />
38
+ </ProgressRoot>
39
39
  </template>
@@ -6,7 +6,7 @@ defineOptions({
6
6
  </script>
7
7
 
8
8
  <template>
9
- <Slot v-bind='$attrs'>
10
- <slot />
11
- </Slot>
9
+ <Slot v-bind='$attrs'>
10
+ <slot />
11
+ </Slot>
12
12
  </template>
@@ -15,18 +15,18 @@ onBeforeUnmount(() => {
15
15
  </script>
16
16
 
17
17
  <template>
18
- <Renderless
19
- v-bind='attrs'
20
- ref='item'
21
- :tabindex='-1'
22
- @keydown.up.prevent='isVertical && focus?.("prev", $event.currentTarget)'
23
- @keydown.down.prevent='isVertical && focus?.("next", $event.currentTarget)'
24
- @keydown.left.prevent='isHorizontal && focus?.("prev", $event.currentTarget)'
25
- @keydown.right.prevent='isHorizontal && focus?.("next", $event.currentTarget)'
26
- @keydown.home.prevent='focus?.("first")'
27
- @keydown.end.prevent='focus?.("last")'
28
- @click.prevent='focusElement?.($event.currentTarget)'
29
- >
30
- <slot />
31
- </Renderless>
18
+ <Renderless
19
+ v-bind='attrs'
20
+ ref='item'
21
+ :tabindex='-1'
22
+ @keydown.up.prevent='isVertical && focus?.("prev", $event.currentTarget)'
23
+ @keydown.down.prevent='isVertical && focus?.("next", $event.currentTarget)'
24
+ @keydown.left.prevent='isHorizontal && focus?.("prev", $event.currentTarget)'
25
+ @keydown.right.prevent='isHorizontal && focus?.("next", $event.currentTarget)'
26
+ @keydown.home.prevent='focus?.("first")'
27
+ @keydown.end.prevent='focus?.("last")'
28
+ @click.prevent='focusElement?.($event.currentTarget)'
29
+ >
30
+ <slot />
31
+ </Renderless>
32
32
  </template>
@@ -1,6 +1,7 @@
1
1
  import type { ComboboxData, ComboboxItemExt } from './combobox/index.js';
2
2
  import type { TextInputProps } from './input/index.js';
3
3
  export interface SelectProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<TextInputProps, 'modelValue' | 'multiline' | 'resize' | 'is' | 'id'> {
4
+ /** List of options */
4
5
  options: ComboboxData<Value, Ext>;
5
6
  /** Determines whether the select should be searchable @default `false` */
6
7
  searchable?: boolean;
@@ -19,6 +20,7 @@ export interface SelectProps<Value extends string = string, Ext extends Combobox
19
20
  /** If set, the clear button is displayed in the right section when the component has value @default `false` */
20
21
  /** Icon displayed in the left section by default */
21
22
  icon?: string;
23
+ /** Maximum number of options rendered at a time */
22
24
  limit?: number;
23
25
  /** Input autocomplete attribute */
24
26
  autoComplete?: string;
@@ -1,6 +1,7 @@
1
1
  import type { ComboboxData, ComboboxItemExt } from './combobox/index.js';
2
2
  import type { TextInputProps } from './input/index.js';
3
3
  export interface SelectProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<TextInputProps, 'modelValue' | 'multiline' | 'resize' | 'is' | 'id'> {
4
+ /** List of options */
4
5
  options: ComboboxData<Value, Ext>;
5
6
  /** Determines whether the select should be searchable @default `false` */
6
7
  searchable?: boolean;
@@ -19,6 +20,7 @@ export interface SelectProps<Value extends string = string, Ext extends Combobox
19
20
  /** If set, the clear button is displayed in the right section when the component has value @default `false` */
20
21
  /** Icon displayed in the left section by default */
21
22
  icon?: string;
23
+ /** Maximum number of options rendered at a time */
22
24
  limit?: number;
23
25
  /** Input autocomplete attribute */
24
26
  autoComplete?: string;
@@ -31,20 +31,20 @@ useProvideSwitchGroup({ value, size, disabled, readOnly, maxSelectedValues });
31
31
  </script>
32
32
 
33
33
  <template>
34
- <InputWrapper :id v-bind='rest'>
35
- <template v-if='!!$slots.label' #label>
36
- <slot name='label' />
37
- </template>
38
-
39
- <slot />
40
-
41
- <template v-if='!!$slots.description' #description>
42
- <slot name='description' />
43
- </template>
44
- <template v-if='!!$slots.error' #error>
45
- <slot name='error' />
46
- </template>
47
-
48
- <VisuallyHiddenInput :id v-model='value' :name />
49
- </InputWrapper>
34
+ <InputWrapper :id v-bind='rest'>
35
+ <template v-if='!!$slots.label' #label>
36
+ <slot name='label' />
37
+ </template>
38
+
39
+ <slot />
40
+
41
+ <template v-if='!!$slots.description' #description>
42
+ <slot name='description' />
43
+ </template>
44
+ <template v-if='!!$slots.error' #error>
45
+ <slot name='error' />
46
+ </template>
47
+
48
+ <VisuallyHiddenInput :id v-model='value' :name />
49
+ </InputWrapper>
50
50
  </template>
@@ -1,30 +1,30 @@
1
- import type { Cell, Header, RowData } from '@tanstack/vue-table'
2
-
3
-
4
- declare module '@tanstack/table-core' {
5
- interface ColumnMeta<TData extends RowData, TValue> {
6
- class?: {
7
- th?: string | ((cell: Header<TData, TValue>) => string)
8
- td?: string | ((cell: Cell<TData, TValue>) => string)
9
- }
10
- style?: {
11
- th?: string | Record<string, string> | ((cell: Header<TData, TValue>) => string | Record<string, string>)
12
- td?: string | Record<string, string> | ((cell: Cell<TData, TValue>) => string | Record<string, string>)
13
- }
14
- colspan?: {
15
- td?: string | ((cell: Cell<TData, TValue>) => string)
16
- }
17
- rowspan?: {
18
- td?: string | ((cell: Cell<TData, TValue>) => string)
19
- }
20
- }
21
-
22
- interface TableMeta<TData> {
23
- class?: {
24
- tr?: string | ((row: Row<TData>) => string)
25
- }
26
- style?: {
27
- tr?: string | Record<string, string> | ((row: Row<TData>) => string | Record<string, string>)
28
- }
29
- }
30
- }
1
+ import type { Cell, Header, RowData } from '@tanstack/vue-table'
2
+
3
+
4
+ declare module '@tanstack/table-core' {
5
+ interface ColumnMeta<TData extends RowData, TValue> {
6
+ class?: {
7
+ th?: string | ((cell: Header<TData, TValue>) => string)
8
+ td?: string | ((cell: Cell<TData, TValue>) => string)
9
+ }
10
+ style?: {
11
+ th?: string | Record<string, string> | ((cell: Header<TData, TValue>) => string | Record<string, string>)
12
+ td?: string | Record<string, string> | ((cell: Cell<TData, TValue>) => string | Record<string, string>)
13
+ }
14
+ colspan?: {
15
+ td?: string | ((cell: Cell<TData, TValue>) => string)
16
+ }
17
+ rowspan?: {
18
+ td?: string | ((cell: Cell<TData, TValue>) => string)
19
+ }
20
+ }
21
+
22
+ interface TableMeta<TData> {
23
+ class?: {
24
+ tr?: string | ((row: Row<TData>) => string)
25
+ }
26
+ style?: {
27
+ tr?: string | Record<string, string> | ((row: Row<TData>) => string | Record<string, string>)
28
+ }
29
+ }
30
+ }
@@ -25,9 +25,13 @@ export type TableSlots<T extends TableData = TableData> = {
25
25
  'body-bottom': (props?: object) => any;
26
26
  } & DynamicHeaderSlots<T> & DynamicFooterSlots<T> & DynamicCellSlots<T>;
27
27
  export interface TableProps<T extends TableData = TableData> extends TableOptions<T>, /** @vue-ignore */ Omit<TableHTMLAttributes, 'columns' | 'onSelect' | 'onContextmenu'> {
28
+ /** Row data */
28
29
  data?: T[];
30
+ /** Column definitions */
29
31
  columns?: TableColumn<T>[];
32
+ /** Table caption text */
30
33
  caption?: string;
34
+ /** Table metadata passed to column defs and cell renderers */
31
35
  meta?: TableMeta<T>;
32
36
  /**
33
37
  * Enable virtualization for large datasets.
@@ -57,15 +61,20 @@ export interface TableProps<T extends TableData = TableData> extends TableOption
57
61
  * @defaultValue false
58
62
  */
59
63
  sticky?: boolean | 'header' | 'footer';
60
- /** Whether the table should be in loading state. */
64
+ /** Loading state */
61
65
  loading?: boolean;
62
66
  /**
67
+ * Color of the loading overlay
63
68
  * @defaultValue 'primary'
64
69
  */
65
70
  loadingColor?: NuanceColor | string;
71
+ /** Vertical alignment of cell content */
66
72
  verticalAlign?: CSSProperties['verticalAlign'];
73
+ /** Called when a row is clicked */
67
74
  onSelect?: (e: Event, row: TableRow<T>) => void;
75
+ /** Called when a row is hovered or hover ends */
68
76
  onHover?: (e: Event, row: TableRow<T> | null) => void;
77
+ /** Called on right-click on a row */
69
78
  onContextmenu?: ((e: Event, row: TableRow<T>) => void) | Array<((e: Event, row: TableRow<T>) => void)>;
70
79
  /** Styles API */
71
80
  classes?: Classes<'root' | 'table' | 'thead' | 'th' | 'td' | 'tr' | 'tbody' | 'tfoot' | 'caption' | 'loading' | 'empty' | 'separator'>;
@@ -20,6 +20,7 @@ const {
20
20
  classes: { type: Object, required: false },
21
21
  leftSectionPE: { type: null, required: false },
22
22
  leftSectionProps: { type: Object, required: false },
23
+ icon: { type: String, required: false },
23
24
  rightSectionPE: { type: null, required: false },
24
25
  rightSectionProps: { type: Object, required: false },
25
26
  is: { type: null, required: false },
@@ -30,15 +31,15 @@ const {
30
31
  </script>
31
32
 
32
33
  <template>
33
- <Button :size :variant :color v-bind='rest'>
34
- <template #leftSection>
35
- <TableSortIcon :column :icons />
36
- </template>
37
- <slot>
38
- <FlexRender :render='column.columnDef.header' />
39
- </slot>
40
- <template v-if='!!$slots.rightSection' #rightSection>
41
- <slot name='rightSection' />
42
- </template>
43
- </Button>
34
+ <Button :size :variant :color v-bind='rest'>
35
+ <template #leftSection>
36
+ <TableSortIcon :column :icons />
37
+ </template>
38
+ <slot>
39
+ <FlexRender :render='column.columnDef.header' />
40
+ </slot>
41
+ <template v-if='!!$slots.rightSection' #rightSection>
42
+ <slot name='rightSection' />
43
+ </template>
44
+ </Button>
44
45
  </template>
@@ -1,7 +1,9 @@
1
1
  import type { CSSProperties } from 'vue';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface TabsListProps extends BoxProps {
4
+ /** If set, tabs take all available width */
4
5
  grow?: boolean;
6
+ /** CSS `justify-content` value for the tab list */
5
7
  justify?: CSSProperties['justify-content'];
6
8
  }
7
9
  declare var __VLS_8: {};
@@ -14,20 +14,20 @@ const style = computed(() => ({ "--tabs-justify": justify }));
14
14
  </script>
15
15
 
16
16
  <template>
17
- <Box
18
- :is
19
- :style
20
- :class='css.list'
21
- role='tablist'
17
+ <Box
18
+ :is
19
+ :style
20
+ :class='css.list'
21
+ role='tablist'
22
22
  :mod='[mod, {
23
23
  variant: ctx?.variant,
24
24
  grow,
25
25
  orientation: ctx?.orientation,
26
26
  placement: ctx?.orientation === "vertical" && ctx.placement,
27
27
  inverted: ctx?.inverted
28
- }]'
29
- :aria-orientation='ctx?.orientation'
30
- >
31
- <slot />
32
- </Box>
28
+ }]'
29
+ :aria-orientation='ctx?.orientation'
30
+ >
31
+ <slot />
32
+ </Box>
33
33
  </template>
@@ -1,7 +1,9 @@
1
1
  import type { CSSProperties } from 'vue';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface TabsListProps extends BoxProps {
4
+ /** If set, tabs take all available width */
4
5
  grow?: boolean;
6
+ /** CSS `justify-content` value for the tab list */
5
7
  justify?: CSSProperties['justify-content'];
6
8
  }
7
9
  declare var __VLS_8: {};
@@ -1,5 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  export interface TabsPanelProps extends BoxProps {
3
+ /** Panel value, must match the corresponding `TabsTab` value */
3
4
  value: string;
4
5
  }
5
6
  declare var __VLS_8: {};
@@ -11,15 +11,15 @@ const ctx = useTabsState();
11
11
  </script>
12
12
 
13
13
  <template>
14
- <Box
15
- :is
16
- :id='ctx?.getPanelId(value)'
17
- :mod='[mod, { orientation: ctx?.orientation }]'
18
- :data-active='ctx?.active.value === value'
19
- :class='css.panel'
20
- role='tabpanel'
21
- :aria-labelledby='ctx?.getTabId(value)'
22
- >
23
- <slot />
24
- </Box>
14
+ <Box
15
+ :is
16
+ :id='ctx?.getPanelId(value)'
17
+ :mod='[mod, { orientation: ctx?.orientation }]'
18
+ :data-active='ctx?.active.value === value'
19
+ :class='css.panel'
20
+ role='tabpanel'
21
+ :aria-labelledby='ctx?.getTabId(value)'
22
+ >
23
+ <slot />
24
+ </Box>
25
25
  </template>
@@ -1,5 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  export interface TabsPanelProps extends BoxProps {
3
+ /** Panel value, must match the corresponding `TabsTab` value */
3
4
  value: string;
4
5
  }
5
6
  declare var __VLS_8: {};