nuance-ui 0.2.10 → 0.2.12

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 (180) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +12 -0
  3. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +11 -10
  4. package/dist/runtime/components/action-icon/action-icon-section.vue +17 -20
  5. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +11 -10
  6. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +17 -14
  7. package/dist/runtime/components/action-icon/action-icon.vue +18 -17
  8. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +17 -14
  9. package/dist/runtime/components/alert.d.vue.ts +8 -6
  10. package/dist/runtime/components/alert.vue +15 -101
  11. package/dist/runtime/components/alert.vue.d.ts +8 -6
  12. package/dist/runtime/components/app-shell/app-shell-aside.vue +2 -28
  13. package/dist/runtime/components/app-shell/app-shell-footer.vue +2 -27
  14. package/dist/runtime/components/app-shell/app-shell-header.vue +2 -28
  15. package/dist/runtime/components/app-shell/app-shell-main.vue +2 -16
  16. package/dist/runtime/components/app-shell/app-shell-navbar.vue +2 -32
  17. package/dist/runtime/components/app-shell/app-shell-section.vue +2 -8
  18. package/dist/runtime/components/app-shell/app-shell.vue +20 -44
  19. package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
  20. package/dist/runtime/components/avatar/avatar-group.vue +1 -1
  21. package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
  22. package/dist/runtime/components/avatar/avatar.d.vue.ts +9 -5
  23. package/dist/runtime/components/avatar/avatar.vue +26 -26
  24. package/dist/runtime/components/avatar/avatar.vue.d.ts +9 -5
  25. package/dist/runtime/components/background-image.d.vue.ts +2 -2
  26. package/dist/runtime/components/background-image.vue +3 -19
  27. package/dist/runtime/components/background-image.vue.d.ts +2 -2
  28. package/dist/runtime/components/badge.d.vue.ts +9 -8
  29. package/dist/runtime/components/badge.vue +18 -154
  30. package/dist/runtime/components/badge.vue.d.ts +9 -8
  31. package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
  32. package/dist/runtime/components/breadcrumbs.vue +2 -48
  33. package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
  34. package/dist/runtime/components/button/button.d.vue.ts +21 -31
  35. package/dist/runtime/components/button/button.vue +36 -45
  36. package/dist/runtime/components/button/button.vue.d.ts +21 -31
  37. package/dist/runtime/components/button/unstyled-button.vue +2 -21
  38. package/dist/runtime/components/calendar/calendar.d.vue.ts +2 -2
  39. package/dist/runtime/components/calendar/calendar.vue +3 -10
  40. package/dist/runtime/components/calendar/calendar.vue.d.ts +2 -2
  41. package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
  42. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +3 -114
  43. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
  44. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +2 -67
  45. package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +2 -2
  46. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +3 -25
  47. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +2 -2
  48. package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -2
  49. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -34
  50. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -2
  51. package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +2 -2
  52. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +3 -25
  53. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +2 -2
  54. package/dist/runtime/components/checkbox/checkbox-card.vue +2 -28
  55. package/dist/runtime/components/checkbox/checkbox-group.vue +3 -3
  56. package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +5 -4
  57. package/dist/runtime/components/checkbox/checkbox-indicator.vue +15 -123
  58. package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +5 -4
  59. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +5 -7
  60. package/dist/runtime/components/checkbox/checkbox.vue +30 -136
  61. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +5 -7
  62. package/dist/runtime/components/chip/chip.d.vue.ts +3 -2
  63. package/dist/runtime/components/chip/chip.vue +29 -212
  64. package/dist/runtime/components/chip/chip.vue.d.ts +3 -2
  65. package/dist/runtime/components/combobox/combobox-dropdown.vue +2 -4
  66. package/dist/runtime/components/container.d.vue.ts +2 -2
  67. package/dist/runtime/components/container.vue +1 -1
  68. package/dist/runtime/components/container.vue.d.ts +2 -2
  69. package/dist/runtime/components/date-time-picker.vue +6 -10
  70. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -7
  71. package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +11 -9
  72. package/dist/runtime/components/dialog/ui/dialog-root.vue +5 -5
  73. package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +11 -9
  74. package/dist/runtime/components/dialog/ui/dialog-title.vue +2 -2
  75. package/dist/runtime/components/drawer/drawer-close-button.vue +6 -6
  76. package/dist/runtime/components/drawer/drawer-root.vue +4 -4
  77. package/dist/runtime/components/drawer/drawer-title.vue +2 -2
  78. package/dist/runtime/components/files/file-upload-button.vue +8 -8
  79. package/dist/runtime/components/files/file-upload-icon.vue +5 -5
  80. package/dist/runtime/components/input/date-picker.vue +6 -10
  81. package/dist/runtime/components/input/email-input.vue +4 -4
  82. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +5 -5
  83. package/dist/runtime/components/input/number-input.vue +7 -85
  84. package/dist/runtime/components/input/password-input.vue +4 -4
  85. package/dist/runtime/components/input/text-input.vue +8 -5
  86. package/dist/runtime/components/input/ui/button-input.vue +6 -25
  87. package/dist/runtime/components/input/ui/input-base.vue +6 -265
  88. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +2 -2
  89. package/dist/runtime/components/input/ui/input-inline.vue +3 -82
  90. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +2 -2
  91. package/dist/runtime/components/input/ui/input-label.d.vue.ts +2 -2
  92. package/dist/runtime/components/input/ui/input-label.vue +1 -1
  93. package/dist/runtime/components/input/ui/input-label.vue.d.ts +2 -2
  94. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -1
  95. package/dist/runtime/components/input/ui/input-wrapper.vue +13 -65
  96. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -1
  97. package/dist/runtime/components/input/ui/spin-input.vue +2 -53
  98. package/dist/runtime/components/link/link-button.vue +9 -9
  99. package/dist/runtime/components/link/link.vue +2 -2
  100. package/dist/runtime/components/loader/loader.d.vue.ts +7 -7
  101. package/dist/runtime/components/loader/loader.vue +8 -7
  102. package/dist/runtime/components/loader/loader.vue.d.ts +7 -7
  103. package/dist/runtime/components/modal/modal-close-button.vue +6 -6
  104. package/dist/runtime/components/modal/modal-root.vue +4 -4
  105. package/dist/runtime/components/modal/modal-title.vue +2 -2
  106. package/dist/runtime/components/nav-link/nav-icon-link.vue +4 -4
  107. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -5
  108. package/dist/runtime/components/nav-link/nav-link.vue +30 -113
  109. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -5
  110. package/dist/runtime/components/paper.vue +2 -31
  111. package/dist/runtime/components/popover/popover-dropdown.vue +2 -54
  112. package/dist/runtime/components/progress/progress-root.d.vue.ts +3 -3
  113. package/dist/runtime/components/progress/progress-root.vue +2 -2
  114. package/dist/runtime/components/progress/progress-root.vue.d.ts +3 -3
  115. package/dist/runtime/components/progress/progress-section.d.vue.ts +3 -0
  116. package/dist/runtime/components/progress/progress-section.vue +8 -6
  117. package/dist/runtime/components/progress/progress-section.vue.d.ts +3 -0
  118. package/dist/runtime/components/progress/progress.vue +2 -2
  119. package/dist/runtime/components/select.vue +6 -10
  120. package/dist/runtime/components/switch/switch-group.vue +3 -3
  121. package/dist/runtime/components/switch/switch.d.vue.ts +3 -0
  122. package/dist/runtime/components/switch/switch.vue +15 -205
  123. package/dist/runtime/components/switch/switch.vue.d.ts +3 -0
  124. package/dist/runtime/components/table/types.d.ts +4 -3
  125. package/dist/runtime/components/table/ui/table-sortable-header.vue +9 -9
  126. package/dist/runtime/components/table/ui/table.vue +9 -174
  127. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +14 -16
  128. package/dist/runtime/components/tabs/tabs-root.vue +14 -12
  129. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +14 -16
  130. package/dist/runtime/components/text.d.vue.ts +10 -9
  131. package/dist/runtime/components/text.vue +16 -77
  132. package/dist/runtime/components/text.vue.d.ts +10 -9
  133. package/dist/runtime/components/textarea.d.vue.ts +5 -3
  134. package/dist/runtime/components/textarea.vue +31 -18
  135. package/dist/runtime/components/textarea.vue.d.ts +5 -3
  136. package/dist/runtime/components/time-picker/time-picker.vue +6 -132
  137. package/dist/runtime/components/title.vue +4 -8
  138. package/dist/runtime/components/tree/_ui/tree-item.vue +2 -62
  139. package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +7 -6
  140. package/dist/runtime/components/tree/_ui/tree-root.vue +13 -19
  141. package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +7 -6
  142. package/dist/runtime/components/tree/tree.vue +5 -5
  143. package/dist/runtime/composables/index.d.ts +1 -1
  144. package/dist/runtime/composables/index.js +1 -1
  145. package/dist/runtime/composables/use-vars-resolver.d.ts +4 -0
  146. package/dist/runtime/composables/use-vars-resolver.js +6 -0
  147. package/dist/runtime/form/date-field.d.vue.ts +45 -0
  148. package/dist/runtime/form/date-field.vue +88 -0
  149. package/dist/runtime/form/date-field.vue.d.ts +45 -0
  150. package/dist/runtime/form/date-time-field.d.vue.ts +37 -0
  151. package/dist/runtime/form/date-time-field.vue +76 -0
  152. package/dist/runtime/form/date-time-field.vue.d.ts +37 -0
  153. package/dist/runtime/form/email-field.d.vue.ts +37 -0
  154. package/dist/runtime/form/email-field.vue +76 -0
  155. package/dist/runtime/form/email-field.vue.d.ts +37 -0
  156. package/dist/runtime/form/number-field.d.vue.ts +37 -0
  157. package/dist/runtime/form/number-field.vue +79 -0
  158. package/dist/runtime/form/number-field.vue.d.ts +37 -0
  159. package/dist/runtime/form/password-field.d.vue.ts +37 -0
  160. package/dist/runtime/form/password-field.vue +76 -0
  161. package/dist/runtime/form/password-field.vue.d.ts +37 -0
  162. package/dist/runtime/form/select-field.d.vue.ts +50 -0
  163. package/dist/runtime/form/select-field.vue +86 -0
  164. package/dist/runtime/form/select-field.vue.d.ts +50 -0
  165. package/dist/runtime/form/text-field.d.vue.ts +37 -0
  166. package/dist/runtime/form/text-field.vue +76 -0
  167. package/dist/runtime/form/text-field.vue.d.ts +37 -0
  168. package/dist/runtime/form/textarea-field.d.vue.ts +37 -0
  169. package/dist/runtime/form/textarea-field.vue +75 -0
  170. package/dist/runtime/form/textarea-field.vue.d.ts +37 -0
  171. package/dist/runtime/form/time-field.d.vue.ts +37 -0
  172. package/dist/runtime/form/time-field.vue +84 -0
  173. package/dist/runtime/form/time-field.vue.d.ts +37 -0
  174. package/dist/runtime/types/index.d.ts +1 -2
  175. package/dist/runtime/types/styling.d.ts +3 -1
  176. package/dist/runtime/types/theme.d.ts +10 -15
  177. package/dist/runtime/utils/style/create-variant-color-resolver.d.ts +2 -2
  178. package/package.json +12 -3
  179. package/dist/runtime/composables/use-style-resolver.d.ts +0 -5
  180. package/dist/runtime/composables/use-style-resolver.js +0 -5
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { NumberInputProps } from '../components/input/number-input.vue.js';
3
+ export interface NumberFieldProps extends Omit<NumberInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<number>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: number;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<NumberFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NumberFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,79 @@
1
+ <script setup>
2
+ import { useField } from "vee-validate";
3
+ import NumberInput from "../components/input/number-input.vue";
4
+ const {
5
+ name,
6
+ rules,
7
+ validateOn = "blur",
8
+ initialValue,
9
+ controlled = true,
10
+ min = Number.MIN_SAFE_INTEGER,
11
+ max = Number.MAX_SAFE_INTEGER,
12
+ ...props
13
+ } = defineProps({
14
+ name: { type: String, required: true },
15
+ rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
16
+ validateOn: { type: String, required: false },
17
+ initialValue: { type: Number, required: false },
18
+ controlled: { type: Boolean, required: false },
19
+ min: { type: Number, required: false },
20
+ max: { type: Number, required: false },
21
+ step: { type: Number, required: false },
22
+ hideControls: { type: Boolean, required: false },
23
+ icon: { type: String, required: false },
24
+ readonly: { type: Boolean, required: false },
25
+ disabled: { type: Boolean, required: false },
26
+ description: { type: String, required: false },
27
+ label: { type: String, required: false },
28
+ required: { type: Boolean, required: false },
29
+ radius: { type: [String, Number, Object], required: false },
30
+ size: { type: [String, Object], required: false },
31
+ variant: { type: String, required: false },
32
+ leftSectionPE: { type: void 0, required: false },
33
+ rightSectionPE: { type: void 0, required: false }
34
+ });
35
+ const {
36
+ value,
37
+ errorMessage,
38
+ handleBlur,
39
+ handleChange
40
+ } = useField(() => name, rules, {
41
+ validateOnValueUpdate: false,
42
+ validateOnMount: false,
43
+ initialValue,
44
+ controlled
45
+ });
46
+ </script>
47
+
48
+ <template>
49
+ <NumberInput
50
+ v-bind='props'
51
+ :model-value='value'
52
+ :error='errorMessage'
53
+ :name
54
+ :min
55
+ :max
56
+ @update:model-value='handleChange($event, !!errorMessage)'
57
+ @blur='handleBlur($event, validateOn === "blur")'
58
+ >
59
+ <template v-if='$slots.leftSection' #leftSection>
60
+ <slot name='leftSection' />
61
+ </template>
62
+
63
+ <template v-if='$slots.rightSection' #rightSection>
64
+ <slot name='rightSection' />
65
+ </template>
66
+
67
+ <template v-if='$slots.label' #label>
68
+ <slot name='label' />
69
+ </template>
70
+
71
+ <template v-if='$slots.description' #description>
72
+ <slot name='description' />
73
+ </template>
74
+
75
+ <template v-if='$slots.error' #error>
76
+ <slot name='error' :error='errorMessage' />
77
+ </template>
78
+ </NumberInput>
79
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { NumberInputProps } from '../components/input/number-input.vue.js';
3
+ export interface NumberFieldProps extends Omit<NumberInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<number>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: number;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<NumberFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NumberFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { TextInputProps } from '../components/input/text-input.vue.js';
3
+ export interface PasswordFieldProps extends Omit<TextInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<string>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: string;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<PasswordFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PasswordFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,76 @@
1
+ <script setup>
2
+ import { useField } from "vee-validate";
3
+ import PasswordInput from "../components/input/password-input.vue";
4
+ const {
5
+ name,
6
+ rules,
7
+ validateOn = "blur",
8
+ initialValue,
9
+ controlled = true,
10
+ ...props
11
+ } = defineProps({
12
+ name: { type: String, required: true },
13
+ rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
14
+ validateOn: { type: String, required: false },
15
+ initialValue: { type: String, required: false },
16
+ controlled: { type: Boolean, required: false },
17
+ multiline: { type: Boolean, required: false },
18
+ withAria: { type: Boolean, required: false },
19
+ classes: { type: Object, required: false },
20
+ icon: { type: String, required: false },
21
+ description: { type: String, required: false },
22
+ label: { type: String, required: false },
23
+ required: { type: Boolean, required: false },
24
+ id: { type: [String, null], required: false },
25
+ radius: { type: [String, Number, Object], required: false },
26
+ size: { type: [String, Object], required: false },
27
+ variant: { type: String, required: false },
28
+ resize: { type: void 0, required: false },
29
+ leftSectionPE: { type: void 0, required: false },
30
+ rightSectionPE: { type: void 0, required: false },
31
+ readonly: { type: Boolean, required: false },
32
+ disabled: { type: Boolean, required: false }
33
+ });
34
+ const {
35
+ value,
36
+ errorMessage,
37
+ handleBlur,
38
+ handleChange
39
+ } = useField(() => name, rules, {
40
+ validateOnValueUpdate: false,
41
+ validateOnMount: false,
42
+ initialValue,
43
+ controlled
44
+ });
45
+ </script>
46
+
47
+ <template>
48
+ <PasswordInput
49
+ v-bind='props'
50
+ :model-value='value'
51
+ :error='errorMessage'
52
+ :name
53
+ @update:model-value='handleChange($event, !!errorMessage)'
54
+ @blur='handleBlur($event, validateOn === "blur")'
55
+ >
56
+ <template v-if='$slots.leftSection' #leftSection>
57
+ <slot name='leftSection' />
58
+ </template>
59
+
60
+ <template v-if='$slots.rightSection' #rightSection>
61
+ <slot name='rightSection' />
62
+ </template>
63
+
64
+ <template v-if='$slots.label' #label>
65
+ <slot name='label' />
66
+ </template>
67
+
68
+ <template v-if='$slots.description' #description>
69
+ <slot name='description' />
70
+ </template>
71
+
72
+ <template v-if='$slots.error' #error>
73
+ <slot name='error' :error='errorMessage' />
74
+ </template>
75
+ </PasswordInput>
76
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { TextInputProps } from '../components/input/text-input.vue.js';
3
+ export interface PasswordFieldProps extends Omit<TextInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<string>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: string;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<PasswordFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PasswordFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,50 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { ComboboxItemExt } from '../components/combobox/index.js';
3
+ import type { SelectProps } from '../components/select.vue.js';
4
+ export interface SelectFieldProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<SelectProps<Value, Ext>, 'error'> {
5
+ /** Field name used by vee-validate */
6
+ name: string;
7
+ /** Validation rules, applied when `controlled: false` or as field-level override */
8
+ rules?: RuleExpression<string | string[] | null>;
9
+ /** When to trigger validation @default `'blur'` */
10
+ validateOn?: 'blur' | 'submit' | 'change';
11
+ /** Pre-fills the field value */
12
+ initialValue?: string | string[] | null;
13
+ /** If `false`, disconnects the field from the parent form context @default `true` */
14
+ controlled?: boolean;
15
+ }
16
+ declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
17
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectFieldProps<Value, Ext>> & (typeof globalThis extends {
18
+ __VLS_PROPS_FALLBACK: infer P;
19
+ } ? P : {});
20
+ expose: (exposed: {}) => void;
21
+ attrs: any;
22
+ slots: {
23
+ leftSection?: (props: {}) => any;
24
+ } & {
25
+ rightSection?: (props: {}) => any;
26
+ } & {
27
+ label?: (props: {}) => any;
28
+ } & {
29
+ description?: (props: {}) => any;
30
+ } & {
31
+ error?: (props: {
32
+ error: string | undefined;
33
+ }) => any;
34
+ } & {
35
+ selection?: (props: {
36
+ value: string | string[] | null;
37
+ display: string;
38
+ }) => any;
39
+ };
40
+ emit: {};
41
+ }>) => import("vue").VNode & {
42
+ __ctx?: Awaited<typeof __VLS_setup>;
43
+ };
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
46
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
47
+ [K in keyof T]: T[K];
48
+ } : {
49
+ [K in keyof T as K]: T[K];
50
+ }) & {};
@@ -0,0 +1,86 @@
1
+ <script setup>
2
+ import { useField } from "vee-validate";
3
+ import Select from "../components/select.vue";
4
+ const {
5
+ name,
6
+ rules,
7
+ validateOn = "blur",
8
+ initialValue = null,
9
+ controlled = true,
10
+ ...props
11
+ } = defineProps({
12
+ name: { type: String, required: true },
13
+ rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
14
+ validateOn: { type: String, required: false },
15
+ initialValue: { type: [String, Array, null], required: false },
16
+ controlled: { type: Boolean, required: false },
17
+ options: { type: Array, required: true },
18
+ searchable: { type: Boolean, required: false },
19
+ multiple: { type: Boolean, required: false },
20
+ withCheckIcon: { type: Boolean, required: false },
21
+ iconPosition: { type: String, required: false },
22
+ nothingFoundMessage: { type: String, required: false },
23
+ allowDeselect: { type: Boolean, required: false },
24
+ closeOnSelect: { type: Boolean, required: false },
25
+ icon: { type: String, required: false },
26
+ limit: { type: Number, required: false },
27
+ autoComplete: { type: String, required: false },
28
+ withAria: { type: Boolean, required: false },
29
+ classes: { type: Object, required: false },
30
+ description: { type: String, required: false },
31
+ label: { type: String, required: false },
32
+ required: { type: Boolean, required: false },
33
+ radius: { type: [String, Number, Object], required: false },
34
+ size: { type: [String, Object], required: false },
35
+ variant: { type: String, required: false },
36
+ leftSectionPE: { type: void 0, required: false },
37
+ rightSectionPE: { type: void 0, required: false },
38
+ readonly: { type: Boolean, required: false },
39
+ disabled: { type: Boolean, required: false }
40
+ });
41
+ const {
42
+ value,
43
+ errorMessage,
44
+ handleBlur,
45
+ handleChange
46
+ } = useField(() => name, rules, {
47
+ validateOnValueUpdate: false,
48
+ validateOnMount: false,
49
+ initialValue,
50
+ controlled
51
+ });
52
+ </script>
53
+
54
+ <template>
55
+ <Select
56
+ v-bind='props'
57
+ :model-value='value'
58
+ :error='errorMessage'
59
+ @update:model-value='handleChange($event, !!errorMessage)'
60
+ @blur='handleBlur($event, validateOn === "blur")'
61
+ >
62
+ <template v-if='$slots.leftSection' #leftSection>
63
+ <slot name='leftSection' />
64
+ </template>
65
+
66
+ <template v-if='$slots.rightSection' #rightSection>
67
+ <slot name='rightSection' />
68
+ </template>
69
+
70
+ <template v-if='$slots.label' #label>
71
+ <slot name='label' />
72
+ </template>
73
+
74
+ <template v-if='$slots.description' #description>
75
+ <slot name='description' />
76
+ </template>
77
+
78
+ <template v-if='$slots.error' #error>
79
+ <slot name='error' :error='errorMessage' />
80
+ </template>
81
+
82
+ <template v-if='$slots.selection' #selection='slotProps'>
83
+ <slot name='selection' v-bind='slotProps' />
84
+ </template>
85
+ </Select>
86
+ </template>
@@ -0,0 +1,50 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { ComboboxItemExt } from '../components/combobox/index.js';
3
+ import type { SelectProps } from '../components/select.vue.js';
4
+ export interface SelectFieldProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<SelectProps<Value, Ext>, 'error'> {
5
+ /** Field name used by vee-validate */
6
+ name: string;
7
+ /** Validation rules, applied when `controlled: false` or as field-level override */
8
+ rules?: RuleExpression<string | string[] | null>;
9
+ /** When to trigger validation @default `'blur'` */
10
+ validateOn?: 'blur' | 'submit' | 'change';
11
+ /** Pre-fills the field value */
12
+ initialValue?: string | string[] | null;
13
+ /** If `false`, disconnects the field from the parent form context @default `true` */
14
+ controlled?: boolean;
15
+ }
16
+ declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
17
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectFieldProps<Value, Ext>> & (typeof globalThis extends {
18
+ __VLS_PROPS_FALLBACK: infer P;
19
+ } ? P : {});
20
+ expose: (exposed: {}) => void;
21
+ attrs: any;
22
+ slots: {
23
+ leftSection?: (props: {}) => any;
24
+ } & {
25
+ rightSection?: (props: {}) => any;
26
+ } & {
27
+ label?: (props: {}) => any;
28
+ } & {
29
+ description?: (props: {}) => any;
30
+ } & {
31
+ error?: (props: {
32
+ error: string | undefined;
33
+ }) => any;
34
+ } & {
35
+ selection?: (props: {
36
+ value: string | string[] | null;
37
+ display: string;
38
+ }) => any;
39
+ };
40
+ emit: {};
41
+ }>) => import("vue").VNode & {
42
+ __ctx?: Awaited<typeof __VLS_setup>;
43
+ };
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
46
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
47
+ [K in keyof T]: T[K];
48
+ } : {
49
+ [K in keyof T as K]: T[K];
50
+ }) & {};
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { TextInputProps } from '../components/input/text-input.vue.js';
3
+ export interface TextFieldProps extends Omit<TextInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<string>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: string;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<TextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,76 @@
1
+ <script setup>
2
+ import { useField } from "vee-validate";
3
+ import TextInput from "../components/input/text-input.vue";
4
+ const {
5
+ name,
6
+ rules,
7
+ validateOn = "blur",
8
+ initialValue,
9
+ controlled = true,
10
+ ...props
11
+ } = defineProps({
12
+ name: { type: String, required: true },
13
+ rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
14
+ validateOn: { type: String, required: false },
15
+ initialValue: { type: String, required: false },
16
+ controlled: { type: Boolean, required: false },
17
+ multiline: { type: Boolean, required: false },
18
+ withAria: { type: Boolean, required: false },
19
+ classes: { type: Object, required: false },
20
+ icon: { type: String, required: false },
21
+ description: { type: String, required: false },
22
+ label: { type: String, required: false },
23
+ required: { type: Boolean, required: false },
24
+ id: { type: [String, null], required: false },
25
+ radius: { type: [String, Number, Object], required: false },
26
+ size: { type: [String, Object], required: false },
27
+ variant: { type: String, required: false },
28
+ resize: { type: void 0, required: false },
29
+ leftSectionPE: { type: void 0, required: false },
30
+ rightSectionPE: { type: void 0, required: false },
31
+ readonly: { type: Boolean, required: false },
32
+ disabled: { type: Boolean, required: false }
33
+ });
34
+ const {
35
+ value,
36
+ errorMessage,
37
+ handleBlur,
38
+ handleChange
39
+ } = useField(() => name, rules, {
40
+ validateOnValueUpdate: false,
41
+ validateOnMount: false,
42
+ initialValue,
43
+ controlled
44
+ });
45
+ </script>
46
+
47
+ <template>
48
+ <TextInput
49
+ v-bind='props'
50
+ :model-value='value'
51
+ :error='errorMessage'
52
+ :name
53
+ @update:model-value='handleChange($event, !!errorMessage)'
54
+ @blur='handleBlur($event, validateOn === "blur")'
55
+ >
56
+ <template v-if='$slots.leftSection' #leftSection>
57
+ <slot name='leftSection' />
58
+ </template>
59
+
60
+ <template v-if='$slots.rightSection' #rightSection>
61
+ <slot name='rightSection' />
62
+ </template>
63
+
64
+ <template v-if='$slots.label' #label>
65
+ <slot name='label' />
66
+ </template>
67
+
68
+ <template v-if='$slots.description' #description>
69
+ <slot name='description' />
70
+ </template>
71
+
72
+ <template v-if='$slots.error' #error>
73
+ <slot name='error' :error='errorMessage' />
74
+ </template>
75
+ </TextInput>
76
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { RuleExpression } from 'vee-validate';
2
+ import type { TextInputProps } from '../components/input/text-input.vue.js';
3
+ export interface TextFieldProps extends Omit<TextInputProps, 'error'> {
4
+ /** Field name used by vee-validate */
5
+ name: string;
6
+ /** Validation rules, applied when `controlled: false` or as field-level override */
7
+ rules?: RuleExpression<string>;
8
+ /** When to trigger validation @default `'blur'` */
9
+ validateOn?: 'blur' | 'submit' | 'change';
10
+ /** Pre-fills the field value */
11
+ initialValue?: string;
12
+ /** If `false`, disconnects the field from the parent form context @default `true` */
13
+ controlled?: boolean;
14
+ }
15
+ declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
16
+ error: string | undefined;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ leftSection?: (props: typeof __VLS_12) => any;
20
+ } & {
21
+ rightSection?: (props: typeof __VLS_15) => any;
22
+ } & {
23
+ label?: (props: typeof __VLS_18) => any;
24
+ } & {
25
+ description?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ error?: (props: typeof __VLS_24) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<TextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };