nuance-ui 0.1.62 → 0.2.0

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 (130) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +11 -6
  5. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
  6. package/dist/runtime/components/action-icon/action-icon.vue +22 -22
  7. package/dist/runtime/components/alert.vue +128 -128
  8. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  9. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  10. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  11. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  12. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  13. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  14. package/dist/runtime/components/avatar/avatar-group.vue +3 -3
  15. package/dist/runtime/components/avatar/avatar.vue +14 -14
  16. package/dist/runtime/components/background-image.vue +18 -18
  17. package/dist/runtime/components/badge.vue +160 -159
  18. package/dist/runtime/components/box.vue +3 -3
  19. package/dist/runtime/components/breadcrumbs.vue +78 -78
  20. package/dist/runtime/components/button/button-group.vue +3 -3
  21. package/dist/runtime/components/button/button.vue +37 -37
  22. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  23. package/dist/runtime/components/calendar/calendar.vue +60 -60
  24. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  25. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  26. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  27. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +41 -37
  28. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  29. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +41 -41
  30. package/dist/runtime/components/card/card-section.vue +3 -3
  31. package/dist/runtime/components/card/card.vue +3 -3
  32. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  33. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  34. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  35. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  36. package/dist/runtime/components/chip/chip-group.vue +2 -2
  37. package/dist/runtime/components/chip/chip.vue +200 -200
  38. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  39. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  40. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  41. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  42. package/dist/runtime/components/combobox/combobox-option.vue +26 -26
  43. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
  44. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  45. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  46. package/dist/runtime/components/container.vue +8 -8
  47. package/dist/runtime/components/date-time-picker.vue +65 -65
  48. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  49. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  50. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  51. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  52. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  53. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  54. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  55. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  56. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  57. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  58. package/dist/runtime/components/input/date-picker.vue +85 -85
  59. package/dist/runtime/components/input/email-input.vue +21 -21
  60. package/dist/runtime/components/input/number-input.vue +132 -132
  61. package/dist/runtime/components/input/password-input.vue +28 -28
  62. package/dist/runtime/components/input/text-input.vue +33 -33
  63. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  64. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  65. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  66. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  67. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  68. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  69. package/dist/runtime/components/link/link-button.vue +16 -16
  70. package/dist/runtime/components/link/link.vue +10 -10
  71. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  72. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  73. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  74. package/dist/runtime/components/loader/loader.vue +1 -1
  75. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  76. package/dist/runtime/components/modal/modal-header.vue +3 -3
  77. package/dist/runtime/components/modal/modal-root.vue +13 -13
  78. package/dist/runtime/components/modal/modal-title.vue +3 -3
  79. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  80. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  81. package/dist/runtime/components/paper.vue +33 -33
  82. package/dist/runtime/components/popover/popover-dropdown.vue +70 -69
  83. package/dist/runtime/components/popover/popover-target.vue +8 -8
  84. package/dist/runtime/components/popover/popover.vue +1 -1
  85. package/dist/runtime/components/progress/progress-label.vue +3 -3
  86. package/dist/runtime/components/progress/progress-root.vue +3 -3
  87. package/dist/runtime/components/progress/progress-section.vue +8 -8
  88. package/dist/runtime/components/progress/progress.vue +9 -9
  89. package/dist/runtime/components/renderless/renderless.vue +3 -3
  90. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  91. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  92. package/dist/runtime/components/select/select.vue +59 -59
  93. package/dist/runtime/components/table/table.d.ts +30 -30
  94. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  95. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  96. package/dist/runtime/components/table/ui/table.vue +295 -295
  97. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  98. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  99. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  100. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  101. package/dist/runtime/components/text.vue +67 -67
  102. package/dist/runtime/components/textarea.vue +34 -34
  103. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  104. package/dist/runtime/components/title.vue +14 -14
  105. package/dist/runtime/components/transition/transition.vue +3 -3
  106. package/dist/runtime/components/tree/_ui/tree-item.vue +129 -128
  107. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  108. package/dist/runtime/components/tree/tree.vue +20 -20
  109. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  110. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  111. package/dist/runtime/helpers/date/create-months.js +1 -1
  112. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  113. package/dist/runtime/modals/modals-provider.vue +10 -10
  114. package/dist/runtime/utils/color-functions/get-gradient.js +1 -1
  115. package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.js +1 -1
  116. package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.js → create-variant-color-resolver.js} +3 -3
  117. package/dist/runtime/utils/{get-size/get-size.js → get-size.js} +2 -2
  118. package/dist/runtime/utils/index.d.ts +3 -5
  119. package/dist/runtime/utils/index.js +3 -5
  120. package/package.json +2 -2
  121. package/dist/runtime/server/tsconfig.json +0 -3
  122. package/dist/runtime/utils/chunk.d.ts +0 -12
  123. package/dist/runtime/utils/chunk.js +0 -6
  124. package/dist/runtime/utils/get-safe-id.d.ts +0 -1
  125. package/dist/runtime/utils/get-safe-id.js +0 -8
  126. /package/dist/runtime/utils/{get-color-var.d.ts → color-functions/get-color-var.d.ts} +0 -0
  127. /package/dist/runtime/utils/{get-color-var.js → color-functions/get-color-var.js} +0 -0
  128. /package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.d.ts +0 -0
  129. /package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.d.ts → create-variant-color-resolver.d.ts} +0 -0
  130. /package/dist/runtime/utils/{get-size/get-size.d.ts → get-size.d.ts} +0 -0
