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
@@ -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: {};
@@ -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: {};
@@ -5,5 +5,6 @@ export interface DialogEmits {
5
5
  close: [];
6
6
  }
7
7
  export interface DialogModel {
8
+ /** Controls open/closed state */
8
9
  open: boolean;
9
10
  }
@@ -5,20 +5,22 @@ export interface FileUploadButtonProps<M extends boolean> extends ButtonProps, U
5
5
  /** Icon passed to leftSection */
6
6
  icon?: string;
7
7
  /**
8
+ * Allows selecting multiple files
8
9
  * @default false
9
10
  */
10
11
  multiple?: MaybeRef<M>;
11
12
  /**
13
+ * Accepted file types
12
14
  * @default '*'
13
15
  */
14
16
  accept?: MaybeRef<string>;
15
17
  /**
16
- * Reset when open file dialog.
18
+ * Resets selected files when the dialog opens
17
19
  * @default false
18
20
  */
19
21
  reset?: MaybeRef<boolean>;
20
22
  /**
21
- * Select directories instead of files.
23
+ * Selects directories instead of files
22
24
  * @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
23
25
  * @default false
24
26
  */
@@ -60,16 +60,16 @@ defineExpose({ files, reset });
60
60
  </script>
61
61
 
62
62
  <template>
63
- <Button v-bind='props' @click='open'>
64
- <template #leftSection>
65
- <slot name='leftSection'>
66
- <Icon :name='icon' />
67
- </slot>
68
- </template>
69
- <template v-if='!!$slots.rightSection' #rightSection>
70
- <slot name='rightSection' />
71
- </template>
72
-
73
- <slot>Загрузить файл</slot>
74
- </Button>
63
+ <Button v-bind='props' @click='open'>
64
+ <template #leftSection>
65
+ <slot name='leftSection'>
66
+ <Icon :name='icon' />
67
+ </slot>
68
+ </template>
69
+ <template v-if='!!$slots.rightSection' #rightSection>
70
+ <slot name='rightSection' />
71
+ </template>
72
+
73
+ <slot>Загрузить файл</slot>
74
+ </Button>
75
75
  </template>
@@ -5,20 +5,22 @@ export interface FileUploadButtonProps<M extends boolean> extends ButtonProps, U
5
5
  /** Icon passed to leftSection */
6
6
  icon?: string;
7
7
  /**
8
+ * Allows selecting multiple files
8
9
  * @default false
9
10
  */
10
11
  multiple?: MaybeRef<M>;
11
12
  /**
13
+ * Accepted file types
12
14
  * @default '*'
13
15
  */
14
16
  accept?: MaybeRef<string>;
15
17
  /**
16
- * Reset when open file dialog.
18
+ * Resets selected files when the dialog opens
17
19
  * @default false
18
20
  */
19
21
  reset?: MaybeRef<boolean>;
20
22
  /**
21
- * Select directories instead of files.
23
+ * Selects directories instead of files
22
24
  * @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
23
25
  * @default false
24
26
  */
@@ -3,20 +3,22 @@ import type { MaybeRef } from 'vue';
3
3
  import type { ActionIconProps } from '../action-icon/action-icon.vue.js';
