@bagelink/vue 1.20.78 → 1.20.83
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/{StructuredEditor-HFOfODf9.cjs → StructuredEditor-CoeToE0Q.cjs} +1 -1
- package/dist/{StructuredEditor-w0UY60b7.js → StructuredEditor-DLKqMtTF.js} +1 -1
- package/dist/components/form/inputs/OTP.vue.d.ts +2 -2
- package/dist/components/form/inputs/OTP.vue.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-SwfYbKT-.js → src-BwqmrajQ.js} +3 -3
- package/dist/{src-BACj3hjY.cjs → src-a5H2o8KK.cjs} +2 -2
- package/dist/src.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/form/inputs/OTP.vue +42 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.83",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bagel Studio",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/signature_pad": "^4.0.0",
|
|
64
64
|
"vue": "^3.5.43",
|
|
65
65
|
"vue-component-type-helpers": "^2.2.12",
|
|
66
|
-
"@bagelink/sdk": "1.20.
|
|
66
|
+
"@bagelink/sdk": "1.20.83"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bagelink/sdk": "*",
|
|
@@ -10,9 +10,9 @@ const props = defineProps<{
|
|
|
10
10
|
error?: string
|
|
11
11
|
/** Color of the entered digits. Accepts any CSS color or theme var (e.g. "primary", "var(--bgl-primary)", "#e11d48"). */
|
|
12
12
|
color?: string
|
|
13
|
-
/** Size of each digit box (width & height). Accepts any CSS length (e.g. "2.5rem", "40px"). Default: 3rem. */
|
|
13
|
+
/** Size of each digit box (sets --otp-input-width & --otp-input-height). Accepts any CSS length (e.g. "2.5rem", "40px"). Default: 3rem. */
|
|
14
14
|
size?: string
|
|
15
|
-
/**
|
|
15
|
+
/** Optional mobile-only size below 910px (sets --otp-input-mobile-width & --otp-input-mobile-height). When omitted, mobile uses the desktop size. */
|
|
16
16
|
mobileSize?: string
|
|
17
17
|
} & BagelInputShellProps>()
|
|
18
18
|
|
|
@@ -28,9 +28,15 @@ const digitColor = computed(() => {
|
|
|
28
28
|
|
|
29
29
|
const shellStyle = computed(() => {
|
|
30
30
|
const style = { ...(baseShellStyle.value ?? {}) } as Record<string, string>
|
|
31
|
-
if (digitColor.value) { style['--
|
|
32
|
-
if (props.size) {
|
|
33
|
-
|
|
31
|
+
if (digitColor.value) { style['--otp-input-color'] = digitColor.value }
|
|
32
|
+
if (props.size) {
|
|
33
|
+
style['--otp-input-width'] = props.size
|
|
34
|
+
style['--otp-input-height'] = props.size
|
|
35
|
+
}
|
|
36
|
+
if (props.mobileSize) {
|
|
37
|
+
style['--otp-input-mobile-width'] = props.mobileSize
|
|
38
|
+
style['--otp-input-mobile-height'] = props.mobileSize
|
|
39
|
+
}
|
|
34
40
|
return Object.keys(style).length > 0 ? style : undefined
|
|
35
41
|
})
|
|
36
42
|
|
|
@@ -127,7 +133,7 @@ function focusInput() {
|
|
|
127
133
|
color: var(--bgl-red);
|
|
128
134
|
}
|
|
129
135
|
.otp_wrap.has-error .digit-box {
|
|
130
|
-
outline:
|
|
136
|
+
outline: var(--otp-input-outline-width) solid var(--bgl-red) !important;
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
.otp_wrap {
|
|
@@ -162,34 +168,50 @@ outline: none;
|
|
|
162
168
|
.otp-hidden-input::selection { background: transparent; }
|
|
163
169
|
|
|
164
170
|
.digit-box {
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
width: var(--otp-input-width);
|
|
172
|
+
height: var(--otp-input-height);
|
|
167
173
|
flex: 0 0 auto;
|
|
168
|
-
color: var(--
|
|
169
|
-
border:
|
|
174
|
+
color: var(--otp-input-color);
|
|
175
|
+
border: var(--otp-input-border-width) solid var(--bgl-input-label-active-color, var(--bgl-primary-tint));
|
|
170
176
|
display: inline-flex;
|
|
171
177
|
align-items: center;
|
|
172
178
|
justify-content: center;
|
|
173
|
-
background: var(--
|
|
174
|
-
border-radius:
|
|
175
|
-
margin:
|
|
179
|
+
background: var(--otp-input-bg);
|
|
180
|
+
border-radius: var(--otp-input-border-radius);
|
|
181
|
+
margin: var(--otp-input-gap);
|
|
176
182
|
text-align: center;
|
|
177
|
-
font-size:
|
|
183
|
+
font-size: var(--otp-input-font-size);
|
|
184
|
+
font-weight: var(--otp-input-font-weight);
|
|
178
185
|
font-variant-numeric: tabular-nums;
|
|
179
186
|
user-select: none;
|
|
180
187
|
transition: outline-color 0.2s ease, box-shadow 0.2s ease;
|
|
181
188
|
}
|
|
182
189
|
|
|
183
190
|
.digit-box.is-active {
|
|
184
|
-
outline:
|
|
191
|
+
outline: var(--otp-input-outline-width) solid var(--bgl-input-label-active-color, var(--bgl-primary));
|
|
185
192
|
filter: drop-shadow(0 0 0.25rem var(--bgl-input-label-active-color, var(--bgl-primary)));
|
|
186
|
-
outline-offset:
|
|
193
|
+
outline-offset: var(--otp-input-outline-offset);
|
|
187
194
|
}
|
|
188
195
|
|
|
189
196
|
/* ── frame variant ──────────────────────────────────────────────────────── */
|
|
190
197
|
|
|
191
198
|
.otp-input {
|
|
192
199
|
width: 100%;
|
|
200
|
+
--otp-input-width: var(--bgl-otp-digit-size, 3rem);
|
|
201
|
+
--otp-input-height: var(--bgl-otp-digit-size, 3rem);
|
|
202
|
+
--otp-input-font-size: calc(var(--otp-input-height) * 0.8);
|
|
203
|
+
--otp-input-font-weight: 400;
|
|
204
|
+
--otp-input-border-radius: 5px;
|
|
205
|
+
--otp-input-border-width: 1px;
|
|
206
|
+
--otp-input-outline-width: 1px;
|
|
207
|
+
--otp-input-outline-offset: 1px;
|
|
208
|
+
--otp-input-gap: 5px;
|
|
209
|
+
--otp-input-bg: var(--bgl-gray-light);
|
|
210
|
+
--otp-input-color: var(--bgl-otp-digit-color, inherit);
|
|
211
|
+
/* Mobile vars are intentionally unset by default — the media query falls
|
|
212
|
+
back to the desktop vars (and the previous 0.25rem padding). Set
|
|
213
|
+
--otp-input-mobile-* (or the mobileSize prop) only when you need a
|
|
214
|
+
mobile-specific override. */
|
|
193
215
|
}
|
|
194
216
|
|
|
195
217
|
.otp-input.frame .digit-box {
|
|
@@ -216,9 +238,10 @@ outline-offset: -1px;
|
|
|
216
238
|
|
|
217
239
|
@media screen and (max-width: 910px) {
|
|
218
240
|
.digit-box {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
241
|
+
width: var(--otp-input-mobile-width, var(--bgl-otp-digit-mobile-size, var(--otp-input-width)));
|
|
242
|
+
height: var(--otp-input-mobile-height, var(--bgl-otp-digit-mobile-size, var(--otp-input-height)));
|
|
243
|
+
font-size: var(--otp-input-mobile-font-size, var(--otp-input-font-size));
|
|
244
|
+
padding: var(--otp-input-mobile-padding, 0.25rem);
|
|
222
245
|
}
|
|
223
246
|
}
|
|
224
247
|
|