@bagelink/vue 1.15.285 → 1.15.287
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/components/form/inputs/TextInput.vue.d.ts +2 -0
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/form/inputs/TextInput.vue +4 -1
- package/src/styles/input-variants.css +6 -6
- package/src/styles/inputs.css +14 -14
package/package.json
CHANGED
|
@@ -26,6 +26,8 @@ export interface TextInputProps extends ValidateInputBaseT, BagelInputShellProps
|
|
|
26
26
|
defaultValue?: string | number
|
|
27
27
|
shrink?: boolean
|
|
28
28
|
underlined?: boolean
|
|
29
|
+
/** Disables visual focus styles while preserving focus behavior. */
|
|
30
|
+
flat?: boolean
|
|
29
31
|
disabled?: boolean
|
|
30
32
|
type?: string
|
|
31
33
|
nativeInputAttrs?: { [key: string]: any }
|
|
@@ -165,6 +167,7 @@ onMounted(async () => {
|
|
|
165
167
|
shrink,
|
|
166
168
|
code,
|
|
167
169
|
underlined,
|
|
170
|
+
flat,
|
|
168
171
|
'textInputIconWrap': icon,
|
|
169
172
|
'txtInputIconStart': iconStart,
|
|
170
173
|
'multiline-field': autoheight || inputRows >= 2,
|
|
@@ -294,7 +297,7 @@ transform: translateY(50%);
|
|
|
294
297
|
/* In a textarea, align icons with the first line instead of the field's bottom. */
|
|
295
298
|
.bagel-input.multiline-field:not(.underlined).textInputIconWrap .bgl_icon-font,
|
|
296
299
|
.bagel-input.multiline-field:not(.underlined).txtInputIconStart .iconStart {
|
|
297
|
-
top: calc(0.
|
|
300
|
+
top: calc(0.9rem + var(--bgl-input-font-size) / 2);
|
|
298
301
|
bottom: auto;
|
|
299
302
|
transform: translateY(-50%);
|
|
300
303
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* float up: focused (text inputs) or open (select) */
|
|
36
|
-
.bagel-input.underlined:focus-within .label-text,
|
|
36
|
+
.bagel-input.underlined:not(.flat):focus-within .label-text,
|
|
37
37
|
.bagel-input.underlined.open .label-text {
|
|
38
38
|
top: -0.65rem;
|
|
39
39
|
font-size: 0.65rem;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* focused: color the label */
|
|
75
|
-
.bagel-input.underlined:focus-within .label-text,
|
|
75
|
+
.bagel-input.underlined:not(.flat):focus-within .label-text,
|
|
76
76
|
.bagel-input.underlined.open .label-text {
|
|
77
77
|
color: var(--bgl-input-label-active-color);
|
|
78
78
|
opacity: 1;
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
pointer-events: none;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.bagel-input.underlined:focus-within > label:not(:has(textarea))::after,
|
|
113
|
+
.bagel-input.underlined:not(.flat):focus-within > label:not(:has(textarea))::after,
|
|
114
114
|
.bagel-input.underlined.open > label:not(:has(textarea))::after {
|
|
115
115
|
width: 100%;
|
|
116
116
|
}
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
transition: border-color 0.25s ease !important;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.bagel-input.underlined textarea:focus {
|
|
129
|
+
.bagel-input.underlined:not(.flat) textarea:focus {
|
|
130
130
|
outline: none !important;
|
|
131
131
|
box-shadow: none !important;
|
|
132
132
|
border-color: var(--bgl-input-label-active-color, var(--bgl-primary)) !important;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/* label floated: moves to top padding area, stays inside border */
|
|
142
|
-
.bagel-input.underlined:focus-within label:has(textarea) .label-text {
|
|
142
|
+
.bagel-input.underlined:not(.flat):focus-within label:has(textarea) .label-text {
|
|
143
143
|
top: 0.45rem;
|
|
144
144
|
font-size: 0.65rem;
|
|
145
145
|
color: var(--bgl-input-label-active-color);
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
opacity: 1;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.bagel-input.underlined:focus-within
|
|
158
|
+
.bagel-input.underlined:not(.flat):focus-within
|
|
159
159
|
label:has(textarea:not(:placeholder-shown))
|
|
160
160
|
.label-text {
|
|
161
161
|
top: 0.45rem;
|
package/src/styles/inputs.css
CHANGED
|
@@ -52,8 +52,8 @@ select {
|
|
|
52
52
|
color: var(--bgl-input-label-color);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.bagel-input:focus-within label,
|
|
56
|
-
.bagel-input:focus-within .label-text,
|
|
55
|
+
.bagel-input:not(.flat):focus-within label,
|
|
56
|
+
.bagel-input:not(.flat):focus-within .label-text,
|
|
57
57
|
.bagel-input.open label,
|
|
58
58
|
.bagel-input.open .label-text {
|
|
59
59
|
color: var(--bgl-input-label-active-color);
|
|
@@ -140,9 +140,9 @@ select {
|
|
|
140
140
|
box-shadow 0.2s ease;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.bagel-input.frame input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not(.colorInputPick):focus,
|
|
144
|
-
.bagel-input.frame textarea:focus,
|
|
145
|
-
.bagel-input.frame select:focus {
|
|
143
|
+
.bagel-input.frame:not(.flat) input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not(.colorInputPick):focus,
|
|
144
|
+
.bagel-input.frame:not(.flat) textarea:focus,
|
|
145
|
+
.bagel-input.frame:not(.flat) select:focus {
|
|
146
146
|
outline-color: var(--bgl-input-label-active-color, var(--bgl-primary)) !important;
|
|
147
147
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--bgl-input-label-active-color, var(--bgl-primary)) 12%, transparent) !important;
|
|
148
148
|
}
|
|
@@ -367,18 +367,18 @@ select {
|
|
|
367
367
|
text-align: right;
|
|
368
368
|
} */
|
|
369
369
|
|
|
370
|
-
.input.active .bagel-input input:focus-visible,
|
|
371
|
-
.bagel-input select:focus-visible,
|
|
372
|
-
.bagel-input textarea:focus-visible,
|
|
370
|
+
.input.active .bagel-input:not(.flat) input:focus-visible,
|
|
371
|
+
.bagel-input:not(.flat) select:focus-visible,
|
|
372
|
+
.bagel-input:not(.flat) textarea:focus-visible,
|
|
373
373
|
.bagel-input button:focus-visible,
|
|
374
374
|
.bgl_btn:focus-visible {
|
|
375
375
|
outline-color: var(--bgl-input-label-active-color, var(--bgl-primary-tint));
|
|
376
376
|
box-shadow: inset 0 0 10px #00000012;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
.bagel-input input:not([type="radio"]):not([type="checkbox"]):focus,
|
|
380
|
-
.bagel-input select:focus,
|
|
381
|
-
.bagel-input textarea:focus {
|
|
379
|
+
.bagel-input:not(.flat) input:not([type="radio"]):not([type="checkbox"]):focus,
|
|
380
|
+
.bagel-input:not(.flat) select:focus,
|
|
381
|
+
.bagel-input:not(.flat) textarea:focus {
|
|
382
382
|
outline-color: rgba(0, 0, 0, 0.05);
|
|
383
383
|
box-shadow: inset 0 0 8px #00000018;
|
|
384
384
|
outline-color: var(--bgl-input-bg);
|
|
@@ -423,9 +423,9 @@ select {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
.input.active.light-input,
|
|
426
|
-
.bagel-input.light-input input:focus-visible,
|
|
427
|
-
.bagel-input.light-input select:focus-visible,
|
|
428
|
-
.bagel-input.light-input textarea:focus-visible,
|
|
426
|
+
.bagel-input.light-input:not(.flat) input:focus-visible,
|
|
427
|
+
.bagel-input.light-input:not(.flat) select:focus-visible,
|
|
428
|
+
.bagel-input.light-input:not(.flat) textarea:focus-visible,
|
|
429
429
|
.bagel-input.num-input.light-input .input-icon-wrap:focus-within {
|
|
430
430
|
box-shadow:
|
|
431
431
|
0 2px 8px 0 rgba(0, 0, 0, 0.15),
|