4
4
  export interface FileUploadIconProps<M extends boolean> extends ActionIconProps, UseFileDialogOptions {
5
5
  /**
6
+ * Allows selecting multiple files
6
7
  * @default false
7
8
  */
8
9
  multiple?: MaybeRef<M>;
9
10
  /**
11
+ * Accepted file types
10
12
  * @default '*'
11
13
  */
12
14
  accept?: MaybeRef<string>;
13
15
  /**
14
- * Reset when open file dialog.
16
+ * Resets selected files when the dialog opens
15
17
  * @default false
16
18
  */
17
19
  reset?: MaybeRef<boolean>;
18
20
  /**
19
- * Select directories instead of files.
21
+ * Selects directories instead of files
20
22
  * @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
21
23
  * @default false
22
24
  */
@@ -55,5 +55,5 @@ defineExpose({ files, reset });
55
55
  </script>
56
56
 
57
57
  <template>
58
- <ActionIcon :icon v-bind='props' @click='open' />
58
+ <ActionIcon :icon v-bind='props' @click='open' />
59
59
  </template>
@@ -3,20 +3,22 @@ import type { MaybeRef } from 'vue';
3
3
  import type { ActionIconProps } from '../action-icon/action-icon.vue.js';
4
4
  export interface FileUploadIconProps<M extends boolean> extends ActionIconProps, UseFileDialogOptions {
5
5
  /**
6
+ * Allows selecting multiple files
6
7
  * @default false
7
8
  */
8
9
  multiple?: MaybeRef<M>;
9
10
  /**
11
+ * Accepted file types
10
12
  * @default '*'
11
13
  */
12
14
  accept?: MaybeRef<string>;
13
15
  /**
14
- * Reset when open file dialog.
16
+ * Resets selected files when the dialog opens
15
17
  * @default false
16
18
  */
17
19
  reset?: MaybeRef<boolean>;
18
20
  /**
19
- * Select directories instead of files.
21
+ * Selects directories instead of files
20
22
  * @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
21
23
  * @default false
22
24
  */
@@ -1,15 +1,15 @@
1
1
  import type { TextInputProps } from './index.js';
2
- declare var __VLS_9: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_26: {};
2
+ declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {};
3
3
  type __VLS_Slots = {} & {
4
4
  leftSection?: (props: typeof __VLS_9) => any;
5
5
  } & {
6
- rightSection?: (props: typeof __VLS_17) => any;
6
+ rightSection?: (props: typeof __VLS_12) => any;
7
7
  } & {
8
- label?: (props: typeof __VLS_20) => any;
8
+ label?: (props: typeof __VLS_15) => any;
9
9
  } & {
10
- error?: (props: typeof __VLS_23) => any;
10
+ error?: (props: typeof __VLS_18) => any;
11
11
  } & {
12
- description?: (props: typeof __VLS_26) => any;
12
+ description?: (props: typeof __VLS_21) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,10 @@
1
1
  <script setup>
2
2
  import TextInput from "./text-input.vue";
3
- const props = defineProps({
3
+ const { icon = "gravity-ui:at", ...rest } = defineProps({
4
4
  multiline: { type: Boolean, required: false },
5
5
  withAria: { type: Boolean, required: false },
6
6
  classes: { type: Object, required: false },
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 },
@@ -21,11 +22,9 @@ const props = defineProps({
21
22
  </script>
22
23
 
23
24
  <template>
24
- <TextInput type='email' v-bind='props'>
25
- <template #leftSection>
26
- <slot name='leftSection'>
27
- <Icon name='gravity-ui:at' />
28
- </slot>
25
+ <TextInput type='email' :icon v-bind='rest'>
26
+ <template v-if='!!$slots.leftSection' #leftSection>
27
+ <slot name='leftSection' />
29
28
  </template>
30
29
 
31
30
  <template v-if='!!$slots.rightSection' #rightSection>
@@ -1,15 +1,15 @@
1
1
  import type { TextInputProps } from './index.js';
2
- declare var __VLS_9: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_26: {};
2
+ declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {};
3
3
  type __VLS_Slots = {} & {
4
4
  leftSection?: (props: typeof __VLS_9) => any;
5
5
  } & {
6
- rightSection?: (props: typeof __VLS_17) => any;
6
+ rightSection?: (props: typeof __VLS_12) => any;
7
7
  } & {
8
- label?: (props: typeof __VLS_20) => any;
8
+ label?: (props: typeof __VLS_15) => any;
9
9
  } & {
10
- error?: (props: typeof __VLS_23) => any;
10
+ error?: (props: typeof __VLS_18) => any;
11
11
  } & {
12
- description?: (props: typeof __VLS_26) => any;
12
+ description?: (props: typeof __VLS_21) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -4,15 +4,21 @@ import type { InputVariant } from '../types.js';
4
4
  export interface WrapperContext {
5
5
  /** Id used to bind input and label, auto-generated if not provided */
6
6
  id?: string | null;
7
+ /** Marks the field as required */
7
8
  required?: boolean;
9
+ /** Border radius */
8
10
  radius?: NuanceSize | string;
11
+ /** Component size */
9
12
  size?: NuanceSize | string;
13
+ /** Visual variant */
10
14
  variant?: InputVariant;
15
+ /** Enables multiline (textarea) mode */
11
16
  multiline?: boolean;
17
+ /** CSS resize behavior for multiline inputs */
12
18
  resize?: CSSProperties['resize'];
13
- /** section pointer-events */
19
+ /** `pointer-events` value for the left section */
14
20
  leftSectionPE?: CSSStyleDeclaration['pointerEvents'];
15
- /** section pointer-events */
21
+ /** `pointer-events` value for the right section */
16
22
  rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
17
23
  }
18
24
  export declare const useProvideInputWrapper: (init: any) => any;
@@ -9,23 +9,25 @@ export interface NumberInputProps extends InputBaseProps, Omit<InputWrapperProps
9
9
  step?: number;
10
10
  /** Determines whether the up/down controls should be hidden, `false` by default */
11
11
  hideControls?: boolean;
12
+ /** Icon displayed in the left section */
13
+ icon?: string;
12
14
  }
13
15
  type __VLS_Props = NumberInputProps;
14
16
  type __VLS_ModelProps = {
15
17
  modelValue?: number;
16
18
  };
17
19
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_48: {}, __VLS_51: {}, __VLS_54: {};
20
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_53: {}, __VLS_56: {}, __VLS_59: {};
19
21
  type __VLS_Slots = {} & {
20
22
  leftSection?: (props: typeof __VLS_15) => any;
21
23
  } & {
22
- rightSection?: (props: typeof __VLS_19) => any;
24
+ rightSection?: (props: typeof __VLS_24) => any;
23
25
  } & {
24
- label?: (props: typeof __VLS_48) => any;
26
+ label?: (props: typeof __VLS_53) => any;
25
27
  } & {
26
- error?: (props: typeof __VLS_51) => any;
28
+ error?: (props: typeof __VLS_56) => any;
27
29
  } & {
28
- description?: (props: typeof __VLS_54) => any;
30
+ description?: (props: typeof __VLS_59) => any;
29
31
  };
30
32
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
33
  "update:modelValue": (value: number) => any;
@@ -9,6 +9,7 @@ const {
9
9
  max = Number.MAX_SAFE_INTEGER,
10
10
  step = 1,
11
11
  hideControls,
12
+ icon,
12
13
  rightSectionPE = "all",
13
14
  ...rest
14
15
  } = defineProps({
@@ -16,6 +17,7 @@ const {
16
17
  max: { type: Number, required: false },
17
18
  step: { type: Number, required: false },
18
19
  hideControls: { type: Boolean, required: false },
20
+ icon: { type: String, required: false },
19
21
  readonly: { type: Boolean, required: false },
20
22
  disabled: { type: Boolean, required: false },
21
23
  error: { type: String, required: false },
@@ -49,8 +51,10 @@ function handleBlur() {
49
51
  <template>
50
52
  <InputWrapper v-bind='rest' :class='$style.root' :right-section-p-e>
51
53
  <BaseInput>
52
- <template v-if='!!$slots.leftSection' #leftSection>
53
- <slot name='leftSection' />
54
+ <template v-if='!!$slots.leftSection || icon' #leftSection>
55
+ <slot name='leftSection'>
56
+ <Icon v-if='icon' :name='icon' />
57
+ </slot>
54
58
  </template>
55
59
 
56
60
  <template #default='{ id, css }'>
@@ -9,23 +9,25 @@ export interface NumberInputProps extends InputBaseProps, Omit<InputWrapperProps
9
9
  step?: number;
10
10
  /** Determines whether the up/down controls should be hidden, `false` by default */
11
11
  hideControls?: boolean;
12
+ /** Icon displayed in the left section */
13
+ icon?: string;
12
14
  }
13
15
  type __VLS_Props = NumberInputProps;
14
16
  type __VLS_ModelProps = {
15
17
  modelValue?: number;
16
18
  };
17
19
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_48: {}, __VLS_51: {}, __VLS_54: {};
20
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_53: {}, __VLS_56: {}, __VLS_59: {};
19
21
  type __VLS_Slots = {} & {
20
22
  leftSection?: (props: typeof __VLS_15) => any;
21
23
  } & {
22
- rightSection?: (props: typeof __VLS_19) => any;
24
+ rightSection?: (props: typeof __VLS_24) => any;
23
25
  } & {
24
- label?: (props: typeof __VLS_48) => any;
26
+ label?: (props: typeof __VLS_53) => any;
25
27
  } & {
26
- error?: (props: typeof __VLS_51) => any;
28
+ error?: (props: typeof __VLS_56) => any;
27
29
  } & {
28
- description?: (props: typeof __VLS_54) => any;
30
+ description?: (props: typeof __VLS_59) => any;
29
31
  };
30
32
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
33
  "update:modelValue": (value: number) => any;
@@ -6,6 +6,7 @@ const props = defineProps({
6
6
  multiline: { type: Boolean, required: false },
7
7
  withAria: { type: Boolean, required: false },
8
8
  classes: { type: Object, required: false },
9
+ icon: { type: String, required: false },
9
10
  error: { type: String, required: false },
10
11
  description: { type: String, required: false },
11
12
  label: { type: String, required: false },
@@ -8,23 +8,25 @@ export interface TextInputProps extends InputWrapperProps, InputBaseProps {
8
8
  withAria?: boolean;
9
9
  /** Styles API */
10
10
  classes?: Classes<'wrapper' | 'input'>;
11
+ /** Icon displayed in the left section */
12
+ icon?: string;
11
13
  }
12
14
  type __VLS_Props = TextInputProps;
13
15
  type __VLS_ModelProps = {
14
16
  modelValue?: string;
15
17
  };
16
18
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
17
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
19
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {};
18
20
  type __VLS_Slots = {} & {
19
21
  leftSection?: (props: typeof __VLS_15) => any;
20
22
  } & {
21
- rightSection?: (props: typeof __VLS_19) => any;
23
+ rightSection?: (props: typeof __VLS_24) => any;
22
24
  } & {
23
- label?: (props: typeof __VLS_22) => any;
25
+ label?: (props: typeof __VLS_27) => any;
24
26
  } & {
25
- error?: (props: typeof __VLS_25) => any;
27
+ error?: (props: typeof __VLS_30) => any;
26
28
  } & {
27
- description?: (props: typeof __VLS_28) => any;
29
+ description?: (props: typeof __VLS_33) => any;
28
30
  };
29
31
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
30
32
  readonly $el: HTMLElement | null | undefined;
@@ -3,10 +3,11 @@ import { unrefElement } from "@vueuse/core";
3
3
  import { useTemplateRef } from "vue";
4
4
  import BaseInput from "./ui/input-base.vue";
5
5
  import InputWrapper from "./ui/input-wrapper.vue";
6
- const { classes, ...props } = defineProps({
6
+ const { classes, icon, ...props } = defineProps({
7
7
  multiline: { type: Boolean, required: false },
8
8
  withAria: { type: Boolean, required: false },
9
9
  classes: { type: Object, required: false },
10
+ icon: { type: String, required: false },
10
11
  error: { type: String, required: false },
11
12
  description: { type: String, required: false },
12
13
  label: { type: String, required: false },
@@ -31,37 +32,39 @@ defineExpose({
31
32
  </script>
32
33
 
33
34
  <template>
34
- <InputWrapper v-bind='props' :class='[$attrs.class, classes?.wrapper]'>
35
- <BaseInput>
36
- <template v-if='!!$slots.leftSection' #leftSection>
37
- <slot name='leftSection' />
38
- </template>
39
-
40
- <template #default='{ id, css }'>
41
- <input
42
- v-bind='{ ...$attrs, class: css }'
43
- :id
44
- ref='input'
45
- v-model='value'
46
- :required
47
- :disabled
48
- :readonly
49
- >
50
- </template>
51
-
52
- <template v-if='!!$slots.rightSection' #rightSection>
53
- <slot name='rightSection' />
54
- </template>
55
- </BaseInput>
56
-
57
- <template v-if='!!$slots.label' #label>
58
- <slot name='label' />
59
- </template>
60
- <template v-if='!!$slots.error' #error>
61
- <slot name='error' />
62
- </template>
63
- <template v-if='!!$slots.description' #description>
64
- <slot name='description' />
65
- </template>
66
- </InputWrapper>
35
+ <InputWrapper v-bind='props' :class='[$attrs.class, classes?.wrapper]'>
36
+ <BaseInput>
37
+ <template v-if='!!$slots.leftSection || icon' #leftSection>
38
+ <slot name='leftSection'>
39
+ <Icon v-if='icon' :name='icon' />
40
+ </slot>
41
+ </template>
42
+
43
+ <template #default='{ id, css }'>
44
+ <input
45
+ v-bind='{ ...$attrs, class: css }'
46
+ :id
47
+ ref='input'
48
+ v-model='value'
49
+ :required
50
+ :disabled
51
+ :readonly
52
+ >
53
+ </template>
54
+
55
+ <template v-if='!!$slots.rightSection' #rightSection>
56
+ <slot name='rightSection' />
57
+ </template>
58
+ </BaseInput>
59
+
60
+ <template v-if='!!$slots.label' #label>
61
+ <slot name='label' />
62
+ </template>
63
+ <template v-if='!!$slots.error' #error>
64
+ <slot name='error' />
65
+ </template>
66
+ <template v-if='!!$slots.description' #description>
67
+ <slot name='description' />
68
+ </template>
69
+ </InputWrapper>
67
70
  </template>
@@ -8,23 +8,25 @@ export interface TextInputProps extends InputWrapperProps, InputBaseProps {
8
8
  withAria?: boolean;
9
9
  /** Styles API */
10
10
  classes?: Classes<'wrapper' | 'input'>;
11
+ /** Icon displayed in the left section */
12
+ icon?: string;
11
13
  }
12
14
  type __VLS_Props = TextInputProps;
13
15
  type __VLS_ModelProps = {
14
16
  modelValue?: string;
15
17
  };
16
18
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
17
- declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
19
+ declare var __VLS_15: {}, __VLS_24: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {};
18
20
  type __VLS_Slots = {} & {
19
21
  leftSection?: (props: typeof __VLS_15) => any;
20
22
  } & {
21
- rightSection?: (props: typeof __VLS_19) => any;
23
+ rightSection?: (props: typeof __VLS_24) => any;
22
24
  } & {
23
- label?: (props: typeof __VLS_22) => any;
25
+ label?: (props: typeof __VLS_27) => any;
24
26
  } & {
25
- error?: (props: typeof __VLS_25) => any;
27
+ error?: (props: typeof __VLS_30) => any;
26
28
  } & {
27
- description?: (props: typeof __VLS_28) => any;
29
+ description?: (props: typeof __VLS_33) => any;
28
30
  };
29
31
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
30
32
  readonly $el: HTMLElement | null | undefined;
@@ -3,17 +3,21 @@ import type { BoxProps } from '../../box.vue.js';
3
3
  export interface InlineInputProps extends BoxProps {
4
4
  /** Input id */
5
5
  id: string;
6
+ /** Label text */
6
7
  label?: string;
8
+ /** Helper text displayed below the label */
7
9
  description?: string;
10
+ /** Error message displayed below the label */
8
11
  error?: string;
9
- /** Disabled input prop */
12
+ /** Disables the component */
10
13
  disabled?: boolean | undefined;
11
14
  /** Component size */
12
15
  size?: NuanceSize | string;
16
+ /** Position of the label relative to the input control */
13
17
  labelPosition?: 'left' | 'right';
14
- /** Body html element */
18
+ /** HTML element used for the body wrapper */
15
19
  bodyElement?: keyof HTMLElementTagNameMap;
16
- /** Label html element */
20
+ /** HTML element used for the label */
17
21
  labelElement?: keyof HTMLElementTagNameMap;
18
22
  }
19
23
  declare var __VLS_14: {}, __VLS_22: {}, __VLS_30: {}, __VLS_38: {};