nuance-ui 0.2.9 → 0.2.11

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 (153) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +11 -10
  3. package/dist/runtime/components/action-icon/action-icon-section.vue +17 -20
  4. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +11 -10
  5. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +17 -14
  6. package/dist/runtime/components/action-icon/action-icon.vue +18 -17
  7. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +17 -14
  8. package/dist/runtime/components/alert.d.vue.ts +8 -6
  9. package/dist/runtime/components/alert.vue +15 -101
  10. package/dist/runtime/components/alert.vue.d.ts +8 -6
  11. package/dist/runtime/components/app-shell/app-shell-aside.vue +2 -28
  12. package/dist/runtime/components/app-shell/app-shell-footer.vue +2 -27
  13. package/dist/runtime/components/app-shell/app-shell-header.vue +2 -28
  14. package/dist/runtime/components/app-shell/app-shell-main.vue +2 -16
  15. package/dist/runtime/components/app-shell/app-shell-navbar.vue +2 -32
  16. package/dist/runtime/components/app-shell/app-shell-section.vue +2 -8
  17. package/dist/runtime/components/app-shell/app-shell.vue +20 -44
  18. package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
  19. package/dist/runtime/components/avatar/avatar-group.vue +1 -1
  20. package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
  21. package/dist/runtime/components/avatar/avatar.d.vue.ts +9 -5
  22. package/dist/runtime/components/avatar/avatar.vue +26 -26
  23. package/dist/runtime/components/avatar/avatar.vue.d.ts +9 -5
  24. package/dist/runtime/components/background-image.d.vue.ts +2 -2
  25. package/dist/runtime/components/background-image.vue +3 -19
  26. package/dist/runtime/components/background-image.vue.d.ts +2 -2
  27. package/dist/runtime/components/badge.d.vue.ts +9 -8
  28. package/dist/runtime/components/badge.vue +18 -154
  29. package/dist/runtime/components/badge.vue.d.ts +9 -8
  30. package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
  31. package/dist/runtime/components/breadcrumbs.vue +2 -48
  32. package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
  33. package/dist/runtime/components/button/button.d.vue.ts +21 -26
  34. package/dist/runtime/components/button/button.module.css +1 -1
  35. package/dist/runtime/components/button/button.vue +36 -42
  36. package/dist/runtime/components/button/button.vue.d.ts +21 -26
  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 -7
  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 +6 -84
  84. package/dist/runtime/components/input/password-input.vue +4 -4
  85. package/dist/runtime/components/input/text-input.vue +4 -4
  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 -8
  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 -8
  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.vue +4 -4
  134. package/dist/runtime/components/time-picker/time-picker.vue +6 -132
  135. package/dist/runtime/components/title.vue +4 -8
  136. package/dist/runtime/components/tree/_ui/tree-item.vue +2 -62
  137. package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +7 -6
  138. package/dist/runtime/components/tree/_ui/tree-root.vue +13 -19
  139. package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +7 -6
  140. package/dist/runtime/components/tree/tree.vue +5 -5
  141. package/dist/runtime/composables/index.d.ts +1 -1
  142. package/dist/runtime/composables/index.js +1 -1
  143. package/dist/runtime/composables/use-vars-resolver.d.ts +4 -0
  144. package/dist/runtime/composables/use-vars-resolver.js +6 -0
  145. package/dist/runtime/types/index.d.ts +2 -2
  146. package/dist/runtime/types/styling.d.ts +6 -0
  147. package/dist/runtime/types/styling.js +0 -0
  148. package/dist/runtime/types/theme.d.ts +10 -15
  149. package/dist/runtime/utils/color/parse-theme-color.d.ts +2 -2
  150. package/dist/runtime/utils/style/create-variant-color-resolver.d.ts +2 -2
  151. package/package.json +2 -2
  152. package/dist/runtime/composables/use-style-resolver.d.ts +0 -6
  153. package/dist/runtime/composables/use-style-resolver.js +0 -5
