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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +11 -10
- package/dist/runtime/components/action-icon/action-icon-section.vue +17 -20
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +11 -10
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +17 -14
- package/dist/runtime/components/action-icon/action-icon.vue +18 -17
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +17 -14
- package/dist/runtime/components/alert.d.vue.ts +8 -6
- package/dist/runtime/components/alert.vue +15 -101
- package/dist/runtime/components/alert.vue.d.ts +8 -6
- package/dist/runtime/components/app-shell/app-shell-aside.vue +2 -28
- package/dist/runtime/components/app-shell/app-shell-footer.vue +2 -27
- package/dist/runtime/components/app-shell/app-shell-header.vue +2 -28
- package/dist/runtime/components/app-shell/app-shell-main.vue +2 -16
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +2 -32
- package/dist/runtime/components/app-shell/app-shell-section.vue +2 -8
- package/dist/runtime/components/app-shell/app-shell.vue +20 -44
- package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.vue +1 -1
- package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar.d.vue.ts +9 -5
- package/dist/runtime/components/avatar/avatar.vue +26 -26
- package/dist/runtime/components/avatar/avatar.vue.d.ts +9 -5
- package/dist/runtime/components/background-image.d.vue.ts +2 -2
- package/dist/runtime/components/background-image.vue +3 -19
- package/dist/runtime/components/background-image.vue.d.ts +2 -2
- package/dist/runtime/components/badge.d.vue.ts +9 -8
- package/dist/runtime/components/badge.vue +18 -154
- package/dist/runtime/components/badge.vue.d.ts +9 -8
- package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
- package/dist/runtime/components/breadcrumbs.vue +2 -48
- package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
- package/dist/runtime/components/button/button.d.vue.ts +21 -26
- package/dist/runtime/components/button/button.module.css +1 -1
- package/dist/runtime/components/button/button.vue +36 -42
- package/dist/runtime/components/button/button.vue.d.ts +21 -26
- package/dist/runtime/components/button/unstyled-button.vue +2 -21
- package/dist/runtime/components/calendar/calendar.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/calendar.vue +3 -10
- package/dist/runtime/components/calendar/calendar.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +3 -114
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +2 -67
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +3 -25
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -34
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +3 -25
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.vue +2 -28
- package/dist/runtime/components/checkbox/checkbox-group.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +5 -4
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +15 -123
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +5 -4
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +5 -7
- package/dist/runtime/components/checkbox/checkbox.vue +30 -136
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +5 -7
- package/dist/runtime/components/chip/chip.d.vue.ts +3 -2
- package/dist/runtime/components/chip/chip.vue +29 -212
- package/dist/runtime/components/chip/chip.vue.d.ts +3 -2
- package/dist/runtime/components/combobox/combobox-dropdown.vue +2 -4
- package/dist/runtime/components/container.d.vue.ts +2 -2
- package/dist/runtime/components/container.vue +1 -1
- package/dist/runtime/components/container.vue.d.ts +2 -2
- package/dist/runtime/components/date-time-picker.vue +6 -10
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -7
- package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +11 -9
- package/dist/runtime/components/dialog/ui/dialog-root.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +11 -9
- package/dist/runtime/components/dialog/ui/dialog-title.vue +2 -2
- package/dist/runtime/components/drawer/drawer-close-button.vue +6 -6
- package/dist/runtime/components/drawer/drawer-root.vue +4 -4
- package/dist/runtime/components/drawer/drawer-title.vue +2 -2
- package/dist/runtime/components/files/file-upload-button.vue +8 -7
- package/dist/runtime/components/files/file-upload-icon.vue +5 -5
- package/dist/runtime/components/input/date-picker.vue +6 -10
- package/dist/runtime/components/input/email-input.vue +4 -4
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +5 -5
- package/dist/runtime/components/input/number-input.vue +6 -84
- package/dist/runtime/components/input/password-input.vue +4 -4
- package/dist/runtime/components/input/text-input.vue +4 -4
- package/dist/runtime/components/input/ui/button-input.vue +6 -25
- package/dist/runtime/components/input/ui/input-base.vue +6 -265
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +2 -2
- package/dist/runtime/components/input/ui/input-inline.vue +3 -82
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +2 -2
- package/dist/runtime/components/input/ui/input-label.d.vue.ts +2 -2
- package/dist/runtime/components/input/ui/input-label.vue +1 -1
- package/dist/runtime/components/input/ui/input-label.vue.d.ts +2 -2
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -1
- package/dist/runtime/components/input/ui/input-wrapper.vue +13 -65
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -1
- package/dist/runtime/components/input/ui/spin-input.vue +2 -53
- package/dist/runtime/components/link/link-button.vue +9 -8
- package/dist/runtime/components/link/link.vue +2 -2
- package/dist/runtime/components/loader/loader.d.vue.ts +7 -7
- package/dist/runtime/components/loader/loader.vue +8 -7
- package/dist/runtime/components/loader/loader.vue.d.ts +7 -7
- package/dist/runtime/components/modal/modal-close-button.vue +6 -6
- package/dist/runtime/components/modal/modal-root.vue +4 -4
- package/dist/runtime/components/modal/modal-title.vue +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.vue +4 -4
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -5
- package/dist/runtime/components/nav-link/nav-link.vue +30 -113
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -5
- package/dist/runtime/components/paper.vue +2 -31
- package/dist/runtime/components/popover/popover-dropdown.vue +2 -54
- package/dist/runtime/components/progress/progress-root.d.vue.ts +3 -3
- package/dist/runtime/components/progress/progress-root.vue +2 -2
- package/dist/runtime/components/progress/progress-root.vue.d.ts +3 -3
- package/dist/runtime/components/progress/progress-section.d.vue.ts +3 -0
- package/dist/runtime/components/progress/progress-section.vue +8 -6
- package/dist/runtime/components/progress/progress-section.vue.d.ts +3 -0
- package/dist/runtime/components/progress/progress.vue +2 -2
- package/dist/runtime/components/select.vue +6 -10
- package/dist/runtime/components/switch/switch-group.vue +3 -3
- package/dist/runtime/components/switch/switch.d.vue.ts +3 -0
- package/dist/runtime/components/switch/switch.vue +15 -205
- package/dist/runtime/components/switch/switch.vue.d.ts +3 -0
- package/dist/runtime/components/table/types.d.ts +4 -3
- package/dist/runtime/components/table/ui/table-sortable-header.vue +9 -8
- package/dist/runtime/components/table/ui/table.vue +9 -174
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +14 -16
- package/dist/runtime/components/tabs/tabs-root.vue +14 -12
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +14 -16
- package/dist/runtime/components/text.d.vue.ts +10 -9
- package/dist/runtime/components/text.vue +16 -77
- package/dist/runtime/components/text.vue.d.ts +10 -9
- package/dist/runtime/components/textarea.vue +4 -4
- package/dist/runtime/components/time-picker/time-picker.vue +6 -132
- package/dist/runtime/components/title.vue +4 -8
- package/dist/runtime/components/tree/_ui/tree-item.vue +2 -62
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +7 -6
- package/dist/runtime/components/tree/_ui/tree-root.vue +13 -19
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +7 -6
- package/dist/runtime/components/tree/tree.vue +5 -5
- package/dist/runtime/composables/index.d.ts +1 -1
- package/dist/runtime/composables/index.js +1 -1
- package/dist/runtime/composables/use-vars-resolver.d.ts +4 -0
- package/dist/runtime/composables/use-vars-resolver.js +6 -0
- package/dist/runtime/types/index.d.ts +2 -2
- package/dist/runtime/types/styling.d.ts +6 -0
- package/dist/runtime/types/styling.js +0 -0
- package/dist/runtime/types/theme.d.ts +10 -15
- package/dist/runtime/utils/color/parse-theme-color.d.ts +2 -2
- package/dist/runtime/utils/style/create-variant-color-resolver.d.ts +2 -2
- package/package.json +2 -2
- package/dist/runtime/composables/use-style-resolver.d.ts +0 -6
- package/dist/runtime/composables/use-style-resolver.js +0 -5
|
@@ -6,13 +6,13 @@ import { useInputWrapperState } from "../lib/input-wrapper.context";
|
|
|
6
6
|
const { classes, ...props } = defineProps({
|
|
7
7
|
classes: { type: Object, required: false },
|
|
8
8
|
required: { type: Boolean, required: false },
|
|
9
|
-
radius: { type: String, required: false },
|
|
10
|
-
size: { type: String, required: false },
|
|
9
|
+
radius: { type: [String, Number, Object], required: false },
|
|
10
|
+
size: { type: [String, Object], required: false },
|
|
11
11
|
variant: { type: String, required: false },
|
|
12
12
|
multiline: { type: Boolean, required: false },
|
|
13
13
|
resize: { type: void 0, required: false },
|
|
14
|
-
leftSectionPE: { type:
|
|
15
|
-
rightSectionPE: { type:
|
|
14
|
+
leftSectionPE: { type: void 0, required: false },
|
|
15
|
+
rightSectionPE: { type: void 0, required: false }
|
|
16
16
|
});
|
|
17
17
|
defineSlots();
|
|
18
18
|
const api = computed(() => useInputWrapperState() ?? props);
|
|
@@ -58,265 +58,6 @@ const style = computed(() => ({
|
|
|
58
58
|
</Box>
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
|
-
<style
|
|
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
|
-
}
|
|
61
|
+
<style module>
|
|
62
|
+
.root{--input-height-xs:rem(30px);--input-height-sm:rem(36px);--input-height-md:rem(42px);--input-height-lg:rem(50px);--input-height-xl:rem(60px);--input-padding-y-xs:rem(5px);--input-padding-y-sm:rem(6px);--input-padding-y-md:rem(8px);--input-padding-y-lg:rem(10px);--input-padding-y-xl:rem(13px);--input-height:var(--input-height-sm);--input-radius:var(--radius-default);--input-cursor:text;--input-text-align:left;--input-line-height:calc(var(--input-height) - rem(2px));--input-padding:calc(var(--input-height)/3);--input-padding-inline-start:var(--input-padding);--input-padding-inline-end:var(--input-padding);--input-placeholder-color:var(--color-placeholder);--input-color:var(--color-text);--input-left-section-width:calc(var(--input-height) - rem(2px));--input-right-section-width:calc(var(--input-height) - rem(2px));--input-left-section-pointer-events:none;--input-right-section-pointer-events:none;--input-left-section-size:var(--input-left-section-width);--input-right-section-size:var(--input-right-section-width);--input-fz:var(--font-size-sm);--input-size:var(--input-height);--input-resize:none;--section-y:1px;--left-section-start:1px;--left-section-border-radius:var(--input-radius) 0 0 var(--input-radius);--right-section-end:1px;--right-section-border-radius:0 var(--input-radius) var(--input-radius) 0;position:relative}.root[data-variant=unstyled]{--input-padding:0;--input-padding-y:0;--input-padding-inline-start:0;--input-padding-inline-end:0}.root[data-pointer]{--input-cursor:pointer}.root[data-multiline]{--input-padding-y-xs:4.5px;--input-padding-y-sm:5.5px;--input-padding-y-md:7px;--input-padding-y-lg:9.5px;--input-padding-y-xl:13px;--input-size:auto;--input-line-height:var(--line-height);--input-padding-y:var(--input-padding-y-sm)}.root[data-with-left-section]{--input-padding-inline-start:var(--input-left-section-size)}.root[data-with-right-section]{--input-padding-inline-end:var(--input-right-section-size)}.root[data-error]{--input-color:var(--color-error);--input-placeholder-color:var(--color-error);--input-section-color:var(--color-error);--input-bd:var(--color-error)}.root{@mixin where-light{--input-disabled-bg:var(--color-gray-1);--input-disabled-color:var(--color-gray-6);&[data-variant=default]:not(&[data-error]){--input-bd:var(--color-gray-4);--input-bg:var(--color-white);--input-bd-focus:var(--color-primary-filled)}&[data-variant=filled]:not(&[data-error]){--input-bd:transparent;--input-bg:var(--color-gray-1);--input-bd-focus:var(--color-primary-filled)}&[data-variant=unstyled]:not(&[data-error]){--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}}}.root{@mixin where-dark{--input-disabled-bg:var(--color-dark-6);--input-disabled-color:var(--color-dark-2);&[data-variant=default]:not(&[data-error]){--input-bd:var(--color-dark-4);--input-bg:var(--color-dark-6);--input-bd-focus:var(--color-primary-filled)}&[data-variant=filled]:not(&[data-error]){--input-bd:transparent;--input-bg:var(--color-dark-5);--input-bd-focus:var(--color-primary-filled)}&[data-variant=unstyled]:not(&[data-error]){--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}}}.root{@mixin where-rtl{--input-text-align:right;--left-section-border-radius:0 var(--input-radius) var(--input-radius) 0;--right-section-border-radius:var(--input-radius) 0 0 var(--input-radius)}}.input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--input-bg);border:rem(1px) solid var(--input-bd);border-radius:var(--input-radius);color:var(--input-color);cursor:var(--input-cursor);display:block;font-family:var(--font-family),serif;font-size:var(--input-fz);height:var(--input-size);line-height:var(--input-line-height);min-height:var(--input-height);overflow:var(--input-overflow);padding-bottom:var(--input-padding-y,0);padding-inline-end:var(--input-padding-inline-end);padding-top:var(--input-padding-y,0);padding-inline-start:var(--input-padding-inline-start);resize:var(--input-resize,none);text-align:var(--input-text-align);transition:border-color .1s ease;width:100%;-webkit-tap-highlight-color:transparent}.input[data-no-overflow]{--input-overflow:hidden}.input:focus,.input:focus-within{--input-bd:var(--input-bd-focus);outline:none}[data-error] .input:focus,[data-error] .input:focus-within{--input-bd:var(--color-error)}.input::-moz-placeholder{color:var(--input-placeholder-color);opacity:1}.input::placeholder{color:var(--input-placeholder-color);opacity:1}.input::-webkit-inner-spin-button,.input::-webkit-outer-spin-button,.input::-webkit-search-cancel-button,.input::-webkit-search-decoration,.input::-webkit-search-results-button,.input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.input:disabled,.input[data-disabled]{background-color:var(--input-disabled-bg);color:var(--input-disabled-color);cursor:not-allowed;opacity:.6}.input:has(input:disabled){background-color:var(--input-disabled-bg);color:var(--input-disabled-color);cursor:not-allowed;opacity:.6}.section{align-items:center;border-radius:var(--section-border-radius);bottom:var(--section-y);color:var(--input-section-color,var(--color-dimmed));display:flex;inset-inline-end:var(--section-end);inset-inline-start:var(--section-start);justify-content:center;pointer-events:var(--section-pointer-events);position:absolute;top:var(--section-y);width:var(--section-size);z-index:1}.section[data-position=right]{--section-pointer-events:var(--input-right-section-pointer-events);--section-end:var(--right-section-end);--section-size:var(--input-right-section-size);--section-border-radius:var(--right-section-border-radius)}.section[data-position=left]{--section-pointer-events:var(--input-left-section-pointer-events);--section-start:var(--left-section-start);--section-size:var(--input-left-section-size);--section-border-radius:var(--left-section-border-radius)}
|
|
322
63
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NuanceSize } from '@nui/types';
|
|
1
|
+
import type { AnyString, NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from '../../box.vue.js';
|
|
3
3
|
export interface InlineInputProps extends BoxProps {
|
|
4
4
|
/** Input id */
|
|
@@ -12,7 +12,7 @@ export interface InlineInputProps extends BoxProps {
|
|
|
12
12
|
/** Disables the component */
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
14
|
/** Component size */
|
|
15
|
-
size?: NuanceSize |
|
|
15
|
+
size?: NuanceSize | AnyString;
|
|
16
16
|
/** Position of the label relative to the input control */
|
|
17
17
|
labelPosition?: 'left' | 'right';
|
|
18
18
|
/** HTML element used for the body wrapper */
|
|
@@ -19,7 +19,7 @@ const {
|
|
|
19
19
|
description: { type: String, required: false },
|
|
20
20
|
error: { type: String, required: false },
|
|
21
21
|
disabled: { type: Boolean, required: false, skipCheck: true },
|
|
22
|
-
size: { type: String, required: false },
|
|
22
|
+
size: { type: [String, Object], required: false },
|
|
23
23
|
labelPosition: { type: String, required: false },
|
|
24
24
|
bodyElement: { type: null, required: false },
|
|
25
25
|
labelElement: { type: null, required: false },
|
|
@@ -60,85 +60,6 @@ const style = computed(() => ({
|
|
|
60
60
|
</Box>
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
|
-
<style
|
|
64
|
-
.root {
|
|
65
|
-
--label-lh-xs: rem(16px);
|
|
66
|
-
--label-lh-sm: rem(20px);
|
|
67
|
-
--label-lh-md: rem(24px);
|
|
68
|
-
--label-lh-lg: rem(30px);
|
|
69
|
-
--label-lh-xl: rem(36px);
|
|
70
|
-
--label-lh: var(--label-lh-sm);
|
|
71
|
-
|
|
72
|
-
--label-fz: var(--font-size-sm);
|
|
73
|
-
|
|
74
|
-
&[data-label-position='left'] {
|
|
75
|
-
--label-order: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&[data-label-position='right'] {
|
|
79
|
-
--label-order: 1;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.body {
|
|
84
|
-
display: flex;
|
|
85
|
-
gap: var(--spacing-sm);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.wrapper {
|
|
89
|
-
--label-cursor: default;
|
|
90
|
-
|
|
91
|
-
cursor: var(--label-cursor);
|
|
92
|
-
|
|
93
|
-
display: inline-flex;
|
|
94
|
-
flex-direction: column;
|
|
95
|
-
gap: .25rem;
|
|
96
|
-
order: var(--label-order);
|
|
97
|
-
|
|
98
|
-
font-size: var(--label-fz);
|
|
99
|
-
line-height: var(--label-lh);
|
|
100
|
-
|
|
101
|
-
-webkit-tap-highlight-color: transparent;
|
|
102
|
-
|
|
103
|
-
fieldset:disabled &,
|
|
104
|
-
&[data-disabled] {
|
|
105
|
-
--label-cursor: not-allowed;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:empty {
|
|
109
|
-
display: none;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.label {
|
|
114
|
-
cursor: var(--label-cursor);
|
|
115
|
-
|
|
116
|
-
color: inherit;
|
|
117
|
-
|
|
118
|
-
fieldset:disabled &,
|
|
119
|
-
&:where([data-disabled]) {
|
|
120
|
-
color: var(--color-gray-5);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.error,
|
|
125
|
-
.description {
|
|
126
|
-
display: block;
|
|
127
|
-
|
|
128
|
-
margin: 0;
|
|
129
|
-
padding: 0;
|
|
130
|
-
|
|
131
|
-
line-height: 1.2;
|
|
132
|
-
overflow-wrap: break-word;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.description {
|
|
136
|
-
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
137
|
-
color: var(--color-dimmed);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.error {
|
|
141
|
-
font-size: var(--input-error-size);
|
|
142
|
-
color: var(--color-error);
|
|
143
|
-
}
|
|
63
|
+
<style module>
|
|
64
|
+
.root{--label-lh-xs:rem(16px);--label-lh-sm:rem(20px);--label-lh-md:rem(24px);--label-lh-lg:rem(30px);--label-lh-xl:rem(36px);--label-lh:var(--label-lh-sm);--label-fz:var(--font-size-sm)}.root[data-label-position=left]{--label-order:0}.root[data-label-position=right]{--label-order:1}.body{display:flex;gap:var(--spacing-sm)}.wrapper{--label-cursor:default;cursor:var(--label-cursor);display:inline-flex;flex-direction:column;font-size:var(--label-fz);gap:.25rem;line-height:var(--label-lh);order:var(--label-order);-webkit-tap-highlight-color:transparent}.wrapper[data-disabled],fieldset:disabled .wrapper{--label-cursor:not-allowed}.wrapper:empty{display:none}.label{color:inherit;cursor:var(--label-cursor)}.label:where([data-disabled]),fieldset:disabled .label{color:var(--color-gray-5)}.description,.error{display:block;line-height:1.2;margin:0;overflow-wrap:break-word;padding:0}.description{color:var(--color-dimmed);font-size:var(--input-description-size,calc(var(--font-size-sm) - rem(2px)))}.error{color:var(--color-error);font-size:var(--input-error-size)}
|
|
144
65
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NuanceSize } from '@nui/types';
|
|
1
|
+
import type { AnyString, NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from '../../box.vue.js';
|
|
3
3
|
export interface InlineInputProps extends BoxProps {
|
|
4
4
|
/** Input id */
|
|
@@ -12,7 +12,7 @@ export interface InlineInputProps extends BoxProps {
|
|
|
12
12
|
/** Disables the component */
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
14
|
/** Component size */
|
|
15
|
-
size?: NuanceSize |
|
|
15
|
+
size?: NuanceSize | AnyString;
|
|
16
16
|
/** Position of the label relative to the input control */
|
|
17
17
|
labelPosition?: 'left' | 'right';
|
|
18
18
|
/** HTML element used for the body wrapper */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { NuanceSize } from '@nui/types';
|
|
1
|
+
import type { AnyString, NuanceSize } from '@nui/types';
|
|
2
2
|
export interface InputLabelProps {
|
|
3
3
|
/** Required input prop @default false */
|
|
4
4
|
required?: boolean;
|
|
5
5
|
/** Component size @default 'sm' */
|
|
6
|
-
size?: NuanceSize |
|
|
6
|
+
size?: NuanceSize | AnyString;
|
|
7
7
|
}
|
|
8
8
|
declare var __VLS_1: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
@@ -3,7 +3,7 @@ import { getFontSize } from "@nui/utils";
|
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
const { required = false, size = "sm" } = defineProps({
|
|
5
5
|
required: { type: Boolean, required: false },
|
|
6
|
-
size: { type: String, required: false }
|
|
6
|
+
size: { type: [String, Object], required: false }
|
|
7
7
|
});
|
|
8
8
|
const style = computed(() => ({
|
|
9
9
|
"--input-label-size": getFontSize(size),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { NuanceSize } from '@nui/types';
|
|
1
|
+
import type { AnyString, NuanceSize } from '@nui/types';
|
|
2
2
|
export interface InputLabelProps {
|
|
3
3
|
/** Required input prop @default false */
|
|
4
4
|
required?: boolean;
|
|
5
5
|
/** Component size @default 'sm' */
|
|
6
|
-
size?: NuanceSize |
|
|
6
|
+
size?: NuanceSize | AnyString;
|
|
7
7
|
}
|
|
8
8
|
declare var __VLS_1: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
@@ -19,7 +19,11 @@ type __VLS_Slots = {} & {
|
|
|
19
19
|
} & {
|
|
20
20
|
description?: (props: typeof __VLS_13) => any;
|
|
21
21
|
};
|
|
22
|
-
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {
|
|
23
|
+
size: import("../../../types/index.js").NuanceSize | import("../../../types/index.js").AnyString;
|
|
24
|
+
radius: import("../../../types/index.js").NuanceRadius | import("../../../types/index.js").AnyString;
|
|
25
|
+
variant: import("..").InputVariant;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
28
|
declare const _default: typeof __VLS_export;
|
|
25
29
|
export default _default;
|
|
@@ -1,53 +1,27 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { getFontSize } from "@nui/utils";
|
|
3
|
-
import { computed, useId } from "vue";
|
|
3
|
+
import { computed, reactive, toRefs, useId } from "vue";
|
|
4
4
|
import { useProvideInputWrapper } from "../lib/input-wrapper.context";
|
|
5
5
|
import InputLabel from "./input-label.vue";
|
|
6
|
-
const {
|
|
7
|
-
id,
|
|
8
|
-
error,
|
|
9
|
-
description,
|
|
10
|
-
label,
|
|
11
|
-
required,
|
|
12
|
-
variant = "default",
|
|
13
|
-
size = "sm",
|
|
14
|
-
radius = "sm",
|
|
15
|
-
leftSectionPE,
|
|
16
|
-
rightSectionPE,
|
|
17
|
-
multiline,
|
|
18
|
-
resize
|
|
19
|
-
} = defineProps({
|
|
6
|
+
const props = defineProps({
|
|
20
7
|
error: { type: String, required: false },
|
|
21
8
|
description: { type: String, required: false },
|
|
22
9
|
label: { type: String, required: false },
|
|
23
10
|
required: { type: Boolean, required: false },
|
|
24
11
|
id: { type: [String, null], required: false },
|
|
25
|
-
radius: { type: String, required: false },
|
|
26
|
-
size: { type: String, required: false },
|
|
27
|
-
variant: { type: String, required: false },
|
|
12
|
+
radius: { type: [String, Number, Object], required: false, default: "sm" },
|
|
13
|
+
size: { type: [String, Object], required: false, default: "sm" },
|
|
14
|
+
variant: { type: String, required: false, default: "default" },
|
|
28
15
|
multiline: { type: Boolean, required: false },
|
|
29
16
|
resize: { type: void 0, required: false },
|
|
30
|
-
leftSectionPE: { type:
|
|
31
|
-
rightSectionPE: { type:
|
|
32
|
-
});
|
|
33
|
-
const uid = id ?? useId();
|
|
34
|
-
useProvideInputWrapper({
|
|
35
|
-
id: uid,
|
|
36
|
-
error,
|
|
37
|
-
description,
|
|
38
|
-
label,
|
|
39
|
-
required,
|
|
40
|
-
variant,
|
|
41
|
-
size,
|
|
42
|
-
radius,
|
|
43
|
-
leftSectionPE,
|
|
44
|
-
rightSectionPE,
|
|
45
|
-
multiline,
|
|
46
|
-
resize
|
|
17
|
+
leftSectionPE: { type: void 0, required: false },
|
|
18
|
+
rightSectionPE: { type: void 0, required: false }
|
|
47
19
|
});
|
|
20
|
+
const uid = props.id ?? useId();
|
|
21
|
+
useProvideInputWrapper(reactive({ ...toRefs(props), id: uid }));
|
|
48
22
|
const style = computed(() => ({
|
|
49
|
-
"--input-error-size": `calc(${getFontSize(size)} - .125rem)`,
|
|
50
|
-
"--input-description-size": `calc(${getFontSize(size)} - .125rem)`
|
|
23
|
+
"--input-error-size": `calc(${getFontSize(props.size)} - .125rem)`,
|
|
24
|
+
"--input-description-size": `calc(${getFontSize(props.size)} - .125rem)`
|
|
51
25
|
}));
|
|
52
26
|
</script>
|
|
53
27
|
|
|
@@ -81,32 +55,6 @@ const style = computed(() => ({
|
|
|
81
55
|
</div>
|
|
82
56
|
</template>
|
|
83
57
|
|
|
84
|
-
<style
|
|
85
|
-
.wrapper {
|
|
86
|
-
--input-error-size: calc(var(--font-size-sm) - rem(2px));
|
|
87
|
-
--input-description-size: calc(var(--font-size-sm) - rem(2px));
|
|
88
|
-
|
|
89
|
-
line-height: var(--line-height);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.error,
|
|
93
|
-
.description {
|
|
94
|
-
display: block;
|
|
95
|
-
|
|
96
|
-
margin: 0;
|
|
97
|
-
padding: 0;
|
|
98
|
-
|
|
99
|
-
line-height: 1.2;
|
|
100
|
-
overflow-wrap: break-word;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.error {
|
|
104
|
-
font-size: var(--input-error-size);
|
|
105
|
-
color: var(--color-error);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.description {
|
|
109
|
-
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
110
|
-
color: var(--color-dimmed);
|
|
111
|
-
}
|
|
58
|
+
<style module>
|
|
59
|
+
.wrapper{--input-error-size:calc(var(--font-size-sm) - rem(2px));--input-description-size:calc(var(--font-size-sm) - rem(2px));line-height:var(--line-height)}.description,.error{display:block;line-height:1.2;margin:0;overflow-wrap:break-word;padding:0}.error{color:var(--color-error);font-size:var(--input-error-size)}.description{color:var(--color-dimmed);font-size:var(--input-description-size,calc(var(--font-size-sm) - rem(2px)))}
|
|
112
60
|
</style>
|
|
@@ -19,7 +19,11 @@ type __VLS_Slots = {} & {
|
|
|
19
19
|
} & {
|
|
20
20
|
description?: (props: typeof __VLS_13) => any;
|
|
21
21
|
};
|
|
22
|
-
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {
|
|
23
|
+
size: import("../../../types/index.js").NuanceSize | import("../../../types/index.js").AnyString;
|
|
24
|
+
radius: import("../../../types/index.js").NuanceRadius | import("../../../types/index.js").AnyString;
|
|
25
|
+
variant: import("..").InputVariant;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
28
|
declare const _default: typeof __VLS_export;
|
|
25
29
|
export default _default;
|
|
@@ -106,57 +106,6 @@ function handleKeyDown(event) {
|
|
|
106
106
|
>
|
|
107
107
|
</template>
|
|
108
108
|
|
|
109
|
-
<style
|
|
110
|
-
.field {
|
|
111
|
-
position: relative;
|
|
112
|
-
|
|
113
|
-
width: calc(2ch + 0.3em);
|
|
114
|
-
height: 100%;
|
|
115
|
-
padding-inline: 0.15em;
|
|
116
|
-
border: 0;
|
|
117
|
-
border-radius: 2px;
|
|
118
|
-
|
|
119
|
-
font-variant-numeric: tabular-nums;
|
|
120
|
-
line-height: 1;
|
|
121
|
-
color: var(--input-color);
|
|
122
|
-
text-align: center;
|
|
123
|
-
text-align-last: center;
|
|
124
|
-
|
|
125
|
-
appearance: none;
|
|
126
|
-
background-color: transparent;
|
|
127
|
-
caret-color: transparent;
|
|
128
|
-
|
|
129
|
-
&:where([data-am-pm]) {
|
|
130
|
-
width: auto;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&:where(:disabled) {
|
|
134
|
-
cursor: not-allowed;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&::selection {
|
|
138
|
-
background-color: transparent;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&::placeholder {
|
|
142
|
-
color: inherit;
|
|
143
|
-
|
|
144
|
-
opacity: 1;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:not(:read-only):focus {
|
|
148
|
-
color: var(--color-white);
|
|
149
|
-
|
|
150
|
-
background-color: var(--color-primary-filled);
|
|
151
|
-
outline: 0;
|
|
152
|
-
|
|
153
|
-
&::placeholder {
|
|
154
|
-
color: var(--color-white);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&:read-only:focus {
|
|
159
|
-
outline: 0;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
109
|
+
<style module>
|
|
110
|
+
.field{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;border-radius:2px;caret-color:transparent;color:var(--input-color);font-variant-numeric:tabular-nums;height:100%;line-height:1;padding-inline:.15em;position:relative;text-align:center;-moz-text-align-last:center;text-align-last:center;width:calc(2ch + .3em)}.field:where([data-am-pm]){width:auto}.field:where(:disabled){cursor:not-allowed}.field::-moz-selection{background-color:transparent}.field::selection{background-color:transparent}.field::-moz-placeholder{color:inherit;opacity:1}.field::placeholder{color:inherit;opacity:1}.field:not(:-moz-read-only):focus{background-color:var(--color-primary-filled);color:var(--color-white);outline:0}.field:not(:read-only):focus{background-color:var(--color-primary-filled);color:var(--color-white);outline:0}.field:not(:read-only):focus::-moz-placeholder{color:var(--color-white)}.field:not(:-moz-read-only):focus::placeholder{color:var(--color-white)}.field:not(:read-only):focus::placeholder{color:var(--color-white)}.field:-moz-read-only:focus{outline:0}.field:read-only:focus{outline:0}
|
|
162
111
|
</style>
|
|
@@ -17,19 +17,20 @@ const props = defineProps({
|
|
|
17
17
|
ariaCurrentValue: { type: String, required: false },
|
|
18
18
|
viewTransition: { type: Boolean, required: false },
|
|
19
19
|
replace: { type: Boolean, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
20
21
|
size: { type: null, required: false },
|
|
21
|
-
spacing: { type: String, required: false },
|
|
22
|
-
variant: { type: String, required: false },
|
|
22
|
+
spacing: { type: [String, Number, Object], required: false },
|
|
23
23
|
gradient: { type: Object, required: false },
|
|
24
|
+
radius: { type: [String, Number, Object], required: false },
|
|
25
|
+
justify: { type: void 0, required: false },
|
|
26
|
+
leftSectionPE: { type: void 0, required: false },
|
|
27
|
+
rightSectionPE: { type: void 0, required: false },
|
|
24
28
|
loading: { type: Boolean, required: false },
|
|
25
|
-
color: { type: null, required: false },
|
|
26
|
-
radius: { type: [String, Number], required: false },
|
|
27
|
-
classes: { type: Object, required: false },
|
|
28
|
-
leftSectionPE: { type: null, required: false },
|
|
29
|
-
leftSectionProps: { type: Object, required: false },
|
|
30
29
|
icon: { type: String, required: false },
|
|
31
|
-
|
|
30
|
+
leftSectionProps: { type: Object, required: false },
|
|
32
31
|
rightSectionProps: { type: Object, required: false },
|
|
32
|
+
variant: { type: String, required: false },
|
|
33
|
+
classes: { type: Object, required: false },
|
|
33
34
|
is: { type: null, required: false },
|
|
34
35
|
mod: { type: [Object, Array, null], required: false }
|
|
35
36
|
});
|