@@ -80,240 +80,240 @@ const isClearable = computed(() => clearable && !readonly && !disabled && (hours
80
80
  </script>
81
81
 
82
82
  <template>
83
- <InputWrapper v-bind='props' :right-section-p-e :class='classes?.root'>
84
- <InputBase
83
+ <InputWrapper v-bind='props' :right-section-p-e :class='classes?.root'>
84
+ <InputBase
85
85
  :classes='{
86
86
  root: classes?.input,
87
87
  section: classes?.section
88
- }'
89
- @click='!disabled && !readonly && focus("hours")'
90
- >
91
- <template #default='{ id, css }'>
92
- <div :class='css'>
93
- <div :class='$style.root' dir='ltr'>
94
- <div :class='$style.group'>
95
- <!-- Hours -->
96
- <SpinInput
97
- ref='hoursRef'
98
- v-model='hours'
99
- :min='0'
100
- :max='23'
101
- :step='typeof step === "object" ? step?.hours ?? 1 : step'
102
- :placeholder='typeof placeholder === "object" ? placeholder?.hours : placeholder'
103
- :class='classes?.field'
104
- :aria-label='hoursInputLabel'
105
- :readonly
106
- :disabled
107
- @next='focus("minutes")'
108
- />
109
- <span>:</span>
110
- <!-- Minutes -->
111
- <SpinInput
112
- ref='minutesRef'
113
- v-model='minutes'
114
- :min='0'
115
- :max='59'
116
- :step='typeof step === "object" ? step?.minutes ?? 1 : step'
117
- :placeholder='typeof placeholder === "object" ? placeholder?.minutes : placeholder'
118
- :class='classes?.field'
119
- :aria-label='minutesInputLabel'
120
- :readonly
121
- :disabled
122
- @next='focus("seconds")'
123
- @prev='focus("hours")'
124
- />
125
- <template v-if='withSeconds'>
126
- <span>:</span>
127
- <!-- Seconds -->
128
- <SpinInput
129
- v-if='withSeconds'
130
- ref='secondsRef'
131
- v-model='seconds'
132
- :min='0'
133
- :max='59'
134
- :step='typeof step === "object" ? step?.seconds ?? 1 : step'
135
- :placeholder='typeof placeholder === "object" ? placeholder?.seconds : placeholder'
136
- :aria-label='secondsInputLabel'
137
- :class='classes?.field'
138
- :readonly
139
- :disabled
140
- @prev='focus("minutes")'
141
- />
142
- </template>
143
- </div>
144
- </div>
145
- </div>
146
- <input
147
- :id
148
- v-model='model'
149
- :name
150
- type='hidden'
151
- :required
152
- :disabled
153
- :readonly
154
- >
155
- </template>
156
-
157
- <template #leftSection>
158
- <slot name='leftSection'>
159
- <Icon name='gravity-ui:clock' />
160
- </slot>
161
- </template>
162
-
163
- <template
164
- v-if='!$slots.rightSection && isClearable || !!$slots.rightSection'
165
- #rightSection
166
- >
167
- <slot name='rightSection'>
168
- <ActionIcon
169
- icon='gravity-ui:xmark'
170
- variant='subtle'
171
- color='gray'
172
- size='sm'
173
- @click.stop='clear'
174
- />
175
- </slot>
176
- </template>
177
- </InputBase>
178
-
179
- <template v-if='$slots.label' #label>
180
- <slot name='label' />
181
- </template>
182
- <template v-if='$slots.error' #error>
183
- <slot name='error' />
184
- </template>
185
- <template v-if='$slots.description' #description>
186
- <slot name='description' />
187
- </template>
188
- </InputWrapper>
88
+ }'
89
+ @click='!disabled && !readonly && focus("hours")'
90
+ >
91
+ <template #default='{ id, css }'>
92
+ <div :class='css'>
93
+ <div :class='$style.root' dir='ltr'>
94
+ <div :class='$style.group'>
95
+ <!-- Hours -->
96
+ <SpinInput
97
+ ref='hoursRef'
98
+ v-model='hours'
99
+ :min='0'
100
+ :max='23'
101
+ :step='typeof step === "object" ? step?.hours ?? 1 : step'
102
+ :placeholder='typeof placeholder === "object" ? placeholder?.hours : placeholder'
103
+ :class='classes?.field'
104
+ :aria-label='hoursInputLabel'
105
+ :readonly
106
+ :disabled
107
+ @next='focus("minutes")'
108
+ />
109
+ <span>:</span>
110
+ <!-- Minutes -->
111
+ <SpinInput
112
+ ref='minutesRef'
113
+ v-model='minutes'
114
+ :min='0'
115
+ :max='59'
116
+ :step='typeof step === "object" ? step?.minutes ?? 1 : step'
117
+ :placeholder='typeof placeholder === "object" ? placeholder?.minutes : placeholder'
118
+ :class='classes?.field'
119
+ :aria-label='minutesInputLabel'
120
+ :readonly
121
+ :disabled
122
+ @next='focus("seconds")'
123
+ @prev='focus("hours")'
124
+ />
125
+ <template v-if='withSeconds'>
126
+ <span>:</span>
127
+ <!-- Seconds -->
128
+ <SpinInput
129
+ v-if='withSeconds'
130
+ ref='secondsRef'
131
+ v-model='seconds'
132
+ :min='0'
133
+ :max='59'
134
+ :step='typeof step === "object" ? step?.seconds ?? 1 : step'
135
+ :placeholder='typeof placeholder === "object" ? placeholder?.seconds : placeholder'
136
+ :aria-label='secondsInputLabel'
137
+ :class='classes?.field'
138
+ :readonly
139
+ :disabled
140
+ @prev='focus("minutes")'
141
+ />
142
+ </template>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ <input
147
+ :id
148
+ v-model='model'
149
+ :name
150
+ type='hidden'
151
+ :required
152
+ :disabled
153
+ :readonly
154
+ >
155
+ </template>
156
+
157
+ <template #leftSection>
158
+ <slot name='leftSection'>
159
+ <Icon name='gravity-ui:clock' />
160
+ </slot>
161
+ </template>
162
+
163
+ <template
164
+ v-if='!$slots.rightSection && isClearable || !!$slots.rightSection'
165
+ #rightSection
166
+ >
167
+ <slot name='rightSection'>
168
+ <ActionIcon
169
+ icon='gravity-ui:xmark'
170
+ variant='subtle'
171
+ color='gray'
172
+ size='sm'
173
+ @click.stop='clear'
174
+ />
175
+ </slot>
176
+ </template>
177
+ </InputBase>
178
+
179
+ <template v-if='$slots.label' #label>
180
+ <slot name='label' />
181
+ </template>
182
+ <template v-if='$slots.error' #error>
183
+ <slot name='error' />
184
+ </template>
185
+ <template v-if='$slots.description' #description>
186
+ <slot name='description' />
187
+ </template>
188
+ </InputWrapper>
189
189
  </template>
