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
@@ -103,73 +103,73 @@ function onSubmit(val) {
103
103
  </script>
104
104
 
105
105
  <template>
106
- <ComboboxRoot
107
- v-model:open='opened'
108
- width='target'
109
- :store
106
+ <ComboboxRoot
107
+ v-model:open='opened'
108
+ width='target'
109
+ :store
110
110
  @submit='(val, option) => {
111
111
  $emit("submit", val, option);
112
112
  onSubmit(val);
113
- }'
114
- >
115
- <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
116
- <component
117
- :is='searchable ? TextInput : ButtonInput'
118
- :id='store.listId'
119
- v-bind='{ ...rest, ...$attrs }'
120
- v-model='inputValue'
121
- :disabled
122
- :right-section-p-e
123
- :readonly='readonly || !searchable'
124
- :class='$style.input'
125
- @focus='focused = true'
126
- @blur='focused = false'
127
- @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
128
- >
129
- <slot v-if='display' name='selection' :value='value' :display='display'>
130
- {{ display }}
131
- </slot>
132
-
133
- <template v-if='$slots?.label' #label>
134
- <slot name='label' />
135
- </template>
136
- <template v-if='$slots?.description' #description>
137
- <slot name='description' />
138
- </template>
139
- <template v-if='$slots?.error' #error>
140
- <slot name='error' />
141
- </template>
142
-
143
- <template v-if='$slots.leftSection || icon' #leftSection>
144
- <slot name='leftSection'>
145
- <Icon v-if='icon' :name='icon' />
146
- </slot>
147
- </template>
148
- <template #rightSection>
149
- <slot name='rightSection'>
150
- <Icon name='gravity-ui:chevrons-expand-vertical' />
151
- </slot>
152
- </template>
153
- </component>
154
- </ComboboxTarget>
155
- <ComboboxOptionsDropdown
156
- v-model='value'
157
- v-model:search='search'
158
- :data='parsed'
159
- :limit
160
- :with-check-icon
161
- :icon-position
162
- :nothing-found-message
163
- :aria-label='store.listId'
164
- :label-id='store.listId'
165
- />
166
- </ComboboxRoot>
113
+ }'
114
+ >
115
+ <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
116
+ <component
117
+ :is='searchable ? TextInput : ButtonInput'
118
+ :id='store.listId'
119
+ v-bind='{ ...rest, ...$attrs }'
120
+ v-model='inputValue'
121
+ :disabled
122
+ :right-section-p-e
123
+ :readonly='readonly || !searchable'
124
+ :class='$style.input'
125
+ @focus='focused = true'
126
+ @blur='focused = false'
127
+ @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
128
+ >
129
+ <slot v-if='display' name='selection' :value='value' :display='display'>
130
+ {{ display }}
131
+ </slot>
132
+
133
+ <template v-if='$slots?.label' #label>
134
+ <slot name='label' />
135
+ </template>
136
+ <template v-if='$slots?.description' #description>
137
+ <slot name='description' />
138
+ </template>
139
+ <template v-if='$slots?.error' #error>
140
+ <slot name='error' />
141
+ </template>
142
+
143
+ <template v-if='$slots.leftSection || icon' #leftSection>
144
+ <slot name='leftSection'>
145
+ <Icon v-if='icon' :name='icon' />
146
+ </slot>
147
+ </template>
148
+ <template #rightSection>
149
+ <slot name='rightSection'>
150
+ <Icon name='gravity-ui:chevrons-expand-vertical' />
151
+ </slot>
152
+ </template>
153
+ </component>
154
+ </ComboboxTarget>
155
+ <ComboboxOptionsDropdown
156
+ v-model='value'
157
+ v-model:search='search'
158
+ :data='parsed'
159
+ :limit
160
+ :with-check-icon
161
+ :icon-position
162
+ :nothing-found-message
163
+ :aria-label='store.listId'
164
+ :label-id='store.listId'
165
+ />
166
+ </ComboboxRoot>
167
167
  </template>
168
168
 
169
169
  <style module lang="postcss">
170
- .input {
171
- :where([readonly]) {
172
- cursor: pointer;
173
- }
174
- }
170
+ .input {
171
+ :where([readonly]) {
172
+ cursor: pointer;
173
+ }
174
+ }
175
175
  </style>
