rk-designsystem 1.3.4 → 1.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 +9 -3
- package/dist/components/Carousel/index.js +215 -166
- package/dist/components/Carousel/styles.module.css.js +35 -31
- package/dist/components/DateInput/index.js +85 -87
- package/dist/components/DateInput/styles.module.css.js +1 -1
- package/dist/components/DatePicker/index.js +197 -175
- package/dist/components/DatePicker/styles.module.css.js +20 -20
- package/dist/components/Donor/index.js +71 -68
- package/dist/components/Donor/styles.module.css.js +22 -22
- package/dist/components/Footer/index.js +88 -86
- package/dist/components/GraphicElement/index.js +3 -3
- package/dist/components/Header/index.js +277 -242
- package/dist/components/Header/styles.module.css.js +49 -49
- package/dist/context/LanguageContext.js +17 -14
- package/dist/index.d.ts +44 -5
- package/dist/rk-designsystem.css +1 -1
- package/dist/translations/index.js +10 -2
- package/package.json +18 -26
- package/dist/utils/search-index.js +0 -106
package/README.md
CHANGED
|
@@ -67,8 +67,8 @@ npm install rk-designsystem
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
> Since 1.4.0 the library declares `@digdir/designsystemet-react` and
|
|
70
|
-
> `@digdir/designsystemet-css` as peer dependencies (
|
|
71
|
-
> React
|
|
70
|
+
> `@digdir/designsystemet-css` as peer dependencies (`^1.21.0`) and requires
|
|
71
|
+
> React `^18.3.1`. npm 7+ installs peers automatically; with older
|
|
72
72
|
> setups install them alongside the package.
|
|
73
73
|
|
|
74
74
|
### 2. Setup Layout with Font
|
|
@@ -229,7 +229,13 @@ until it has real production consumers. The breaking changes below landed in
|
|
|
229
229
|
Button prop removals, mislabeled as a patch — 1.2.5 is deprecated.)
|
|
230
230
|
|
|
231
231
|
- **Peer dependencies (1.4.0):** `@digdir/designsystemet-react` and
|
|
232
|
-
`@digdir/designsystemet-css` (
|
|
232
|
+
`@digdir/designsystemet-css` (`^1.21.0`) are peers; React `^18.3.1 || ^19`.
|
|
233
|
+
The Digdir floor moved from `~1.13.3` to `^1.21.0`, and the library now
|
|
234
|
+
tracks the newest Digdir 1.x: consumers on 1.13 must upgrade
|
|
235
|
+
(`npm install @digdir/designsystemet-react@^1.21 @digdir/designsystemet-css@^1.21`)
|
|
236
|
+
or npm refuses to resolve the peers. Tooltip triggers keep their own
|
|
237
|
+
accessible name in 1.21 (the tooltip becomes `aria-description`), and
|
|
238
|
+
`ToggleGroup`'s `data-toggle-group` is deprecated in favour of `aria-label`.
|
|
233
239
|
- **ESM-only (1.4.0):** the CommonJS/UMD entry is removed, so
|
|
234
240
|
`require('rk-designsystem')` now fails explicitly. It never actually worked:
|
|
235
241
|
the UMD file was parsed as ESM (the package is `"type": "module"`), and the
|
|
@@ -1,193 +1,214 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as u, jsx as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import
|
|
2
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as h, useState as d, useRef as se, useCallback as f, useMemo as le } from "react";
|
|
4
|
+
import ne from "embla-carousel-react";
|
|
5
5
|
import a from "./styles.module.css.js";
|
|
6
|
-
import { ChevronLeftIcon as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Spinner as
|
|
9
|
-
import { useLanguageOptional as
|
|
10
|
-
const
|
|
6
|
+
import { ChevronLeftIcon as de, ChevronRightIcon as ce, PlayIcon as ue, PauseIcon as pe } from "@navikt/aksel-icons";
|
|
7
|
+
import { Button as V } from "../Button/index.js";
|
|
8
|
+
import { Spinner as he } from "../SpinnerLoader/index.js";
|
|
9
|
+
import { useLanguageOptional as fe } from "../../context/LanguageContext.js";
|
|
10
|
+
const ge = ({
|
|
11
11
|
images: e,
|
|
12
|
-
autoPlay:
|
|
13
|
-
autoDelay:
|
|
14
|
-
showArrows:
|
|
15
|
-
showDots:
|
|
16
|
-
variant:
|
|
17
|
-
slidesPerView:
|
|
18
|
-
slideSpacing:
|
|
19
|
-
cornerRadius:
|
|
20
|
-
"
|
|
21
|
-
|
|
12
|
+
autoPlay: c = !1,
|
|
13
|
+
autoDelay: z = 5,
|
|
14
|
+
showArrows: I = !0,
|
|
15
|
+
showDots: D = !0,
|
|
16
|
+
variant: G,
|
|
17
|
+
slidesPerView: C = 1,
|
|
18
|
+
slideSpacing: N = 16,
|
|
19
|
+
cornerRadius: v = 0,
|
|
20
|
+
"aria-label": _,
|
|
21
|
+
crossOrigin: H,
|
|
22
|
+
"data-color": K,
|
|
23
|
+
"data-size": U
|
|
22
24
|
}) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
var T;
|
|
26
|
+
const { t: l } = fe();
|
|
27
|
+
h(() => {
|
|
25
28
|
const r = "rk-carousel-inline-styles";
|
|
26
29
|
if (typeof document > "u" || document.getElementById(r)) return;
|
|
27
|
-
const o =
|
|
30
|
+
const o = me(a), i = document.createElement("style");
|
|
28
31
|
i.id = r, i.textContent = o, document.head.prepend(i);
|
|
29
32
|
}, []);
|
|
30
|
-
const
|
|
33
|
+
const W = {
|
|
31
34
|
loop: !0,
|
|
32
35
|
align: "start",
|
|
33
36
|
containScroll: "trimSnaps",
|
|
34
37
|
slidesToScroll: 1
|
|
35
|
-
}, [
|
|
38
|
+
}, [X, t] = ne(W), [g, q] = d(0), [J, k] = d([]), [S, j] = d([]), [L, P] = d([]), E = se([]), Q = (e ?? []).map((r) => r.src).join(`
|
|
36
39
|
`);
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
h(() => {
|
|
41
|
+
P(
|
|
39
42
|
(e ?? []).map((r, o) => {
|
|
40
|
-
const i =
|
|
43
|
+
const i = E.current[o];
|
|
41
44
|
return !!(i && i.complete && i.naturalWidth > 0);
|
|
42
45
|
})
|
|
43
46
|
);
|
|
44
|
-
}, [
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
+
}, [Q]);
|
|
48
|
+
const B = f((r) => {
|
|
49
|
+
P((o) => {
|
|
47
50
|
if (o[r]) return o;
|
|
48
51
|
const i = [...o];
|
|
49
52
|
return i[r] = !0, i;
|
|
50
53
|
});
|
|
51
|
-
}, []),
|
|
52
|
-
t &&
|
|
53
|
-
}, [t]),
|
|
54
|
-
|
|
54
|
+
}, []), O = le(() => z * 1e3, [z]), n = f(() => {
|
|
55
|
+
t && (q(t.selectedScrollSnap()), j(t.slidesInView()));
|
|
56
|
+
}, [t]), Y = f((r) => t && t.scrollTo(r), [t]), Z = f(() => t && t.scrollPrev(), [t]), ee = f(() => t && t.scrollNext(), [t]);
|
|
57
|
+
h(() => {
|
|
55
58
|
if (t)
|
|
56
|
-
return t.on("select",
|
|
57
|
-
t.off("select",
|
|
59
|
+
return t.on("select", n), t.on("reInit", n), t.on("slidesInView", n), k(t.scrollSnapList()), j(t.slidesInView()), () => {
|
|
60
|
+
t.off("select", n), t.off("reInit", n), t.off("slidesInView", n);
|
|
58
61
|
};
|
|
59
|
-
}, [t,
|
|
60
|
-
t && (t.reInit(),
|
|
61
|
-
}, [t, e,
|
|
62
|
-
const [
|
|
63
|
-
|
|
64
|
-
if (!
|
|
62
|
+
}, [t, n]), h(() => {
|
|
63
|
+
t && (t.reInit(), k(t.scrollSnapList()));
|
|
64
|
+
}, [t, e, C, N]);
|
|
65
|
+
const [m, te] = d(!1), [re, A] = d(!1), [oe, F] = d(!1), x = c && !m && !re && !oe;
|
|
66
|
+
h(() => {
|
|
67
|
+
if (!x || !t || !e || e.length <= 1) return;
|
|
65
68
|
const r = window.setInterval(() => {
|
|
66
69
|
t.canScrollNext() && t.scrollNext();
|
|
67
|
-
},
|
|
70
|
+
}, O);
|
|
68
71
|
return () => {
|
|
69
72
|
window.clearInterval(r);
|
|
70
73
|
};
|
|
71
|
-
}, [
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
flex: `0 0 ${G}`,
|
|
101
|
-
paddingLeft: `${m}px`,
|
|
102
|
-
paddingRight: `${m}px`,
|
|
103
|
-
borderRadius: g > 0 ? `${g}px` : void 0,
|
|
104
|
-
overflow: "hidden"
|
|
105
|
-
// Ensure radius clips content
|
|
106
|
-
},
|
|
107
|
-
children: /* @__PURE__ */ u("div", { className: a.slideInner, style: { borderRadius: `${g}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
108
|
-
!z[o] && /* @__PURE__ */ n("div", { className: a.loaderOverlay, children: /* @__PURE__ */ n(re, { "aria-label": s("carousel.loading") }) }),
|
|
109
|
-
/* @__PURE__ */ n(
|
|
110
|
-
"img",
|
|
111
|
-
{
|
|
112
|
-
ref: (i) => {
|
|
113
|
-
k.current[o] = i;
|
|
114
|
-
},
|
|
115
|
-
className: `${a.image} ${z[o] ? a.loaded : a.loadingImage}`,
|
|
116
|
-
src: r.src,
|
|
117
|
-
alt: r.alt,
|
|
118
|
-
loading: o < E ? "eager" : "lazy",
|
|
119
|
-
crossOrigin: "anonymous",
|
|
120
|
-
onLoad: () => N(o),
|
|
121
|
-
onError: (i) => {
|
|
122
|
-
i.target.style.display = "none", N(o);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] })
|
|
74
|
+
}, [x, O, t, e]);
|
|
75
|
+
const y = Math.max(1, C), ae = `${100 / y}%`, b = N / 2, ie = (r) => S.length > 0 ? S.includes(r) : r < y, M = (e == null ? void 0 : e.length) ?? 0, R = (r) => l("carousel.slideOf").replace("{index}", String(r + 1)).replace("{total}", String(M)), p = M > 1, $ = c && p, w = D && p;
|
|
76
|
+
return (
|
|
77
|
+
// APG carousel pattern: a labelled region with the "carousel" role
|
|
78
|
+
// description, slides as labelled groups, and a live position status.
|
|
79
|
+
/* @__PURE__ */ u(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: a.carouselContainer,
|
|
83
|
+
role: "region",
|
|
84
|
+
"aria-roledescription": "carousel",
|
|
85
|
+
"aria-label": _ ?? l("carousel.label"),
|
|
86
|
+
"data-color": K,
|
|
87
|
+
"data-size": U,
|
|
88
|
+
"data-variant": G,
|
|
89
|
+
onMouseEnter: c ? () => A(!0) : void 0,
|
|
90
|
+
onMouseLeave: c ? () => A(!1) : void 0,
|
|
91
|
+
onFocus: c ? () => F(!0) : void 0,
|
|
92
|
+
onBlur: c ? (r) => {
|
|
93
|
+
r.currentTarget.contains(r.relatedTarget) || F(!1);
|
|
94
|
+
} : void 0,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ s("div", { className: a.viewport, ref: X, children: /* @__PURE__ */ s(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
className: a.slides,
|
|
100
|
+
style: {
|
|
101
|
+
marginLeft: `-${b}px`,
|
|
102
|
+
marginRight: `-${b}px`
|
|
127
103
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
104
|
+
children: e && e.length > 0 ? e.map((r, o) => /* @__PURE__ */ s(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: a.slide,
|
|
108
|
+
role: "group",
|
|
109
|
+
"aria-roledescription": "slide",
|
|
110
|
+
"aria-label": R(o),
|
|
111
|
+
"aria-hidden": ie(o) ? void 0 : !0,
|
|
112
|
+
style: {
|
|
113
|
+
flex: `0 0 ${ae}`,
|
|
114
|
+
paddingLeft: `${b}px`,
|
|
115
|
+
paddingRight: `${b}px`,
|
|
116
|
+
borderRadius: v > 0 ? `${v}px` : void 0,
|
|
117
|
+
overflow: "hidden"
|
|
118
|
+
// Ensure radius clips content
|
|
119
|
+
},
|
|
120
|
+
children: /* @__PURE__ */ u("div", { className: a.slideInner, style: { borderRadius: `${v}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
121
|
+
!L[o] && /* @__PURE__ */ s("div", { className: a.loaderOverlay, children: /* @__PURE__ */ s(he, { "aria-label": l("carousel.loading") }) }),
|
|
122
|
+
/* @__PURE__ */ s(
|
|
123
|
+
"img",
|
|
124
|
+
{
|
|
125
|
+
ref: (i) => {
|
|
126
|
+
E.current[o] = i;
|
|
127
|
+
},
|
|
128
|
+
className: `${a.image} ${L[o] ? a.loaded : a.loadingImage}`,
|
|
129
|
+
src: r.src,
|
|
130
|
+
alt: r.alt,
|
|
131
|
+
loading: o < y ? "eager" : "lazy",
|
|
132
|
+
crossOrigin: H,
|
|
133
|
+
onLoad: () => B(o),
|
|
134
|
+
onError: (i) => {
|
|
135
|
+
i.target.style.display = "none", B(o);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] })
|
|
140
|
+
},
|
|
141
|
+
`image-${o}-${r.src}`
|
|
142
|
+
)) : /* @__PURE__ */ s("div", { className: a.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ s("div", { className: a.empty, children: l("carousel.empty") }) })
|
|
143
|
+
}
|
|
144
|
+
) }),
|
|
145
|
+
p && /* @__PURE__ */ u("div", { role: "status", "aria-live": x ? "off" : "polite", className: a.srOnly, children: [
|
|
146
|
+
R(g),
|
|
147
|
+
(T = e[g]) != null && T.alt ? `: ${e[g].alt}` : ""
|
|
156
148
|
] }),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
(I || w || $) && /* @__PURE__ */ u("div", { className: a.controls, "aria-hidden": "false", children: [
|
|
150
|
+
I && /* @__PURE__ */ u("div", { className: a.arrows, children: [
|
|
151
|
+
/* @__PURE__ */ s(
|
|
152
|
+
V,
|
|
153
|
+
{
|
|
154
|
+
variant: "primary",
|
|
155
|
+
icon: !0,
|
|
156
|
+
"aria-label": l("carousel.previousImage"),
|
|
157
|
+
onClick: Z,
|
|
158
|
+
disabled: !p,
|
|
159
|
+
children: /* @__PURE__ */ s(de, { "aria-hidden": !0 })
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ s(
|
|
163
|
+
V,
|
|
164
|
+
{
|
|
165
|
+
variant: "primary",
|
|
166
|
+
icon: !0,
|
|
167
|
+
"aria-label": l("carousel.nextImage"),
|
|
168
|
+
onClick: ee,
|
|
169
|
+
disabled: !p,
|
|
170
|
+
children: /* @__PURE__ */ s(ce, { "aria-hidden": !0 })
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] }),
|
|
174
|
+
(w || $) && // One translucent pill holds the pause control and the dots; the
|
|
175
|
+
// dots alone form the labelled "Bildeposisjon" group so the
|
|
176
|
+
// pause button is not announced as part of the position picker.
|
|
177
|
+
/* @__PURE__ */ u("div", { className: a.dots, children: [
|
|
178
|
+
$ && /* @__PURE__ */ s(
|
|
172
179
|
"button",
|
|
173
180
|
{
|
|
174
181
|
type: "button",
|
|
175
|
-
className:
|
|
176
|
-
onClick: () =>
|
|
177
|
-
"aria-label":
|
|
178
|
-
"aria-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
)
|
|
182
|
-
|
|
182
|
+
className: a.playPause,
|
|
183
|
+
onClick: () => te((r) => !r),
|
|
184
|
+
"aria-label": l(m ? "carousel.resumeAutoplay" : "carousel.pauseAutoplay"),
|
|
185
|
+
"aria-pressed": m,
|
|
186
|
+
children: m ? /* @__PURE__ */ s(ue, { "aria-hidden": !0 }) : /* @__PURE__ */ s(pe, { "aria-hidden": !0 })
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
w && /* @__PURE__ */ s("div", { className: a.dotGroup, role: "group", "aria-label": l("carousel.imagePosition"), children: J.map((r, o) => {
|
|
190
|
+
const i = o === g;
|
|
191
|
+
return /* @__PURE__ */ s(
|
|
192
|
+
"button",
|
|
193
|
+
{
|
|
194
|
+
type: "button",
|
|
195
|
+
className: `${a.dot} ${i ? a.dotActive : ""}`,
|
|
196
|
+
onClick: () => Y(o),
|
|
197
|
+
"aria-label": `${l("carousel.goToImage")} ${o + 1}`,
|
|
198
|
+
"aria-current": i || void 0
|
|
199
|
+
},
|
|
200
|
+
`dot-${o}`
|
|
201
|
+
);
|
|
202
|
+
}) })
|
|
203
|
+
] })
|
|
183
204
|
] })
|
|
184
|
-
]
|
|
185
|
-
|
|
186
|
-
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
)
|
|
187
208
|
);
|
|
188
209
|
};
|
|
189
|
-
|
|
190
|
-
function
|
|
210
|
+
ge.displayName = "Carousel";
|
|
211
|
+
function me(e) {
|
|
191
212
|
return `
|
|
192
213
|
.${e.carouselContainer} {
|
|
193
214
|
position: relative;
|
|
@@ -195,8 +216,8 @@ function ie(e) {
|
|
|
195
216
|
width: 100%;
|
|
196
217
|
height: 100%;
|
|
197
218
|
min-height: 200px;
|
|
198
|
-
background-color: var(--ds-color-background-default, #fff);
|
|
199
|
-
color: var(--ds-color-text-default, #2b2b2b);
|
|
219
|
+
background-color: var(--ds-color-neutral-background-default, #fff);
|
|
220
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
200
221
|
border-radius: var(--ds-border-radius-md, 4px);
|
|
201
222
|
box-sizing: border-box;
|
|
202
223
|
max-width: 100%;
|
|
@@ -257,14 +278,25 @@ function ie(e) {
|
|
|
257
278
|
display: inline-flex;
|
|
258
279
|
align-items: center;
|
|
259
280
|
gap: var(--ds-size-2, 8px);
|
|
260
|
-
color: var(--ds-color-text-subtle, #5d5d5d);
|
|
281
|
+
color: var(--ds-color-neutral-text-subtle, #5d5d5d);
|
|
261
282
|
font-size: var(--ds-font-size-2, 14px);
|
|
262
283
|
}
|
|
263
284
|
.${e.empty} {
|
|
264
|
-
color: var(--ds-color-text-subtle, #5d5d5d);
|
|
285
|
+
color: var(--ds-color-neutral-text-subtle, #5d5d5d);
|
|
265
286
|
font-size: var(--ds-font-size-2, 14px);
|
|
266
287
|
text-align: center;
|
|
267
288
|
}
|
|
289
|
+
.${e.srOnly} {
|
|
290
|
+
position: absolute;
|
|
291
|
+
width: 1px;
|
|
292
|
+
height: 1px;
|
|
293
|
+
padding: 0;
|
|
294
|
+
margin: -1px;
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
clip: rect(0, 0, 0, 0);
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
border: 0;
|
|
299
|
+
}
|
|
268
300
|
.${e.controls} {
|
|
269
301
|
position: absolute;
|
|
270
302
|
inset: 0;
|
|
@@ -297,15 +329,32 @@ function ie(e) {
|
|
|
297
329
|
padding: var(--ds-size-1, 4px) var(--ds-size-2, 8px);
|
|
298
330
|
border-radius: 999px;
|
|
299
331
|
}
|
|
332
|
+
.${e.dotGroup} {
|
|
333
|
+
display: inline-flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
gap: var(--ds-size-1, 4px);
|
|
336
|
+
}
|
|
300
337
|
.${e.dot} {
|
|
301
|
-
|
|
302
|
-
|
|
338
|
+
display: inline-flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
justify-content: center;
|
|
341
|
+
width: var(--ds-size-6, 24px);
|
|
342
|
+
height: var(--ds-size-6, 24px);
|
|
343
|
+
border: 0;
|
|
303
344
|
border-radius: 999px;
|
|
304
|
-
|
|
305
|
-
background-color: rgba(255, 255, 255, 0.6);
|
|
345
|
+
background: transparent;
|
|
306
346
|
padding: 0;
|
|
307
347
|
margin: 0;
|
|
308
348
|
cursor: pointer;
|
|
349
|
+
}
|
|
350
|
+
.${e.dot}::before {
|
|
351
|
+
content: "";
|
|
352
|
+
width: 12px;
|
|
353
|
+
height: 12px;
|
|
354
|
+
border-radius: 999px;
|
|
355
|
+
border: var(--ds-border-width-default, 1px) solid var(--ds-color-neutral-border-subtle, #d6d6d6);
|
|
356
|
+
background-color: rgba(255, 255, 255, 0.6);
|
|
357
|
+
box-sizing: border-box;
|
|
309
358
|
transition: all 0.2s ease;
|
|
310
359
|
}
|
|
311
360
|
.${e.playPause} {
|
|
@@ -315,7 +364,7 @@ function ie(e) {
|
|
|
315
364
|
width: var(--ds-size-6, 24px);
|
|
316
365
|
height: var(--ds-size-6, 24px);
|
|
317
366
|
border-radius: 999px;
|
|
318
|
-
border: var(--ds-border-width-default, 1px) solid var(--ds-color-border-subtle, #d6d6d6);
|
|
367
|
+
border: var(--ds-border-width-default, 1px) solid var(--ds-color-neutral-border-subtle, #d6d6d6);
|
|
319
368
|
background-color: rgba(255, 255, 255, 0.85);
|
|
320
369
|
/* Pinned to match the hardcoded pill — see styles.module.css. */
|
|
321
370
|
color: #1e1e1e;
|
|
@@ -323,7 +372,7 @@ function ie(e) {
|
|
|
323
372
|
margin: 0;
|
|
324
373
|
cursor: pointer;
|
|
325
374
|
}
|
|
326
|
-
.${e.dotActive} {
|
|
375
|
+
.${e.dotActive}::before {
|
|
327
376
|
background-color: var(--ds-color-primary-color-red-base-default, #D52B1E);
|
|
328
377
|
border-color: var(--ds-color-primary-color-red-base-default, #D52B1E);
|
|
329
378
|
transform: scale(1.1);
|
|
@@ -357,7 +406,7 @@ function ie(e) {
|
|
|
357
406
|
bottom: var(--ds-size-2, 8px);
|
|
358
407
|
gap: var(--ds-size-1, 4px);
|
|
359
408
|
}
|
|
360
|
-
.${e.dot} {
|
|
409
|
+
.${e.dot}::before {
|
|
361
410
|
width: 10px;
|
|
362
411
|
height: 10px;
|
|
363
412
|
}
|
|
@@ -376,5 +425,5 @@ function ie(e) {
|
|
|
376
425
|
`;
|
|
377
426
|
}
|
|
378
427
|
export {
|
|
379
|
-
|
|
428
|
+
ge as Carousel
|
|
380
429
|
};
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const
|
|
3
|
-
carouselContainer:
|
|
4
|
-
viewport:
|
|
2
|
+
const o = "_carouselContainer_1qjfm_5", _ = "_viewport_1qjfm_18", s = "_slides_1qjfm_24", t = "_slide_1qjfm_24", e = "_slideInner_1qjfm_44", n = "_loaderOverlay_1qjfm_52", l = "_image_1qjfm_62", d = "_loaded_1qjfm_73", r = "_loading_1qjfm_77", a = "_empty_1qjfm_85", c = "_srOnly_1qjfm_95", i = "_controls_1qjfm_107", m = "_arrows_1qjfm_117", f = "_dots_1qjfm_127", j = "_playPause_1qjfm_142", q = "_dotGroup_1qjfm_169", p = "_dot_1qjfm_127", y = "_dotActive_1qjfm_200", u = {
|
|
3
|
+
carouselContainer: o,
|
|
4
|
+
viewport: _,
|
|
5
5
|
slides: s,
|
|
6
|
-
slide:
|
|
7
|
-
slideInner:
|
|
8
|
-
loaderOverlay:
|
|
9
|
-
image:
|
|
10
|
-
loaded:
|
|
11
|
-
loading:
|
|
12
|
-
empty:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
slide: t,
|
|
7
|
+
slideInner: e,
|
|
8
|
+
loaderOverlay: n,
|
|
9
|
+
image: l,
|
|
10
|
+
loaded: d,
|
|
11
|
+
loading: r,
|
|
12
|
+
empty: a,
|
|
13
|
+
srOnly: c,
|
|
14
|
+
controls: i,
|
|
15
|
+
arrows: m,
|
|
16
|
+
dots: f,
|
|
17
|
+
playPause: j,
|
|
18
|
+
dotGroup: q,
|
|
19
|
+
dot: p,
|
|
20
|
+
dotActive: y
|
|
19
21
|
};
|
|
20
22
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
m as arrows,
|
|
24
|
+
o as carouselContainer,
|
|
25
|
+
i as controls,
|
|
24
26
|
u as default,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
l as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
p as dot,
|
|
28
|
+
y as dotActive,
|
|
29
|
+
q as dotGroup,
|
|
30
|
+
f as dots,
|
|
31
|
+
a as empty,
|
|
32
|
+
l as image,
|
|
33
|
+
d as loaded,
|
|
34
|
+
n as loaderOverlay,
|
|
35
|
+
r as loading,
|
|
36
|
+
j as playPause,
|
|
37
|
+
t as slide,
|
|
38
|
+
e as slideInner,
|
|
36
39
|
s as slides,
|
|
37
|
-
|
|
40
|
+
c as srOnly,
|
|
41
|
+
_ as viewport
|
|
38
42
|
};
|