190
190
 
191
191
  <style lang="postcss" module>
192
- .root {
193
- overflow: hidden;
194
- display: flex;
195
- align-items: center;
196
-
197
- height: 100%;
198
-
199
- @mixin where-rtl {
200
- flex-direction: row-reverse;
201
- }
202
- }
203
-
204
- .group {
205
- display: flex;
206
- align-items: center;
207
-
208
- height: calc(var(--input-height) - rem(15px));
209
- }
210
-
211
- .controls {
212
- display: flex;
213
- flex-direction: column;
214
- }
215
-
216
- .controlsGroup {
217
- display: flex;
218
- gap: .25rem;
219
- }
220
-
221
- .dropdown {
222
- padding: .25rem;
223
- }
224
-
225
- .control {
226
- width: max-content;
227
- min-width: 2.5em;
228
- height: 2em;
229
- border-radius: var(--radius-default);
230
-
231
- font-size: var(--control-font-size, var(--font-size-sm));
232
- text-align: center;
233
-
234
- &:where([data-active]) {
235
- color: var(--color-white);
236
-
237
- background-color: var(--color-primary-filled);
238
- }
239
-
240
- @mixin hover {
241
- &:where(:not([data-active])) {
242
- color: var(--color-bright);
243
-
244
- @mixin where-dark {
245
- background-color: var(--color-dark-5);
246
- }
247
-
248
- @mixin where-light {
249
- background-color: var(--color-gray-1);
250
- }
251
- }
252
- }
253
- }
254
-
255
- .presetControl {
256
- height: 2em;
257
- padding-inline: 0.5em;
258
- border-radius: var(--radius-default);
259
-
260
- font-size: var(--control-font-size, var(--font-size-sm));
261
- text-align: center;
262
-
263
- &:where([data-active]) {
264
- color: var(--color-white);
265
-
266
- background-color: var(--color-primary-filled);
267
- }
268
-
269
- @mixin hover {
270
- &:where(:not([data-active])) {
271
- color: var(--color-bright);
272
-
273
- @mixin where-dark {
274
- background-color: var(--color-dark-5);
275
- }
276
-
277
- @mixin where-light {
278
- background-color: var(--color-gray-1);
279
- }
280
- }
281
- }
282
- }
283
-
284
- .presetsGroup {
285
- &+& {
286
- margin-top: var(--spacing-sm);
287
- }
288
- }
289
-
290
- .presetsGroupLabel {
291
- display: flex;
292
- align-items: center;
293
-
294
- margin-bottom: .25rem;
295
- padding-inline-start: 7px;
296
-
297
- font-size: calc(var(--control-font-size, var(--font-size-sm)) - 2px);
298
- font-weight: 500;
299
- color: var(--color-dimmed);
300
-
301
- &::after {
302
- content: '';
303
-
304
- flex: 1;
305
-
306
- width: 100%;
307
- height: 1px;
308
- margin-inline-start: var(--spacing-xs);
309
-
310
- @mixin where-light {
311
- background-color: var(--color-gray-2);
312
- }
313
-
314
- @mixin where-dark {
315
- background-color: var(--color-dark-4);
316
- }
317
- }
318
- }
192
+ .root {
193
+ overflow: hidden;
194
+ display: flex;
195
+ align-items: center;
196
+
197
+ height: 100%;
198
+
199
+ @mixin where-rtl {
200
+ flex-direction: row-reverse;
201
+ }
202
+ }
203
+
204
+ .group {
205
+ display: flex;
206
+ align-items: center;
207
+
208
+ height: calc(var(--input-height) - rem(15px));
209
+ }
210
+
211
+ .controls {
212
+ display: flex;
213
+ flex-direction: column;
214
+ }
215
+
216
+ .controlsGroup {
217
+ display: flex;
218
+ gap: .25rem;
219
+ }
220
+
221
+ .dropdown {
222
+ padding: .25rem;
223
+ }
224
+
225
+ .control {
226
+ width: max-content;
227
+ min-width: 2.5em;
228
+ height: 2em;
229
+ border-radius: var(--radius-default);
230
+
231
+ font-size: var(--control-font-size, var(--font-size-sm));
232
+ text-align: center;
233
+
234
+ &:where([data-active]) {
235
+ color: var(--color-white);
236
+
237
+ background-color: var(--color-primary-filled);
238
+ }
239
+
240
+ @mixin hover {
241
+ &:where(:not([data-active])) {
242
+ color: var(--color-bright);
243
+
244
+ @mixin where-dark {
245
+ background-color: var(--color-dark-5);
246
+ }
247
+
248
+ @mixin where-light {
249
+ background-color: var(--color-gray-1);
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ .presetControl {
256
+ height: 2em;
257
+ padding-inline: 0.5em;
258
+ border-radius: var(--radius-default);
259
+
260
+ font-size: var(--control-font-size, var(--font-size-sm));
261
+ text-align: center;
262
+
263
+ &:where([data-active]) {
264
+ color: var(--color-white);
265
+
266
+ background-color: var(--color-primary-filled);
267
+ }
268
+
269
+ @mixin hover {
270
+ &:where(:not([data-active])) {
271
+ color: var(--color-bright);
272
+
273
+ @mixin where-dark {
274
+ background-color: var(--color-dark-5);
275
+ }
276
+
277
+ @mixin where-light {
278
+ background-color: var(--color-gray-1);
279
+ }
280
+ }
281
+ }
282
+ }
283
+
284
+ .presetsGroup {
285
+ &+& {
286
+ margin-top: var(--spacing-sm);
287
+ }
288
+ }
289
+
290
+ .presetsGroupLabel {
291
+ display: flex;
292
+ align-items: center;
293
+
294
+ margin-bottom: .25rem;
295
+ padding-inline-start: 7px;
296
+
297
+ font-size: calc(var(--control-font-size, var(--font-size-sm)) - 2px);
298
+ font-weight: 500;
299
+ color: var(--color-dimmed);
300
+
301
+ &::after {
302
+ content: '';
303
+
304
+ flex: 1;
305
+
306
+ width: 100%;
307
+ height: 1px;
308
+ margin-inline-start: var(--spacing-xs);
309
+
310
+ @mixin where-light {
311
+ background-color: var(--color-gray-2);
312
+ }
313
+
314
+ @mixin where-dark {
315
+ background-color: var(--color-dark-4);
316
+ }
317
+ }
318
+ }
319
319
  </style>
@@ -26,21 +26,21 @@ const style = computed(() => ({ "--title-text-wrap": textWrap }));
26
26
  </script>
27
27
 
28
28
  <template>
29
- <Text
30
- :is='`h${order}`'
31
- v-bind='rest'
32
- :size='size || `h${order}`'
33
- :class='$style.root'
34
- :style
35
- >
36
- <slot />
37
- </Text>
29
+ <Text
30
+ :is='`h${order}`'
31
+ v-bind='rest'
32
+ :size='size || `h${order}`'
33
+ :class='$style.root'
34
+ :style
35
+ >
36
+ <slot />
37
+ </Text>
38
38
  </template>
39
39
 
40
40
  <style module lang="postcss">
41
- .root {
42
- --title-text-wrap: pretty;
43
-
44
- text-wrap: var(--title-text-wrap);
45
- }
41
+ .root {
42
+ --title-text-wrap: pretty;
43
+
44
+ text-wrap: var(--title-text-wrap);
45
+ }
46
46
  </style>
@@ -17,9 +17,9 @@ const style = computed(() => ({
17
17
  </script>
18
18
 
19
19
  <template>
20
- <Transition :class='$style.root' :style :name @after-leave='() => emit("afterLeave")'>
21
- <slot />
22
- </Transition>
20
+ <Transition :class='$style.root' :style :name @after-leave='() => emit("afterLeave")'>
21
+ <slot />
22
+ </Transition>
23
23
  </template>
24
24
 
25
25
  <style module>