@@ -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;
@@ -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 },
@@ -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,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: {};
@@ -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: {};
@@ -1,26 +1,53 @@
1
1
  import type { NuanceColor, NuanceRadius } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface TabsRootProps extends BoxProps {
4
+ /** Value of the tab activated by default (uncontrolled) */
4
5
  defaultTab?: string;
5
- /** Tabs orientation, `'horizontal'` by default */
6
+ /**
7
+ * Tabs orientation
8
+ * @default `'horizontal'`
9
+ */
6
10
  orientation?: 'vertical' | 'horizontal';
7
- /** `TabsList` placement relative to `TabsPanel`, applicable only when `orientation="vertical"`, `'left'` by default */
11
+ /**
12
+ * `TabsList` placement relative to `TabsPanel`, applicable only when `orientation="vertical"`
13
+ * @default `'left'`
14
+ */
8
15
  placement?: 'left' | 'right';
16
+ /**
17
+ * Visual variant
18
+ * @default `'default'`
19
+ */
9
20
  variant?: 'default' | 'pills' | 'outline';
10
- /** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
21
+ /**
22
+ * Whether arrow key presses loop through items
23
+ * @default `true`
24
+ */
11
25
  loop?: boolean;
12
- /** Determines whether tab should be activated with arrow key press, `true` by default */
26
+ /**
27
+ * Whether a tab is activated on arrow key press
28
+ * @default `true`
29
+ */
13
30
  activateTabWithKeyboard?: boolean;
14
- /** Determines whether tab can be deactivated, `false` by default */
31
+ /**
32
+ * Whether a tab can be deactivated
33
+ * @default `false`
34
+ */
15
35
  allowTabDeactivation?: boolean;
16
- /** Changes colors of `TabsTab` components when variant is `pills` or `default`, does nothing for other variants */
36
+ /** Color from theme */
17
37
  color?: NuanceColor;
18
- /** Key of `theme.radius` or any valid CSS value to set `border-radius`, `theme.defaultRadius` by default */
38
+ /** Border radius */
19
39
  radius?: NuanceRadius;
20
- /** Determines whether tabs should have inverted styles, `false` by default */
40
+ /**
41
+ * Inverts tab styles
42
+ * @default `false`
43
+ */
21
44
  inverted?: boolean;
22
- /** If set to `false`, `TabsPanel` content will be unmounted when the associated tab is not active, `true` by default */
45
+ /**
46
+ * If `false`, panel content is unmounted when inactive
47
+ * @default `true`
48
+ */
23
49
  keepMounted?: boolean;
50
+ /** Root element id */
24
51
  id?: string;
25
52
  }
26
53
  type __VLS_Props = TabsRootProps;
@@ -1,26 +1,53 @@
1
1
  import type { NuanceColor, NuanceRadius } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface TabsRootProps extends BoxProps {
4
+ /** Value of the tab activated by default (uncontrolled) */
4
5
  defaultTab?: string;
5
- /** Tabs orientation, `'horizontal'` by default */
6
+ /**
7
+ * Tabs orientation
8
+ * @default `'horizontal'`
9
+ */
6
10
  orientation?: 'vertical' | 'horizontal';
7
- /** `TabsList` placement relative to `TabsPanel`, applicable only when `orientation="vertical"`, `'left'` by default */
11
+ /**
12
+ * `TabsList` placement relative to `TabsPanel`, applicable only when `orientation="vertical"`
13
+ * @default `'left'`
14
+ */
8
15
  placement?: 'left' | 'right';
16
+ /**
17
+ * Visual variant
18
+ * @default `'default'`
19
+ */
9
20
  variant?: 'default' | 'pills' | 'outline';
10
- /** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
21
+ /**
22
+ * Whether arrow key presses loop through items
23
+ * @default `true`
24
+ */
11
25
  loop?: boolean;
12
- /** Determines whether tab should be activated with arrow key press, `true` by default */
26
+ /**
27
+ * Whether a tab is activated on arrow key press
28
+ * @default `true`
29
+ */
13
30
  activateTabWithKeyboard?: boolean;
14
- /** Determines whether tab can be deactivated, `false` by default */
31
+ /**
32
+ * Whether a tab can be deactivated
33
+ * @default `false`
34
+ */
15
35
  allowTabDeactivation?: boolean;
16
- /** Changes colors of `TabsTab` components when variant is `pills` or `default`, does nothing for other variants */
36
+ /** Color from theme */
17
37
  color?: NuanceColor;
18
- /** Key of `theme.radius` or any valid CSS value to set `border-radius`, `theme.defaultRadius` by default */
38
+ /** Border radius */
19
39
  radius?: NuanceRadius;
20
- /** Determines whether tabs should have inverted styles, `false` by default */
40
+ /**
41
+ * Inverts tab styles
42
+ * @default `false`
43
+ */
21
44
  inverted?: boolean;
22
- /** If set to `false`, `TabsPanel` content will be unmounted when the associated tab is not active, `true` by default */
45
+ /**
46
+ * If `false`, panel content is unmounted when inactive
47
+ * @default `true`
48
+ */
23
49
  keepMounted?: boolean;
50
+ /** Root element id */
24
51
  id?: string;
25
52
  }