@@ -3,13 +3,7 @@ import type { CSSProperties, RendererElement } from 'vue';
3
3
  import type { BoxProps } from '../../box.vue.js';
4
4
  import type { TransitionName } from '../../transition.vue.js';
5
5
  import type { DialogModel } from '../types.js';
6
- export interface DialogRootProps extends BoxProps {
7
- /** If set, the dialog is closed when user clicks on the overlay @default `true` */
8
- closeOnClickOutside?: boolean;
9
- /** If set, the component is rendered inside `Portal` @default `true` */
10
- withinPortal?: boolean;
11
- /** If set, the component is rendered with `Overlay` @default `true` */
12
- withoutOverlay?: boolean;
6
+ interface StyleProps {
13
7
  /** Top/bottom modal offset @default `5dvh` */
14
8
  yOffset?: CSSProperties['marginTop'];
15
9
  /** Left/right modal offset @default `5vw` */
@@ -22,10 +16,18 @@ export interface DialogRootProps extends BoxProps {
22
16
  shadow?: NuanceShadow;
23
17
  /** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default `'md'` */
24
18
  padding?: NuanceSpacing;
25
- /** Passes a class to root element */
26
- rootClass?: string;
27
19
  /** Animation on hide/show */
28
20
  transition?: TransitionName;
21
+ }
22
+ export interface DialogRootProps extends BoxProps, StyleProps {
23
+ /** If set, the dialog is closed when user clicks on the overlay @default `true` */
24
+ closeOnClickOutside?: boolean;
25
+ /** If set, the component is rendered inside `Portal` @default `true` */
26
+ withinPortal?: boolean;
27
+ /** If set, the component is rendered with `Overlay` @default `true` */
28
+ withoutOverlay?: boolean;
29
+ /** Passes a class to root element */
30
+ rootClass?: string;
29
31
  /** Portal target to render element @default 'body' */
30
32
  portalTarget?: string | RendererElement | null;
31
33
  }
@@ -25,17 +25,17 @@ const {
25
25
  closeOnClickOutside: { type: Boolean, required: false },
26
26
  withinPortal: { type: Boolean, required: false },
27
27
  withoutOverlay: { type: Boolean, required: false },
28
+ rootClass: { type: String, required: false },
29
+ portalTarget: { type: [String, Object, null], required: false },
30
+ is: { type: null, required: false },
31
+ mod: { type: [Object, Array, null], required: false },
28
32
  yOffset: { type: void 0, required: false },
29
33
  xOffset: { type: void 0, required: false },
30
34
  radius: { type: [String, Number], required: false },
31
35
  size: { type: String, required: false },
32
36
  shadow: { type: String, required: false },
33
37
  padding: { type: [String, Number], required: false },
34
- rootClass: { type: String, required: false },
35
- transition: { type: String, required: false },
36
- portalTarget: { type: [String, Object, null], required: false },
37
- is: { type: null, required: false },
38
- mod: { type: [Object, Array, null], required: false }
38
+ transition: { type: String, required: false }
39
39
  });
40
40
  const emit = defineEmits(["open", "close"]);
41
41
  const opened = defineModel("open", { type: Boolean, ...{ default: false } });
@@ -3,13 +3,7 @@ import type { CSSProperties, RendererElement } from 'vue';
3
3
  import type { BoxProps } from '../../box.vue.js';
4
4
  import type { TransitionName } from '../../transition.vue.js';
5
5
  import type { DialogModel } from '../types.js';
6
- export interface DialogRootProps extends BoxProps {
7
- /** If set, the dialog is closed when user clicks on the overlay @default `true` */
8
- closeOnClickOutside?: boolean;
9
- /** If set, the component is rendered inside `Portal` @default `true` */
10
- withinPortal?: boolean;
11
- /** If set, the component is rendered with `Overlay` @default `true` */
12
- withoutOverlay?: boolean;
6
+ interface StyleProps {
13
7
  /** Top/bottom modal offset @default `5dvh` */
14
8
  yOffset?: CSSProperties['marginTop'];
15
9
  /** Left/right modal offset @default `5vw` */
@@ -22,10 +16,18 @@ export interface DialogRootProps extends BoxProps {
22
16
  shadow?: NuanceShadow;
23
17
  /** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default `'md'` */
24
18
  padding?: NuanceSpacing;
25
- /** Passes a class to root element */
26
- rootClass?: string;
27
19
  /** Animation on hide/show */
28
20
  transition?: TransitionName;
21
+ }
22
+ export interface DialogRootProps extends BoxProps, StyleProps {
23
+ /** If set, the dialog is closed when user clicks on the overlay @default `true` */
24
+ closeOnClickOutside?: boolean;
25
+ /** If set, the component is rendered inside `Portal` @default `true` */
26
+ withinPortal?: boolean;
27
+ /** If set, the component is rendered with `Overlay` @default `true` */
28
+ withoutOverlay?: boolean;
29
+ /** Passes a class to root element */
30
+ rootClass?: string;
29
31
  /** Portal target to render element @default 'body' */
30
32
  portalTarget?: string | RendererElement | null;
31
33
  }
@@ -10,11 +10,11 @@ const { size = "md", lh = "1", ...props } = defineProps({
10
10
  inline: { type: Boolean, required: false },
11
11
  inherit: { type: Boolean, required: false },
12
12
  gradient: { type: Object, required: false },
13
- variant: { type: String, required: false },
14
13
  fz: { type: null, required: false },
15
- lh: { type: String, required: false },
14
+ lh: { type: [String, Object], required: false },
16
15
  fw: { type: void 0, required: false },
17
16
  c: { type: null, required: false },
17
+ variant: { type: String, required: false },
18
18
  mod: { type: [Object, Array, null], required: false }
19
19
  });
20
20
  </script>
@@ -2,15 +2,15 @@
2
2
  import DialogCloseButton from "../dialog/ui/dialog-close-button.vue";
3
3
  const props = defineProps({
4
4
  size: { type: null, required: false },
5
- variant: { type: String, required: false },
6
5
  gradient: { type: Object, required: false },
7
- loading: { type: Boolean, required: false },
8
6
  color: { type: null, required: false },
9
- radius: { type: [String, Number], required: false },
10
- classes: { type: Object, required: false },
11
- mod: { type: [Object, Array, null], required: false },
7
+ radius: { type: [String, Number, Object], required: false },
8
+ loading: { type: Boolean, required: false },
12
9
  icon: { type: String, required: false },
13
- disabled: { type: Boolean, required: false }
10
+ disabled: { type: Boolean, required: false },
11
+ mod: { type: [Object, Array, null], required: false },
12
+ variant: { type: String, required: false },
13
+ classes: { type: Object, required: false }
14
14
  });
15
15
  </script>
16
16
 
@@ -14,15 +14,15 @@ const {
14
14
  closeOnClickOutside: { type: Boolean, required: false },
15
15
  withinPortal: { type: Boolean, required: false },
16
16
  withoutOverlay: { type: Boolean, required: false },
17
+ portalTarget: { type: [String, Object, null], required: false },
18
+ is: { type: null, required: false },
19
+ mod: { type: [Object, Array, null], required: false },
17
20
  yOffset: { type: void 0, required: false },
18
21
  xOffset: { type: void 0, required: false },
19
22
  radius: { type: [String, Number], required: false },
20
23
  size: { type: String, required: false },
21
24
  shadow: { type: String, required: false },
22
- padding: { type: [String, Number], required: false },
23
- portalTarget: { type: [String, Object, null], required: false },
24
- is: { type: null, required: false },
25
- mod: { type: [Object, Array, null], required: false }
25
+ padding: { type: [String, Number], required: false }
26
26
  });
27
27
  defineEmits(["open", "close"]);
28
28
  const opened = defineModel("open", { type: Boolean, ...{ default: false } });
@@ -9,11 +9,11 @@ const props = defineProps({
9
9
  inline: { type: Boolean, required: false },
10
10
  inherit: { type: Boolean, required: false },
11
11
  gradient: { type: Object, required: false },
12
- variant: { type: String, required: false },
13
12
  fz: { type: null, required: false },
14
- lh: { type: String, required: false },
13
+ lh: { type: [String, Object], required: false },
15
14
  fw: { type: void 0, required: false },
16
15
  c: { type: null, required: false },
16
+ variant: { type: String, required: false },
17
17
  mod: { type: [Object, Array, null], required: false }
18
18
  });
19
19
  </script>
@@ -15,18 +15,19 @@ const {
15
15
  accept: { type: null, required: false },
16
16
  reset: { type: null, required: false },
17
17
  directory: { type: null, required: false },
18
+ color: { type: null, required: false },
18
19
  size: { type: null, required: false },
19
- spacing: { type: String, required: false },
20
- variant: { type: String, required: false },
20
+ spacing: { type: [String, Number, Object], required: false },
21
21
  gradient: { type: Object, required: false },
22
+ radius: { type: [String, Number, Object], required: false },
23
+ justify: { type: void 0, required: false },
24
+ leftSectionPE: { type: void 0, required: false },
25
+ rightSectionPE: { type: void 0, required: false },
22
26
  loading: { type: Boolean, required: false },
23
- color: { type: null, required: false },
24
- radius: { type: [String, Number], required: false },
25
- classes: { type: Object, required: false },
26
- leftSectionPE: { type: null, required: false },
27
27
  leftSectionProps: { type: Object, required: false },
28
- rightSectionPE: { type: null, required: false },
29
28
  rightSectionProps: { type: Object, required: false },
29
+ variant: { type: String, required: false },
30
+ classes: { type: Object, required: false },
30
31
  is: { type: null, required: false },
31
32
  mod: { type: [Object, Array, null], required: false },
32
33
  capture: { type: null, required: false },
@@ -15,15 +15,15 @@ const {
15
15
  reset: { type: null, required: false },
16
16
  directory: { type: null, required: false },
17
17
  size: { type: null, required: false },
18
- variant: { type: String, required: false },
19
18
  gradient: { type: Object, required: false },
20
- loading: { type: Boolean, required: false },
21
19
  color: { type: null, required: false },
22
- radius: { type: [String, Number], required: false },
23
- classes: { type: Object, required: false },
24
- mod: { type: [Object, Array, null], required: false },
20
+ radius: { type: [String, Number, Object], required: false },
21
+ loading: { type: Boolean, required: false },
25
22
  icon: { type: String, required: false },
26
23
  disabled: { type: Boolean, required: false },
24
+ mod: { type: [Object, Array, null], required: false },
25
+ variant: { type: String, required: false },
26
+ classes: { type: Object, required: false },
27
27
  capture: { type: null, required: false },
28
28
  initialFiles: { type: null, required: false },
29
29
  input: { type: null, required: false },
@@ -31,7 +31,7 @@ const {
31
31
  ...props
32
32
  } = defineProps({
33
33
  valueFormat: { type: [String, Object], required: false },
34
- size: { type: String, required: false },
34
+ size: { type: [String, Object], required: false },
35
35
  withWeekNumbers: { type: Boolean, required: false },
36
36
  prevDisabled: { type: Function, required: false },
37
37
  nextDisabled: { type: Function, required: false },
@@ -58,11 +58,11 @@ const {
58
58
  label: { type: String, required: false },
59
59
  required: { type: Boolean, required: false },
60
60
  id: { type: [String, null], required: false },
61
- radius: { type: String, required: false },
61
+ radius: { type: [String, Number, Object], required: false },
62
62
  variant: { type: String, required: false },
63
63
  resize: { type: void 0, required: false },
64
- leftSectionPE: { type: null, required: false },
65
- rightSectionPE: { type: null, required: false }
64
+ leftSectionPE: { type: void 0, required: false },
65
+ rightSectionPE: { type: void 0, required: false }
66
66
  });
67
67
  defineEmits(["open", "close", "select", "prev", "level", "next"]);
68
68
  const model = defineModel({ type: null });
@@ -177,10 +177,6 @@ const visible = computed(() => {
177
177
  </Popover>
178
178
  </template>
179
179
 
180
- <style lang="postcss" module>
181
- .list {
182
- display: flex;
183
- flex-wrap: wrap;
184
- gap: .25rem;
185
- }
180
+ <style module>
181
+ .list{display:flex;flex-wrap:wrap;gap:.25rem}
186
182
  </style>
@@ -10,12 +10,12 @@ const { icon = "gravity-ui:at", ...rest } = defineProps({
10
10
  label: { type: String, required: false },
11
11
  required: { type: Boolean, required: false },
12
12
  id: { type: [String, null], required: false },
13
- radius: { type: String, required: false },
14
- size: { type: String, required: false },
13
+ radius: { type: [String, Number, Object], required: false },
14
+ size: { type: [String, Object], required: false },
15
15
  variant: { type: String, required: false },
16
16
  resize: { type: void 0, required: false },
17
- leftSectionPE: { type: null, required: false },
18
- rightSectionPE: { type: null, required: false },
17
+ leftSectionPE: { type: void 0, required: false },
18
+ rightSectionPE: { type: void 0, required: false },
19
19
  readonly: { type: Boolean, required: false },
20
20
  disabled: { type: Boolean, required: false }
21
21
  });
@@ -1,4 +1,4 @@
1
- import type { NuanceSize } from '@nui/types';
1
+ import type { AnyString, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { CSSProperties } from 'vue';
3
3
  import type { InputVariant } from '../types.js';
4
4
  export interface WrapperContext {
@@ -7,9 +7,9 @@ export interface WrapperContext {
7
7
  /** Marks the field as required */
8
8
  required?: boolean;
9
9
  /** Border radius */
10
- radius?: NuanceSize | string;
10
+ radius?: NuanceRadius | AnyString;
11
11
  /** Component size */
12
- size?: NuanceSize | string;
12
+ size?: NuanceSize | AnyString;
13
13
  /** Visual variant */
14
14
  variant?: InputVariant;
15
15
  /** Enables multiline (textarea) mode */
@@ -17,9 +17,9 @@ export interface WrapperContext {
17
17
  /** CSS resize behavior for multiline inputs */
18
18
  resize?: CSSProperties['resize'];
19
19
  /** `pointer-events` value for the left section */
20
- leftSectionPE?: CSSStyleDeclaration['pointerEvents'];
20
+ leftSectionPE?: CSSProperties['pointerEvents'];
21
21
  /** `pointer-events` value for the right section */
22
- rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
22
+ rightSectionPE?: CSSProperties['pointerEvents'];
23
23
  }
24
24
  export declare const useProvideInputWrapper: (init: any) => any;
25
25
  export declare const useInputWrapperState: () => any;
@@ -24,11 +24,11 @@ const {
24
24
  description: { type: String, required: false },
25
25
  label: { type: String, required: false },
26
26
  required: { type: Boolean, required: false },
27
- radius: { type: String, required: false },
28
- size: { type: String, required: false },
27
+ radius: { type: [String, Number, Object], required: false },
28
+ size: { type: [String, Object], required: false },
29
29
  variant: { type: String, required: false },
30
- leftSectionPE: { type: null, required: false },
31
- rightSectionPE: { type: null, required: false }
30
+ leftSectionPE: { type: void 0, required: false },
31
+ rightSectionPE: { type: void 0, required: false }
32
32
  });
33
33
  const focused = shallowRef(false);
34
34
  const value = defineModel({ type: Number, ...{ default: 0 } });
@@ -106,84 +106,6 @@ function handleBlur() {
106
106
  </InputWrapper>
107
107
  </template>
108
108
 
109
- <style module lang="postcss">
110
- .root {
111
- --ni-right-section-width-xs: rem(17px);
112
- --ni-right-section-width-sm: rem(24px);
113
- --ni-right-section-width-md: rem(27px);
114
- --ni-right-section-width-lg: rem(31px);
115
- --ni-right-section-width-xl: rem(34px);
116
- }
117
-
118
- .controls {
119
- --ni-chevron-size-xs: rem(10px);
120
- --ni-chevron-size-sm: rem(14px);
121
- --ni-chevron-size-md: rem(16px);
122
- --ni-chevron-size-lg: rem(18px);
123
- --ni-chevron-size-xl: rem(20px);
124
- --ni-chevron-size: var(--ni-chevron-size-sm);
125
-
126
- display: flex;
127
- flex-direction: column;
128
-
129
- width: 100%;
130
- max-width: calc(var(--ni-chevron-size) * 1.7);
131
- height: calc(var(--input-height) - rem(2px));
132
- margin-inline-start: auto;
133
- }
134
-
135
- .control {
136
- --control-border: 1px solid var(--input-bd);
137
- --control-radius: calc(var(--input-radius) - rem(1px));
138
-
139
- cursor: pointer;
140
-
141
- display: flex;
142
-
143
- flex: 0 0 50%;
144
- align-items: center;
145
- justify-content: center;
146
-
147
- width: 100%;
148
- height: calc(var(--input-height) / 2 - rem(1px));
149
- padding: 0;
150
- border-inline-start: var(--control-border);
151
-
152
- color: var(--color-text);
153
-
154
- background-color: transparent;
155
-
156
- &:where(:disabled) {
157
- cursor: not-allowed;
158
-
159
- color: var(--color-disabled-text);
160
-
161
- opacity: 0.6;
162
- background-color: transparent;
163
- }
164
-
165
- .root[data-error] :where(&) {
166
- color: var(--color-error);
167
- }
168
-
169
- &:where(:first-of-type) {
170
- border-radius: 0;
171
- border-start-end-radius: var(--control-radius);
172
- }
173
-
174
- &:last-of-type {
175
- border-radius: 0;
176
- border-end-end-radius: var(--control-radius);
177
- }
178
-
179
- @mixin hover {
180
- @mixin where-light {
181
- background-color: var(--color-gray-0);
182
- }
183
-
184
- @mixin where-dark {
185
- background-color: var(--color-dark-4);
186
- }
187
- }
188
- }
109
+ <style module>
110
+ .root{--ni-right-section-width-xs:rem(17px);--ni-right-section-width-sm:rem(24px);--ni-right-section-width-md:rem(27px);--ni-right-section-width-lg:rem(31px);--ni-right-section-width-xl:rem(34px)}.controls{--ni-chevron-size-xs:rem(10px);--ni-chevron-size-sm:rem(14px);--ni-chevron-size-md:rem(16px);--ni-chevron-size-lg:rem(18px);--ni-chevron-size-xl:rem(20px);--ni-chevron-size:var(--ni-chevron-size-sm);flex-direction:column;height:calc(var(--input-height) - rem(2px));margin-inline-start:auto;max-width:calc(var(--ni-chevron-size)*1.7)}.control,.controls{display:flex;width:100%}.control{--control-border:1px solid var(--input-bd);--control-radius:calc(var(--input-radius) - rem(1px));align-items:center;background-color:transparent;border-inline-start:var(--control-border);color:var(--color-text);cursor:pointer;flex:0 0 50%;height:calc(var(--input-height)/2 - rem(1px));justify-content:center;padding:0}.control:where(:disabled){background-color:transparent;color:var(--color-disabled-text);cursor:not-allowed;opacity:.6}.root[data-error] :where(.control){color:var(--color-error)}.control:where(:first-of-type){border-radius:0;border-start-end-radius:var(--control-radius)}.control:last-of-type{border-radius:0;border-end-end-radius:var(--control-radius)}.control{@mixin hover{@mixin where-light{background-color:var(--color-gray-0)}@mixin where-dark{background-color:var(--color-dark-4)}}}
189
111
  </style>
@@ -12,12 +12,12 @@ const props = defineProps({
12
12
  label: { type: String, required: false },
13
13
  required: { type: Boolean, required: false },
14
14
  id: { type: [String, null], required: false },
15
- radius: { type: String, required: false },
16
- size: { type: String, required: false },
15
+ radius: { type: [String, Number, Object], required: false },
16
+ size: { type: [String, Object], required: false },
17
17
  variant: { type: String, required: false },
18
18
  resize: { type: void 0, required: false },
19
- leftSectionPE: { type: null, required: false },
20
- rightSectionPE: { type: null, required: false },
19
+ leftSectionPE: { type: void 0, required: false },
20
+ rightSectionPE: { type: void 0, required: false },
21
21
  readonly: { type: Boolean, required: false },
22
22
  disabled: { type: Boolean, required: false }
23
23
  });
@@ -13,12 +13,12 @@ const { classes, icon, ...props } = defineProps({
13
13
  label: { type: String, required: false },
14
14
  required: { type: Boolean, required: false },
15
15
  id: { type: [String, null], required: false },
16
- radius: { type: String, required: false },
17
- size: { type: String, required: false },
16
+ radius: { type: [String, Number, Object], required: false },
17
+ size: { type: [String, Object], required: false },
18
18
  variant: { type: String, required: false },
19
19
  resize: { type: void 0, required: false },
20
- leftSectionPE: { type: null, required: false },
21
- rightSectionPE: { type: null, required: false },
20
+ leftSectionPE: { type: void 0, required: false },
21
+ rightSectionPE: { type: void 0, required: false },
22
22
  readonly: { type: Boolean, required: false },
23
23
  disabled: { type: Boolean, required: false }
24
24
  });
@@ -14,12 +14,12 @@ const { classes, ...props } = defineProps({
14
14
  label: { type: String, required: false },
15
15
  required: { type: Boolean, required: false },
16
16
  id: { type: [String, null], required: false },
17
- radius: { type: String, required: false },
18
- size: { type: String, required: false },
17
+ radius: { type: [String, Number, Object], required: false },
18
+ size: { type: [String, Object], required: false },
19
19
  variant: { type: String, required: false },
20
20
  resize: { type: void 0, required: false },
21
- leftSectionPE: { type: null, required: false },
22
- rightSectionPE: { type: null, required: false },
21
+ leftSectionPE: { type: void 0, required: false },
22
+ rightSectionPE: { type: void 0, required: false },
23
23
  readonly: { type: Boolean, required: false },
24
24
  disabled: { type: Boolean, required: false }
25
25
  });
@@ -79,25 +79,6 @@ defineExpose({
79
79
  </InputWrapper>
80
80
  </template>
81
81
 
82
- <style lang="postcss" module>
83
- .base {
84
- --input-cursor: pointer;
85
- }
86
-
87
- .button {
88
- width: 100%;
89
- min-width: rem(100px);
90
-
91
- font-weight: 400;
92
-
93
- &:where([data-multiline]) {
94
- height: auto;
95
- padding-block: calc(var(--input-padding-inline-end) / 2);
96
- }
97
- }
98
-
99
- .section {
100
- font-size: var(--font-size-lg);
101
- color: var(--color-dimmed);
102
- }
82
+ <style module>
83
+ .base{--input-cursor:pointer}.button{font-weight:400;min-width:rem(100px);width:100%}.button:where([data-multiline]){height:auto;padding-block:calc(var(--input-padding-inline-end)/2)}.section{color:var(--color-dimmed);font-size:var(--font-size-lg)}
103
84
  </style>