srcdev-nuxt-forms 2.1.35 → 2.1.37
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/assets/styles/ally/_utils.css +20 -0
- package/assets/styles/ally/_variables.css +8 -0
- package/assets/styles/ally/index.css +2 -0
- package/assets/styles/forms/themes/_error.css +6 -6
- package/assets/styles/forms/themes/_ghost.css +6 -6
- package/assets/styles/forms/themes/_input-action.css +20 -0
- package/assets/styles/forms/themes/_primary.css +7 -6
- package/assets/styles/forms/themes/_secondary.css +6 -6
- package/assets/styles/forms/themes/_success.css +6 -6
- package/assets/styles/forms/themes/_tertiary.css +5 -5
- package/assets/styles/forms/themes/_warning.css +6 -6
- package/assets/styles/forms/themes/index.css +8 -7
- package/assets/styles/forms/variables/_sizes.css +82 -0
- package/assets/styles/forms/variables/_theme.css +1 -62
- package/assets/styles/forms/variables/index.css +1 -0
- package/assets/styles/main.css +1 -0
- package/assets/styles/typography/utils/_font-classes.css +30 -0
- package/components/forms/form-errors/InputError.vue +1 -1
- package/components/forms/input-button/InputButtonCore.vue +28 -131
- package/components/forms/input-checkbox-radio/InputCheckboxRadioButton.vue +21 -20
- package/components/forms/input-checkbox-radio/InputCheckboxRadioCore.vue +14 -29
- package/components/forms/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +1 -1
- package/components/forms/input-number/InputNumberCore.vue +16 -15
- package/components/forms/input-number/variants/InputNumberDefault.vue +7 -7
- package/components/forms/input-range/InputRangeCore.vue +3 -3
- package/components/forms/input-range-fancy/InputRangeFancyCore.vue +0 -12
- package/components/forms/input-text/InputTextCore.vue +52 -22
- package/components/forms/input-text/variants/InputTextAsNumberWithLabel.vue +23 -5
- package/components/forms/input-text/variants/InputTextWithLabel.vue +9 -1
- package/components/forms/input-textarea/InputTextareaCore.vue +4 -4
- package/components/forms/toggle-switch/ToggleSwitchCore.vue +19 -29
- package/components/forms/ui/FormField.vue +25 -3
- package/components/forms/ui/FormWrapper.vue +1 -0
- package/package.json +2 -1
|
@@ -5,23 +5,24 @@
|
|
|
5
5
|
:aria-disabled="readonly"
|
|
6
6
|
:data-testid="dataTestid"
|
|
7
7
|
:data-btn-theme="theme"
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
:data-size="size"
|
|
9
|
+
class="input-button-core"
|
|
10
|
+
:class="[`btn-${type}`, effectClass, elementClasses, { 'icon-only': isIconOnly }]"
|
|
10
11
|
>
|
|
11
12
|
<span v-if="useEffect && effect == 'fancy'" class="fancy"></span>
|
|
12
13
|
<template v-if="hasLeftContent && !isIconOnly">
|
|
13
|
-
<span class="btn-icon left"
|
|
14
|
+
<span class="btn-icon left">
|
|
14
15
|
<slot name="left"></slot>
|
|
15
16
|
</span>
|
|
16
17
|
</template>
|
|
17
|
-
<span class="btn-text" :class="[
|
|
18
|
+
<span class="btn-text" :class="[weight, { 'sr-only': isIconOnly }]">{{ buttonText }}</span>
|
|
18
19
|
<template v-if="hasRightContent && !isIconOnly">
|
|
19
20
|
<span class="btn-icon right">
|
|
20
21
|
<slot name="right"></slot>
|
|
21
22
|
</span>
|
|
22
23
|
</template>
|
|
23
24
|
<template v-if="isIconOnly">
|
|
24
|
-
<span class="btn-icon icon-only"
|
|
25
|
+
<span class="btn-icon icon-only">
|
|
25
26
|
<slot name="iconOnly"></slot>
|
|
26
27
|
</span>
|
|
27
28
|
</template>
|
|
@@ -111,31 +112,26 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
111
112
|
</script>
|
|
112
113
|
|
|
113
114
|
<style lang="css">
|
|
114
|
-
.
|
|
115
|
-
--_padding-block: var(--theme-form-button-padding-block-normal);
|
|
116
|
-
--_padding-inline: var(--theme-form-button-padding-inline-normal);
|
|
117
|
-
--_icon-gap: var(--theme-form-button-icon-gap-normal);
|
|
118
|
-
--_border-width: var(--input-border-width-default);
|
|
119
|
-
--_outline-width: var(--input-outline-width-thin);
|
|
120
|
-
|
|
115
|
+
.input-button-core {
|
|
121
116
|
align-items: center;
|
|
122
117
|
display: flex;
|
|
123
|
-
gap: var(--
|
|
118
|
+
gap: var(--form-button-icon-gap);
|
|
124
119
|
justify-content: center;
|
|
125
120
|
border: none;
|
|
126
|
-
border-radius: var(--input-border-radius);
|
|
121
|
+
border-radius: var(--form-input-border-radius);
|
|
127
122
|
font-family: var(--font-family);
|
|
128
123
|
|
|
129
|
-
|
|
130
|
-
padding-
|
|
131
|
-
padding-block: var(--
|
|
124
|
+
padding-inline: var(--form-button-padding-inline);
|
|
125
|
+
padding-block-start: var(--form-element-padding-block-start);
|
|
126
|
+
padding-block-end: var(--form-element-padding-block-end);
|
|
132
127
|
|
|
133
128
|
transition: all 0.2s ease-in-out;
|
|
134
129
|
|
|
130
|
+
box-shadow: var(--box-shadow-off);
|
|
135
131
|
background-color: var(--theme-btn-bg);
|
|
136
|
-
border: var(--
|
|
132
|
+
border: var(--form-element-border-width) solid var(--theme-btn-border);
|
|
137
133
|
color: var(--theme-btn-text);
|
|
138
|
-
outline:
|
|
134
|
+
outline: var(--form-element-outline-width) solid var(--theme-btn-outline);
|
|
139
135
|
|
|
140
136
|
/*
|
|
141
137
|
* States
|
|
@@ -156,7 +152,7 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
156
152
|
--theme-btn-border: var(--theme-btn-border-focus);
|
|
157
153
|
--theme-btn-text: var(--theme-btn-text-focus);
|
|
158
154
|
--theme-btn-outline: var(--theme-btn-outline-focus);
|
|
159
|
-
box-shadow: var(--
|
|
155
|
+
box-shadow: var(--box-shadow-on);
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
&[readonly] {
|
|
@@ -167,88 +163,19 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
167
163
|
}
|
|
168
164
|
}
|
|
169
165
|
|
|
170
|
-
&.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
&.icon-only {
|
|
177
|
-
--_padding-block: var(--theme-form-button-padding-block-icon-only-x-small);
|
|
178
|
-
--_padding-inline: var(--theme-form-button-padding-inline-icon-only-x-small);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&.small {
|
|
183
|
-
&:not(.icon-only) {
|
|
184
|
-
--_padding-block: var(--theme-form-button-padding-block-x-small);
|
|
185
|
-
--_padding-inline: var(--theme-form-button-padding-inline-small);
|
|
186
|
-
--_icon-gap: var(--theme-form-button-icon-gap-small);
|
|
187
|
-
}
|
|
188
|
-
&.icon-only {
|
|
189
|
-
--_padding-block: var(--theme-form-button-padding-block-icon-only-small);
|
|
190
|
-
--_padding-inline: var(--theme-form-button-padding-inline-icon-only-small);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
&.normal {
|
|
194
|
-
&:not(.icon-only) {
|
|
195
|
-
--_padding-block: var(--theme-form-button-padding-block-x-small);
|
|
196
|
-
--_padding-inline: var(--theme-form-button-padding-inline-normal);
|
|
197
|
-
--_icon-gap: var(--theme-form-button-icon-gap-normal);
|
|
198
|
-
}
|
|
199
|
-
&.icon-only {
|
|
200
|
-
--_padding-block: var(--theme-form-button-padding-block-icon-only-normal);
|
|
201
|
-
--_padding-inline: var(--theme-form-button-padding-inline-icon-only-normal);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
&.medium {
|
|
205
|
-
&:not(.icon-only) {
|
|
206
|
-
--_padding-block: var(--theme-form-button-padding-block-x-small);
|
|
207
|
-
--_padding-inline: var(--theme-form-button-padding-inline-medium);
|
|
208
|
-
--_icon-gap: var(--theme-form-button-icon-gap-medium);
|
|
209
|
-
}
|
|
210
|
-
&.icon-only {
|
|
211
|
-
--_padding-block: var(--theme-form-button-padding-block-icon-only-medium);
|
|
212
|
-
--_padding-inline: var(--theme-form-button-padding-inline-icon-only-medium);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
&.large {
|
|
217
|
-
&:not(.icon-only) {
|
|
218
|
-
--_padding-block: var(--theme-form-button-padding-block-x-small);
|
|
219
|
-
--_padding-inline: var(--theme-form-button-padding-inline-large);
|
|
220
|
-
--_icon-gap: var(--theme-form-button-icon-gap-large);
|
|
221
|
-
}
|
|
222
|
-
&.icon-only {
|
|
223
|
-
--_padding-block: var(--theme-form-button-padding-block-icon-only-large);
|
|
224
|
-
--_padding-inline: var(--theme-form-button-padding-inline-icon-only-large);
|
|
225
|
-
}
|
|
166
|
+
&.icon-only {
|
|
167
|
+
aspect-ratio: 1;
|
|
168
|
+
height: var(--form-icon-only-button-size);
|
|
169
|
+
width: var(--form-icon-only-button-size);
|
|
170
|
+
margin: 0 !important;
|
|
171
|
+
padding: 0 !important;
|
|
226
172
|
}
|
|
227
173
|
|
|
228
174
|
.btn-text {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
font-size: var(--theme-form-button-font-size-normal);
|
|
234
|
-
}
|
|
235
|
-
&.medium {
|
|
236
|
-
font-size: var(--theme-form-button-font-size-medium);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&.large {
|
|
240
|
-
font-size: var(--theme-form-button-font-size-large);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&.sr-only {
|
|
244
|
-
position: absolute;
|
|
245
|
-
clip: rect(1px, 0.1rem, 0.1rem, 0.1rem);
|
|
246
|
-
clip-path: inset(50%);
|
|
247
|
-
height: 0.1rem;
|
|
248
|
-
width: 0.1rem;
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
white-space: nowrap;
|
|
251
|
-
}
|
|
175
|
+
display: inline-block;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
font-size: var(--form-element-font-size);
|
|
178
|
+
line-height: var(--form-element-line-height);
|
|
252
179
|
}
|
|
253
180
|
|
|
254
181
|
.btn-icon {
|
|
@@ -256,38 +183,8 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
256
183
|
.icon {
|
|
257
184
|
aspect-ratio: 1;
|
|
258
185
|
display: inline-block;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
&.x-small {
|
|
262
|
-
.icon {
|
|
263
|
-
height: var(--theme-form-button-icon-size-small);
|
|
264
|
-
width: var(--theme-form-button-icon-size-small);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
&.small {
|
|
268
|
-
.icon {
|
|
269
|
-
height: var(--theme-form-button-icon-size-small);
|
|
270
|
-
width: var(--theme-form-button-icon-size-small);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
&.normal {
|
|
274
|
-
.icon {
|
|
275
|
-
height: var(--theme-form-button-icon-size-normal);
|
|
276
|
-
width: var(--theme-form-button-icon-size-normal);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
&.medium {
|
|
280
|
-
.icon {
|
|
281
|
-
height: var(--theme-form-button-icon-size-medium);
|
|
282
|
-
width: var(--theme-form-button-icon-size-medium);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
&.large {
|
|
287
|
-
.icon {
|
|
288
|
-
height: var(--theme-form-button-icon-size-large);
|
|
289
|
-
width: var(--theme-form-button-icon-size-large);
|
|
290
|
-
}
|
|
186
|
+
height: var(--form-icon-size);
|
|
187
|
+
width: var(--form-icon-size);
|
|
291
188
|
}
|
|
292
189
|
}
|
|
293
190
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-checkbox-radio-button-button" :data-form-theme="formTheme" :class="[size, elementClasses, optionsLayout, { error: fieldHasError }]">
|
|
2
|
+
<div class="input-checkbox-radio-button-button" :data-form-theme="formTheme" :data-size="size" :class="[size, elementClasses, optionsLayout, { error: fieldHasError }]">
|
|
3
3
|
<InputCheckboxRadioCore :isButton="true" :type :id :name :required v-model="modelValue" :size :trueValue :falseValue :fieldHasError :theme :ariaDescribedby>
|
|
4
4
|
<template #checkedIcon>
|
|
5
5
|
<slot name="checkedIcon"></slot>
|
|
6
6
|
</template>
|
|
7
7
|
</InputCheckboxRadioCore>
|
|
8
|
-
<label v-if="hasLabelContent" class="input-checkbox-radio-button-label
|
|
8
|
+
<label v-if="hasLabelContent" class="input-checkbox-radio-button-label" :for="id">
|
|
9
9
|
<slot name="labelContent"></slot>
|
|
10
10
|
</label>
|
|
11
|
-
<label v-else class="input-checkbox-radio-button-label
|
|
11
|
+
<label v-else class="input-checkbox-radio-button-label" :for="id">{{ label }}</label>
|
|
12
12
|
<div class="item-icon">
|
|
13
13
|
<slot name="itemIcon">
|
|
14
14
|
<Icon name="material-symbols:add-2" class="icon" />
|
|
@@ -106,16 +106,16 @@ const flexDirection = ref(direction);
|
|
|
106
106
|
|
|
107
107
|
<style lang="css">
|
|
108
108
|
.input-checkbox-radio-button-button {
|
|
109
|
-
--_checkbox-size: initial;
|
|
109
|
+
/* --_checkbox-size: initial; */
|
|
110
110
|
--_background-color: var(--theme-checkbox-radio-button-bg-default);
|
|
111
|
-
--_outline-width: var(--
|
|
111
|
+
--_outline-width: var(--form-element-outline-width);
|
|
112
112
|
--_border-color: var(--theme-checkbox-radio-button-border-default);
|
|
113
113
|
--_outline-color: var(--theme-checkbox-radio-button-outline-default);
|
|
114
114
|
--_label-color: var(--theme-checkbox-radio-button-label-default);
|
|
115
115
|
--_box-shadow: var(--theme-checkbox-radio-button-shadow);
|
|
116
116
|
--_white-space: wrap;
|
|
117
117
|
--_gap: 0.4rem;
|
|
118
|
-
--_border-radius: 2.2rem;
|
|
118
|
+
/* --_border-radius: 2.2rem; */
|
|
119
119
|
--_padding-block: 0.4rem;
|
|
120
120
|
--_padding-inline: 1.2rem;
|
|
121
121
|
|
|
@@ -126,7 +126,7 @@ const flexDirection = ref(direction);
|
|
|
126
126
|
gap: var(--_gap);
|
|
127
127
|
|
|
128
128
|
background-color: var(--_background-color);
|
|
129
|
-
border-radius: var(--
|
|
129
|
+
border-radius: calc(var(--form-element-line-height) / 1);
|
|
130
130
|
border: var(--theme-checkbox-radio-button-border-width) solid var(--_border-color);
|
|
131
131
|
outline: var(--theme-checkbox-radio-button-outline-width) solid var(--_outline-color);
|
|
132
132
|
box-shadow: 0.1rem 0.1rem 0.8rem 0.1rem var(--_box-shadow);
|
|
@@ -149,37 +149,37 @@ const flexDirection = ref(direction);
|
|
|
149
149
|
|
|
150
150
|
/* Sizes */
|
|
151
151
|
&.x-small {
|
|
152
|
-
--_checkbox-size: 2rem;
|
|
152
|
+
/* --_checkbox-size: 2rem; */
|
|
153
153
|
--_gap: 1rem;
|
|
154
|
-
--_border-radius: 2rem;
|
|
154
|
+
/* --_border-radius: 2rem; */
|
|
155
155
|
--_padding-block: 0.2rem;
|
|
156
156
|
--_padding-inline: 1.6rem;
|
|
157
157
|
}
|
|
158
158
|
&.small {
|
|
159
|
-
--_checkbox-size: 2.2rem;
|
|
159
|
+
/* --_checkbox-size: 2.2rem; */
|
|
160
160
|
--_gap: 1.2rem;
|
|
161
|
-
--_border-radius: 1.8rem;
|
|
161
|
+
/* --_border-radius: 1.8rem; */
|
|
162
162
|
--_padding-block: 0rem;
|
|
163
163
|
--_padding-inline: 1.2rem;
|
|
164
164
|
}
|
|
165
165
|
&.normal {
|
|
166
|
-
--_checkbox-size: 3.4rem;
|
|
166
|
+
/* --_checkbox-size: 3.4rem; */
|
|
167
167
|
--_gap: 1rem;
|
|
168
|
-
--_border-radius: 2rem;
|
|
168
|
+
/* --_border-radius: 2rem; */
|
|
169
169
|
--_padding-block: 0.4rem;
|
|
170
170
|
--_padding-inline: 1.2rem;
|
|
171
171
|
}
|
|
172
172
|
&.medium {
|
|
173
|
-
--_checkbox-size: 3.4rem;
|
|
173
|
+
/* --_checkbox-size: 3.4rem; */
|
|
174
174
|
--_gap: 1rem;
|
|
175
|
-
--_border-radius: 2rem;
|
|
175
|
+
/* --_border-radius: 2rem; */
|
|
176
176
|
--_padding-block: 0.4rem;
|
|
177
177
|
--_padding-inline: 1.2rem;
|
|
178
178
|
}
|
|
179
179
|
&.large {
|
|
180
|
-
--_checkbox-size: 3.4rem;
|
|
180
|
+
/* --_checkbox-size: 3.4rem; */
|
|
181
181
|
--_gap: 1rem;
|
|
182
|
-
--_border-radius: 2rem;
|
|
182
|
+
/* --_border-radius: 2rem; */
|
|
183
183
|
--_padding-block: 0.4rem;
|
|
184
184
|
--_padding-inline: 1.2rem;
|
|
185
185
|
}
|
|
@@ -189,8 +189,9 @@ const flexDirection = ref(direction);
|
|
|
189
189
|
display: flex;
|
|
190
190
|
flex-grow: 1;
|
|
191
191
|
color: var(--_label-color);
|
|
192
|
+
font-size: var(--form-element-font-size);
|
|
192
193
|
width: 100%;
|
|
193
|
-
height:
|
|
194
|
+
height: var(--form-element-line-height);
|
|
194
195
|
align-items: center;
|
|
195
196
|
justify-content: center;
|
|
196
197
|
margin-block: 0.8rem;
|
|
@@ -207,7 +208,7 @@ const flexDirection = ref(direction);
|
|
|
207
208
|
align-items: center;
|
|
208
209
|
justify-content: center;
|
|
209
210
|
color: var(--_border-color);
|
|
210
|
-
height: var(--
|
|
211
|
-
width: var(--
|
|
211
|
+
height: var(--form-input-checkbox-radio-button-size);
|
|
212
|
+
width: var(--form-input-checkbox-radio-button-size);
|
|
212
213
|
}
|
|
213
214
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-checkbox-radio-wrapper" :data-form-theme="formTheme" :class="[type, size, elementClasses, { error: fieldHasError }, { button: isButton }]">
|
|
2
|
+
<div class="input-checkbox-radio-wrapper" :data-form-theme="formTheme" :data-theme="size" :class="[type, size, elementClasses, { error: fieldHasError }, { button: isButton }]">
|
|
3
3
|
<slot name="checkedIcon" v-if="isChecked">
|
|
4
4
|
<Icon :name="defaultIcon" class="input-checked-icon" />
|
|
5
5
|
</slot>
|
|
@@ -112,16 +112,18 @@ const isChecked = computed(() => {
|
|
|
112
112
|
|
|
113
113
|
<style lang="css">
|
|
114
114
|
.input-checkbox-radio-wrapper {
|
|
115
|
-
--_checkbox-size: initial;
|
|
116
115
|
--_outline-width: 0.1rem;
|
|
117
116
|
--_border-width: 0.1rem;
|
|
118
117
|
--_border-radius: 50%;
|
|
119
118
|
--_background-color: var(--theme-form-checkbox-bg);
|
|
120
119
|
--_box-shadow: none;
|
|
121
120
|
|
|
121
|
+
--_icon-size: var(--form-input-checkbox-radio-button-size);
|
|
122
|
+
|
|
122
123
|
&:not(.button) {
|
|
123
|
-
--
|
|
124
|
-
--
|
|
124
|
+
--_icon-size: var(--form-toggle-symbol-size);
|
|
125
|
+
--_outline-width: var(--form-element-outline-width);
|
|
126
|
+
--_border-width: var(--form-element-border-width);
|
|
125
127
|
&.checkbox {
|
|
126
128
|
--_background-color: var(--theme-form-checkbox-bg);
|
|
127
129
|
--_border-color: var(--theme-form-checkbox-border);
|
|
@@ -147,37 +149,20 @@ const isChecked = computed(() => {
|
|
|
147
149
|
outline: 0.1rem solid var(--_outline-color);
|
|
148
150
|
box-shadow: var(--_box-shadow);
|
|
149
151
|
|
|
150
|
-
height: var(--
|
|
151
|
-
width: var(--
|
|
152
|
+
height: var(--_icon-size);
|
|
153
|
+
width: var(--_icon-size);
|
|
152
154
|
|
|
153
155
|
transition: all 0.2s ease-in-out;
|
|
154
156
|
|
|
155
157
|
&:not(.button):has(.input-checkbox-radio-core:focus-visible) {
|
|
156
|
-
--_box-shadow: var(--
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/* Sizes */
|
|
160
|
-
&.x-small {
|
|
161
|
-
--_checkbox-size: 2rem;
|
|
162
|
-
}
|
|
163
|
-
&.small {
|
|
164
|
-
--_checkbox-size: 2.4rem;
|
|
165
|
-
}
|
|
166
|
-
&.normal {
|
|
167
|
-
--_checkbox-size: 3.4rem;
|
|
168
|
-
}
|
|
169
|
-
&.medium {
|
|
170
|
-
--_checkbox-size: 4rem;
|
|
171
|
-
}
|
|
172
|
-
&.large {
|
|
173
|
-
--_checkbox-size: 4.4rem;
|
|
158
|
+
--_box-shadow: var(--form-focus-box-shadow);
|
|
174
159
|
}
|
|
175
160
|
|
|
176
161
|
.input-checked-icon {
|
|
177
162
|
grid-area: element-stack;
|
|
178
163
|
color: var(--theme-form-checkbox-symbol);
|
|
179
|
-
height: var(--
|
|
180
|
-
width: var(--
|
|
164
|
+
height: var(--_icon-size);
|
|
165
|
+
width: var(--_icon-size);
|
|
181
166
|
box-shadow: var(--_box-shadow);
|
|
182
167
|
}
|
|
183
168
|
|
|
@@ -188,8 +173,8 @@ const isChecked = computed(() => {
|
|
|
188
173
|
overflow: hidden;
|
|
189
174
|
opacity: 0;
|
|
190
175
|
|
|
191
|
-
height: var(--
|
|
192
|
-
width: var(--
|
|
176
|
+
height: var(--_icon-size);
|
|
177
|
+
width: var(--_icon-size);
|
|
193
178
|
|
|
194
179
|
&:hover {
|
|
195
180
|
cursor: pointer;
|
|
@@ -197,7 +182,7 @@ const isChecked = computed(() => {
|
|
|
197
182
|
|
|
198
183
|
&:not(.is-button) {
|
|
199
184
|
&:focus-visible {
|
|
200
|
-
--_box-shadow: var(--
|
|
185
|
+
--_box-shadow: var(--form-focus-box-shadow);
|
|
201
186
|
}
|
|
202
187
|
}
|
|
203
188
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-checkbox-radio-with-label" :class="[elementClasses, optionsLayout, { error: fieldHasError }]">
|
|
2
|
+
<div class="input-checkbox-radio-with-label" :data-size="size" :class="[elementClasses, optionsLayout, { error: fieldHasError }]">
|
|
3
3
|
<InputCheckboxRadioCore :type :id :name :required v-model="modelValue" :size :trueValue :falseValue :fieldHasError :theme :ariaDescribedby>
|
|
4
4
|
<template #checkedIcon>
|
|
5
5
|
<slot name="checkedIcon"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-number-wrapper" :data-form-theme="formTheme" :class="elementClasses">
|
|
2
|
+
<div class="input-number-wrapper" :data-form-theme="formTheme" :data-size="size" :class="elementClasses">
|
|
3
3
|
<div v-if="hasLeftContent" class="slot left">
|
|
4
4
|
<slot name="left"></slot>
|
|
5
5
|
</div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:min
|
|
14
14
|
:max
|
|
15
15
|
:step
|
|
16
|
-
:class="['input-number-core', `input-number--${theme}`, `input-number--${size}`, `input-number--${weight}
|
|
16
|
+
:class="['input-number-core', `input-number--${theme}`, `input-number--${size}`, `input-number--${weight}`]"
|
|
17
17
|
v-model="modelValue"
|
|
18
18
|
ref="inputField"
|
|
19
19
|
inputmode="numeric"
|
|
@@ -109,8 +109,7 @@ onMounted(() => {
|
|
|
109
109
|
|
|
110
110
|
<style lang="css">
|
|
111
111
|
.input-number-wrapper {
|
|
112
|
-
--
|
|
113
|
-
--_border-width: var(--input-border-width-default);
|
|
112
|
+
--_focus-box-shadow: var(--box-shadow-off);
|
|
114
113
|
--_min-width: v-bind(minLength);
|
|
115
114
|
|
|
116
115
|
display: flex;
|
|
@@ -118,9 +117,14 @@ onMounted(() => {
|
|
|
118
117
|
|
|
119
118
|
width: fit-content;
|
|
120
119
|
|
|
120
|
+
background-color: var(--theme-form-input-bg);
|
|
121
|
+
border-radius: var(--form-element-border-width);
|
|
122
|
+
border: var(--form-element-border-width) solid var(--theme-form-input-border);
|
|
123
|
+
outline: var(--form-element-outline-width) solid var(--theme-form-input-outline);
|
|
124
|
+
box-shadow: var(--_focus-box-shadow);
|
|
125
|
+
|
|
121
126
|
.slot {
|
|
122
127
|
display: inline-block;
|
|
123
|
-
padding-inline: 0.8rem;
|
|
124
128
|
|
|
125
129
|
.icon {
|
|
126
130
|
font-weight: 900;
|
|
@@ -148,22 +152,19 @@ onMounted(() => {
|
|
|
148
152
|
box-shadow: none;
|
|
149
153
|
|
|
150
154
|
background-color: var(--theme-form-input-bg);
|
|
151
|
-
border-radius: var(--input-border-width-default);
|
|
152
|
-
border: var(--_border-width) solid var(--theme-form-input-border);
|
|
153
|
-
outline: var(--_outline-width) solid var(--theme-form-input-outline);
|
|
154
|
-
|
|
155
155
|
color: var(--theme-form-input-text);
|
|
156
156
|
font-family: var(--font-family);
|
|
157
|
-
font-size: var(--
|
|
158
|
-
line-height: var(--line-height);
|
|
159
|
-
|
|
157
|
+
font-size: var(--form-element-font-size);
|
|
158
|
+
line-height: var(--form-element-line-height);
|
|
159
|
+
|
|
160
|
+
padding-inline: var(--form-text-padding-inline);
|
|
161
|
+
padding-block-start: var(--form-element-padding-block-start);
|
|
162
|
+
padding-block-end: var(--form-element-padding-block-end);
|
|
160
163
|
text-align: center;
|
|
161
164
|
min-width: var(--_min-width);
|
|
162
165
|
|
|
163
166
|
&:focus-visible {
|
|
164
|
-
|
|
165
|
-
outline: var(--_outline-width) solid hsl(from var(--theme-form-input-outline-focus) h s 50%);
|
|
166
|
-
box-shadow: var(--theme-form-focus-box-shadow);
|
|
167
|
+
--_focus-box-shadow: var(--box-shadow-on);
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
&::placeholder,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-number-with-label" :data-form-theme="formTheme" :class="[elementClasses, `theme-${theme}`, { error: fieldHasError }]">
|
|
2
|
+
<div class="input-number-with-label" :data-form-theme="formTheme" :data-size="size" :class="[elementClasses, `theme-${theme}`, { error: fieldHasError }]">
|
|
3
3
|
<label class="input-number-label body-normal-bold" :for="id">{{ label }}</label>
|
|
4
4
|
<template v-if="hasDescription">
|
|
5
5
|
<slot name="description"></slot>
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
:readonly="Number(modelValue) <= min"
|
|
14
14
|
:is-pending="false"
|
|
15
15
|
buttonText="Step down"
|
|
16
|
-
|
|
17
|
-
size
|
|
16
|
+
theme="input-action"
|
|
17
|
+
:size
|
|
18
18
|
>
|
|
19
19
|
<template #iconOnly>
|
|
20
20
|
<slot name="left"></slot>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
:readonly="Number(modelValue) >= max"
|
|
29
29
|
:is-pending="false"
|
|
30
30
|
buttonText="Step up"
|
|
31
|
-
|
|
32
|
-
size
|
|
31
|
+
theme="input-action"
|
|
32
|
+
:size
|
|
33
33
|
>
|
|
34
34
|
<template #iconOnly>
|
|
35
35
|
<slot name="right"></slot>
|
|
@@ -133,8 +133,8 @@ const updateValue = (step: number, withinRangeLimit: boolean) => {
|
|
|
133
133
|
|
|
134
134
|
<style lang="css">
|
|
135
135
|
.input-number-with-label {
|
|
136
|
-
--_border-width: var(--
|
|
137
|
-
--_outline-width: var(--
|
|
136
|
+
--_border-width: var(--form-element-border-width);
|
|
137
|
+
--_outline-width: var(--form-element-outline-width);
|
|
138
138
|
--_label-padding-inline: 1rem;
|
|
139
139
|
|
|
140
140
|
.input-number-label {
|
|
@@ -116,8 +116,8 @@ const changeBackgroundColor = () => {
|
|
|
116
116
|
<style lang="css">
|
|
117
117
|
.input-range-wrapper {
|
|
118
118
|
--_gutter: 1.2rem;
|
|
119
|
-
--_border-width: var(--
|
|
120
|
-
--_outline-width: var(--
|
|
119
|
+
--_border-width: var(--form-element-border-width);
|
|
120
|
+
--_outline-width: var(--form-element-outline-width);
|
|
121
121
|
|
|
122
122
|
--_input-range-height: 2.4rem;
|
|
123
123
|
--_slot-translate-y: calc(var(--_input-range-height) / 4);
|
|
@@ -203,7 +203,7 @@ const changeBackgroundColor = () => {
|
|
|
203
203
|
} */
|
|
204
204
|
|
|
205
205
|
&:focus-visible {
|
|
206
|
-
box-shadow: var(--
|
|
206
|
+
box-shadow: var(--form-focus-box-shadow);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -154,18 +154,6 @@ onMounted(() => {
|
|
|
154
154
|
margin: 0 auto;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.sr-only {
|
|
158
|
-
position: absolute;
|
|
159
|
-
width: 0.1rem;
|
|
160
|
-
height: 0.1rem;
|
|
161
|
-
padding: 0;
|
|
162
|
-
margin: -0.1rem;
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
clip: rect(0, 0, 0, 0);
|
|
165
|
-
white-space: nowrap;
|
|
166
|
-
border-width: 0;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
157
|
.control:focus-within,
|
|
170
158
|
.control:hover {
|
|
171
159
|
--active: 1;
|