@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/Radio.astro
CHANGED
|
@@ -47,43 +47,47 @@ const classes = ["ui-check", disabled && "is-disabled", className]
|
|
|
47
47
|
</label>
|
|
48
48
|
|
|
49
49
|
<style>
|
|
50
|
-
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
gap: var(--space-2);
|
|
54
|
-
min-height: 32px;
|
|
55
|
-
font-family: var(--font-sans);
|
|
56
|
-
font-size: var(--text-sm);
|
|
57
|
-
color: var(--text);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
50
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
@layer components {
|
|
53
|
+
.ui-check {
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: var(--space-2);
|
|
57
|
+
min-height: 32px;
|
|
58
|
+
font-family: var(--font-sans);
|
|
59
|
+
font-size: var(--text-sm);
|
|
60
|
+
color: var(--text);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
.ui-check input {
|
|
65
|
+
width: 17px;
|
|
66
|
+
height: 17px;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
accent-color: var(--primary);
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
.ui-check input:focus-visible {
|
|
73
|
+
outline: 2px solid var(--focus);
|
|
74
|
+
outline-offset: 2px;
|
|
75
|
+
box-shadow: 0 0 0 4px var(--focus-outer);
|
|
76
|
+
}
|
|
79
77
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
.ui-check.is-disabled {
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
color: var(--text-muted);
|
|
81
|
+
}
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
.ui-check.is-disabled input {
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (max-width: 700px), (pointer: coarse) {
|
|
88
|
+
.ui-check {
|
|
89
|
+
min-height: 40px;
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
</style>
|
package/src/astro/Skeleton.astro
CHANGED
|
@@ -12,9 +12,18 @@ interface Props {
|
|
|
12
12
|
class?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
variant = "block",
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
radius,
|
|
20
|
+
class: className,
|
|
21
|
+
...rest
|
|
22
|
+
} = Astro.props;
|
|
16
23
|
|
|
17
|
-
const classes = ["ui-skel", `ui-skel--${variant}`, className]
|
|
24
|
+
const classes = ["ui-skel", `ui-skel--${variant}`, className]
|
|
25
|
+
.filter(Boolean)
|
|
26
|
+
.join(" ");
|
|
18
27
|
|
|
19
28
|
const style = [
|
|
20
29
|
width && `width:${width}`,
|
|
@@ -25,56 +34,65 @@ const style = [
|
|
|
25
34
|
.join(";");
|
|
26
35
|
---
|
|
27
36
|
|
|
28
|
-
<span
|
|
37
|
+
<span
|
|
38
|
+
class={classes}
|
|
39
|
+
style={style || undefined}
|
|
40
|
+
aria-hidden="true"
|
|
41
|
+
{...rest}
|
|
42
|
+
></span>
|
|
29
43
|
|
|
30
44
|
<style>
|
|
31
|
-
|
|
32
|
-
display: block;
|
|
33
|
-
background: var(--surface-hover);
|
|
34
|
-
background-image: linear-gradient(
|
|
35
|
-
90deg,
|
|
36
|
-
var(--surface-hover) 0%,
|
|
37
|
-
var(--border) 50%,
|
|
38
|
-
var(--surface-hover) 100%
|
|
39
|
-
);
|
|
40
|
-
background-size: 200% 100%;
|
|
41
|
-
border-radius: var(--radius-md);
|
|
42
|
-
animation: ui-skel-shimmer 1400ms ease-in-out infinite;
|
|
43
|
-
}
|
|
45
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
@layer components {
|
|
48
|
+
.ui-skel {
|
|
49
|
+
display: block;
|
|
50
|
+
background: var(--surface-hover);
|
|
51
|
+
background-image: linear-gradient(
|
|
52
|
+
90deg,
|
|
53
|
+
var(--surface-hover) 0%,
|
|
54
|
+
var(--border) 50%,
|
|
55
|
+
var(--surface-hover) 100%
|
|
56
|
+
);
|
|
57
|
+
background-size: 200% 100%;
|
|
58
|
+
border-radius: var(--radius-md);
|
|
59
|
+
animation: ui-skel-shimmer 1400ms ease-in-out infinite;
|
|
60
|
+
}
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
.ui-skel--img {
|
|
63
|
+
width: 100%;
|
|
64
|
+
aspect-ratio: 4 / 3;
|
|
65
|
+
border-radius: 0;
|
|
66
|
+
}
|
|
55
67
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
.ui-skel--title {
|
|
69
|
+
height: 0.875rem;
|
|
70
|
+
border-radius: var(--radius-sm);
|
|
71
|
+
}
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
.ui-skel--line {
|
|
74
|
+
height: 0.625rem;
|
|
75
|
+
border-radius: var(--radius-sm);
|
|
76
|
+
}
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
background-position: 200% 0;
|
|
78
|
+
.ui-skel--block {
|
|
79
|
+
height: 1rem;
|
|
68
80
|
}
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
|
|
82
|
+
@keyframes ui-skel-shimmer {
|
|
83
|
+
0% {
|
|
84
|
+
background-position: 200% 0;
|
|
85
|
+
}
|
|
86
|
+
100% {
|
|
87
|
+
background-position: -200% 0;
|
|
88
|
+
}
|
|
71
89
|
}
|
|
72
|
-
}
|
|
73
90
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.ui-skel {
|
|
93
|
+
animation: none;
|
|
94
|
+
background-image: none;
|
|
95
|
+
}
|
|
78
96
|
}
|
|
79
97
|
}
|
|
80
98
|
</style>
|
package/src/astro/Social.astro
CHANGED
|
@@ -27,29 +27,34 @@ const classes = ["ui-social", className].filter(Boolean).join(" ");
|
|
|
27
27
|
</a>
|
|
28
28
|
|
|
29
29
|
<style>
|
|
30
|
-
|
|
31
|
-
display: inline-flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
width: 40px;
|
|
35
|
-
height: 40px;
|
|
36
|
-
border-radius: var(--radius-md);
|
|
37
|
-
color: var(--ivory-light);
|
|
38
|
-
transition: color var(--duration-fast) var(--ease-standard),
|
|
39
|
-
background-color var(--duration-fast) var(--ease-standard);
|
|
40
|
-
}
|
|
41
|
-
.ui-social:hover {
|
|
42
|
-
color: var(--ivory-xlight);
|
|
43
|
-
background: rgba(255, 255, 255, 0.08);
|
|
44
|
-
}
|
|
45
|
-
.ui-social:focus-visible {
|
|
46
|
-
outline: 2px solid var(--ivory-xlight);
|
|
47
|
-
outline-offset: 2px;
|
|
48
|
-
}
|
|
30
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
49
31
|
|
|
50
|
-
@
|
|
32
|
+
@layer components {
|
|
51
33
|
.ui-social {
|
|
52
|
-
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
width: 40px;
|
|
38
|
+
height: 40px;
|
|
39
|
+
border-radius: var(--radius-md);
|
|
40
|
+
color: var(--ivory-light);
|
|
41
|
+
transition:
|
|
42
|
+
color var(--duration-fast) var(--ease-standard),
|
|
43
|
+
background-color var(--duration-fast) var(--ease-standard);
|
|
44
|
+
}
|
|
45
|
+
.ui-social:hover {
|
|
46
|
+
color: var(--ivory-xlight);
|
|
47
|
+
background: rgba(255, 255, 255, 0.08);
|
|
48
|
+
}
|
|
49
|
+
.ui-social:focus-visible {
|
|
50
|
+
outline: 2px solid var(--ivory-xlight);
|
|
51
|
+
outline-offset: 2px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion: reduce) {
|
|
55
|
+
.ui-social {
|
|
56
|
+
transition: none;
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
</style>
|
|
@@ -20,9 +20,18 @@ interface Props {
|
|
|
20
20
|
class?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
steps,
|
|
25
|
+
current,
|
|
26
|
+
label,
|
|
27
|
+
mobile = false,
|
|
28
|
+
class: className,
|
|
29
|
+
...rest
|
|
30
|
+
} = Astro.props;
|
|
24
31
|
|
|
25
|
-
const classes = ["ui-steps", mobile && "ui-steps--mobile", className]
|
|
32
|
+
const classes = ["ui-steps", mobile && "ui-steps--mobile", className]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(" ");
|
|
26
35
|
---
|
|
27
36
|
|
|
28
37
|
<nav class={classes} aria-label={label} {...rest}>
|
|
@@ -31,7 +40,10 @@ const classes = ["ui-steps", mobile && "ui-steps--mobile", className].filter(Boo
|
|
|
31
40
|
return (
|
|
32
41
|
<>
|
|
33
42
|
{i > 0 && <span class="ui-steps__sep"></span>}
|
|
34
|
-
<span
|
|
43
|
+
<span
|
|
44
|
+
class={["ui-step", state].filter(Boolean).join(" ")}
|
|
45
|
+
aria-current={i === current ? "step" : undefined}
|
|
46
|
+
>
|
|
35
47
|
<span class="ui-step__dot" aria-hidden="true">
|
|
36
48
|
{i < current ? <Icon name="check" size={11} stroke={3} /> : i + 1}
|
|
37
49
|
</span>
|
|
@@ -43,62 +55,66 @@ const classes = ["ui-steps", mobile && "ui-steps--mobile", className].filter(Boo
|
|
|
43
55
|
</nav>
|
|
44
56
|
|
|
45
57
|
<style>
|
|
46
|
-
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: var(--space-2);
|
|
50
|
-
}
|
|
58
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
51
59
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
60
|
+
@layer components {
|
|
61
|
+
.ui-steps {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: var(--space-2);
|
|
65
|
+
}
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
border: 1px solid var(--border);
|
|
68
|
-
font-size: var(--text-xs);
|
|
69
|
-
font-weight: var(--weight-semibold);
|
|
70
|
-
background: var(--surface);
|
|
71
|
-
color: var(--text-muted);
|
|
72
|
-
}
|
|
67
|
+
.ui-step {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: var(--space-2);
|
|
71
|
+
font-size: var(--text-sm);
|
|
72
|
+
color: var(--text-muted);
|
|
73
|
+
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
.ui-step__dot {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
width: 22px;
|
|
80
|
+
height: 22px;
|
|
81
|
+
border-radius: var(--radius-full);
|
|
82
|
+
border: 1px solid var(--border);
|
|
83
|
+
font-size: var(--text-xs);
|
|
84
|
+
font-weight: var(--weight-semibold);
|
|
85
|
+
background: var(--surface);
|
|
86
|
+
color: var(--text-muted);
|
|
87
|
+
}
|
|
83
88
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
.ui-step.is-current {
|
|
90
|
+
color: var(--text);
|
|
91
|
+
font-weight: var(--weight-semibold);
|
|
92
|
+
}
|
|
93
|
+
.ui-step.is-current .ui-step__dot {
|
|
94
|
+
border-color: var(--primary);
|
|
95
|
+
background: var(--primary);
|
|
96
|
+
color: var(--primary-fg);
|
|
97
|
+
}
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
.ui-step.is-done {
|
|
100
|
+
color: var(--text);
|
|
101
|
+
}
|
|
102
|
+
.ui-step.is-done .ui-step__dot {
|
|
103
|
+
border-color: var(--primary);
|
|
104
|
+
background: var(--primary);
|
|
105
|
+
color: var(--primary-fg);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ui-steps__sep {
|
|
109
|
+
flex: 1;
|
|
110
|
+
min-width: var(--space-4);
|
|
111
|
+
height: 1px;
|
|
112
|
+
background: var(--border);
|
|
113
|
+
}
|
|
99
114
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
/* Mobile: only the current step keeps its label. */
|
|
116
|
+
.ui-steps--mobile .ui-step:not(.is-current) .ui-step__label {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
103
119
|
}
|
|
104
120
|
</style>
|
package/src/astro/Sticker.astro
CHANGED
|
@@ -15,12 +15,33 @@ const classes = ["pl-sticker", `pl-sticker--${size}`, className]
|
|
|
15
15
|
<span class={classes} aria-hidden="true" {...rest}>
|
|
16
16
|
<svg class="pl-sticker__disc" viewBox="0 0 112 112">
|
|
17
17
|
<circle cx="56" cy="56" r="52" fill="var(--surface-inverse)"></circle>
|
|
18
|
-
<circle
|
|
18
|
+
<circle
|
|
19
|
+
class="pl-sticker__ring"
|
|
20
|
+
cx="56"
|
|
21
|
+
cy="56"
|
|
22
|
+
r="47"
|
|
23
|
+
fill="none"
|
|
24
|
+
stroke="var(--sage-light)"
|
|
25
|
+
stroke-width="1.5"
|
|
26
|
+
stroke-dasharray="5 7"
|
|
27
|
+
></circle>
|
|
19
28
|
</svg>
|
|
20
29
|
<span class="pl-sticker__content">
|
|
21
|
-
<span
|
|
30
|
+
<span>
|
|
31
|
+
<slot />
|
|
32
|
+
</span>
|
|
22
33
|
{arrow && (
|
|
23
|
-
<svg
|
|
34
|
+
<svg
|
|
35
|
+
class="pl-sticker__arrow"
|
|
36
|
+
width="18"
|
|
37
|
+
height="18"
|
|
38
|
+
viewBox="0 0 24 24"
|
|
39
|
+
fill="none"
|
|
40
|
+
stroke="currentColor"
|
|
41
|
+
stroke-width="2.4"
|
|
42
|
+
stroke-linecap="round"
|
|
43
|
+
stroke-linejoin="round"
|
|
44
|
+
>
|
|
24
45
|
<path d="M12 5v14M6 13l6 6 6-6"></path>
|
|
25
46
|
</svg>
|
|
26
47
|
)}
|
|
@@ -28,53 +49,57 @@ const classes = ["pl-sticker", `pl-sticker--${size}`, className]
|
|
|
28
49
|
</span>
|
|
29
50
|
|
|
30
51
|
<style>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
@media (prefers-reduced-motion: reduce) {
|
|
75
|
-
.pl-sticker__ring,
|
|
52
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
53
|
+
|
|
54
|
+
@layer components {
|
|
55
|
+
.pl-sticker {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: inline-block;
|
|
58
|
+
width: 112px;
|
|
59
|
+
height: 112px;
|
|
60
|
+
flex: none;
|
|
61
|
+
}
|
|
62
|
+
.pl-sticker--sm {
|
|
63
|
+
width: 92px;
|
|
64
|
+
height: 92px;
|
|
65
|
+
}
|
|
66
|
+
.pl-sticker__disc {
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
display: block;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
.pl-sticker__ring {
|
|
74
|
+
transform-origin: 56px 56px;
|
|
75
|
+
animation: pl-spin 18s linear infinite;
|
|
76
|
+
}
|
|
77
|
+
.pl-sticker__content {
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
gap: var(--space-1);
|
|
85
|
+
color: var(--surface-inverse-fg);
|
|
86
|
+
text-align: center;
|
|
87
|
+
font-size: var(--text-xs);
|
|
88
|
+
font-weight: var(--weight-semibold);
|
|
89
|
+
line-height: 1.2;
|
|
90
|
+
letter-spacing: 0.02em;
|
|
91
|
+
}
|
|
92
|
+
.pl-sticker--sm .pl-sticker__content {
|
|
93
|
+
font-size: var(--text-2xs);
|
|
94
|
+
}
|
|
76
95
|
.pl-sticker__arrow {
|
|
77
|
-
animation:
|
|
96
|
+
animation: pl-bob 1.8s ease-in-out infinite;
|
|
97
|
+
}
|
|
98
|
+
@media (prefers-reduced-motion: reduce) {
|
|
99
|
+
.pl-sticker__ring,
|
|
100
|
+
.pl-sticker__arrow {
|
|
101
|
+
animation: none;
|
|
102
|
+
}
|
|
78
103
|
}
|
|
79
104
|
}
|
|
80
105
|
</style>
|
package/src/astro/Swatch.astro
CHANGED
|
@@ -48,53 +48,57 @@ const ariaLabel = selected ? `${label}, geselecteerd` : label;
|
|
|
48
48
|
></button>
|
|
49
49
|
|
|
50
50
|
<style>
|
|
51
|
-
|
|
52
|
-
width: 30px;
|
|
53
|
-
height: 30px;
|
|
54
|
-
padding: 0;
|
|
55
|
-
background: var(--swatch);
|
|
56
|
-
border: 1px solid var(--border);
|
|
57
|
-
border-radius: var(--radius-full);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
transition: box-shadow var(--duration-fast) var(--ease-standard);
|
|
60
|
-
}
|
|
51
|
+
@layer reset, tokens, base, components, motion, utilities;
|
|
61
52
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
@layer components {
|
|
54
|
+
.ui-swatch {
|
|
55
|
+
width: 30px;
|
|
56
|
+
height: 30px;
|
|
57
|
+
padding: 0;
|
|
58
|
+
background: var(--swatch);
|
|
59
|
+
border: 1px solid var(--border);
|
|
60
|
+
border-radius: var(--radius-full);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: box-shadow var(--duration-fast) var(--ease-standard);
|
|
63
|
+
}
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
box-shadow: 0 0 0 4px var(--focus-outer);
|
|
72
|
-
}
|
|
65
|
+
.ui-swatch:hover,
|
|
66
|
+
.ui-swatch.is-hover {
|
|
67
|
+
box-shadow: 0 0 0 2px var(--border-strong);
|
|
68
|
+
}
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
0 0 0
|
|
79
|
-
|
|
80
|
-
}
|
|
70
|
+
.ui-swatch:focus-visible,
|
|
71
|
+
.ui-swatch.is-focus {
|
|
72
|
+
outline: 2px solid var(--focus);
|
|
73
|
+
outline-offset: 2px;
|
|
74
|
+
box-shadow: 0 0 0 4px var(--focus-outer);
|
|
75
|
+
}
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
/* Selected: 2 px ring, readable without colour. */
|
|
78
|
+
.ui-swatch.is-selected,
|
|
79
|
+
.ui-swatch[aria-pressed="true"] {
|
|
80
|
+
box-shadow:
|
|
81
|
+
0 0 0 2px var(--surface),
|
|
82
|
+
0 0 0 4px var(--border-strong);
|
|
83
|
+
}
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
.ui-swatch {
|
|
90
|
-
|
|
85
|
+
.ui-swatch.is-disabled,
|
|
86
|
+
.ui-swatch:disabled {
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
cursor: not-allowed;
|
|
91
89
|
}
|
|
92
|
-
}
|
|
93
90
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.ui-swatch {
|
|
93
|
+
transition: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 700px), (pointer: coarse) {
|
|
98
|
+
.ui-swatch {
|
|
99
|
+
width: 32px;
|
|
100
|
+
height: 32px;
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
</style>
|
|
@@ -5,7 +5,11 @@ interface Props {
|
|
|
5
5
|
class?: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const {
|
|
8
|
+
const {
|
|
9
|
+
label = "Uitgelichte artikelen",
|
|
10
|
+
class: className,
|
|
11
|
+
...rest
|
|
12
|
+
} = Astro.props;
|
|
9
13
|
const classes = ["pl-carousel", className].filter(Boolean).join(" ");
|
|
10
14
|
---
|
|
11
15
|
|