26
53
  type __VLS_Props = TabsRootProps;
@@ -1,15 +1,19 @@
1
1
  import type { Mod } from '@nui/utils';
2
2
  export interface TabsTabProps {
3
+ /** Tab value, must match the corresponding `TabsPanel` value */
3
4
  value: string;
5
+ /** Element modifiers transformed into `data-` attributes, falsy values are removed */
4
6
  mod?: Mod | Mod[];
7
+ /** Icon displayed before the label */
8
+ icon?: string;
5
9
  }
6
- declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
10
+ declare var __VLS_10: {}, __VLS_17: {}, __VLS_19: {};
7
11
  type __VLS_Slots = {} & {
8
12
  leftSection?: (props: typeof __VLS_10) => any;
9
13
  } & {
10
- default?: (props: typeof __VLS_12) => any;
14
+ default?: (props: typeof __VLS_17) => any;
11
15
  } & {
12
- rightSection?: (props: typeof __VLS_14) => any;
16
+ rightSection?: (props: typeof __VLS_19) => any;
13
17
  };
14
18
  declare const __VLS_base: import("vue").DefineComponent<TabsTabProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TabsTabProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -3,9 +3,10 @@ import { computed } from "vue";
3
3
  import UnstyledButton from "../button/unstyled-button.vue";
4
4
  import { useTabsState } from "./lib";
5
5
  import css from "./tabs.module.css";
