@atelier-ui/styles 0.3.5
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 +27 -0
- package/accordion/atl-accordion.css +152 -0
- package/alert/atl-alert.css +102 -0
- package/avatar/atl-avatar.css +181 -0
- package/badge/atl-badge.css +74 -0
- package/breadcrumbs/atl-breadcrumbs.css +109 -0
- package/button/atl-button.css +173 -0
- package/card/atl-card.css +93 -0
- package/chat/atl-chat.css +516 -0
- package/checkbox/atl-checkbox.css +160 -0
- package/code-block/atl-code-block.css +146 -0
- package/combobox/atl-combobox.css +258 -0
- package/dialog/atl-dialog.css +197 -0
- package/drawer/atl-drawer.css +255 -0
- package/icon/atl-icon.css +47 -0
- package/input/atl-input.css +121 -0
- package/menu/atl-menu.css +113 -0
- package/menu/atl-menu.native.css +23 -0
- package/package.json +32 -0
- package/pagination/atl-pagination.css +101 -0
- package/progress/atl-progress.css +84 -0
- package/radio/atl-radio.css +95 -0
- package/radio-group/atl-radio-group.css +46 -0
- package/select/atl-select.css +43 -0
- package/select/atl-select.native.css +92 -0
- package/skeleton/atl-skeleton.css +71 -0
- package/stepper/atl-stepper.css +222 -0
- package/table/atl-table.css +257 -0
- package/tabs/atl-tabs.css +175 -0
- package/textarea/atl-textarea.css +119 -0
- package/toast/atl-toast.css +168 -0
- package/toggle/atl-toggle.css +138 -0
- package/tooltip/atl-tooltip.css +31 -0
- package/tooltip/atl-tooltip.native.css +89 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
.atl-progress,
|
|
7
|
+
.atl-progress * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.atl-progress {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
font-family: var(--ui-font-family);
|
|
15
|
+
/* The leading every descendant inherits. Stated here so the component keeps
|
|
16
|
+
its own vertical rhythm instead of adopting the consuming app's prose
|
|
17
|
+
leading — the defect that made the row boxes measure differently in a
|
|
18
|
+
Storybook page and in a docs page (ADR-0052). Single-line chrome, so tight. */
|
|
19
|
+
line-height: var(--ui-line-height-tight);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.atl-progress > .track {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
border-radius: var(--ui-radius-full);
|
|
26
|
+
background-color: var(--ui-color-surface-sunken);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Size variants — modernised for visibility (sm was 4px → 6px) */
|
|
31
|
+
.atl-progress.size-sm > .track {
|
|
32
|
+
height: 6px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.atl-progress.size-md > .track {
|
|
36
|
+
height: 10px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.atl-progress.size-lg > .track {
|
|
40
|
+
height: 14px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Fill */
|
|
44
|
+
.atl-progress > .track > .fill {
|
|
45
|
+
height: 100%;
|
|
46
|
+
border-radius: var(--ui-radius-full);
|
|
47
|
+
background-color: var(--ui-color-primary);
|
|
48
|
+
transition: width var(--ui-transition-normal);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Color variants */
|
|
52
|
+
.atl-progress.variant-success > .track > .fill {
|
|
53
|
+
background-color: var(--ui-color-success);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.atl-progress.variant-warning > .track > .fill {
|
|
57
|
+
background-color: var(--ui-color-warning);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.atl-progress.variant-danger > .track > .fill {
|
|
61
|
+
background-color: var(--ui-color-danger);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Indeterminate animation */
|
|
65
|
+
@keyframes atl-progress-indeterminate {
|
|
66
|
+
0% {
|
|
67
|
+
transform: translateX(-150%);
|
|
68
|
+
}
|
|
69
|
+
100% {
|
|
70
|
+
transform: translateX(350%);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.atl-progress.is-indeterminate > .track > .fill {
|
|
75
|
+
width: 40% !important;
|
|
76
|
+
animation: atl-progress-indeterminate 1.4s var(--ui-ease-in-out) infinite;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
.atl-progress.is-indeterminate > .track > .fill {
|
|
81
|
+
animation: none;
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
.atl-radio,
|
|
7
|
+
.atl-radio * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.atl-radio {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--ui-spacing-3);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
user-select: none;
|
|
17
|
+
color: var(--ui-color-text);
|
|
18
|
+
line-height: var(--ui-line-height-tight);
|
|
19
|
+
font-family: var(--ui-font-family);
|
|
20
|
+
font-size: var(--ui-font-size-md);
|
|
21
|
+
/* Row recipe (ADR-0052): the clickable line is a row — it states its height
|
|
22
|
+
and centres the control + text, rather than being sized by whichever of
|
|
23
|
+
the two happens to be taller. */
|
|
24
|
+
padding-block: 0;
|
|
25
|
+
min-height: var(--ui-row-height-sm);
|
|
26
|
+
transition: color var(--ui-transition-fast);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.atl-radio:hover:not(.is-disabled) {
|
|
30
|
+
color: var(--ui-color-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* The native input is selected as a descendant, not a child: the root is the
|
|
34
|
+
<label> in React and Vue but the <atl-radio> host in Angular, where the label
|
|
35
|
+
sits one level further in. The label holds only the radio's own text. */
|
|
36
|
+
.atl-radio input[type='radio'] {
|
|
37
|
+
appearance: none;
|
|
38
|
+
-webkit-appearance: none;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
width: 1.25rem;
|
|
41
|
+
height: 1.25rem;
|
|
42
|
+
border: var(--ui-border-width-thick) solid var(--ui-color-border-strong);
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
background-color: var(--ui-color-input-bg);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
position: relative;
|
|
47
|
+
transition:
|
|
48
|
+
border-color var(--ui-transition-fast),
|
|
49
|
+
border-width var(--ui-transition-fast) var(--ui-ease-out),
|
|
50
|
+
background-color var(--ui-transition-fast),
|
|
51
|
+
box-shadow var(--ui-transition-fast);
|
|
52
|
+
outline: none;
|
|
53
|
+
margin: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.atl-radio:hover input[type='radio']:not(:disabled) {
|
|
57
|
+
border-color: var(--ui-color-primary);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.atl-radio input[type='radio']:focus-visible {
|
|
61
|
+
box-shadow: var(--ui-focus-ring);
|
|
62
|
+
border-color: var(--ui-color-primary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Checked state — thick inner ring */
|
|
66
|
+
.atl-radio input[type='radio']:checked {
|
|
67
|
+
border-color: var(--ui-color-primary);
|
|
68
|
+
border-width: 6px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Invalid state */
|
|
72
|
+
.atl-radio.is-invalid input[type='radio'] {
|
|
73
|
+
border-color: var(--ui-color-input-border-invalid);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.atl-radio.is-invalid:hover input[type='radio'] {
|
|
77
|
+
border-color: var(--ui-color-danger-hover);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.atl-radio.is-invalid input[type='radio']:focus-visible {
|
|
81
|
+
border-color: var(--ui-color-input-border-invalid);
|
|
82
|
+
box-shadow: var(--ui-focus-ring-danger);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Disabled state */
|
|
86
|
+
.atl-radio.is-disabled {
|
|
87
|
+
opacity: var(--ui-opacity-disabled);
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
color: var(--ui-color-text-muted);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.atl-radio.is-disabled input[type='radio'] {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
border-color: var(--ui-color-border);
|
|
95
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
.atl-radio-group,
|
|
7
|
+
.atl-radio-group * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.atl-radio-group {
|
|
12
|
+
display: flex;
|
|
13
|
+
font-family: var(--ui-font-family);
|
|
14
|
+
/* The leading every descendant inherits. Stated here so the component keeps
|
|
15
|
+
its own vertical rhythm instead of adopting the consuming app's prose
|
|
16
|
+
leading — the defect that made the row boxes measure differently in a
|
|
17
|
+
Storybook page and in a docs page (ADR-0052). Single-line chrome, so tight. */
|
|
18
|
+
line-height: var(--ui-line-height-tight);
|
|
19
|
+
gap: var(--ui-spacing-3);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.atl-radio-group.orientation-vertical {
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.atl-radio-group.orientation-horizontal {
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.atl-radio-group.is-disabled {
|
|
32
|
+
opacity: var(--ui-opacity-disabled);
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Error messages */
|
|
37
|
+
.atl-radio-group > .errors {
|
|
38
|
+
margin-top: var(--ui-spacing-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.atl-radio-group > .errors > .error-message {
|
|
42
|
+
margin: 0;
|
|
43
|
+
font-size: var(--ui-font-size-sm);
|
|
44
|
+
color: var(--ui-color-error-text);
|
|
45
|
+
line-height: var(--ui-line-height-normal);
|
|
46
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
.atl-select,
|
|
7
|
+
.atl-select * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* What the three adapters share: the root, the caption and the error list. The
|
|
12
|
+
* field itself differs — a native <select> in React and Vue, a CDK-overlay
|
|
13
|
+
* listbox in Angular (ADR-0007, ADR-0145) — and is styled per framework:
|
|
14
|
+
* atl-select.<framework>.css. */
|
|
15
|
+
.atl-select {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
position: relative;
|
|
18
|
+
font-family: var(--ui-font-family);
|
|
19
|
+
/* The leading every descendant inherits, stated so the component keeps its
|
|
20
|
+
own rhythm rather than the consuming app's prose leading (ADR-0052).
|
|
21
|
+
A single-line field, so tight. */
|
|
22
|
+
line-height: var(--ui-line-height-tight);
|
|
23
|
+
font-size: var(--ui-font-size-md);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.atl-select > label {
|
|
27
|
+
display: block;
|
|
28
|
+
margin-bottom: var(--ui-spacing-2);
|
|
29
|
+
font-size: var(--ui-font-size-sm);
|
|
30
|
+
color: var(--ui-color-text);
|
|
31
|
+
font-weight: var(--ui-font-weight-medium);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Error display */
|
|
35
|
+
.atl-select > .errors {
|
|
36
|
+
margin-top: var(--ui-spacing-2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.atl-select > .errors > .error-message {
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-size: var(--ui-font-size-sm);
|
|
42
|
+
color: var(--ui-color-error-text);
|
|
43
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Served to React and Vue only, after atl-select.css (the shared sheet): both render a
|
|
2
|
+
* native <select> inside a wrapper, with the chevron and the invalid indicator
|
|
3
|
+
* absolutely placed over it; the operating system draws the option list. Angular's
|
|
4
|
+
* field is a button plus a CDK-overlay listbox (libs/angular/.../atl-select.angular.css,
|
|
5
|
+
* which loads instead of this file), so none of this exists there. Recorded in the contract
|
|
6
|
+
* (select.contract.ts), allowlists.js (A11Y_PARITY_EXEMPT, "select") and ADR-0007 /
|
|
7
|
+
* ADR-0145. */
|
|
8
|
+
|
|
9
|
+
/* Select wrapper — holds native select + arrow icon */
|
|
10
|
+
.atl-select > .select-wrapper {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.atl-select > .select-wrapper > select {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
width: 100%;
|
|
21
|
+
min-height: var(--ui-control-height-md);
|
|
22
|
+
/* Control line-height plus padding derived from the height, so the box does not
|
|
23
|
+
* depend on which font is installed. Authored 0.625rem padding with an inherited
|
|
24
|
+
* line-height rendered 40px with Instrument Sans and 41px with the fallback — the
|
|
25
|
+
* defect only appeared in CI. See ADR-0048. */
|
|
26
|
+
line-height: var(--ui-line-height-tight);
|
|
27
|
+
padding: calc(
|
|
28
|
+
(
|
|
29
|
+
var(--ui-control-height-md) - var(--ui-line-height-tight) *
|
|
30
|
+
var(--ui-font-size-md)
|
|
31
|
+
) /
|
|
32
|
+
2 - var(--ui-border-width)
|
|
33
|
+
)
|
|
34
|
+
var(--ui-spacing-4);
|
|
35
|
+
padding-inline-end: calc(var(--ui-spacing-4) + 1.25rem + var(--ui-spacing-5));
|
|
36
|
+
background: var(--ui-color-input-bg);
|
|
37
|
+
border: var(--ui-border-width) solid var(--ui-color-input-border);
|
|
38
|
+
border-radius: var(--ui-radius-md);
|
|
39
|
+
color: var(--ui-color-text);
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
font-size: inherit;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
appearance: none;
|
|
44
|
+
-webkit-appearance: none;
|
|
45
|
+
transition:
|
|
46
|
+
border-color var(--ui-transition-fast),
|
|
47
|
+
box-shadow var(--ui-transition-fast),
|
|
48
|
+
background-color var(--ui-transition-fast);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.atl-select > .select-wrapper > select:hover:not(:disabled) {
|
|
52
|
+
border-color: var(--ui-color-input-border-hover);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.atl-select > .select-wrapper > select:focus-visible {
|
|
56
|
+
outline: none;
|
|
57
|
+
box-shadow: var(--ui-focus-ring);
|
|
58
|
+
border-color: var(--ui-color-input-border-focus);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.atl-select > .select-wrapper > select:disabled {
|
|
62
|
+
opacity: var(--ui-opacity-disabled);
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.atl-select.is-invalid > .select-wrapper > select {
|
|
67
|
+
border-color: var(--ui-color-input-border-invalid);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Arrow icon */
|
|
71
|
+
.atl-select > .select-wrapper > .select-arrow {
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset-inline-end: var(--ui-spacing-4);
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
font-size: var(--ui-font-size-xs);
|
|
76
|
+
color: var(--ui-color-text-muted);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* The invalid indicator sits inline-end, left of the chevron, and the field reserves
|
|
80
|
+
* the space for it unconditionally so nothing shifts when the state flips. Slot:
|
|
81
|
+
* 16px inset + 16px chevron + 4px gap + 16px indicator + 4px = 56px.
|
|
82
|
+
* AtlInput and AtlTextarea already showed this indicator; carrying invalid on border
|
|
83
|
+
* colour alone left AtlSelect and AtlCombobox failing WCAG 1.4.1 whenever a consumer
|
|
84
|
+
* set invalid without passing errors (ADR-0055). */
|
|
85
|
+
.atl-select.is-invalid > .select-wrapper > .invalid-icon {
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 50%;
|
|
88
|
+
transform: translateY(-50%);
|
|
89
|
+
inset-inline-end: calc(var(--ui-spacing-4) + var(--ui-spacing-5));
|
|
90
|
+
color: var(--ui-color-danger);
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
.atl-skeleton,
|
|
7
|
+
.atl-skeleton * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.atl-skeleton {
|
|
12
|
+
/* The library states its own typeface (ADR-0035). Without this the component
|
|
13
|
+
* renders in the consuming app's font while its neighbours render Instrument
|
|
14
|
+
* Sans — measured: a card next to a button showed two typefaces. Declared once
|
|
15
|
+
* per component root, never on a descendant (ADR-0049). */
|
|
16
|
+
font-family: var(--ui-font-family);
|
|
17
|
+
/* The leading every descendant inherits. Stated here so the component keeps
|
|
18
|
+
its own vertical rhythm instead of adopting the consuming app's prose
|
|
19
|
+
leading — the defect that made the row boxes measure differently in a
|
|
20
|
+
Storybook page and in a docs page (ADR-0052). Single-line chrome, so tight. */
|
|
21
|
+
line-height: var(--ui-line-height-tight);
|
|
22
|
+
display: block;
|
|
23
|
+
background: var(--ui-color-border);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Variant shapes */
|
|
29
|
+
.atl-skeleton.variant-text {
|
|
30
|
+
border-radius: var(--ui-radius-sm);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.atl-skeleton.variant-circular {
|
|
34
|
+
border-radius: var(--ui-radius-full, 9999px);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.atl-skeleton.variant-rectangular {
|
|
38
|
+
border-radius: var(--ui-radius-md);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Shimmer animation — uses currentColor-aware overlay so it reads on
|
|
42
|
+
* both light and dark surfaces (was hardcoded white at 0.3 alpha,
|
|
43
|
+
* which only showed on dark backgrounds). */
|
|
44
|
+
.atl-skeleton.is-animated::after {
|
|
45
|
+
content: '';
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset: 0;
|
|
48
|
+
background: linear-gradient(
|
|
49
|
+
90deg,
|
|
50
|
+
transparent 0%,
|
|
51
|
+
color-mix(in srgb, var(--ui-color-surface-raised) 80%, transparent) 50%,
|
|
52
|
+
transparent 100%
|
|
53
|
+
);
|
|
54
|
+
animation: atl-skeleton-shimmer 1.5s infinite;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@keyframes atl-skeleton-shimmer {
|
|
58
|
+
0% {
|
|
59
|
+
transform: translateX(-100%);
|
|
60
|
+
}
|
|
61
|
+
100% {
|
|
62
|
+
transform: translateX(100%);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Respect reduced motion */
|
|
67
|
+
@media (prefers-reduced-motion: reduce) {
|
|
68
|
+
.atl-skeleton.is-animated::after {
|
|
69
|
+
animation: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* Geometry contract: every size this component states is a border-box size.
|
|
2
|
+
* Declared with the component rather than as a global reset, so it ships in the
|
|
3
|
+
* same file as the sizes it governs and no consuming app has to supply one.
|
|
4
|
+
* Gated by check:box-sizing; the resulting boxes are measured by check:geometry.
|
|
5
|
+
* See ADR-0043. */
|
|
6
|
+
:is(.atl-step, .atl-stepper),
|
|
7
|
+
:is(.atl-step, .atl-stepper) * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.atl-stepper {
|
|
12
|
+
/* Local, not tokens: one component, two uses each, and the connector offset is
|
|
13
|
+
DERIVED from them (ADR-0071). A single-use dimension is not a token, but a
|
|
14
|
+
relationship between two of them should be visible. */
|
|
15
|
+
--step-circle: 36px;
|
|
16
|
+
--step-connector-width: 2px;
|
|
17
|
+
display: block;
|
|
18
|
+
font-family: var(--ui-font-family);
|
|
19
|
+
/* The leading every descendant inherits. Stated here so the component keeps
|
|
20
|
+
its own vertical rhythm instead of adopting the consuming app's prose
|
|
21
|
+
leading — the defect that made the row boxes measure differently in a
|
|
22
|
+
Storybook page and in a docs page (ADR-0052). Single-line chrome, so tight. */
|
|
23
|
+
line-height: var(--ui-line-height-tight);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* The wrapper Angular's AtlStep renders around its panel. React and Vue have no such
|
|
27
|
+
element, so the panel rules below also match without it. */
|
|
28
|
+
.atl-step {
|
|
29
|
+
display: contents;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ─── Header ─── */
|
|
33
|
+
.atl-stepper > .stepper-header {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
list-style: none;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ─── Step item ─── */
|
|
42
|
+
.atl-stepper > .stepper-header > .step-item {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: center;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ─── Connector ─── */
|
|
50
|
+
.atl-stepper > .stepper-header > .step-connector {
|
|
51
|
+
flex: 1;
|
|
52
|
+
height: var(--step-connector-width);
|
|
53
|
+
background: var(--ui-color-border);
|
|
54
|
+
border-radius: var(--ui-radius-full);
|
|
55
|
+
transition: background var(--ui-transition-normal) var(--ui-ease-out);
|
|
56
|
+
min-width: var(--ui-spacing-4);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.atl-stepper > .stepper-header > .step-connector.is-active {
|
|
60
|
+
background: var(--ui-color-primary);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* ─── Step circle button ─── */
|
|
64
|
+
.atl-stepper > .stepper-header > .step-item > .step-circle {
|
|
65
|
+
all: unset;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: var(--step-circle);
|
|
71
|
+
height: var(--step-circle);
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
border: var(--ui-border-width-thick) solid var(--ui-color-border);
|
|
74
|
+
background: var(--ui-color-surface);
|
|
75
|
+
color: var(--ui-color-text-muted);
|
|
76
|
+
font-size: var(--ui-font-size-sm);
|
|
77
|
+
font-weight: var(--ui-font-weight-semibold);
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
transition: var(--ui-transition-normal) var(--ui-ease-out);
|
|
80
|
+
transition-property: border-color, background-color, color, box-shadow;
|
|
81
|
+
user-select: none;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.atl-stepper > .stepper-header > .step-item > .step-circle:focus-visible {
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: var(--ui-focus-ring);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.atl-stepper > .stepper-header > .step-item > .step-circle:disabled {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ─── Step text ─── */
|
|
95
|
+
.atl-stepper > .stepper-header > .step-item > .step-text {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
align-items: center;
|
|
99
|
+
margin-top: var(--ui-spacing-2);
|
|
100
|
+
text-align: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.atl-stepper > .stepper-header > .step-item > .step-text > .step-label {
|
|
104
|
+
font-size: var(--ui-font-size-sm);
|
|
105
|
+
font-weight: var(--ui-font-weight-medium);
|
|
106
|
+
color: var(--ui-color-text-muted);
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.atl-stepper > .stepper-header > .step-item > .step-text > .step-description {
|
|
111
|
+
font-size: var(--ui-font-size-xs);
|
|
112
|
+
color: var(--ui-color-text-muted);
|
|
113
|
+
margin-top: var(--ui-spacing-1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.atl-stepper > .stepper-header > .step-item > .step-text > .step-optional {
|
|
117
|
+
font-size: var(--ui-font-size-xs);
|
|
118
|
+
color: var(--ui-color-text-muted);
|
|
119
|
+
font-style: italic;
|
|
120
|
+
margin-top: var(--ui-spacing-1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* ─── Content ─── */
|
|
124
|
+
.atl-stepper > .stepper-content {
|
|
125
|
+
margin-top: var(--ui-spacing-6);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.atl-stepper > .stepper-content > .step-panel[hidden],
|
|
129
|
+
.atl-stepper > .stepper-content > .atl-step > .step-panel[hidden] {
|
|
130
|
+
display: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ─── Active state ─── */
|
|
134
|
+
.atl-stepper > .stepper-header > .step-item.is-active > .step-circle {
|
|
135
|
+
border-color: var(--ui-color-primary);
|
|
136
|
+
color: var(--ui-color-primary);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.atl-stepper
|
|
140
|
+
> .stepper-header
|
|
141
|
+
> .step-item.is-active
|
|
142
|
+
> .step-text
|
|
143
|
+
> .step-label {
|
|
144
|
+
/* Weight stays the resting --ui-type-control medium (ADR-0074): the Figma master
|
|
145
|
+
* renders this label Medium in every state, and .atl-tab-group's own .is-active —
|
|
146
|
+
* the other stateful member of the same six-rule consumer list — changes only
|
|
147
|
+
* colour, never weight, on its current item. */
|
|
148
|
+
color: var(--ui-color-text);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ─── Completed state ─── */
|
|
152
|
+
.atl-stepper > .stepper-header > .step-item.is-completed > .step-circle {
|
|
153
|
+
border-color: var(--ui-color-primary);
|
|
154
|
+
background: var(--ui-color-primary);
|
|
155
|
+
color: var(--ui-color-text-on-primary);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.atl-stepper
|
|
159
|
+
> .stepper-header
|
|
160
|
+
> .step-item.is-completed
|
|
161
|
+
> .step-text
|
|
162
|
+
> .step-label {
|
|
163
|
+
color: var(--ui-color-text);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ─── Error state ─── */
|
|
167
|
+
.atl-stepper > .stepper-header > .step-item.is-error > .step-circle {
|
|
168
|
+
border-color: var(--ui-color-danger);
|
|
169
|
+
background: var(--ui-color-danger);
|
|
170
|
+
color: var(--ui-color-text-on-danger, #ffffff);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.atl-stepper
|
|
174
|
+
> .stepper-header
|
|
175
|
+
> .step-item.is-error
|
|
176
|
+
> .step-text
|
|
177
|
+
> .step-label {
|
|
178
|
+
color: var(--ui-color-danger);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* ─── Disabled state ─── */
|
|
182
|
+
.atl-stepper > .stepper-header > .step-item.is-disabled > .step-circle {
|
|
183
|
+
opacity: var(--ui-opacity-disabled);
|
|
184
|
+
cursor: not-allowed;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.atl-stepper
|
|
188
|
+
> .stepper-header
|
|
189
|
+
> .step-item.is-disabled
|
|
190
|
+
> .step-text
|
|
191
|
+
> .step-label {
|
|
192
|
+
opacity: var(--ui-opacity-disabled);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* ─── Vertical orientation ─── */
|
|
196
|
+
.atl-stepper.orientation-vertical > .stepper-header {
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
align-items: stretch;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.atl-stepper.orientation-vertical > .stepper-header > .step-item {
|
|
202
|
+
flex-direction: row;
|
|
203
|
+
align-items: flex-start;
|
|
204
|
+
gap: var(--ui-spacing-3);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.atl-stepper.orientation-vertical > .stepper-header > .step-item > .step-text {
|
|
208
|
+
align-items: flex-start;
|
|
209
|
+
text-align: left;
|
|
210
|
+
margin-top: 0;
|
|
211
|
+
padding-top: var(--ui-spacing-1);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.atl-stepper.orientation-vertical > .stepper-header > .step-connector {
|
|
215
|
+
flex: none;
|
|
216
|
+
width: var(--step-connector-width);
|
|
217
|
+
height: var(--ui-spacing-6);
|
|
218
|
+
/* Centres the connector under the circle: half the circle minus half the
|
|
219
|
+
connector. Was a literal 17px, which hid the relationship. */
|
|
220
|
+
margin-left: calc((var(--step-circle) - var(--step-connector-width)) / 2);
|
|
221
|
+
min-width: 0;
|
|
222
|
+
}
|