nuance-ui 0.2.2 → 0.2.5
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.
- package/LICENSE.md +9 -9
- package/README.md +75 -75
- package/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.vue +22 -22
- package/dist/runtime/components/alert.vue +128 -128
- package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
- package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
- package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
- package/dist/runtime/components/app-shell/app-shell.vue +34 -34
- package/dist/runtime/components/avatar/avatar-group.vue +3 -3
- package/dist/runtime/components/avatar/avatar.vue +14 -14
- package/dist/runtime/components/background-image.vue +18 -18
- package/dist/runtime/components/badge.vue +159 -160
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button-group.vue +3 -3
- package/dist/runtime/components/button/button.vue +37 -37
- package/dist/runtime/components/button/unstyled-button.vue +23 -23
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
- package/dist/runtime/components/card/card-section.vue +3 -3
- package/dist/runtime/components/card/card.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
- package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
- package/dist/runtime/components/checkbox/checkbox.vue +140 -140
- package/dist/runtime/components/chip/chip-group.vue +2 -2
- package/dist/runtime/components/chip/chip.vue +200 -200
- package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
- package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
- package/dist/runtime/components/combobox/combobox-group.vue +21 -21
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
- package/dist/runtime/components/combobox/combobox-option.vue +26 -26
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
- package/dist/runtime/components/combobox/combobox-root.vue +3 -3
- package/dist/runtime/components/combobox/combobox-target.vue +3 -3
- package/dist/runtime/components/container.vue +8 -8
- package/dist/runtime/components/date-time-picker.vue +65 -65
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
- package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
- package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
- package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
- package/dist/runtime/components/drawer/drawer-header.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue +15 -15
- package/dist/runtime/components/drawer/drawer-title.vue +3 -3
- package/dist/runtime/components/files/file-upload-button.vue +12 -12
- package/dist/runtime/components/files/file-upload-icon.vue +1 -1
- package/dist/runtime/components/input/date-picker.vue +85 -85
- package/dist/runtime/components/input/email-input.vue +21 -21
- package/dist/runtime/components/input/number-input.vue +132 -132
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +33 -33
- package/dist/runtime/components/input/ui/button-input.vue +64 -64
- package/dist/runtime/components/input/ui/input-base.vue +283 -283
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-label.vue +4 -4
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/input/ui/spin-input.vue +69 -69
- package/dist/runtime/components/link/link-button.vue +16 -16
- package/dist/runtime/components/link/link.vue +10 -10
- package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
- package/dist/runtime/components/loader/loader.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue +3 -3
- package/dist/runtime/components/modal/modal-header.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue +13 -13
- package/dist/runtime/components/modal/modal-title.vue +3 -3
- package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
- package/dist/runtime/components/nav-link/nav-link.vue +130 -130
- package/dist/runtime/components/paper.vue +33 -33
- package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
- package/dist/runtime/components/popover/popover-target.vue +8 -8
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.vue +3 -3
- package/dist/runtime/components/progress/progress-root.vue +3 -3
- package/dist/runtime/components/progress/progress-section.vue +8 -8
- package/dist/runtime/components/progress/progress.vue +9 -9
- package/dist/runtime/components/renderless/renderless.vue +3 -3
- package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
- package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
- package/dist/runtime/components/select/select.vue +59 -59
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
- package/dist/runtime/components/table/ui/table.vue +295 -295
- package/dist/runtime/components/tabs/tabs-list.vue +10 -10
- package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
- package/dist/runtime/components/tabs/tabs-root.vue +8 -8
- package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +34 -34
- package/dist/runtime/components/time-picker/time-picker.vue +230 -230
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/transition/transition.vue +3 -3
- package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/tree/tree.vue +20 -20
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
- package/dist/runtime/modals/modals-provider.vue +10 -10
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +9 -48
|
@@ -28,295 +28,295 @@ const style = computed(() => ({
|
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<template>
|
|
31
|
-
<Box
|
|
32
|
-
:style
|
|
33
|
-
:class='[$style.root, classes?.root]'
|
|
31
|
+
<Box
|
|
32
|
+
:style
|
|
33
|
+
:class='[$style.root, classes?.root]'
|
|
34
34
|
:mod='[{
|
|
35
35
|
"with-left-section": !!$slots.leftSection,
|
|
36
36
|
"with-right-section": !!$slots.rightSection,
|
|
37
37
|
"variant": api.variant,
|
|
38
38
|
"error": !!api?.error
|
|
39
|
-
}]'
|
|
40
|
-
>
|
|
41
|
-
<span
|
|
42
|
-
v-if='$slots.leftSection'
|
|
43
|
-
:class='[$style.section, classes?.section]'
|
|
44
|
-
data-position='left'
|
|
45
|
-
>
|
|
46
|
-
<slot name='leftSection' />
|
|
47
|
-
</span>
|
|
48
|
-
|
|
49
|
-
<slot :id='api.id' :css='$style.input' />
|
|
50
|
-
|
|
51
|
-
<span
|
|
52
|
-
v-if='$slots.rightSection'
|
|
53
|
-
:class='[$style.section, classes?.section]'
|
|
54
|
-
data-position='right'
|
|
55
|
-
>
|
|
56
|
-
<slot name='rightSection' />
|
|
57
|
-
</span>
|
|
58
|
-
</Box>
|
|
39
|
+
}]'
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
v-if='$slots.leftSection'
|
|
43
|
+
:class='[$style.section, classes?.section]'
|
|
44
|
+
data-position='left'
|
|
45
|
+
>
|
|
46
|
+
<slot name='leftSection' />
|
|
47
|
+
</span>
|
|
48
|
+
|
|
49
|
+
<slot :id='api.id' :css='$style.input' />
|
|
50
|
+
|
|
51
|
+
<span
|
|
52
|
+
v-if='$slots.rightSection'
|
|
53
|
+
:class='[$style.section, classes?.section]'
|
|
54
|
+
data-position='right'
|
|
55
|
+
>
|
|
56
|
+
<slot name='rightSection' />
|
|
57
|
+
</span>
|
|
58
|
+
</Box>
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<style lang="postcss" module>
|
|
62
|
-
.root {
|
|
63
|
-
--input-height-xs: rem(30px);
|
|
64
|
-
--input-height-sm: rem(36px);
|
|
65
|
-
--input-height-md: rem(42px);
|
|
66
|
-
--input-height-lg: rem(50px);
|
|
67
|
-
--input-height-xl: rem(60px);
|
|
68
|
-
|
|
69
|
-
--input-padding-y-xs: rem(5px);
|
|
70
|
-
--input-padding-y-sm: rem(6px);
|
|
71
|
-
--input-padding-y-md: rem(8px);
|
|
72
|
-
--input-padding-y-lg: rem(10px);
|
|
73
|
-
--input-padding-y-xl: rem(13px);
|
|
74
|
-
|
|
75
|
-
--input-height: var(--input-height-sm);
|
|
76
|
-
--input-radius: var(--radius-default);
|
|
77
|
-
|
|
78
|
-
--input-cursor: text;
|
|
79
|
-
--input-text-align: left;
|
|
80
|
-
--input-line-height: calc(var(--input-height) - rem(2px));
|
|
81
|
-
--input-padding: calc(var(--input-height) / 3);
|
|
82
|
-
--input-padding-inline-start: var(--input-padding);
|
|
83
|
-
--input-padding-inline-end: var(--input-padding);
|
|
84
|
-
--input-placeholder-color: var(--color-placeholder);
|
|
85
|
-
--input-color: var(--color-text);
|
|
86
|
-
|
|
87
|
-
--input-left-section-width: calc(var(--input-height) - rem(2px));
|
|
88
|
-
--input-right-section-width: calc(var(--input-height) - rem(2px));
|
|
89
|
-
--input-left-section-pointer-events: none;
|
|
90
|
-
--input-right-section-pointer-events: none;
|
|
91
|
-
--input-left-section-size: var(--input-left-section-width);
|
|
92
|
-
--input-right-section-size: var(--input-right-section-width);
|
|
93
|
-
|
|
94
|
-
--input-fz: var(--font-size-sm);
|
|
95
|
-
--input-size: var(--input-height);
|
|
96
|
-
--input-resize: none;
|
|
97
|
-
|
|
98
|
-
--section-y: 1px;
|
|
99
|
-
--left-section-start: 1px;
|
|
100
|
-
--left-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
101
|
-
|
|
102
|
-
--right-section-end: 1px;
|
|
103
|
-
--right-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
104
|
-
|
|
105
|
-
position: relative;
|
|
106
|
-
|
|
107
|
-
&[data-variant='unstyled'] {
|
|
108
|
-
--input-padding: 0;
|
|
109
|
-
--input-padding-y: 0;
|
|
110
|
-
--input-padding-inline-start: 0;
|
|
111
|
-
--input-padding-inline-end: 0;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&[data-pointer] {
|
|
115
|
-
--input-cursor: pointer;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&[data-multiline] {
|
|
119
|
-
--input-padding-y-xs: 4.5px;
|
|
120
|
-
--input-padding-y-sm: 5.5px;
|
|
121
|
-
--input-padding-y-md: 7px;
|
|
122
|
-
--input-padding-y-lg: 9.5px;
|
|
123
|
-
--input-padding-y-xl: 13px;
|
|
124
|
-
|
|
125
|
-
--input-size: auto;
|
|
126
|
-
--input-line-height: var(--line-height);
|
|
127
|
-
--input-padding-y: var(--input-padding-y-sm);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&[data-with-left-section] {
|
|
131
|
-
--input-padding-inline-start: var(--input-left-section-size);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&[data-with-right-section] {
|
|
135
|
-
--input-padding-inline-end: var(--input-right-section-size);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&[data-error] {
|
|
139
|
-
--input-color: var(--color-error);
|
|
140
|
-
--input-placeholder-color: var(--color-error);
|
|
141
|
-
--input-section-color: var(--color-error);
|
|
142
|
-
|
|
143
|
-
--input-bd: var(--color-error);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
@mixin where-light {
|
|
147
|
-
--input-disabled-bg: var(--color-gray-1);
|
|
148
|
-
--input-disabled-color: var(--color-gray-6);
|
|
149
|
-
|
|
150
|
-
&[data-variant='default'] {
|
|
151
|
-
--input-bd: var(--color-gray-4);
|
|
152
|
-
--input-bg: var(--color-white);
|
|
153
|
-
--input-bd-focus: var(--color-primary-filled);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&[data-variant='filled'] {
|
|
157
|
-
--input-bd: transparent;
|
|
158
|
-
--input-bg: var(--color-gray-1);
|
|
159
|
-
--input-bd-focus: var(--color-primary-filled);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&[data-variant='unstyled'] {
|
|
163
|
-
--input-bd: transparent;
|
|
164
|
-
--input-bg: transparent;
|
|
165
|
-
--input-bd-focus: transparent;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@mixin where-dark {
|
|
170
|
-
--input-disabled-bg: var(--color-dark-6);
|
|
171
|
-
--input-disabled-color: var(--color-dark-2);
|
|
172
|
-
|
|
173
|
-
&[data-variant='default'] {
|
|
174
|
-
--input-bd: var(--color-dark-4);
|
|
175
|
-
--input-bg: var(--color-dark-6);
|
|
176
|
-
--input-bd-focus: var(--color-primary-filled);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&[data-variant='filled'] {
|
|
180
|
-
--input-bd: transparent;
|
|
181
|
-
--input-bg: var(--color-dark-5);
|
|
182
|
-
--input-bd-focus: var(--color-primary-filled);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&[data-variant='unstyled'] {
|
|
186
|
-
--input-bd: transparent;
|
|
187
|
-
--input-bg: transparent;
|
|
188
|
-
--input-bd-focus: transparent;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@mixin where-rtl {
|
|
193
|
-
--input-text-align: right;
|
|
194
|
-
--left-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
195
|
-
--right-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.input {
|
|
200
|
-
cursor: var(--input-cursor);
|
|
201
|
-
resize: var(--input-resize, none);
|
|
202
|
-
|
|
203
|
-
overflow: var(--input-overflow);
|
|
204
|
-
display: block;
|
|
205
|
-
|
|
206
|
-
width: 100%;
|
|
207
|
-
height: var(--input-size);
|
|
208
|
-
min-height: var(--input-height);
|
|
209
|
-
padding-top: var(--input-padding-y, 0rem);
|
|
210
|
-
padding-bottom: var(--input-padding-y, 0rem);
|
|
211
|
-
padding-inline-start: var(--input-padding-inline-start);
|
|
212
|
-
padding-inline-end: var(--input-padding-inline-end);
|
|
213
|
-
border: rem(1px) solid var(--input-bd);
|
|
214
|
-
border-radius: var(--input-radius);
|
|
215
|
-
|
|
216
|
-
font-family: var(--font-family), serif;
|
|
217
|
-
font-size: var(--input-fz);
|
|
218
|
-
line-height: var(--input-line-height);
|
|
219
|
-
color: var(--input-color);
|
|
220
|
-
|
|
221
|
-
text-align: var(--input-text-align);
|
|
222
|
-
|
|
223
|
-
appearance: none;
|
|
224
|
-
background-color: var(--input-bg);
|
|
225
|
-
|
|
226
|
-
transition: border-color 100ms ease;
|
|
227
|
-
-webkit-tap-highlight-color: transparent;
|
|
228
|
-
|
|
229
|
-
/* Used as data attribute in Textarea component, does not have associated prop on the Input component */
|
|
230
|
-
|
|
231
|
-
&[data-no-overflow] {
|
|
232
|
-
--input-overflow: hidden;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&:focus,
|
|
236
|
-
&:focus-within {
|
|
237
|
-
--input-bd: var(--input-bd-focus);
|
|
238
|
-
|
|
239
|
-
outline: none;
|
|
240
|
-
|
|
241
|
-
[data-error] & {
|
|
242
|
-
--input-bd: var(--color-error);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
&::placeholder {
|
|
247
|
-
color: var(--input-placeholder-color);
|
|
248
|
-
|
|
249
|
-
opacity: 1;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
&::-webkit-inner-spin-button,
|
|
253
|
-
&::-webkit-outer-spin-button,
|
|
254
|
-
&::-webkit-search-decoration,
|
|
255
|
-
&::-webkit-search-cancel-button,
|
|
256
|
-
&::-webkit-search-results-button,
|
|
257
|
-
&::-webkit-search-results-decoration {
|
|
258
|
-
appearance: none;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
&[type='number'] {
|
|
262
|
-
-moz-appearance: textfield;
|
|
263
|
-
appearance: textfield;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&:disabled,
|
|
267
|
-
&[data-disabled] {
|
|
268
|
-
cursor: not-allowed;
|
|
269
|
-
|
|
270
|
-
color: var(--input-disabled-color);
|
|
271
|
-
|
|
272
|
-
opacity: 0.6;
|
|
273
|
-
background-color: var(--input-disabled-bg);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Required to be a separate selector to work in Firefox, can be merged with &:disabled once :has is supported */
|
|
277
|
-
|
|
278
|
-
&:has(input:disabled) {
|
|
279
|
-
cursor: not-allowed;
|
|
280
|
-
|
|
281
|
-
color: var(--input-disabled-color);
|
|
282
|
-
|
|
283
|
-
opacity: .6;
|
|
284
|
-
background-color: var(--input-disabled-bg);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.section {
|
|
289
|
-
pointer-events: var(--section-pointer-events);
|
|
290
|
-
|
|
291
|
-
position: absolute;
|
|
292
|
-
z-index: 1;
|
|
293
|
-
top: var(--section-y);
|
|
294
|
-
bottom: var(--section-y);
|
|
295
|
-
inset-inline-start: var(--section-start);
|
|
296
|
-
inset-inline-end: var(--section-end);
|
|
297
|
-
|
|
298
|
-
display: flex;
|
|
299
|
-
align-items: center;
|
|
300
|
-
justify-content: center;
|
|
301
|
-
|
|
302
|
-
width: var(--section-size);
|
|
303
|
-
|
|
304
|
-
border-radius: var(--section-border-radius);
|
|
305
|
-
|
|
306
|
-
color: var(--input-section-color, var(--color-dimmed));
|
|
307
|
-
|
|
308
|
-
&[data-position='right'] {
|
|
309
|
-
--section-pointer-events: var(--input-right-section-pointer-events);
|
|
310
|
-
--section-end: var(--right-section-end);
|
|
311
|
-
--section-size: var(--input-right-section-size);
|
|
312
|
-
--section-border-radius: var(--right-section-border-radius);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
&[data-position='left'] {
|
|
316
|
-
--section-pointer-events: var(--input-left-section-pointer-events);
|
|
317
|
-
--section-start: var(--left-section-start);
|
|
318
|
-
--section-size: var(--input-left-section-size);
|
|
319
|
-
--section-border-radius: var(--left-section-border-radius);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
62
|
+
.root {
|
|
63
|
+
--input-height-xs: rem(30px);
|
|
64
|
+
--input-height-sm: rem(36px);
|
|
65
|
+
--input-height-md: rem(42px);
|
|
66
|
+
--input-height-lg: rem(50px);
|
|
67
|
+
--input-height-xl: rem(60px);
|
|
68
|
+
|
|
69
|
+
--input-padding-y-xs: rem(5px);
|
|
70
|
+
--input-padding-y-sm: rem(6px);
|
|
71
|
+
--input-padding-y-md: rem(8px);
|
|
72
|
+
--input-padding-y-lg: rem(10px);
|
|
73
|
+
--input-padding-y-xl: rem(13px);
|
|
74
|
+
|
|
75
|
+
--input-height: var(--input-height-sm);
|
|
76
|
+
--input-radius: var(--radius-default);
|
|
77
|
+
|
|
78
|
+
--input-cursor: text;
|
|
79
|
+
--input-text-align: left;
|
|
80
|
+
--input-line-height: calc(var(--input-height) - rem(2px));
|
|
81
|
+
--input-padding: calc(var(--input-height) / 3);
|
|
82
|
+
--input-padding-inline-start: var(--input-padding);
|
|
83
|
+
--input-padding-inline-end: var(--input-padding);
|
|
84
|
+
--input-placeholder-color: var(--color-placeholder);
|
|
85
|
+
--input-color: var(--color-text);
|
|
86
|
+
|
|
87
|
+
--input-left-section-width: calc(var(--input-height) - rem(2px));
|
|
88
|
+
--input-right-section-width: calc(var(--input-height) - rem(2px));
|
|
89
|
+
--input-left-section-pointer-events: none;
|
|
90
|
+
--input-right-section-pointer-events: none;
|
|
91
|
+
--input-left-section-size: var(--input-left-section-width);
|
|
92
|
+
--input-right-section-size: var(--input-right-section-width);
|
|
93
|
+
|
|
94
|
+
--input-fz: var(--font-size-sm);
|
|
95
|
+
--input-size: var(--input-height);
|
|
96
|
+
--input-resize: none;
|
|
97
|
+
|
|
98
|
+
--section-y: 1px;
|
|
99
|
+
--left-section-start: 1px;
|
|
100
|
+
--left-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
101
|
+
|
|
102
|
+
--right-section-end: 1px;
|
|
103
|
+
--right-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
104
|
+
|
|
105
|
+
position: relative;
|
|
106
|
+
|
|
107
|
+
&[data-variant='unstyled'] {
|
|
108
|
+
--input-padding: 0;
|
|
109
|
+
--input-padding-y: 0;
|
|
110
|
+
--input-padding-inline-start: 0;
|
|
111
|
+
--input-padding-inline-end: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-pointer] {
|
|
115
|
+
--input-cursor: pointer;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&[data-multiline] {
|
|
119
|
+
--input-padding-y-xs: 4.5px;
|
|
120
|
+
--input-padding-y-sm: 5.5px;
|
|
121
|
+
--input-padding-y-md: 7px;
|
|
122
|
+
--input-padding-y-lg: 9.5px;
|
|
123
|
+
--input-padding-y-xl: 13px;
|
|
124
|
+
|
|
125
|
+
--input-size: auto;
|
|
126
|
+
--input-line-height: var(--line-height);
|
|
127
|
+
--input-padding-y: var(--input-padding-y-sm);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&[data-with-left-section] {
|
|
131
|
+
--input-padding-inline-start: var(--input-left-section-size);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&[data-with-right-section] {
|
|
135
|
+
--input-padding-inline-end: var(--input-right-section-size);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-error] {
|
|
139
|
+
--input-color: var(--color-error);
|
|
140
|
+
--input-placeholder-color: var(--color-error);
|
|
141
|
+
--input-section-color: var(--color-error);
|
|
142
|
+
|
|
143
|
+
--input-bd: var(--color-error);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@mixin where-light {
|
|
147
|
+
--input-disabled-bg: var(--color-gray-1);
|
|
148
|
+
--input-disabled-color: var(--color-gray-6);
|
|
149
|
+
|
|
150
|
+
&[data-variant='default'] {
|
|
151
|
+
--input-bd: var(--color-gray-4);
|
|
152
|
+
--input-bg: var(--color-white);
|
|
153
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&[data-variant='filled'] {
|
|
157
|
+
--input-bd: transparent;
|
|
158
|
+
--input-bg: var(--color-gray-1);
|
|
159
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&[data-variant='unstyled'] {
|
|
163
|
+
--input-bd: transparent;
|
|
164
|
+
--input-bg: transparent;
|
|
165
|
+
--input-bd-focus: transparent;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@mixin where-dark {
|
|
170
|
+
--input-disabled-bg: var(--color-dark-6);
|
|
171
|
+
--input-disabled-color: var(--color-dark-2);
|
|
172
|
+
|
|
173
|
+
&[data-variant='default'] {
|
|
174
|
+
--input-bd: var(--color-dark-4);
|
|
175
|
+
--input-bg: var(--color-dark-6);
|
|
176
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&[data-variant='filled'] {
|
|
180
|
+
--input-bd: transparent;
|
|
181
|
+
--input-bg: var(--color-dark-5);
|
|
182
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&[data-variant='unstyled'] {
|
|
186
|
+
--input-bd: transparent;
|
|
187
|
+
--input-bg: transparent;
|
|
188
|
+
--input-bd-focus: transparent;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@mixin where-rtl {
|
|
193
|
+
--input-text-align: right;
|
|
194
|
+
--left-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
195
|
+
--right-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.input {
|
|
200
|
+
cursor: var(--input-cursor);
|
|
201
|
+
resize: var(--input-resize, none);
|
|
202
|
+
|
|
203
|
+
overflow: var(--input-overflow);
|
|
204
|
+
display: block;
|
|
205
|
+
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: var(--input-size);
|
|
208
|
+
min-height: var(--input-height);
|
|
209
|
+
padding-top: var(--input-padding-y, 0rem);
|
|
210
|
+
padding-bottom: var(--input-padding-y, 0rem);
|
|
211
|
+
padding-inline-start: var(--input-padding-inline-start);
|
|
212
|
+
padding-inline-end: var(--input-padding-inline-end);
|
|
213
|
+
border: rem(1px) solid var(--input-bd);
|
|
214
|
+
border-radius: var(--input-radius);
|
|
215
|
+
|
|
216
|
+
font-family: var(--font-family), serif;
|
|
217
|
+
font-size: var(--input-fz);
|
|
218
|
+
line-height: var(--input-line-height);
|
|
219
|
+
color: var(--input-color);
|
|
220
|
+
|
|
221
|
+
text-align: var(--input-text-align);
|
|
222
|
+
|
|
223
|
+
appearance: none;
|
|
224
|
+
background-color: var(--input-bg);
|
|
225
|
+
|
|
226
|
+
transition: border-color 100ms ease;
|
|
227
|
+
-webkit-tap-highlight-color: transparent;
|
|
228
|
+
|
|
229
|
+
/* Used as data attribute in Textarea component, does not have associated prop on the Input component */
|
|
230
|
+
|
|
231
|
+
&[data-no-overflow] {
|
|
232
|
+
--input-overflow: hidden;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:focus,
|
|
236
|
+
&:focus-within {
|
|
237
|
+
--input-bd: var(--input-bd-focus);
|
|
238
|
+
|
|
239
|
+
outline: none;
|
|
240
|
+
|
|
241
|
+
[data-error] & {
|
|
242
|
+
--input-bd: var(--color-error);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&::placeholder {
|
|
247
|
+
color: var(--input-placeholder-color);
|
|
248
|
+
|
|
249
|
+
opacity: 1;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&::-webkit-inner-spin-button,
|
|
253
|
+
&::-webkit-outer-spin-button,
|
|
254
|
+
&::-webkit-search-decoration,
|
|
255
|
+
&::-webkit-search-cancel-button,
|
|
256
|
+
&::-webkit-search-results-button,
|
|
257
|
+
&::-webkit-search-results-decoration {
|
|
258
|
+
appearance: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&[type='number'] {
|
|
262
|
+
-moz-appearance: textfield;
|
|
263
|
+
appearance: textfield;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&:disabled,
|
|
267
|
+
&[data-disabled] {
|
|
268
|
+
cursor: not-allowed;
|
|
269
|
+
|
|
270
|
+
color: var(--input-disabled-color);
|
|
271
|
+
|
|
272
|
+
opacity: 0.6;
|
|
273
|
+
background-color: var(--input-disabled-bg);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Required to be a separate selector to work in Firefox, can be merged with &:disabled once :has is supported */
|
|
277
|
+
|
|
278
|
+
&:has(input:disabled) {
|
|
279
|
+
cursor: not-allowed;
|
|
280
|
+
|
|
281
|
+
color: var(--input-disabled-color);
|
|
282
|
+
|
|
283
|
+
opacity: .6;
|
|
284
|
+
background-color: var(--input-disabled-bg);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.section {
|
|
289
|
+
pointer-events: var(--section-pointer-events);
|
|
290
|
+
|
|
291
|
+
position: absolute;
|
|
292
|
+
z-index: 1;
|
|
293
|
+
top: var(--section-y);
|
|
294
|
+
bottom: var(--section-y);
|
|
295
|
+
inset-inline-start: var(--section-start);
|
|
296
|
+
inset-inline-end: var(--section-end);
|
|
297
|
+
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
justify-content: center;
|
|
301
|
+
|
|
302
|
+
width: var(--section-size);
|
|
303
|
+
|
|
304
|
+
border-radius: var(--section-border-radius);
|
|
305
|
+
|
|
306
|
+
color: var(--input-section-color, var(--color-dimmed));
|
|
307
|
+
|
|
308
|
+
&[data-position='right'] {
|
|
309
|
+
--section-pointer-events: var(--input-right-section-pointer-events);
|
|
310
|
+
--section-end: var(--right-section-end);
|
|
311
|
+
--section-size: var(--input-right-section-size);
|
|
312
|
+
--section-border-radius: var(--right-section-border-radius);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&[data-position='left'] {
|
|
316
|
+
--section-pointer-events: var(--input-left-section-pointer-events);
|
|
317
|
+
--section-start: var(--left-section-start);
|
|
318
|
+
--section-size: var(--input-left-section-size);
|
|
319
|
+
--section-border-radius: var(--left-section-border-radius);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
322
|
</style>
|