@kwtv/components 0.2.0 → 0.4.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/README.md +52 -9
- package/package.json +2 -2
- package/src/astro/Accordion.astro +10 -6
- package/src/astro/AccordionItem.astro +55 -45
- package/src/astro/ActiveFilterTags.astro +41 -28
- package/src/astro/Alert.astro +45 -41
- package/src/astro/Badge.astro +80 -76
- package/src/astro/Band.astro +104 -58
- package/src/astro/Breadcrumb.astro +38 -30
- package/src/astro/Button.astro +135 -129
- package/src/astro/Card.astro +72 -62
- package/src/astro/CartLine.astro +72 -58
- package/src/astro/Checkbox.astro +36 -32
- package/src/astro/Chip.astro +68 -64
- package/src/astro/ChipRail.astro +6 -1
- package/src/astro/DotGrid.astro +55 -42
- package/src/astro/EmptyState.astro +29 -23
- package/src/astro/FilterGroup.astro +29 -26
- package/src/astro/Filters.astro +57 -47
- package/src/astro/Footer.astro +195 -178
- package/src/astro/FooterColumn.astro +39 -35
- package/src/astro/Header.astro +80 -67
- package/src/astro/Icon.astro +4 -2
- package/src/astro/IconButton.astro +67 -61
- package/src/astro/Marquee.astro +43 -41
- package/src/astro/NavDropdown.astro +169 -149
- package/src/astro/NavLink.astro +59 -56
- package/src/astro/Newsletter.astro +64 -56
- package/src/astro/Pager.astro +71 -46
- package/src/astro/PickCard.astro +72 -68
- package/src/astro/ProductCard.astro +134 -119
- package/src/astro/Radio.astro +36 -32
- package/src/astro/Skeleton.astro +60 -42
- package/src/astro/Social.astro +26 -21
- package/src/astro/StepIndicator.astro +70 -54
- package/src/astro/Sticker.astro +74 -49
- package/src/astro/Swatch.astro +44 -40
- package/src/astro/SwipeCarousel.astro +5 -1
- package/src/astro/Table.astro +66 -56
- package/src/astro/TableCard.astro +45 -37
- package/src/astro/TextField.astro +104 -91
- package/src/astro/Totals.astro +39 -35
- package/src/react/Drawer.css +60 -56
- package/src/react/Drawer.tsx +1 -5
- package/src/react/Modal.css +97 -93
- package/src/react/Modal.tsx +4 -6
- package/src/react/NewsCarousel.css +108 -104
- package/src/react/NewsCarousel.tsx +7 -1
- package/src/react/QuantityStepper.css +84 -80
- package/src/react/Select.css +159 -155
- package/src/react/Select.tsx +8 -2
- package/src/react/Toast.css +128 -124
- package/src/react/Toast.tsx +38 -4
- package/src/styles/base.css +30 -26
- package/src/styles/controls.css +183 -179
- package/src/styles/motion.css +203 -199
package/src/astro/Band.astro
CHANGED
|
@@ -10,20 +10,35 @@
|
|
|
10
10
|
* Cards placed on the band move to a lighter tint of the band's own surface,
|
|
11
11
|
* so they read as part of the band rather than a return to plain paper.
|
|
12
12
|
*
|
|
13
|
+
* Product cards keep their own paper surface and text roles. Their new and
|
|
14
|
+
* favourite ribbons are sage by default, so on the band they move to
|
|
15
|
+
* charcoal and ivory. Promo stays burgundy, so all three stay distinct.
|
|
16
|
+
*
|
|
13
17
|
* Corner radius matches every other surface in the system (Card, PickCard,
|
|
14
18
|
* NavDropdown's panel): --radius-lg. A band that sits inset in a page, next
|
|
15
19
|
* to a rounded card, needs the same rounding or the two read as unrelated.
|
|
20
|
+
* A band that runs edge to edge sets `bleed`. It drops the radius and the
|
|
21
|
+
* side borders, which would only show as clipped corners at the viewport.
|
|
16
22
|
*/
|
|
17
23
|
interface Props {
|
|
18
24
|
/** Renders as <section> by default. Use "div" when the band is not a
|
|
19
25
|
* standalone region of the page. */
|
|
20
26
|
as?: "section" | "div" | "aside";
|
|
27
|
+
/** Runs edge to edge: no corner radius and no side borders. */
|
|
28
|
+
bleed?: boolean;
|
|
21
29
|
class?: string;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
|
-
const {
|
|
32
|
+
const {
|
|
33
|
+
as: Tag = "section",
|
|
34
|
+
bleed = false,
|
|
35
|
+
class: className,
|
|
36
|
+
...rest
|
|
37
|
+
} = Astro.props;
|
|
25
38
|
|
|
26
|
-
const classes = ["ui-band", className]
|
|
39
|
+
const classes = ["ui-band", bleed && "ui-band--bleed", className]
|
|
40
|
+
.filter(Boolean)
|
|
41
|
+
.join(" ");
|
|
27
42
|
---
|
|
28
43
|
|
|
29
44
|
<Tag class={classes} {...rest}>
|
|
@@ -31,67 +46,98 @@ const classes = ["ui-band", className].filter(Boolean).join(" ");
|
|
|
31
46
|
</Tag>
|
|
32
47
|
|
|
33
48
|
<style>
|
|
34
|
-
|
|
35
|
-
background: var(--surface-accent);
|
|
36
|
-
border: 1px solid var(--border-strong);
|
|
37
|
-
border-radius: var(--radius-lg);
|
|
38
|
-
color: var(--surface-accent-fg);
|
|
39
|
-
}
|
|
49
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.ui-band :global(strong),
|
|
49
|
-
.ui-band :global(b),
|
|
50
|
-
.ui-band :global(label),
|
|
51
|
-
.ui-band :global(.ui-eyebrow),
|
|
52
|
-
.ui-band :global(.ui-card__eyebrow),
|
|
53
|
-
.ui-band :global(.ui-card__body) {
|
|
54
|
-
color: var(--surface-accent-fg);
|
|
55
|
-
}
|
|
51
|
+
@layer components {
|
|
52
|
+
.ui-band {
|
|
53
|
+
background: var(--surface-accent);
|
|
54
|
+
border: 1px solid var(--border-strong);
|
|
55
|
+
border-radius: var(--radius-lg);
|
|
56
|
+
color: var(--surface-accent-fg);
|
|
57
|
+
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color: var(--surface-accent-muted);
|
|
62
|
-
}
|
|
59
|
+
.ui-band--bleed {
|
|
60
|
+
border-inline: 0;
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
/* Every text role inside the band moves to the accent foreground. Sage is a */
|
|
65
|
+
/* mid tone: --text clears it, but --text-muted and --link do not. */
|
|
66
|
+
.ui-band :global(p),
|
|
67
|
+
.ui-band :global(span),
|
|
68
|
+
.ui-band :global(a),
|
|
69
|
+
.ui-band :global(td),
|
|
70
|
+
.ui-band :global(th),
|
|
71
|
+
.ui-band :global(strong),
|
|
72
|
+
.ui-band :global(b),
|
|
73
|
+
.ui-band :global(label),
|
|
74
|
+
.ui-band :global(.ui-eyebrow),
|
|
75
|
+
.ui-band :global(.ui-card__eyebrow),
|
|
76
|
+
.ui-band :global(.ui-card__body) {
|
|
77
|
+
color: var(--surface-accent-fg);
|
|
78
|
+
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
/* Secondary copy gets the band's own muted role, which clears 4.5 on sage. */
|
|
81
|
+
/* --text-muted only reaches 3.6 here. */
|
|
82
|
+
.ui-band :global(small),
|
|
83
|
+
.ui-band :global(.ui-band__note) {
|
|
84
|
+
color: var(--surface-accent-muted);
|
|
85
|
+
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
/* A card on the band moves to a lighter tint of the band's own surface, */
|
|
88
|
+
/* rather than to plain paper, so it still reads as part of the band. It */
|
|
89
|
+
/* carries its own foreground role: --surface-accent-fg is tuned for the */
|
|
90
|
+
/* band's own, darker/mid tint and is not guaranteed to clear AA on this */
|
|
91
|
+
/* lighter one. */
|
|
92
|
+
.ui-band :global(.ui-card),
|
|
93
|
+
.ui-band :global(.ui-card--raised) {
|
|
94
|
+
background: var(--surface-accent-subtle);
|
|
95
|
+
border-color: var(--border-strong);
|
|
96
|
+
}
|
|
97
|
+
.ui-band :global(.ui-card__eyebrow),
|
|
98
|
+
.ui-band :global(.ui-card__title),
|
|
99
|
+
.ui-band :global(.ui-card__body) {
|
|
100
|
+
color: var(--surface-accent-subtle-fg);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* A product card keeps its own paper surface, so its text keeps the plain */
|
|
104
|
+
/* roles. The span flip above would otherwise reach its title, meta and */
|
|
105
|
+
/* price. Sold-out and old-price styles in ProductCard still outrank these. */
|
|
106
|
+
.ui-band :global(.ui-product__title),
|
|
107
|
+
.ui-band :global(.ui-product__price) {
|
|
108
|
+
color: var(--text);
|
|
109
|
+
}
|
|
110
|
+
.ui-band :global(.ui-product__meta) {
|
|
111
|
+
color: var(--text-muted);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* The new and favourite ribbons are sage by default and vanish on the */
|
|
115
|
+
/* band. The extra .ui-product outranks ProductCard's own ribbon rules. */
|
|
116
|
+
.ui-band :global(.ui-product .ui-ribbon--new i) {
|
|
117
|
+
background: var(--text);
|
|
118
|
+
color: var(--text-inverse);
|
|
119
|
+
}
|
|
120
|
+
.ui-band :global(.ui-product .ui-ribbon--fav i) {
|
|
121
|
+
background: var(--surface);
|
|
122
|
+
color: var(--text);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Buttons keep their own label colours: they carry their own fill, so the */
|
|
126
|
+
/* band's foreground flip must not reach inside them. */
|
|
127
|
+
.ui-band :global(.ui-btn--primary),
|
|
128
|
+
.ui-band :global(.ui-btn--primary span) {
|
|
129
|
+
color: var(--primary-fg);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ui-band :global(.ui-btn--accent),
|
|
133
|
+
.ui-band :global(.ui-btn--accent span) {
|
|
134
|
+
color: var(--accent-fg);
|
|
135
|
+
}
|
|
91
136
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
137
|
+
.ui-band :global(.ui-btn--secondary),
|
|
138
|
+
.ui-band :global(.ui-btn--secondary span) {
|
|
139
|
+
color: var(--surface-accent-fg);
|
|
140
|
+
border-color: var(--border-strong);
|
|
141
|
+
}
|
|
96
142
|
}
|
|
97
143
|
</style>
|
|
@@ -20,7 +20,11 @@ const { items, label = "Kruimelpad", class: className, ...rest } = Astro.props;
|
|
|
20
20
|
const lastIndex = items.length - 1;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<nav
|
|
23
|
+
<nav
|
|
24
|
+
class={["ui-crumbs", className].filter(Boolean).join(" ")}
|
|
25
|
+
aria-label={label}
|
|
26
|
+
{...rest}
|
|
27
|
+
>
|
|
24
28
|
{items.map((item, i) => (
|
|
25
29
|
<>
|
|
26
30
|
{item.href && i !== lastIndex ? (
|
|
@@ -38,37 +42,41 @@ const lastIndex = items.length - 1;
|
|
|
38
42
|
</nav>
|
|
39
43
|
|
|
40
44
|
<style>
|
|
41
|
-
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-wrap: wrap;
|
|
44
|
-
align-items: center;
|
|
45
|
-
gap: var(--space-1);
|
|
46
|
-
font-size: var(--text-xs);
|
|
47
|
-
line-height: var(--leading-xs);
|
|
48
|
-
color: var(--text-muted);
|
|
49
|
-
}
|
|
45
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
50
46
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
outline-offset: 2px;
|
|
62
|
-
border-radius: var(--radius-sm);
|
|
63
|
-
}
|
|
47
|
+
@layer components {
|
|
48
|
+
.ui-crumbs {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: var(--space-1);
|
|
53
|
+
font-size: var(--text-xs);
|
|
54
|
+
line-height: var(--leading-xs);
|
|
55
|
+
color: var(--text-muted);
|
|
56
|
+
}
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
.ui-crumbs a {
|
|
59
|
+
color: var(--link);
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
.ui-crumbs a:hover {
|
|
63
|
+
color: var(--link-hover);
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
}
|
|
66
|
+
.ui-crumbs a:focus-visible {
|
|
67
|
+
outline: 2px solid var(--focus);
|
|
68
|
+
outline-offset: 2px;
|
|
69
|
+
border-radius: var(--radius-sm);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ui-crumbs [aria-current="page"] {
|
|
73
|
+
color: var(--text);
|
|
74
|
+
font-weight: var(--weight-medium);
|
|
75
|
+
}
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
.ui-crumbs__sep {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
color: var(--border-strong);
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
</style>
|
package/src/astro/Button.astro
CHANGED
|
@@ -59,7 +59,9 @@ const tagProps = href
|
|
|
59
59
|
{...tagProps}
|
|
60
60
|
{...rest}
|
|
61
61
|
>
|
|
62
|
-
<span class="ui-btn__label"
|
|
62
|
+
<span class="ui-btn__label">
|
|
63
|
+
<slot />
|
|
64
|
+
</span>
|
|
63
65
|
{icon && (
|
|
64
66
|
<span class="ui-btn__icon" aria-hidden="true">
|
|
65
67
|
<Icon name={icon as any} size="1em" stroke={1.8} />
|
|
@@ -69,149 +71,153 @@ const tagProps = href
|
|
|
69
71
|
</Tag>
|
|
70
72
|
|
|
71
73
|
<style>
|
|
72
|
-
|
|
73
|
-
--_pad-x: var(--space-5);
|
|
74
|
-
display: inline-flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
gap: var(--space-2);
|
|
78
|
-
position: relative;
|
|
79
|
-
min-height: 40px;
|
|
80
|
-
padding: var(--space-2) var(--_pad-x);
|
|
81
|
-
border: 1px solid transparent;
|
|
82
|
-
border-radius: var(--radius-md);
|
|
83
|
-
font-family: var(--font-sans);
|
|
84
|
-
font-size: var(--text-sm);
|
|
85
|
-
font-weight: var(--weight-semibold);
|
|
86
|
-
line-height: 1;
|
|
87
|
-
text-decoration: none;
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
transition:
|
|
90
|
-
background-color var(--duration-fast) var(--ease-standard),
|
|
91
|
-
border-color var(--duration-fast) var(--ease-standard),
|
|
92
|
-
transform var(--duration-fast) var(--ease-standard);
|
|
93
|
-
}
|
|
74
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
94
75
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
76
|
+
@layer components {
|
|
77
|
+
.ui-btn {
|
|
78
|
+
--_pad-x: var(--space-5);
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
gap: var(--space-2);
|
|
83
|
+
position: relative;
|
|
84
|
+
min-height: 40px;
|
|
85
|
+
padding: var(--space-2) var(--_pad-x);
|
|
86
|
+
border: 1px solid transparent;
|
|
87
|
+
border-radius: var(--radius-md);
|
|
88
|
+
font-family: var(--font-sans);
|
|
89
|
+
font-size: var(--text-sm);
|
|
90
|
+
font-weight: var(--weight-semibold);
|
|
91
|
+
line-height: 1;
|
|
92
|
+
text-decoration: none;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition:
|
|
95
|
+
background-color var(--duration-fast) var(--ease-standard),
|
|
96
|
+
border-color var(--duration-fast) var(--ease-standard),
|
|
97
|
+
transform var(--duration-fast) var(--ease-standard);
|
|
98
|
+
}
|
|
109
99
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
/* Sizes: 32 / 40 / 48 px. */
|
|
101
|
+
.ui-btn--sm {
|
|
102
|
+
min-height: 32px;
|
|
103
|
+
--_pad-x: var(--space-4);
|
|
104
|
+
font-size: var(--text-xs);
|
|
105
|
+
}
|
|
106
|
+
.ui-btn--md {
|
|
107
|
+
min-height: 40px;
|
|
108
|
+
}
|
|
109
|
+
.ui-btn--lg {
|
|
110
|
+
min-height: 48px;
|
|
111
|
+
--_pad-x: var(--space-6);
|
|
112
|
+
font-size: var(--text-base);
|
|
113
|
+
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
.ui-btn--primary:hover,
|
|
121
|
-
.ui-btn--primary.is-hover {
|
|
122
|
-
background: var(--primary-hover);
|
|
123
|
-
}
|
|
115
|
+
.ui-btn--block {
|
|
116
|
+
display: flex;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
124
119
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
120
|
+
/* Primary. */
|
|
121
|
+
.ui-btn--primary {
|
|
122
|
+
background: var(--primary);
|
|
123
|
+
color: var(--primary-fg);
|
|
124
|
+
}
|
|
125
|
+
.ui-btn--primary:hover,
|
|
126
|
+
.ui-btn--primary.is-hover {
|
|
127
|
+
background: var(--primary-hover);
|
|
128
|
+
}
|
|
135
129
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
130
|
+
/* Secondary. */
|
|
131
|
+
.ui-btn--secondary {
|
|
132
|
+
background: transparent;
|
|
133
|
+
border-color: var(--border-strong);
|
|
134
|
+
color: var(--text);
|
|
135
|
+
}
|
|
136
|
+
.ui-btn--secondary:hover,
|
|
137
|
+
.ui-btn--secondary.is-hover {
|
|
138
|
+
background: var(--surface-hover);
|
|
139
|
+
}
|
|
145
140
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
color: var(--link-hover);
|
|
156
|
-
}
|
|
141
|
+
/* Accent. One call to action per page. */
|
|
142
|
+
.ui-btn--accent {
|
|
143
|
+
background: var(--accent);
|
|
144
|
+
color: var(--accent-fg);
|
|
145
|
+
}
|
|
146
|
+
.ui-btn--accent:hover,
|
|
147
|
+
.ui-btn--accent.is-hover {
|
|
148
|
+
background: var(--accent-hover);
|
|
149
|
+
}
|
|
157
150
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
/* Ghost. Low-weight actions. */
|
|
152
|
+
.ui-btn--ghost {
|
|
153
|
+
background: transparent;
|
|
154
|
+
color: var(--link);
|
|
155
|
+
padding-inline: var(--space-3);
|
|
156
|
+
}
|
|
157
|
+
.ui-btn--ghost:hover,
|
|
158
|
+
.ui-btn--ghost.is-hover {
|
|
159
|
+
background: var(--surface-hover);
|
|
160
|
+
color: var(--link-hover);
|
|
161
|
+
}
|
|
165
162
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
/* Focus: 2 px ring plus 4 px halo. */
|
|
164
|
+
.ui-btn:focus-visible,
|
|
165
|
+
.ui-btn.is-focus {
|
|
166
|
+
outline: 2px solid var(--focus);
|
|
167
|
+
outline-offset: 2px;
|
|
168
|
+
box-shadow: 0 0 0 4px var(--focus-outer);
|
|
169
|
+
}
|
|
171
170
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
pointer-events: none;
|
|
178
|
-
}
|
|
171
|
+
/* Pressed: 1 px downward shift. */
|
|
172
|
+
.ui-btn:active,
|
|
173
|
+
.ui-btn.is-active {
|
|
174
|
+
transform: translateY(1px);
|
|
175
|
+
}
|
|
179
176
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
.ui-btn__spinner {
|
|
189
|
-
position: absolute;
|
|
190
|
-
width: 16px;
|
|
191
|
-
height: 16px;
|
|
192
|
-
border: 2px solid currentColor;
|
|
193
|
-
border-top-color: transparent;
|
|
194
|
-
border-radius: var(--radius-full);
|
|
195
|
-
animation: ui-btn-spin var(--duration-slower) linear infinite;
|
|
196
|
-
}
|
|
177
|
+
/* Disabled. */
|
|
178
|
+
.ui-btn:disabled,
|
|
179
|
+
.ui-btn[aria-disabled="true"] {
|
|
180
|
+
opacity: 0.5;
|
|
181
|
+
cursor: not-allowed;
|
|
182
|
+
pointer-events: none;
|
|
183
|
+
}
|
|
197
184
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
185
|
+
/* Loading: label hidden, spinner shown. */
|
|
186
|
+
.ui-btn.is-loading {
|
|
187
|
+
cursor: progress;
|
|
188
|
+
}
|
|
189
|
+
.ui-btn.is-loading .ui-btn__label,
|
|
190
|
+
.ui-btn.is-loading .ui-btn__icon {
|
|
191
|
+
visibility: hidden;
|
|
192
|
+
}
|
|
193
|
+
.ui-btn__spinner {
|
|
194
|
+
position: absolute;
|
|
195
|
+
width: 16px;
|
|
196
|
+
height: 16px;
|
|
197
|
+
border: 2px solid currentColor;
|
|
198
|
+
border-top-color: transparent;
|
|
199
|
+
border-radius: var(--radius-full);
|
|
200
|
+
animation: ui-btn-spin var(--duration-slower) linear infinite;
|
|
201
|
+
}
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
.ui-btn__icon {
|
|
204
|
+
display: inline-flex;
|
|
205
|
+
font-size: 1em;
|
|
206
206
|
}
|
|
207
|
-
}
|
|
208
207
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
@keyframes ui-btn-spin {
|
|
209
|
+
to {
|
|
210
|
+
transform: rotate(360deg);
|
|
211
|
+
}
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
|
|
214
|
+
@media (prefers-reduced-motion: reduce) {
|
|
215
|
+
.ui-btn {
|
|
216
|
+
transition: none;
|
|
217
|
+
}
|
|
218
|
+
.ui-btn__spinner {
|
|
219
|
+
animation-duration: 1200ms;
|
|
220
|
+
}
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
223
|
</style>
|