6
- const { value, mod } = defineProps({
6
+ const { value, mod, icon } = defineProps({
7
7
  value: { type: String, required: true },
8
- mod: { type: [Object, Array], required: false }
8
+ mod: { type: [Object, Array], required: false },
9
+ icon: { type: String, required: false }
9
10
  });
10
11
  const ctx = useTabsState();
11
12
  const active = computed(() => value === ctx?.active.value);
@@ -28,8 +29,10 @@ const active = computed(() => value === ctx?.active.value);
28
29
  :aria-controls='ctx?.getPanelId(value)'
29
30
  @click='ctx?.onUpdate(value)'
30
31
  >
31
- <span v-if='$slots.leftSection' :class='css.tabSection' data-position='left'>
32
- <slot name='leftSection' />
32
+ <span v-if='$slots.leftSection || icon' :class='css.tabSection' data-position='left'>
33
+ <slot name='leftSection'>
34
+ <Icon v-if='icon' :name='icon' />
35
+ </slot>
33
36
  </span>
34
37
  <span v-if='$slots.default' :class='css.tabLabel'>
35
38
  <slot />
@@ -1,15 +1,19 @@
1
1
  import type { Mod } from '@nui/utils';
2
2
  export interface TabsTabProps {
3
+ /** Tab value, must match the corresponding `TabsPanel` value */
3
4
  value: string;
5
+ /** Element modifiers transformed into `data-` attributes, falsy values are removed */
4
6
  mod?: Mod | Mod[];
7
+ /** Icon displayed before the label */
8
+ icon?: string;
5
9
  }
6
- declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
10
+ declare var __VLS_10: {}, __VLS_17: {}, __VLS_19: {};
7
11
  type __VLS_Slots = {} & {
8
12
  leftSection?: (props: typeof __VLS_10) => any;
9
13
  } & {
10
- default?: (props: typeof __VLS_12) => any;
14
+ default?: (props: typeof __VLS_17) => any;
11
15
  } & {
12
- rightSection?: (props: typeof __VLS_14) => any;
16
+ rightSection?: (props: typeof __VLS_19) => any;
13
17
  };
14
18
  declare const __VLS_base: import("vue").DefineComponent<TabsTabProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TabsTabProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -14,12 +14,17 @@ export interface TextProps extends BoxProps {
14
14
  inline?: boolean;
15
15
  /** Determines whether font properties should be inherited from the parent, `false` by default */
16
16
  inherit?: boolean;
17
- /** Gradient configuration, ignored when `variant` is not `gradient`, `theme.defaultGradient` by default */
17
+ /** Gradient configuration (used with `variant="gradient"`) */
18
18
  gradient?: NuanceGradient;
19
+ /** Visual variant */
19
20
  variant?: 'text' | 'gradient';
21
+ /** Font size token */
20
22
  fz?: NuanceSize | `h${TitleOrder}` | string;
23
+ /** Line height token */
21
24
  lh?: NuanceSize | string;
25
+ /** Font weight */
22
26
  fw?: CSSProperties['font-weight'];
27
+ /** Text color from theme */
23
28
  c?: NuanceColor | 'dimmed';
24
29
  }
25
30
  declare var __VLS_8: {};
@@ -14,12 +14,17 @@ export interface TextProps extends BoxProps {
14
14
  inline?: boolean;
15
15
  /** Determines whether font properties should be inherited from the parent, `false` by default */
16
16
  inherit?: boolean;
17
- /** Gradient configuration, ignored when `variant` is not `gradient`, `theme.defaultGradient` by default */
17
+ /** Gradient configuration (used with `variant="gradient"`) */
18
18
  gradient?: NuanceGradient;
19
+ /** Visual variant */
19
20
  variant?: 'text' | 'gradient';
21
+ /** Font size token */
20
22
  fz?: NuanceSize | `h${TitleOrder}` | string;
23
+ /** Line height token */
21
24
  lh?: NuanceSize | string;
25
+ /** Font weight */
22
26
  fw?: CSSProperties['font-weight'];
27
+ /** Text color from theme */
23
28
  c?: NuanceColor | 'dimmed';
24
29
  }
25
30
  declare var __VLS_8: {};
@@ -1,22 +1,24 @@
1
1
  import type { InputBaseProps, InputWrapperProps } from './input/index.js';
2
2
  export interface TextareaProps extends InputWrapperProps, InputBaseProps {
3
+ /** Icon displayed in the left section */
4
+ icon?: string;
3
5
  }
4
6
  type __VLS_Props = TextareaProps;
5
7
  type __VLS_ModelProps = {
6
8
  modelValue?: string;
7
9
  };
8
10
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
11
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {};
10
12
  type __VLS_Slots = {} & {
11
13
  leftSection?: (props: typeof __VLS_15) => any;
12
14
  } & {
13
- rightSection?: (props: typeof __VLS_19) => any;
15
+ rightSection?: (props: typeof __VLS_24) => any;
14
16
  } & {
15
- label?: (props: typeof __VLS_22) => any;
17
+ label?: (props: typeof __VLS_27) => any;
16
18
  } & {
17
- error?: (props: typeof __VLS_25) => any;
19
+ error?: (props: typeof __VLS_30) => any;
18
20
  } & {
19
- description?: (props: typeof __VLS_28) => any;
21
+ description?: (props: typeof __VLS_33) => any;
20
22
  };
21
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
22
24
  $el: HTMLTextAreaElement | null | undefined;
@@ -3,7 +3,8 @@ import { unrefElement, useTextareaAutosize } from "@vueuse/core";
3
3
  import { useTemplateRef } from "vue";
4
4
  import InputBase from "./input/ui/input-base.vue";
5
5
  import InputWrapper from "./input/ui/input-wrapper.vue";
6
- const props = defineProps({
6
+ const { icon, ...props } = defineProps({
7
+ icon: { type: String, required: false },
7
8
  error: { type: String, required: false },
8
9
  description: { type: String, required: false },
9
10
  label: { type: String, required: false },
@@ -34,8 +35,10 @@ defineExpose({
34
35
  <template>
35
36
  <InputWrapper v-bind='props' :multiline :class='$attrs?.class'>
36
37
  <InputBase>
37
- <template v-if='!!$slots.leftSection' #leftSection>
38
- <slot name='leftSection' />
38
+ <template v-if='!!$slots.leftSection || icon' #leftSection>
39
+ <slot name='leftSection'>
40
+ <Icon v-if='icon' :name='icon' />
41
+ </slot>
39
42
  </template>
40
43
 
41
44
  <template #default='{ id, css }'>
@@ -1,22 +1,24 @@
1
1
  import type { InputBaseProps, InputWrapperProps } from './input/index.js';
2
2
  export interface TextareaProps extends InputWrapperProps, InputBaseProps {
3
+ /** Icon displayed in the left section */
4
+ icon?: string;
3
5
  }
4
6
  type __VLS_Props = TextareaProps;
5
7
  type __VLS_ModelProps = {
6
8
  modelValue?: string;
7
9
  };
8
10
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
11
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {};
10
12
  type __VLS_Slots = {} & {
11
13
  leftSection?: (props: typeof __VLS_15) => any;
12
14
  } & {
13
- rightSection?: (props: typeof __VLS_19) => any;
15
+ rightSection?: (props: typeof __VLS_24) => any;
14
16
  } & {
15
- label?: (props: typeof __VLS_22) => any;
17
+ label?: (props: typeof __VLS_27) => any;
16
18
  } & {
17
- error?: (props: typeof __VLS_25) => any;
19
+ error?: (props: typeof __VLS_30) => any;
18
20
  } & {
19
- description?: (props: typeof __VLS_28) => any;
21
+ description?: (props: typeof __VLS_33) => any;
20
22
  };
21
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
22
24
  $el: HTMLTextAreaElement | null | undefined;
@@ -1,6 +1,11 @@
1
1
  import type { TextProps } from './text.vue.js';
2
2
  export interface TitleProps extends Omit<TextProps, 'is'> {
3
+ /**
4
+ * Heading level
5
+ * @default `'2'`
6
+ */
3
7
  order?: '1' | '2' | '3' | '4' | '5' | '6';
8
+ /** CSS `text-wrap` value */
4
9
  textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';
5
10
  }
6
11
  declare var __VLS_8: {};
@@ -1,6 +1,11 @@
1
1
  import type { TextProps } from './text.vue.js';
2
2
  export interface TitleProps extends Omit<TextProps, 'is'> {
3
+ /**
4
+ * Heading level
5
+ * @default `'2'`
6
+ */
3
7
  order?: '1' | '2' | '3' | '4' | '5' | '6';
8
+ /** CSS `text-wrap` value */
4
9
  textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';
5
10
  }
6
11
  declare var __VLS_8: {};
@@ -1,9 +1,19 @@
1
1
  export type TransitionName = 'fade' | 'fade-down' | 'fade-up' | 'fade-left' | 'fade-right' | 'skew-up' | 'skew-down' | 'rotate-right' | 'rotate-left' | 'slide-down' | 'slide-up' | 'slide-right' | 'slide-left' | 'scale-y' | 'scale-x' | 'scale' | 'pop' | 'pop-top-left' | 'pop-top-right' | 'pop-bottom-left' | 'pop-bottom-right';
2
2
  export interface TransitionProps {
3
+ /**
4
+ * Transition animation name
5
+ * @default `'pop-bottom-left'`
6
+ */
3
7
  name?: TransitionName;
4
- /** Transition duration in ms, `250` default */
8
+ /**
9
+ * Transition duration in ms
10
+ * @default `250`
11
+ */
5
12
  duration?: number;
6
- /** Transition dilay in ms, `0` default */
13
+ /**
14
+ * Transition delay in ms
15
+ * @default `0`
16
+ */
7
17
  delay?: number;
8
18
  }
9
19
  declare var __VLS_9: {};
@@ -1,9 +1,19 @@
1
1
  export type TransitionName = 'fade' | 'fade-down' | 'fade-up' | 'fade-left' | 'fade-right' | 'skew-up' | 'skew-down' | 'rotate-right' | 'rotate-left' | 'slide-down' | 'slide-up' | 'slide-right' | 'slide-left' | 'scale-y' | 'scale-x' | 'scale' | 'pop' | 'pop-top-left' | 'pop-top-right' | 'pop-bottom-left' | 'pop-bottom-right';
2
2
  export interface TransitionProps {
3
+ /**
4
+ * Transition animation name
5
+ * @default `'pop-bottom-left'`
6
+ */
3
7
  name?: TransitionName;
4
- /** Transition duration in ms, `250` default */
8
+ /**
9
+ * Transition duration in ms
10
+ * @default `250`
11
+ */
5
12
  duration?: number;
6
- /** Transition dilay in ms, `0` default */
13
+ /**
14
+ * Transition delay in ms
15
+ * @default `0`
16
+ */
7
17
  delay?: number;
8
18
  }
9
19
  declare var __VLS_9: {};
@@ -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>;