@duskmoon-dev/core 1.19.9 → 1.19.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/README.md +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/datepicker.css +1 -1
- package/dist/components/file-input.css +1 -1
- package/dist/components/form-group.css +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/index.css +142 -230
- package/dist/components/input.css +1 -1
- package/dist/components/join.css +4 -4
- package/dist/components/otp-input.css +160 -2
- package/dist/components/radio.css +1 -1
- package/dist/components/select.css +1 -1
- package/dist/components/switch.css +1 -1
- package/dist/components/textarea.css +1 -1
- package/dist/components/toggle-switch.css +1 -1
- package/dist/components/toggle.css +1 -1
- package/dist/components/validator.css +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/datepicker.js +1 -1
- package/dist/esm/components/file-input.js +1 -1
- package/dist/esm/components/form-group.js +1 -1
- package/dist/esm/components/form.js +1 -1
- package/dist/esm/components/input.js +1 -1
- package/dist/esm/components/join.js +4 -4
- package/dist/esm/components/otp-input.js +160 -2
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/textarea.js +1 -1
- package/dist/esm/components/toggle-switch.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/validator.js +1 -1
- package/dist/index.css +142 -230
- package/dist/index.min.css +1 -1
- package/dist/standalone/duskmoonui-themes.css +1 -1
- package/dist/standalone/duskmoonui.css +144 -232
- package/dist/standalone/duskmoonui.js +5 -5
- package/dist/standalone/duskmoonui.mjs +5 -5
- package/package.json +1 -7
- package/dist/components/pin-input.css +0 -245
- package/dist/esm/components/pin-input.d.ts +0 -5
- package/dist/esm/components/pin-input.js +0 -254
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
51
51
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
52
52
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
53
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
53
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
54
54
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
55
55
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
51
51
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
52
52
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
53
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
53
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
54
54
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
55
55
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
51
51
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
52
52
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
53
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
53
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
54
54
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
55
55
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
51
51
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
52
52
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
53
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
53
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
54
54
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
55
55
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
56
56
|
|
package/dist/components/form.css
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
55
55
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
56
56
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
57
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
57
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
58
58
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
59
59
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
60
60
|
|
|
@@ -1381,7 +1381,7 @@
|
|
|
1381
1381
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
1382
1382
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
1383
1383
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
1384
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
1384
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
1385
1385
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
1386
1386
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
1387
1387
|
|
|
@@ -10188,256 +10188,168 @@
|
|
|
10188
10188
|
}
|
|
10189
10189
|
@media (forced-colors: active) { .otp-code { background-image: none; } }
|
|
10190
10190
|
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
*
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
@layer components {
|
|
10204
|
-
/* Base PIN Container */
|
|
10205
|
-
.pin-input {
|
|
10191
|
+
/* One native input over decorative cells, following the daisyUI OTP layout.
|
|
10192
|
+
The spans must precede the input; their count matches maxlength/pattern. */
|
|
10193
|
+
.otp-input:has(> .otp-code) {
|
|
10194
|
+
--otp-count: 6;
|
|
10195
|
+
--otp-cell: 2ch;
|
|
10196
|
+
--otp-gap-ratio: 0.25;
|
|
10197
|
+
--otp-gap: calc(var(--otp-cell) * var(--otp-gap-ratio));
|
|
10198
|
+
--otp-stride: calc(var(--otp-cell) + var(--otp-gap));
|
|
10199
|
+
--otp-width-units: calc(var(--otp-count) * (1 + var(--otp-gap-ratio)) + 0.25);
|
|
10200
|
+
--otp-height: 3rem;
|
|
10201
|
+
position: relative;
|
|
10206
10202
|
display: inline-flex;
|
|
10203
|
+
flex-wrap: nowrap;
|
|
10207
10204
|
align-items: center;
|
|
10208
|
-
gap: 0
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
font-size: 1.5rem;
|
|
10217
|
-
font-weight: 600;
|
|
10218
|
-
text-align: center;
|
|
10219
|
-
color: var(--color-on-surface);
|
|
10220
|
-
background-color: var(--color-surface);
|
|
10221
|
-
border: 2px solid currentColor;
|
|
10205
|
+
gap: 0;
|
|
10206
|
+
inline-size: calc(var(--otp-cell) * var(--otp-width-units) + 2px);
|
|
10207
|
+
max-inline-size: 100%;
|
|
10208
|
+
container-type: inline-size;
|
|
10209
|
+
block-size: var(--otp-height);
|
|
10210
|
+
font: 1.5rem / 1 ui-monospace, monospace;
|
|
10211
|
+
direction: ltr;
|
|
10212
|
+
color: var(--dm-validation-color, var(--color-on-surface));
|
|
10222
10213
|
border-radius: var(--radius-sm);
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
caret-color: var(--color-primary);
|
|
10226
|
-
-webkit-text-security: disc;
|
|
10227
|
-
}
|
|
10228
|
-
|
|
10229
|
-
.pin-input-field::placeholder {
|
|
10230
|
-
color: var(--color-on-surface-variant);
|
|
10231
|
-
opacity: 0.3;
|
|
10232
|
-
}
|
|
10233
|
-
|
|
10234
|
-
.pin-input-field:hover:not(:disabled):not(:focus) {
|
|
10235
|
-
background-color: var(--color-surface-container);
|
|
10236
|
-
}
|
|
10237
|
-
|
|
10238
|
-
.pin-input-field:focus {
|
|
10239
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
10240
|
-
}
|
|
10241
|
-
|
|
10242
|
-
.pin-input-field:disabled {
|
|
10243
|
-
opacity: 0.38;
|
|
10244
|
-
cursor: not-allowed;
|
|
10245
|
-
background-color: var(--color-surface-container);
|
|
10246
|
-
}
|
|
10247
|
-
|
|
10248
|
-
/* Show PIN (toggle visibility) */
|
|
10249
|
-
.pin-input-visible .pin-input-field {
|
|
10250
|
-
-webkit-text-security: none;
|
|
10251
|
-
}
|
|
10252
|
-
|
|
10253
|
-
/* Size Variants */
|
|
10254
|
-
.pin-input-sm .pin-input-field {
|
|
10255
|
-
width: 2.5rem;
|
|
10256
|
-
height: 3rem;
|
|
10257
|
-
font-size: 1.25rem;
|
|
10258
|
-
border-radius: var(--radius-xs);
|
|
10214
|
+
/* Reserve space for the trailing native caret and cell focus rings. */
|
|
10215
|
+
clip-path: inset(-4px -4px -4px -4px);
|
|
10259
10216
|
}
|
|
10260
10217
|
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10218
|
+
/* Scale cells to the actual wrapper width, including inside narrow forms. */
|
|
10219
|
+
.otp-input > :is(span, .otp-code), .otp-input:has(> .otp-code)::after {
|
|
10220
|
+
--otp-cell: calc((100cqi - 2px) / var(--otp-width-units));
|
|
10221
|
+
--otp-gap: calc(var(--otp-cell) * var(--otp-gap-ratio));
|
|
10222
|
+
--otp-stride: calc(var(--otp-cell) + var(--otp-gap));
|
|
10266
10223
|
}
|
|
10267
10224
|
|
|
10268
|
-
|
|
10269
|
-
.
|
|
10270
|
-
|
|
10271
|
-
}
|
|
10225
|
+
.otp-input:has(> span:nth-child(1)) { --otp-count: 1; }
|
|
10226
|
+
.otp-input:has(> span:nth-child(2)) { --otp-count: 2; }
|
|
10227
|
+
.otp-input:has(> span:nth-child(3)) { --otp-count: 3; }
|
|
10228
|
+
.otp-input:has(> span:nth-child(4)) { --otp-count: 4; }
|
|
10229
|
+
.otp-input:has(> span:nth-child(5)) { --otp-count: 5; }
|
|
10230
|
+
.otp-input:has(> span:nth-child(6)) { --otp-count: 6; }
|
|
10231
|
+
.otp-input:has(> span:nth-child(7)) { --otp-count: 7; }
|
|
10232
|
+
.otp-input:has(> span:nth-child(8)) { --otp-count: 8; }
|
|
10272
10233
|
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10234
|
+
.otp-input > span[aria-hidden="true"] {
|
|
10235
|
+
position: absolute;
|
|
10236
|
+
inset-block: 0;
|
|
10237
|
+
inline-size: var(--otp-cell);
|
|
10238
|
+
box-sizing: border-box;
|
|
10239
|
+
background-color: var(--color-surface);
|
|
10240
|
+
border: 1px solid currentColor;
|
|
10241
|
+
border-radius: inherit;
|
|
10242
|
+
pointer-events: none;
|
|
10243
|
+
transition: background-color 150ms ease-in-out;
|
|
10279
10244
|
}
|
|
10245
|
+
.otp-input > span:nth-child(1) { left: 0; }
|
|
10246
|
+
.otp-input > span:nth-child(2) { left: var(--otp-stride); }
|
|
10247
|
+
.otp-input > span:nth-child(3) { left: calc(var(--otp-stride) * 2); }
|
|
10248
|
+
.otp-input > span:nth-child(4) { left: calc(var(--otp-stride) * 3); }
|
|
10249
|
+
.otp-input > span:nth-child(5) { left: calc(var(--otp-stride) * 4); }
|
|
10250
|
+
.otp-input > span:nth-child(6) { left: calc(var(--otp-stride) * 5); }
|
|
10251
|
+
.otp-input > span:nth-child(7) { left: calc(var(--otp-stride) * 6); }
|
|
10252
|
+
.otp-input > span:nth-child(8) { left: calc(var(--otp-stride) * 7); }
|
|
10280
10253
|
|
|
10281
|
-
.
|
|
10282
|
-
|
|
10254
|
+
.otp-input > .otp-code {
|
|
10255
|
+
position: relative;
|
|
10256
|
+
z-index: 1;
|
|
10257
|
+
field-sizing: content;
|
|
10258
|
+
flex-shrink: 0;
|
|
10259
|
+
inline-size: auto;
|
|
10260
|
+
min-inline-size: 0;
|
|
10261
|
+
max-inline-size: none;
|
|
10262
|
+
block-size: 100%;
|
|
10263
|
+
margin: 0;
|
|
10264
|
+
padding: 0 0 0 calc((var(--otp-cell) - 1ch) / 2);
|
|
10265
|
+
border: 0;
|
|
10266
|
+
border-radius: 0;
|
|
10267
|
+
font: inherit;
|
|
10268
|
+
font-size: min(1em, var(--otp-cell));
|
|
10269
|
+
letter-spacing: calc(var(--otp-stride) - 1ch);
|
|
10270
|
+
color: inherit;
|
|
10271
|
+
background: transparent;
|
|
10272
|
+
outline: none;
|
|
10283
10273
|
box-shadow: none;
|
|
10274
|
+
appearance: none;
|
|
10284
10275
|
}
|
|
10285
10276
|
|
|
10286
|
-
/*
|
|
10287
|
-
.
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
height: 2.5rem;
|
|
10296
|
-
}
|
|
10297
|
-
|
|
10298
|
-
.pin-input-circle.pin-input-lg .pin-input-field {
|
|
10299
|
-
width: 3.5rem;
|
|
10300
|
-
height: 3.5rem;
|
|
10301
|
-
}
|
|
10302
|
-
|
|
10303
|
-
/* Dot Display (shows dots instead of numbers) */
|
|
10304
|
-
.pin-input-dots .pin-input-field {
|
|
10305
|
-
font-size: 2rem;
|
|
10306
|
-
letter-spacing: -0.25rem;
|
|
10307
|
-
}
|
|
10308
|
-
|
|
10309
|
-
/* Color Variants */
|
|
10310
|
-
.pin-input-primary .pin-input-field {
|
|
10311
|
-
color: var(--color-primary);
|
|
10312
|
-
}
|
|
10313
|
-
|
|
10314
|
-
.pin-input-primary .pin-input-field:focus {
|
|
10315
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
10316
|
-
}
|
|
10317
|
-
|
|
10318
|
-
.pin-input-secondary .pin-input-field {
|
|
10319
|
-
color: var(--color-secondary);
|
|
10320
|
-
}
|
|
10321
|
-
|
|
10322
|
-
.pin-input-secondary .pin-input-field:focus {
|
|
10323
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
|
|
10324
|
-
}
|
|
10325
|
-
|
|
10326
|
-
.pin-input-tertiary .pin-input-field {
|
|
10327
|
-
color: var(--color-tertiary);
|
|
10328
|
-
}
|
|
10329
|
-
|
|
10330
|
-
.pin-input-tertiary .pin-input-field:focus {
|
|
10331
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
|
|
10332
|
-
}
|
|
10333
|
-
|
|
10334
|
-
.pin-input-info .pin-input-field {
|
|
10335
|
-
color: var(--color-info);
|
|
10336
|
-
}
|
|
10337
|
-
|
|
10338
|
-
.pin-input-info .pin-input-field:focus {
|
|
10339
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-info) 10%, transparent);
|
|
10340
|
-
}
|
|
10341
|
-
|
|
10342
|
-
.pin-input-success .pin-input-field {
|
|
10343
|
-
color: var(--color-success);
|
|
10344
|
-
}
|
|
10345
|
-
|
|
10346
|
-
.pin-input-success .pin-input-field:focus {
|
|
10347
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
|
|
10348
|
-
}
|
|
10349
|
-
|
|
10350
|
-
.pin-input-warning .pin-input-field {
|
|
10351
|
-
color: var(--color-warning);
|
|
10352
|
-
}
|
|
10353
|
-
|
|
10354
|
-
.pin-input-warning .pin-input-field:focus {
|
|
10355
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
|
|
10356
|
-
}
|
|
10357
|
-
|
|
10358
|
-
.pin-input-error .pin-input-field {
|
|
10359
|
-
color: var(--color-error);
|
|
10360
|
-
animation: pin-shake 300ms ease-in-out;
|
|
10361
|
-
}
|
|
10362
|
-
|
|
10363
|
-
.pin-input-error .pin-input-field:focus {
|
|
10364
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
|
|
10365
|
-
}
|
|
10366
|
-
|
|
10367
|
-
.pin-input-accent .pin-input-field {
|
|
10368
|
-
color: var(--color-accent);
|
|
10369
|
-
}
|
|
10370
|
-
|
|
10371
|
-
.pin-input-accent .pin-input-field:focus {
|
|
10372
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-accent) 10%, transparent);
|
|
10373
|
-
}
|
|
10374
|
-
|
|
10375
|
-
.pin-input-neutral .pin-input-field {
|
|
10376
|
-
color: var(--color-neutral);
|
|
10377
|
-
}
|
|
10378
|
-
|
|
10379
|
-
.pin-input-neutral .pin-input-field:focus {
|
|
10380
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-neutral) 10%, transparent);
|
|
10381
|
-
}
|
|
10382
|
-
|
|
10383
|
-
.pin-input-base .pin-input-field {
|
|
10384
|
-
color: var(--color-base-content);
|
|
10385
|
-
}
|
|
10386
|
-
|
|
10387
|
-
.pin-input-base .pin-input-field:focus {
|
|
10388
|
-
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-base-content) 10%, transparent);
|
|
10389
|
-
}
|
|
10390
|
-
|
|
10391
|
-
@keyframes pin-shake {
|
|
10392
|
-
0%, 100% { transform: translateX(0); }
|
|
10393
|
-
20%, 60% { transform: translateX(-4px); }
|
|
10394
|
-
40%, 80% { transform: translateX(4px); }
|
|
10395
|
-
}
|
|
10396
|
-
|
|
10397
|
-
/* Ghost Variant */
|
|
10398
|
-
.pin-input-ghost .pin-input-field {
|
|
10399
|
-
background-color: transparent;
|
|
10400
|
-
border-color: transparent;
|
|
10277
|
+
/* Intrinsic input width follows the entered characters, positioning the next cell. */
|
|
10278
|
+
.otp-input:has(> .otp-code)::after {
|
|
10279
|
+
content: "";
|
|
10280
|
+
flex-shrink: 0;
|
|
10281
|
+
inline-size: var(--otp-cell);
|
|
10282
|
+
block-size: var(--otp-height);
|
|
10283
|
+
margin-inline-start: calc(-0.25 * var(--otp-cell));
|
|
10284
|
+
border-radius: inherit;
|
|
10285
|
+
pointer-events: none;
|
|
10401
10286
|
}
|
|
10402
|
-
|
|
10403
|
-
.
|
|
10404
|
-
background-color: var(--color-surface-container);
|
|
10405
|
-
border-color: transparent;
|
|
10287
|
+
.otp-input:focus-within::after,
|
|
10288
|
+
.otp-input:has(> .otp-code:focus) > span {
|
|
10406
10289
|
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
10290
|
+
outline: 1px solid currentColor;
|
|
10291
|
+
}
|
|
10292
|
+
.otp-input:has(> .otp-code:valid:focus)::after { visibility: hidden; }
|
|
10293
|
+
/* Cell indicators replace the reset's unlayered native focus outline. */
|
|
10294
|
+
.otp-input > .otp-code:focus {
|
|
10295
|
+
outline: none !important;
|
|
10296
|
+
box-shadow: none !important;
|
|
10297
|
+
}
|
|
10298
|
+
|
|
10299
|
+
.otp-input-xs:has(> .otp-code) { font-size: 1rem; --otp-height: 2rem; }
|
|
10300
|
+
.otp-input-sm:has(> .otp-code) { font-size: 1.25rem; --otp-height: 2.5rem; }
|
|
10301
|
+
.otp-input-md:has(> .otp-code) { font-size: 1.5rem; --otp-height: 3rem; }
|
|
10302
|
+
.otp-input-lg:has(> .otp-code) { font-size: 1.75rem; --otp-height: 3.5rem; }
|
|
10303
|
+
.otp-input-xl:has(> .otp-code) { font-size: 2rem; --otp-height: 4rem; }
|
|
10304
|
+
.otp-input-joined:has(> .otp-code) { --otp-gap-ratio: 0; }
|
|
10305
|
+
.otp-input-joined > span:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
|
|
10306
|
+
.otp-input-joined > span:not(:nth-last-child(2)) { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
|
|
10307
|
+
.otp-input-ghost > span { border-color: transparent; }
|
|
10308
|
+
.otp-input-filled > span { background-color: var(--color-surface-container); }
|
|
10309
|
+
.otp-input-underline > span { border-width: 0 0 1px; border-radius: 0; background-color: transparent; }
|
|
10310
|
+
|
|
10311
|
+
.otp-input-primary:has(> .otp-code) { color: var(--dm-validation-color, var(--color-primary)); }
|
|
10312
|
+
.otp-input-secondary:has(> .otp-code) { color: var(--dm-validation-color, var(--color-secondary)); }
|
|
10313
|
+
.otp-input-tertiary:has(> .otp-code) { color: var(--dm-validation-color, var(--color-tertiary)); }
|
|
10314
|
+
.otp-input-info:has(> .otp-code) { color: var(--dm-validation-color, var(--color-info)); }
|
|
10315
|
+
.otp-input-success:has(> .otp-code) { color: var(--dm-validation-color, var(--color-success)); }
|
|
10316
|
+
.otp-input-warning:has(> .otp-code) { color: var(--dm-validation-color, var(--color-warning)); }
|
|
10317
|
+
.otp-input-error:has(> .otp-code) { color: var(--dm-validation-color, var(--color-error)); }
|
|
10318
|
+
.otp-input-accent:has(> .otp-code) { color: var(--dm-validation-color, var(--color-accent)); }
|
|
10319
|
+
.otp-input-neutral:has(> .otp-code) { color: var(--dm-validation-color, var(--color-neutral)); }
|
|
10320
|
+
.otp-input-base:has(> .otp-code) { color: var(--dm-validation-color, var(--color-base-content)); }
|
|
10321
|
+
|
|
10322
|
+
.otp-input:has(> .otp-code:is(.validate :valid, .validate:valid, .validator.validator-success:user-valid):not([aria-invalid="true"]):not(:disabled)):not(:where(.form-group-error *, .form-control.error *)) {
|
|
10323
|
+
--dm-validation-color: var(--color-success);
|
|
10407
10324
|
}
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
display: flex;
|
|
10412
|
-
flex-direction: column;
|
|
10413
|
-
gap: 0.5rem;
|
|
10325
|
+
.otp-input:has(> .otp-code:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)),
|
|
10326
|
+
:is(.form-group-error, .form-control.error) .otp-input {
|
|
10327
|
+
--dm-validation-color: var(--color-error);
|
|
10414
10328
|
}
|
|
10415
|
-
|
|
10416
|
-
.
|
|
10417
|
-
|
|
10418
|
-
font-weight: 500;
|
|
10419
|
-
color: var(--color-on-surface);
|
|
10329
|
+
.otp-input:has(> .otp-code:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > span,
|
|
10330
|
+
:is(.form-group-error, .form-control.error) .otp-input > span {
|
|
10331
|
+
border-color: currentColor;
|
|
10420
10332
|
}
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
color: var(--color-on-surface-variant);
|
|
10333
|
+
.otp-input:has(> .otp-code:disabled) {
|
|
10334
|
+
opacity: 0.38;
|
|
10335
|
+
cursor: not-allowed;
|
|
10425
10336
|
}
|
|
10337
|
+
.otp-input > .otp-code:disabled { opacity: 1; }
|
|
10426
10338
|
|
|
10427
|
-
.
|
|
10428
|
-
|
|
10429
|
-
color: var(--color-
|
|
10339
|
+
/* Engines without content sizing retain a usable single native input. */
|
|
10340
|
+
@supports not (field-sizing: content) {
|
|
10341
|
+
.otp-input > .otp-code { inline-size: 100%; letter-spacing: normal; padding: 0.75rem; background-color: var(--color-surface); border: 1px solid currentColor; border-radius: inherit; }
|
|
10342
|
+
.otp-input > span, .otp-input:has(> .otp-code)::after { display: none; }
|
|
10343
|
+
.otp-input > .otp-code:focus { outline: 2px solid currentColor !important; outline-offset: 2px; }
|
|
10344
|
+
}
|
|
10345
|
+
@media (forced-colors: active) {
|
|
10346
|
+
.otp-input:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
|
|
10430
10347
|
}
|
|
10431
10348
|
|
|
10432
|
-
/* Reduce Motion */
|
|
10433
10349
|
@media (prefers-reduced-motion: reduce) {
|
|
10434
|
-
.
|
|
10350
|
+
.otp-input-field, .otp-input > span {
|
|
10435
10351
|
transition: none;
|
|
10436
10352
|
}
|
|
10437
|
-
|
|
10438
|
-
.pin-input-error .pin-input-field {
|
|
10439
|
-
animation: none;
|
|
10440
|
-
}
|
|
10441
10353
|
}
|
|
10442
10354
|
}
|
|
10443
10355
|
|
|
@@ -17088,20 +17000,20 @@
|
|
|
17088
17000
|
z-index: 1;
|
|
17089
17001
|
}
|
|
17090
17002
|
|
|
17091
|
-
:is(.join, .join-horizontal) > .join-item:not(:first-child) {
|
|
17003
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:not(:first-child) {
|
|
17092
17004
|
margin-inline-start: -1px;
|
|
17093
17005
|
}
|
|
17094
17006
|
|
|
17095
|
-
:is(.join, .join-horizontal) > .join-item:not(:first-child):not(:last-child) {
|
|
17007
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:not(:first-child):not(:last-child) {
|
|
17096
17008
|
border-radius: 0;
|
|
17097
17009
|
}
|
|
17098
17010
|
|
|
17099
|
-
:is(.join, .join-horizontal) > .join-item:first-child:not(:last-child) {
|
|
17011
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:first-child:not(:last-child) {
|
|
17100
17012
|
border-start-end-radius: 0;
|
|
17101
17013
|
border-end-end-radius: 0;
|
|
17102
17014
|
}
|
|
17103
17015
|
|
|
17104
|
-
:is(.join, .join-horizontal) > .join-item:last-child:not(:first-child) {
|
|
17016
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:last-child:not(:first-child) {
|
|
17105
17017
|
border-start-start-radius: 0;
|
|
17106
17018
|
border-end-start-radius: 0;
|
|
17107
17019
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.validator-hint { font-size: 0.75rem; color: var(--color-on-surface-variant); }
|
|
51
51
|
.validator-error { display: none; font-size: 0.75rem; color: var(--color-error); }
|
|
52
52
|
/* Keep OTP actions stationary when blur reveals an error during a click. */
|
|
53
|
-
.otp-code ~ .validator-error { display: block; visibility: hidden; }
|
|
53
|
+
:is(.otp-code, .otp-input) ~ .validator-error { display: block; visibility: hidden; }
|
|
54
54
|
:is(.form-group, .form-control):has(:is([aria-invalid="true"], .validator:user-invalid, .validate :invalid, .validate:invalid):not(:disabled)) > .validator-error,
|
|
55
55
|
:is(.form-group-error, .form-control.error) > .validator-error { display: block; visibility: visible; }
|
|
56
56
|
|
package/dist/components/join.css
CHANGED
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
z-index: 1;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:is(.join, .join-horizontal) > .join-item:not(:first-child) {
|
|
27
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:not(:first-child) {
|
|
28
28
|
margin-inline-start: -1px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:is(.join, .join-horizontal) > .join-item:not(:first-child):not(:last-child) {
|
|
31
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:not(:first-child):not(:last-child) {
|
|
32
32
|
border-radius: 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
:is(.join, .join-horizontal) > .join-item:first-child:not(:last-child) {
|
|
35
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:first-child:not(:last-child) {
|
|
36
36
|
border-start-end-radius: 0;
|
|
37
37
|
border-end-end-radius: 0;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
:is(.join, .join-horizontal) > .join-item:last-child:not(:first-child) {
|
|
40
|
+
:is(.join, .join-horizontal):not(.join-vertical) > .join-item:last-child:not(:first-child) {
|
|
41
41
|
border-start-start-radius: 0;
|
|
42
42
|
border-end-start-radius: 0;
|
|
43
43
|
}
|