@scalewing/react 1.70.0 → 1.72.0
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/CHANGELOG.md +16 -0
- package/README.md +76 -2
- package/dist/components/Box.d.ts +3 -2
- package/dist/components/Box.js +3 -2
- package/dist/components/ListGroup.d.ts +11 -3
- package/dist/components/ListGroup.js +6 -3
- package/dist/components/PinField.d.ts +48 -0
- package/dist/components/PinField.js +63 -0
- package/dist/components/pin-field/PinPad.d.ts +15 -0
- package/dist/components/pin-field/PinPad.js +20 -0
- package/dist/css/css-action-menu.js +11 -0
- package/dist/css/css-button-group-attached.js +6 -1
- package/dist/css/css-button-natural-width.d.ts +1 -0
- package/dist/css/css-button-natural-width.js +16 -0
- package/dist/css/css-button.js +2 -0
- package/dist/css/css-components.js +3 -0
- package/dist/css/css-list-size.d.ts +3 -0
- package/dist/css/css-list-size.js +31 -0
- package/dist/css/css-list-tiles-bounded.d.ts +1 -0
- package/dist/css/css-list-tiles-bounded.js +74 -0
- package/dist/css/css-list-tiles.d.ts +1 -0
- package/dist/css/css-list-tiles.js +37 -7
- package/dist/css/css-list.d.ts +0 -1
- package/dist/css/css-list.js +18 -9
- package/dist/css/css-pin-field.d.ts +6 -0
- package/dist/css/css-pin-field.js +240 -0
- package/dist/css/css-utilities.js +2 -0
- package/dist/css/list-row-metrics.d.ts +3 -0
- package/dist/css/list-row-metrics.js +18 -0
- package/dist/css/spacing-classes.d.ts +1 -1
- package/dist/css/spacing-classes.js +1 -0
- package/dist/css/stacking.js +2 -1
- package/dist/css/stylesheet.js +2 -0
- package/dist/flex-item-classes.d.ts +15 -0
- package/dist/flex-item-classes.js +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/list-options.d.ts +13 -5
- package/dist/list-options.js +15 -7
- package/dist/pin-entry.d.ts +26 -0
- package/dist/pin-entry.js +46 -0
- package/dist/pin-field-labels.d.ts +17 -0
- package/dist/pin-field-labels.js +13 -0
- package/dist/styles.css +276 -15
- package/package.json +1 -1
package/dist/list-options.js
CHANGED
|
@@ -10,6 +10,13 @@ import { isOneOf } from './is-one-of.js';
|
|
|
10
10
|
* `md`).
|
|
11
11
|
*/
|
|
12
12
|
export const listGroupVariants = ['panel', 'plain', 'tiles'];
|
|
13
|
+
/**
|
|
14
|
+
* How tall a group's rows stand at least: `md` (the default) is as tall as
|
|
15
|
+
* the words (44 px for a pressable row on a coarse pointer); `lg` is a
|
|
16
|
+
* 56 px row on every pointer, its words centred in it, such as a grid of
|
|
17
|
+
* names pressed at a shared counter.
|
|
18
|
+
*/
|
|
19
|
+
export const listGroupSizes = ['md', 'lg'];
|
|
13
20
|
/** `danger` draws the title in the danger colour, for a row that ends something. */
|
|
14
21
|
export const listRowTones = ['default', 'danger'];
|
|
15
22
|
/** `strong` (the default) sets the title at the label weight; `plain` at the body's. */
|
|
@@ -19,24 +26,25 @@ function isBlank(text) {
|
|
|
19
26
|
return typeof text !== 'string' || text.trim() === '';
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
|
-
* Fails closed on a ListGroup it cannot draw: an unknown variant,
|
|
23
|
-
* `maxHeight` that is not a whole row count from 1, a bounded list with
|
|
29
|
+
* Fails closed on a ListGroup it cannot draw: an unknown variant or size,
|
|
30
|
+
* a `maxHeight` that is not a whole row count from 1, a bounded list with
|
|
24
31
|
* no name (its scroll region is a keyboard stop and must say what it
|
|
25
32
|
* holds), `tileColumns` other than 2, 3 or 4 or on a list that is not
|
|
26
|
-
* tiles, or tiles with
|
|
27
|
-
* rows nor add up to a total).
|
|
33
|
+
* tiles, or tiles with a `footer` (tiles do not add up to a total).
|
|
28
34
|
*/
|
|
29
|
-
export function assertListGroup({ label, labelledBy, variant, maxHeight, tileColumns, hasFooter, }) {
|
|
35
|
+
export function assertListGroup({ label, labelledBy, variant, size, maxHeight, tileColumns, hasFooter, }) {
|
|
30
36
|
if (!isOneOf(listGroupVariants, variant))
|
|
31
37
|
throw new RangeError(`Unknown ListGroup variant: ${String(variant)}`);
|
|
38
|
+
if (!isOneOf(listGroupSizes, size))
|
|
39
|
+
throw new RangeError(`Unknown ListGroup size: ${String(size)}`);
|
|
32
40
|
if (tileColumns !== undefined) {
|
|
33
41
|
if (variant !== 'tiles')
|
|
34
42
|
throw new RangeError('ListGroup tileColumns needs variant="tiles"');
|
|
35
43
|
if (!listTileColumnCounts.includes(tileColumns))
|
|
36
44
|
throw new RangeError(`ListGroup tileColumns must be 2, 3 or 4: ${String(tileColumns)}`);
|
|
37
45
|
}
|
|
38
|
-
if (variant === 'tiles' &&
|
|
39
|
-
throw new RangeError('A ListGroup of tiles takes no
|
|
46
|
+
if (variant === 'tiles' && hasFooter)
|
|
47
|
+
throw new RangeError('A ListGroup of tiles takes no footer');
|
|
40
48
|
if (maxHeight === undefined)
|
|
41
49
|
return;
|
|
42
50
|
const rows = typeof maxHeight === 'object' && maxHeight !== null
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The character a PinField's input holds in place of each digit entered.
|
|
3
|
+
* The input's DOM value is only ever a run of these, so the digits are
|
|
4
|
+
* never in the page: not in the input's `value`, nor in any attribute.
|
|
5
|
+
*/
|
|
6
|
+
export declare const pinMaskCharacter = "\u2022";
|
|
7
|
+
export declare const defaultPinLength = 6;
|
|
8
|
+
/** The most digits a PinField takes: its dots still fit a 390 px column. */
|
|
9
|
+
export declare const maxPinLength = 12;
|
|
10
|
+
/** Fails closed on a length that is not a whole number from 1 to the cap. */
|
|
11
|
+
export declare function assertPinLength(length: number): void;
|
|
12
|
+
/** Fails closed on a value that is not ASCII digits or is past `length`. */
|
|
13
|
+
export declare function assertPinValue(value: string, length: number): void;
|
|
14
|
+
/** What the input holds for `count` digits entered: one mask character each. */
|
|
15
|
+
export declare function pinMask(count: number): string;
|
|
16
|
+
/**
|
|
17
|
+
* The digits after an edit of the input. `edited` is the input's text once
|
|
18
|
+
* the browser applied a key, a paste or a deletion to the mask: the mask
|
|
19
|
+
* characters left say how many of the earlier digits survive (always the
|
|
20
|
+
* first ones: the entry adds and removes at its end), and the ASCII digits
|
|
21
|
+
* in it are the new ones, in order. Anything else is dropped, and the result
|
|
22
|
+
* is cut to `length`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readPinEntry(edited: string, value: string, length: number): string;
|
|
25
|
+
/** The count's words: `{count}` and `{length}` replaced in the template. */
|
|
26
|
+
export declare function pinCountText(template: string, count: number, length: number): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The character a PinField's input holds in place of each digit entered.
|
|
3
|
+
* The input's DOM value is only ever a run of these, so the digits are
|
|
4
|
+
* never in the page: not in the input's `value`, nor in any attribute.
|
|
5
|
+
*/
|
|
6
|
+
export const pinMaskCharacter = '•';
|
|
7
|
+
export const defaultPinLength = 6;
|
|
8
|
+
/** The most digits a PinField takes: its dots still fit a 390 px column. */
|
|
9
|
+
export const maxPinLength = 12;
|
|
10
|
+
/** Fails closed on a length that is not a whole number from 1 to the cap. */
|
|
11
|
+
export function assertPinLength(length) {
|
|
12
|
+
if (!Number.isInteger(length) || length < 1 || length > maxPinLength)
|
|
13
|
+
throw new RangeError(`PinField length must be a whole number from 1 to ${maxPinLength}`);
|
|
14
|
+
}
|
|
15
|
+
/** Fails closed on a value that is not ASCII digits or is past `length`. */
|
|
16
|
+
export function assertPinValue(value, length) {
|
|
17
|
+
if (typeof value !== 'string' || /[^0-9]/.test(value))
|
|
18
|
+
throw new RangeError('PinField value must hold only the digits 0 to 9');
|
|
19
|
+
if (value.length > length)
|
|
20
|
+
throw new RangeError('PinField value is longer than its length');
|
|
21
|
+
}
|
|
22
|
+
/** What the input holds for `count` digits entered: one mask character each. */
|
|
23
|
+
export function pinMask(count) {
|
|
24
|
+
return pinMaskCharacter.repeat(count);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The digits after an edit of the input. `edited` is the input's text once
|
|
28
|
+
* the browser applied a key, a paste or a deletion to the mask: the mask
|
|
29
|
+
* characters left say how many of the earlier digits survive (always the
|
|
30
|
+
* first ones: the entry adds and removes at its end), and the ASCII digits
|
|
31
|
+
* in it are the new ones, in order. Anything else is dropped, and the result
|
|
32
|
+
* is cut to `length`.
|
|
33
|
+
*/
|
|
34
|
+
export function readPinEntry(edited, value, length) {
|
|
35
|
+
// A typed or pasted mask character only counts toward the earlier digits
|
|
36
|
+
// that survive (capped at how many there were); it is never a new digit.
|
|
37
|
+
const kept = Math.min(edited.split(pinMaskCharacter).length - 1, value.length);
|
|
38
|
+
const typed = edited.replace(/[^0-9]/g, '');
|
|
39
|
+
return (value.slice(0, kept) + typed).slice(0, length);
|
|
40
|
+
}
|
|
41
|
+
/** The count's words: `{count}` and `{length}` replaced in the template. */
|
|
42
|
+
export function pinCountText(template, count, length) {
|
|
43
|
+
return template
|
|
44
|
+
.replaceAll('{count}', String(count))
|
|
45
|
+
.replaceAll('{length}', String(length));
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words the PinField speaks on its own. Products pass their translations.
|
|
3
|
+
*/
|
|
4
|
+
export type PinFieldLabels = {
|
|
5
|
+
/**
|
|
6
|
+
* How many digits are entered, read with the field and announced after
|
|
7
|
+
* each entry: `{count}` and `{length}` are replaced by the numbers.
|
|
8
|
+
*/
|
|
9
|
+
count: string;
|
|
10
|
+
/** The pad's Delete key's name. */
|
|
11
|
+
delete: string;
|
|
12
|
+
/** The pad's name: its keys are a group. */
|
|
13
|
+
pad: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const defaultPinFieldLabels: PinFieldLabels;
|
|
16
|
+
/** Consumer labels over the English defaults; empty strings fail closed. */
|
|
17
|
+
export declare function resolvePinFieldLabels(labels?: Partial<PinFieldLabels>): PinFieldLabels;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const defaultPinFieldLabels = {
|
|
2
|
+
count: '{count} of {length} digits entered',
|
|
3
|
+
delete: 'Delete the last digit',
|
|
4
|
+
pad: 'Number pad',
|
|
5
|
+
};
|
|
6
|
+
/** Consumer labels over the English defaults; empty strings fail closed. */
|
|
7
|
+
export function resolvePinFieldLabels(labels = {}) {
|
|
8
|
+
const resolved = { ...defaultPinFieldLabels, ...labels };
|
|
9
|
+
for (const [key, text] of Object.entries(resolved))
|
|
10
|
+
if (typeof text !== 'string' || text.trim() === '')
|
|
11
|
+
throw new RangeError(`labels.${key} must be non-empty text`);
|
|
12
|
+
return resolved;
|
|
13
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -884,6 +884,7 @@ body {
|
|
|
884
884
|
.sw-inline { display: flex; flex-direction: row; align-items: center; min-width: 0; }
|
|
885
885
|
.sw-wrap { flex-wrap: wrap; }
|
|
886
886
|
.sw-grow { flex-grow: 1; }
|
|
887
|
+
.sw-no-shrink { flex-shrink: 0; }
|
|
887
888
|
.sw-full-width { width: 100%; }
|
|
888
889
|
.sw-container { width: 100%; max-width: var(--sw-container-max); margin-inline: auto; }
|
|
889
890
|
.sw-container-reading { width: 100%; max-width: var(--sw-reading-max); margin-inline: auto; }
|
|
@@ -1051,6 +1052,10 @@ body {
|
|
|
1051
1052
|
@media (pointer: coarse) {
|
|
1052
1053
|
.sw-button { min-height: var(--sw-control-md-min-height); min-width: var(--sw-control-md-min-height); }
|
|
1053
1054
|
}
|
|
1055
|
+
.sw-button {
|
|
1056
|
+
flex-shrink: 0;
|
|
1057
|
+
max-width: 100%;
|
|
1058
|
+
}
|
|
1054
1059
|
.sw-button-full {
|
|
1055
1060
|
width: 100%;
|
|
1056
1061
|
}
|
|
@@ -1085,6 +1090,7 @@ body {
|
|
|
1085
1090
|
|
|
1086
1091
|
.sw-button-group.sw-button-group-attached > .sw-button {
|
|
1087
1092
|
border-radius: 0;
|
|
1093
|
+
flex-shrink: 1;
|
|
1088
1094
|
}
|
|
1089
1095
|
|
|
1090
1096
|
.sw-button-group.sw-button-group-attached > .sw-button ~ .sw-button {
|
|
@@ -3123,31 +3129,31 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3123
3129
|
max-height: calc(var(--sw-list-max-rows) * (2 * var(--sw-space-3) + 20px + 18px + 1px));
|
|
3124
3130
|
}
|
|
3125
3131
|
|
|
3126
|
-
.sw-list-group-scroll.sw-scroll-more-top,
|
|
3127
|
-
.sw-list-group-scroll.sw-scroll-more-bottom {
|
|
3132
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-top,
|
|
3133
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-bottom {
|
|
3128
3134
|
background-repeat: no-repeat;
|
|
3129
3135
|
background-size: 100% var(--sw-space-5);
|
|
3130
3136
|
}
|
|
3131
3137
|
|
|
3132
|
-
.sw-list-group-scroll.sw-scroll-more-top {
|
|
3138
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-top {
|
|
3133
3139
|
background-image: linear-gradient(to bottom, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent);
|
|
3134
3140
|
background-position: top;
|
|
3135
3141
|
}
|
|
3136
3142
|
|
|
3137
|
-
.sw-list-group-scroll.sw-scroll-more-bottom {
|
|
3143
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-bottom {
|
|
3138
3144
|
background-image: linear-gradient(to top, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent);
|
|
3139
3145
|
background-position: bottom;
|
|
3140
3146
|
}
|
|
3141
3147
|
|
|
3142
|
-
.sw-list-group-scroll.sw-scroll-more-top.sw-scroll-more-bottom {
|
|
3148
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-top.sw-scroll-more-bottom {
|
|
3143
3149
|
background-image: linear-gradient(to bottom, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent), linear-gradient(to top, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent);
|
|
3144
3150
|
background-position: top, bottom;
|
|
3145
3151
|
}
|
|
3146
3152
|
|
|
3147
3153
|
@media (forced-colors: active) {
|
|
3148
|
-
.sw-list-group-scroll.sw-scroll-more-top,
|
|
3149
|
-
.sw-list-group-scroll.sw-scroll-more-bottom,
|
|
3150
|
-
.sw-list-group-scroll.sw-scroll-more-top.sw-scroll-more-bottom { background-image: none; }
|
|
3154
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-top,
|
|
3155
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-bottom,
|
|
3156
|
+
.sw-list-group:not(.sw-list-group-tiles) > .sw-list-group-scroll.sw-scroll-more-top.sw-scroll-more-bottom { background-image: none; }
|
|
3151
3157
|
}
|
|
3152
3158
|
|
|
3153
3159
|
@media (forced-colors: active) {
|
|
@@ -3385,29 +3391,92 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3385
3391
|
white-space: nowrap;
|
|
3386
3392
|
}
|
|
3387
3393
|
|
|
3388
|
-
.sw-list-group-
|
|
3394
|
+
.sw-list-group-lg > .sw-list > .sw-list-item > .sw-list-row,
|
|
3395
|
+
.sw-list-group-lg > .sw-list-group-scroll > .sw-list > .sw-list-item > .sw-list-row,
|
|
3396
|
+
.sw-list-group-lg > .sw-list-group-footer > .sw-list-item > .sw-list-row {
|
|
3397
|
+
align-items: center;
|
|
3398
|
+
min-height: calc(var(--sw-space-8) + var(--sw-space-2));
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
.sw-list-group-tiles > .sw-list,
|
|
3402
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list {
|
|
3389
3403
|
display: grid;
|
|
3390
3404
|
gap: var(--sw-space-3);
|
|
3391
3405
|
}
|
|
3392
3406
|
|
|
3393
|
-
.sw-list-group-tiles-2 > .sw-list
|
|
3394
|
-
.sw-list-group-tiles-
|
|
3395
|
-
.sw-list-group-tiles-
|
|
3407
|
+
.sw-list-group-tiles-2 > .sw-list,
|
|
3408
|
+
.sw-list-group-tiles-2 > .sw-list-group-scroll > .sw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
3409
|
+
.sw-list-group-tiles-3 > .sw-list,
|
|
3410
|
+
.sw-list-group-tiles-3 > .sw-list-group-scroll > .sw-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
3411
|
+
.sw-list-group-tiles-4 > .sw-list,
|
|
3412
|
+
.sw-list-group-tiles-4 > .sw-list-group-scroll > .sw-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
3396
3413
|
|
|
3397
|
-
.sw-list-group-tiles > .sw-list > .sw-list-item
|
|
3414
|
+
.sw-list-group-tiles > .sw-list > .sw-list-item,
|
|
3415
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list > .sw-list-item {
|
|
3416
|
+
align-items: stretch;
|
|
3398
3417
|
background: var(--sw-color-surface);
|
|
3399
3418
|
border: 1px solid var(--sw-color-border);
|
|
3400
3419
|
border-radius: var(--sw-radius-md);
|
|
3420
|
+
display: flex;
|
|
3401
3421
|
min-width: 0;
|
|
3402
3422
|
overflow: clip;
|
|
3403
3423
|
}
|
|
3404
3424
|
|
|
3425
|
+
.sw-list-group-tiles > .sw-list > .sw-list-item > .sw-list-row,
|
|
3426
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list > .sw-list-item > .sw-list-row {
|
|
3427
|
+
flex: 1 1 auto;
|
|
3428
|
+
min-width: 0;
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
.sw-list-group-tiles > .sw-list > .sw-list-item > .sw-list-row-action,
|
|
3432
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list > .sw-list-item > .sw-list-row-action { align-self: center; }
|
|
3433
|
+
|
|
3405
3434
|
@media not all and (min-width: 48rem) {
|
|
3406
|
-
.sw-list-group-tiles > .sw-list
|
|
3435
|
+
.sw-list-group-tiles > .sw-list,
|
|
3436
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list { grid-template-columns: minmax(0, 1fr); }
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
@media (forced-colors: active) {
|
|
3440
|
+
.sw-list-group-tiles > .sw-list > .sw-list-item,
|
|
3441
|
+
.sw-list-group-tiles > .sw-list-group-scroll > .sw-list > .sw-list-item { border-color: CanvasText; }
|
|
3442
|
+
}
|
|
3443
|
+
|
|
3444
|
+
.sw-list-group-tiles > .sw-list-group-scroll {
|
|
3445
|
+
max-height: calc(var(--sw-list-max-rows) * (2 * var(--sw-space-3) + 20px + 18px + 2px) + (var(--sw-list-max-rows) - 1) * var(--sw-space-3));
|
|
3446
|
+
scroll-padding-block: max(0px, min(var(--sw-space-5), calc((100% - (2 * var(--sw-space-3) + 20px + 18px + 2px)) / 2)));
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
.sw-list-group-tiles > .sw-list-group-scroll::before,
|
|
3450
|
+
.sw-list-group-tiles > .sw-list-group-scroll::after {
|
|
3451
|
+
content: '';
|
|
3452
|
+
display: block;
|
|
3453
|
+
height: var(--sw-space-5);
|
|
3454
|
+
pointer-events: none;
|
|
3455
|
+
position: sticky;
|
|
3456
|
+
z-index: 1;
|
|
3407
3457
|
}
|
|
3408
3458
|
|
|
3459
|
+
.sw-list-group-tiles > .sw-list-group-scroll::before {
|
|
3460
|
+
margin-block-end: calc(-1 * var(--sw-space-5));
|
|
3461
|
+
top: 0;
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3464
|
+
.sw-list-group-tiles > .sw-list-group-scroll::after {
|
|
3465
|
+
bottom: 0;
|
|
3466
|
+
margin-block-start: calc(-1 * var(--sw-space-5));
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
.sw-list-group-tiles > .sw-list-group-scroll.sw-scroll-more-top::before { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent); }
|
|
3470
|
+
|
|
3471
|
+
.sw-list-group-tiles > .sw-list-group-scroll.sw-scroll-more-bottom::after { background-image: linear-gradient(to top, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent); }
|
|
3472
|
+
|
|
3409
3473
|
@media (forced-colors: active) {
|
|
3410
|
-
.sw-list-group-tiles > .sw-list
|
|
3474
|
+
.sw-list-group-tiles > .sw-list-group-scroll::before,
|
|
3475
|
+
.sw-list-group-tiles > .sw-list-group-scroll::after { display: none; }
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
@media print {
|
|
3479
|
+
.sw-list-group-tiles > .sw-list-group-scroll { max-height: none; }
|
|
3411
3480
|
}
|
|
3412
3481
|
|
|
3413
3482
|
.sw-fixture-group {
|
|
@@ -7638,6 +7707,8 @@ html:has(.sw-site-header-sticky) .sw-docs-layout {
|
|
|
7638
7707
|
|
|
7639
7708
|
.sw-action-menu {
|
|
7640
7709
|
display: inline-flex;
|
|
7710
|
+
flex-shrink: 0;
|
|
7711
|
+
max-width: 100%;
|
|
7641
7712
|
position: relative;
|
|
7642
7713
|
}
|
|
7643
7714
|
|
|
@@ -7649,6 +7720,7 @@ html:has(.sw-site-header-sticky) .sw-docs-layout {
|
|
|
7649
7720
|
color: var(--sw-color-text);
|
|
7650
7721
|
cursor: pointer;
|
|
7651
7722
|
font: inherit;
|
|
7723
|
+
max-width: 100%;
|
|
7652
7724
|
min-height: var(--sw-control-xs-min-height);
|
|
7653
7725
|
padding-inline: var(--sw-control-xs-padding-inline);
|
|
7654
7726
|
}
|
|
@@ -11056,6 +11128,195 @@ html:has(.sw-site-header-sticky) .sw-docs-layout {
|
|
|
11056
11128
|
}
|
|
11057
11129
|
}
|
|
11058
11130
|
|
|
11131
|
+
.sw-pin-field {
|
|
11132
|
+
min-width: 0;
|
|
11133
|
+
/* Holds its hidden label, count and empty error region, which leave the flow. */
|
|
11134
|
+
position: relative;
|
|
11135
|
+
}
|
|
11136
|
+
|
|
11137
|
+
.sw-pin-field-entry {
|
|
11138
|
+
background-color: var(--sw-glass-fill);
|
|
11139
|
+
border: 1px solid var(--sw-color-border);
|
|
11140
|
+
border-radius: var(--sw-radius-sm);
|
|
11141
|
+
color: inherit;
|
|
11142
|
+
font-family: inherit;
|
|
11143
|
+
font-size: inherit;
|
|
11144
|
+
padding-inline: var(--sw-control-md-padding-inline);
|
|
11145
|
+
align-items: center;
|
|
11146
|
+
box-sizing: border-box;
|
|
11147
|
+
cursor: text;
|
|
11148
|
+
display: flex;
|
|
11149
|
+
min-height: var(--sw-control-md-min-height);
|
|
11150
|
+
position: relative;
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11153
|
+
[data-theme] input.sw-pin-field-input {
|
|
11154
|
+
border: 0;
|
|
11155
|
+
cursor: inherit;
|
|
11156
|
+
height: 100%;
|
|
11157
|
+
inset: 0;
|
|
11158
|
+
margin: 0;
|
|
11159
|
+
min-height: 0;
|
|
11160
|
+
opacity: 0;
|
|
11161
|
+
padding: 0;
|
|
11162
|
+
position: absolute;
|
|
11163
|
+
width: 100%;
|
|
11164
|
+
}
|
|
11165
|
+
|
|
11166
|
+
/* The canvas sets a disabled text control's opacity back to 1: not this one's. */
|
|
11167
|
+
[data-theme] input.sw-pin-field-input:disabled { opacity: 0; }
|
|
11168
|
+
|
|
11169
|
+
.sw-pin-field-entry:focus-within {
|
|
11170
|
+
outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
|
|
11171
|
+
outline-offset: var(--sw-focus-ring-offset);
|
|
11172
|
+
}
|
|
11173
|
+
|
|
11174
|
+
.sw-field-invalid .sw-pin-field-entry { border-color: var(--sw-color-danger); }
|
|
11175
|
+
|
|
11176
|
+
/* The frame draws the surface, so it carries the disabled look for its input. */
|
|
11177
|
+
.sw-pin-field-entry:has(> input:disabled) {
|
|
11178
|
+
background-color: var(--sw-color-subtle);
|
|
11179
|
+
border-style: dashed;
|
|
11180
|
+
cursor: not-allowed;
|
|
11181
|
+
opacity: 1;
|
|
11182
|
+
-webkit-text-fill-color: currentColor;
|
|
11183
|
+
}
|
|
11184
|
+
|
|
11185
|
+
.sw-pin-field-dots {
|
|
11186
|
+
display: flex;
|
|
11187
|
+
gap: var(--sw-space-3);
|
|
11188
|
+
pointer-events: none;
|
|
11189
|
+
}
|
|
11190
|
+
|
|
11191
|
+
.sw-pin-field-dot {
|
|
11192
|
+
border: 2px solid var(--sw-color-muted);
|
|
11193
|
+
border-radius: var(--sw-radius-pill);
|
|
11194
|
+
box-sizing: border-box;
|
|
11195
|
+
flex: none;
|
|
11196
|
+
height: var(--sw-space-4);
|
|
11197
|
+
width: var(--sw-space-4);
|
|
11198
|
+
}
|
|
11199
|
+
|
|
11200
|
+
.sw-pin-field-dot-filled {
|
|
11201
|
+
background: var(--sw-color-text);
|
|
11202
|
+
border-color: var(--sw-color-text);
|
|
11203
|
+
}
|
|
11204
|
+
|
|
11205
|
+
.sw-pin-field-with-pad {
|
|
11206
|
+
/* Centred in a column wider than it, whatever the column's alignment. */
|
|
11207
|
+
margin-inline: auto;
|
|
11208
|
+
max-inline-size: calc(10 * var(--sw-space-6));
|
|
11209
|
+
text-align: center;
|
|
11210
|
+
width: 100%;
|
|
11211
|
+
}
|
|
11212
|
+
|
|
11213
|
+
.sw-pin-field-with-pad .sw-pin-field-entry,
|
|
11214
|
+
.sw-pin-field-with-pad .sw-pin-field-entry:has(> input:disabled) {
|
|
11215
|
+
background-color: transparent;
|
|
11216
|
+
border-width: 0;
|
|
11217
|
+
justify-content: center;
|
|
11218
|
+
}
|
|
11219
|
+
|
|
11220
|
+
.sw-pin-field-with-pad .sw-pin-field-entry:has(> input:disabled) .sw-pin-field-dots {
|
|
11221
|
+
opacity: var(--sw-disabled-opacity);
|
|
11222
|
+
}
|
|
11223
|
+
|
|
11224
|
+
.sw-pin-field-pad {
|
|
11225
|
+
display: grid;
|
|
11226
|
+
gap: var(--sw-space-2);
|
|
11227
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
11228
|
+
margin-block-start: var(--sw-space-3);
|
|
11229
|
+
}
|
|
11230
|
+
|
|
11231
|
+
/* The hint or the error under the keys stands a little apart from them. */
|
|
11232
|
+
.sw-pin-field-pad ~ :is(.sw-field-description, .sw-field-error:not(:empty)) {
|
|
11233
|
+
margin-block-start: var(--sw-space-2);
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11236
|
+
.sw-pin-field-key {
|
|
11237
|
+
align-items: center;
|
|
11238
|
+
appearance: none;
|
|
11239
|
+
background: var(--sw-color-subtle);
|
|
11240
|
+
border: 1px solid var(--sw-color-muted);
|
|
11241
|
+
border-radius: var(--sw-radius-md);
|
|
11242
|
+
box-sizing: border-box;
|
|
11243
|
+
color: var(--sw-color-text);
|
|
11244
|
+
cursor: pointer;
|
|
11245
|
+
display: inline-flex;
|
|
11246
|
+
font-family: var(--sw-font-sans);
|
|
11247
|
+
font-size: 28px;
|
|
11248
|
+
font-variant-numeric: tabular-nums;
|
|
11249
|
+
font-weight: 400;
|
|
11250
|
+
justify-content: center;
|
|
11251
|
+
line-height: 34px;
|
|
11252
|
+
margin: 0;
|
|
11253
|
+
min-block-size: calc(2 * var(--sw-space-6));
|
|
11254
|
+
min-inline-size: calc(2 * var(--sw-space-6));
|
|
11255
|
+
padding: 0;
|
|
11256
|
+
touch-action: manipulation;
|
|
11257
|
+
user-select: none;
|
|
11258
|
+
-webkit-tap-highlight-color: transparent;
|
|
11259
|
+
}
|
|
11260
|
+
|
|
11261
|
+
.sw-pin-field-key-delete { background: transparent; }
|
|
11262
|
+
|
|
11263
|
+
@media (hover: hover) {
|
|
11264
|
+
.sw-pin-field-key:hover:not(:disabled, [aria-disabled='true']) {
|
|
11265
|
+
background: var(--sw-color-border);
|
|
11266
|
+
}
|
|
11267
|
+
}
|
|
11268
|
+
|
|
11269
|
+
.sw-pin-field-key:active:not(:disabled, [aria-disabled='true']) {
|
|
11270
|
+
background: var(--sw-color-border);
|
|
11271
|
+
}
|
|
11272
|
+
|
|
11273
|
+
.sw-pin-field-key:focus { outline: none; }
|
|
11274
|
+
|
|
11275
|
+
.sw-pin-field-key:focus-visible {
|
|
11276
|
+
outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
|
|
11277
|
+
outline-offset: var(--sw-focus-ring-offset);
|
|
11278
|
+
}
|
|
11279
|
+
|
|
11280
|
+
.sw-pin-field-key:is(:disabled, [aria-disabled='true']) {
|
|
11281
|
+
cursor: not-allowed;
|
|
11282
|
+
opacity: var(--sw-disabled-opacity);
|
|
11283
|
+
}
|
|
11284
|
+
|
|
11285
|
+
.sw-pin-field-glyph {
|
|
11286
|
+
fill: none;
|
|
11287
|
+
flex: none;
|
|
11288
|
+
height: var(--sw-space-5);
|
|
11289
|
+
stroke: currentColor;
|
|
11290
|
+
stroke-linecap: round;
|
|
11291
|
+
stroke-linejoin: round;
|
|
11292
|
+
/* The stroke of the system's other private glyphs and of consumer icons (ADR 0008). */
|
|
11293
|
+
stroke-width: 1.75;
|
|
11294
|
+
width: var(--sw-space-5);
|
|
11295
|
+
}
|
|
11296
|
+
|
|
11297
|
+
/* The mark points the way a deletion goes. */
|
|
11298
|
+
[dir='rtl'] .sw-pin-field-glyph { transform: scaleX(-1); }
|
|
11299
|
+
|
|
11300
|
+
@media (forced-colors: active) {
|
|
11301
|
+
.sw-field-invalid .sw-pin-field-entry { border-color: Mark; }
|
|
11302
|
+
.sw-pin-field-entry:has(> input:disabled) {
|
|
11303
|
+
border-color: GrayText;
|
|
11304
|
+
color: GrayText;
|
|
11305
|
+
-webkit-text-fill-color: GrayText;
|
|
11306
|
+
}
|
|
11307
|
+
.sw-pin-field-dot { border-color: CanvasText; }
|
|
11308
|
+
.sw-pin-field-dot-filled { background: CanvasText; }
|
|
11309
|
+
.sw-pin-field-entry:has(> input:disabled) .sw-pin-field-dot { border-color: GrayText; }
|
|
11310
|
+
.sw-pin-field-entry:has(> input:disabled) .sw-pin-field-dot-filled { background: GrayText; }
|
|
11311
|
+
.sw-pin-field-with-pad .sw-pin-field-entry:has(> input:disabled) .sw-pin-field-dots { opacity: 1; }
|
|
11312
|
+
.sw-pin-field-key { border-color: ButtonText; }
|
|
11313
|
+
.sw-pin-field-key:is(:disabled, [aria-disabled='true']) {
|
|
11314
|
+
border-color: GrayText;
|
|
11315
|
+
color: GrayText;
|
|
11316
|
+
opacity: 1;
|
|
11317
|
+
}
|
|
11318
|
+
}
|
|
11319
|
+
|
|
11059
11320
|
.sw-steps {
|
|
11060
11321
|
display: flex;
|
|
11061
11322
|
flex-direction: column;
|