@rikstv/shared-components 3.2.1-4 → 3.2.1-alpha.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/dist/components/accordion/Accordion-C-Lu1AN3.mjs +311 -0
- package/dist/components/alert/Alert-C2ywNHz1.mjs +68 -0
- package/dist/components/breadcrumb/Breadcrumb-Dpi45ZU-.mjs +21 -0
- package/dist/components/button/{ArrowButton-DqViaPQ-.mjs → ArrowButton-DMr9aNBX.mjs} +11 -11
- package/dist/components/button/BaseButton-BDwLDH8l.mjs +46 -0
- package/dist/components/button/BaseButton.d.ts +1 -2
- package/dist/components/button/BaseDecoratedButton-ChPN1ek7.mjs +15 -0
- package/dist/components/button/BaseDecoratedButton.d.ts +1 -1
- package/dist/components/button/{BaseLinkButton-niQ474XP.mjs → BaseLinkButton-BsJ_29CO.mjs} +13 -13
- package/dist/components/button/BaseLinkButton.d.ts +1 -1
- package/dist/components/button/Button-ChxzP0BI.mjs +19 -0
- package/dist/components/button/DecoratedButton-BPD31Ccf.mjs +26 -0
- package/dist/components/button/IconButton-DYRG4f36.mjs +18 -0
- package/dist/components/button/IconButton.d.ts +1 -1
- package/dist/components/checkbox/BaseCheckbox-Ds7EbRAQ.mjs +41 -0
- package/dist/components/checkbox/Checkbox-DqG1H_l_.mjs +22 -0
- package/dist/components/core/{Core-DVnHiJm2.mjs → Core-GV7d4sn7.mjs} +10 -10
- package/dist/components/core/LightMode-QGX5KWDc.mjs +9 -0
- package/dist/components/core/RiksTV-CLsPQKYj.mjs +6 -0
- package/dist/components/core/Strim-D7gNGKkV.mjs +6 -0
- package/dist/components/dropdown/Dropdown-U7w2rrui.mjs +44 -0
- package/dist/components/dropdown/Dropdown.d.ts +2 -3
- package/dist/components/icons/{Arrow-DlptGprM.mjs → Arrow-DpNA_SD7.mjs} +2 -2
- package/dist/components/icons/{Chevron-BBlkokQX.mjs → Chevron-D7z5f5Ni.mjs} +2 -2
- package/dist/components/icons/{HeartToggle-Bwgo4FxH.mjs → HeartToggle-Buv7f9yB.mjs} +3 -3
- package/dist/components/icons/{Icons-CVv5JxOX.mjs → Icons-D0X7KrxA.mjs} +3 -3
- package/dist/components/list/CheckmarkListItem-DDP1qoW4.mjs +9 -0
- package/dist/components/list/CrossmarkListItem-CbzfzRC4.mjs +9 -0
- package/dist/components/list/{List-4jHnUXn_.mjs → List-DbnDS6C4.mjs} +3 -3
- package/dist/components/list/ListItem-CQZq9GfN.mjs +34 -0
- package/dist/components/list/ListItem.d.ts +1 -2
- package/dist/components/list/OrderedListItem-CjcJ5-Li.mjs +5 -0
- package/dist/components/loader/Loader-D_bteiXh.mjs +21 -0
- package/dist/components/loader/RawLoader-5VXTs9nJ.mjs +47 -0
- package/dist/components/notificationDot/{NotificationDot-C2_j4FdL.mjs → NotificationDot-pljIxRxJ.mjs} +6 -6
- package/dist/components/panel/Panel-CrtDgKD_.mjs +59 -0
- package/dist/components/progress/CircularProgress-CopS-z4L.mjs +50 -0
- package/dist/components/progress/Progress-_FQvkoIg.mjs +26 -0
- package/dist/components/spacing/Gutter-BG0NTrtn.mjs +5 -0
- package/dist/components/spacing/GutterPadding-n99wy2ws.mjs +5 -0
- package/dist/components/textfield/PasswordTextField-OBI71D--.mjs +22 -0
- package/dist/components/textfield/TextField-BCS5Ve2N.mjs +76 -0
- package/dist/components/toggle/FieldSet-DOEdpTZk.mjs +13 -0
- package/dist/components/toggle/RadioToggle-EoTh0Vv6.mjs +17 -0
- package/dist/components/toggleButton/ToggleButton-BYIO805O.mjs +47 -0
- package/dist/components/toggleButton/ToggleButton.d.ts +1 -2
- package/dist/components/toggleInlineButton/ToggleInlineButton-BgOpE9Ya.mjs +40 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton-DuHYN8Qo.mjs +37 -0
- package/dist/components/typography/{Typography-CXNJ1SFo.mjs → Typography-BDz_QfCz.mjs} +18 -18
- package/dist/shared-components.mjs +33 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/accordion/Accordion-rewqLwCV.mjs +0 -34
- package/dist/components/alert/Alert-pjg9sCaq.mjs +0 -68
- package/dist/components/breadcrumb/Breadcrumb-BJNLZ7iB.mjs +0 -21
- package/dist/components/button/BaseButton-Bhxc5Zyj.mjs +0 -46
- package/dist/components/button/BaseDecoratedButton-5on1OJrJ.mjs +0 -15
- package/dist/components/button/Button-DGXKZhwG.mjs +0 -19
- package/dist/components/button/DecoratedButton-D1hX-3Iw.mjs +0 -26
- package/dist/components/button/IconButton-DVEZ8K3d.mjs +0 -18
- package/dist/components/checkbox/BaseCheckbox-BGkrjof6.mjs +0 -41
- package/dist/components/checkbox/Checkbox-Cl4PCYXu.mjs +0 -22
- package/dist/components/core/LightMode-DPAa0Pv9.mjs +0 -9
- package/dist/components/core/RiksTV-CxHetJcp.mjs +0 -6
- package/dist/components/core/Strim-C1ajVDCm.mjs +0 -6
- package/dist/components/dropdown/Dropdown-CWVW7rKD.mjs +0 -44
- package/dist/components/list/CheckmarkListItem-D86vlUxv.mjs +0 -9
- package/dist/components/list/CrossmarkListItem-CXIrUTPd.mjs +0 -9
- package/dist/components/list/ListItem-ClQsSisn.mjs +0 -34
- package/dist/components/list/OrderedListItem-CphW2Aa0.mjs +0 -5
- package/dist/components/loader/Loader-gjL6yh1f.mjs +0 -21
- package/dist/components/loader/RawLoader-BpIpTIRJ.mjs +0 -47
- package/dist/components/panel/Panel-CPz2fLQW.mjs +0 -59
- package/dist/components/progress/CircularProgress-CD_dLu6N.mjs +0 -50
- package/dist/components/progress/Progress-CjnegHvC.mjs +0 -26
- package/dist/components/spacing/Gutter-PXX_UdiX.mjs +0 -5
- package/dist/components/spacing/GutterPadding-Bd7tSm3F.mjs +0 -5
- package/dist/components/textfield/PasswordTextField-BfvT8zYj.mjs +0 -22
- package/dist/components/textfield/TextField-Ct-ceRzE.mjs +0 -76
- package/dist/components/toggle/FieldSet-BM_JN_UL.mjs +0 -13
- package/dist/components/toggle/RadioToggle-C_79eEFl.mjs +0 -17
- package/dist/components/toggleButton/ToggleButton-CGLyQll6.mjs +0 -47
- package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +0 -40
- package/dist/components/toggleLinkButton/ToggleLinkButton-W1wyWc93.mjs +0 -37
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import ee, { useRef as re, useEffect as te } from "react";
|
|
2
|
+
import { C as ne } from "../icons/Chevron-D7z5f5Ni.mjs";
|
|
3
|
+
var w = { exports: {} }, R = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-runtime.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var F;
|
|
14
|
+
function oe() {
|
|
15
|
+
if (F) return R;
|
|
16
|
+
F = 1;
|
|
17
|
+
var c = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
|
|
18
|
+
function f(d, a, s) {
|
|
19
|
+
var l = null;
|
|
20
|
+
if (s !== void 0 && (l = "" + s), a.key !== void 0 && (l = "" + a.key), "key" in a) {
|
|
21
|
+
s = {};
|
|
22
|
+
for (var _ in a)
|
|
23
|
+
_ !== "key" && (s[_] = a[_]);
|
|
24
|
+
} else s = a;
|
|
25
|
+
return a = s.ref, {
|
|
26
|
+
$$typeof: c,
|
|
27
|
+
type: d,
|
|
28
|
+
key: l,
|
|
29
|
+
ref: a !== void 0 ? a : null,
|
|
30
|
+
props: s
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return R.Fragment = m, R.jsx = f, R.jsxs = f, R;
|
|
34
|
+
}
|
|
35
|
+
var b = {};
|
|
36
|
+
/**
|
|
37
|
+
* @license React
|
|
38
|
+
* react-jsx-runtime.development.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
45
|
+
var D;
|
|
46
|
+
function ae() {
|
|
47
|
+
return D || (D = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
|
+
function c(e) {
|
|
49
|
+
if (e == null) return null;
|
|
50
|
+
if (typeof e == "function")
|
|
51
|
+
return e.$$typeof === B ? null : e.displayName || e.name || null;
|
|
52
|
+
if (typeof e == "string") return e;
|
|
53
|
+
switch (e) {
|
|
54
|
+
case p:
|
|
55
|
+
return "Fragment";
|
|
56
|
+
case z:
|
|
57
|
+
return "Profiler";
|
|
58
|
+
case U:
|
|
59
|
+
return "StrictMode";
|
|
60
|
+
case q:
|
|
61
|
+
return "Suspense";
|
|
62
|
+
case X:
|
|
63
|
+
return "SuspenseList";
|
|
64
|
+
case Z:
|
|
65
|
+
return "Activity";
|
|
66
|
+
}
|
|
67
|
+
if (typeof e == "object")
|
|
68
|
+
switch (typeof e.tag == "number" && console.error(
|
|
69
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
|
+
), e.$$typeof) {
|
|
71
|
+
case W:
|
|
72
|
+
return "Portal";
|
|
73
|
+
case G:
|
|
74
|
+
return (e.displayName || "Context") + ".Provider";
|
|
75
|
+
case V:
|
|
76
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
+
case J:
|
|
78
|
+
var r = e.render;
|
|
79
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
+
case H:
|
|
81
|
+
return r = e.displayName || null, r !== null ? r : c(e.type) || "Memo";
|
|
82
|
+
case y:
|
|
83
|
+
r = e._payload, e = e._init;
|
|
84
|
+
try {
|
|
85
|
+
return c(e(r));
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
function m(e) {
|
|
92
|
+
return "" + e;
|
|
93
|
+
}
|
|
94
|
+
function f(e) {
|
|
95
|
+
try {
|
|
96
|
+
m(e);
|
|
97
|
+
var r = !1;
|
|
98
|
+
} catch {
|
|
99
|
+
r = !0;
|
|
100
|
+
}
|
|
101
|
+
if (r) {
|
|
102
|
+
r = console;
|
|
103
|
+
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
104
|
+
return t.call(
|
|
105
|
+
r,
|
|
106
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
+
n
|
|
108
|
+
), m(e);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function d(e) {
|
|
112
|
+
if (e === p) return "<>";
|
|
113
|
+
if (typeof e == "object" && e !== null && e.$$typeof === y)
|
|
114
|
+
return "<...>";
|
|
115
|
+
try {
|
|
116
|
+
var r = c(e);
|
|
117
|
+
return r ? "<" + r + ">" : "<...>";
|
|
118
|
+
} catch {
|
|
119
|
+
return "<...>";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function a() {
|
|
123
|
+
var e = k.A;
|
|
124
|
+
return e === null ? null : e.getOwner();
|
|
125
|
+
}
|
|
126
|
+
function s() {
|
|
127
|
+
return Error("react-stack-top-frame");
|
|
128
|
+
}
|
|
129
|
+
function l(e) {
|
|
130
|
+
if (g.call(e, "key")) {
|
|
131
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
|
+
if (r && r.isReactWarning) return !1;
|
|
133
|
+
}
|
|
134
|
+
return e.key !== void 0;
|
|
135
|
+
}
|
|
136
|
+
function _(e, r) {
|
|
137
|
+
function t() {
|
|
138
|
+
N || (N = !0, console.error(
|
|
139
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
|
+
r
|
|
141
|
+
));
|
|
142
|
+
}
|
|
143
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
144
|
+
get: t,
|
|
145
|
+
configurable: !0
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function L() {
|
|
149
|
+
var e = c(this.type);
|
|
150
|
+
return C[e] || (C[e] = !0, console.error(
|
|
151
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
|
+
}
|
|
154
|
+
function M(e, r, t, n, i, u, O, j) {
|
|
155
|
+
return t = u.ref, e = {
|
|
156
|
+
$$typeof: x,
|
|
157
|
+
type: e,
|
|
158
|
+
key: r,
|
|
159
|
+
props: u,
|
|
160
|
+
_owner: i
|
|
161
|
+
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
|
+
enumerable: !1,
|
|
163
|
+
get: L
|
|
164
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
165
|
+
configurable: !1,
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
writable: !0,
|
|
168
|
+
value: 0
|
|
169
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
170
|
+
configurable: !1,
|
|
171
|
+
enumerable: !1,
|
|
172
|
+
writable: !0,
|
|
173
|
+
value: null
|
|
174
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
175
|
+
configurable: !1,
|
|
176
|
+
enumerable: !1,
|
|
177
|
+
writable: !0,
|
|
178
|
+
value: O
|
|
179
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
180
|
+
configurable: !1,
|
|
181
|
+
enumerable: !1,
|
|
182
|
+
writable: !0,
|
|
183
|
+
value: j
|
|
184
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
|
+
}
|
|
186
|
+
function P(e, r, t, n, i, u, O, j) {
|
|
187
|
+
var o = r.children;
|
|
188
|
+
if (o !== void 0)
|
|
189
|
+
if (n)
|
|
190
|
+
if (Q(o)) {
|
|
191
|
+
for (n = 0; n < o.length; n++)
|
|
192
|
+
h(o[n]);
|
|
193
|
+
Object.freeze && Object.freeze(o);
|
|
194
|
+
} else
|
|
195
|
+
console.error(
|
|
196
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
|
+
);
|
|
198
|
+
else h(o);
|
|
199
|
+
if (g.call(r, "key")) {
|
|
200
|
+
o = c(e);
|
|
201
|
+
var E = Object.keys(r).filter(function(K) {
|
|
202
|
+
return K !== "key";
|
|
203
|
+
});
|
|
204
|
+
n = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", I[o + n] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
206
|
+
let props = %s;
|
|
207
|
+
<%s {...props} />
|
|
208
|
+
React keys must be passed directly to JSX without using spread:
|
|
209
|
+
let props = %s;
|
|
210
|
+
<%s key={someKey} {...props} />`,
|
|
211
|
+
n,
|
|
212
|
+
o,
|
|
213
|
+
E,
|
|
214
|
+
o
|
|
215
|
+
), I[o + n] = !0);
|
|
216
|
+
}
|
|
217
|
+
if (o = null, t !== void 0 && (f(t), o = "" + t), l(r) && (f(r.key), o = "" + r.key), "key" in r) {
|
|
218
|
+
t = {};
|
|
219
|
+
for (var S in r)
|
|
220
|
+
S !== "key" && (t[S] = r[S]);
|
|
221
|
+
} else t = r;
|
|
222
|
+
return o && _(
|
|
223
|
+
t,
|
|
224
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
+
), M(
|
|
226
|
+
e,
|
|
227
|
+
o,
|
|
228
|
+
u,
|
|
229
|
+
i,
|
|
230
|
+
a(),
|
|
231
|
+
t,
|
|
232
|
+
O,
|
|
233
|
+
j
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
function h(e) {
|
|
237
|
+
typeof e == "object" && e !== null && e.$$typeof === x && e._store && (e._store.validated = 1);
|
|
238
|
+
}
|
|
239
|
+
var v = ee, x = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), G = Symbol.for("react.context"), J = Symbol.for("react.forward_ref"), q = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), B = Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Q = Array.isArray, A = console.createTask ? console.createTask : function() {
|
|
240
|
+
return null;
|
|
241
|
+
};
|
|
242
|
+
v = {
|
|
243
|
+
"react-stack-bottom-frame": function(e) {
|
|
244
|
+
return e();
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
var N, C = {}, Y = v["react-stack-bottom-frame"].bind(
|
|
248
|
+
v,
|
|
249
|
+
s
|
|
250
|
+
)(), $ = A(d(s)), I = {};
|
|
251
|
+
b.Fragment = p, b.jsx = function(e, r, t, n, i) {
|
|
252
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
253
|
+
return P(
|
|
254
|
+
e,
|
|
255
|
+
r,
|
|
256
|
+
t,
|
|
257
|
+
!1,
|
|
258
|
+
n,
|
|
259
|
+
i,
|
|
260
|
+
u ? Error("react-stack-top-frame") : Y,
|
|
261
|
+
u ? A(d(e)) : $
|
|
262
|
+
);
|
|
263
|
+
}, b.jsxs = function(e, r, t, n, i) {
|
|
264
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return P(
|
|
266
|
+
e,
|
|
267
|
+
r,
|
|
268
|
+
t,
|
|
269
|
+
!0,
|
|
270
|
+
n,
|
|
271
|
+
i,
|
|
272
|
+
u ? Error("react-stack-top-frame") : Y,
|
|
273
|
+
u ? A(d(e)) : $
|
|
274
|
+
);
|
|
275
|
+
};
|
|
276
|
+
}()), b;
|
|
277
|
+
}
|
|
278
|
+
process.env.NODE_ENV === "production" ? w.exports = oe() : w.exports = ae();
|
|
279
|
+
var T = w.exports;
|
|
280
|
+
const ue = ({
|
|
281
|
+
initialOpen: c = !0,
|
|
282
|
+
children: m,
|
|
283
|
+
heading: f,
|
|
284
|
+
className: d = "",
|
|
285
|
+
lightBackground: a = !1,
|
|
286
|
+
...s
|
|
287
|
+
}) => {
|
|
288
|
+
const l = re(null);
|
|
289
|
+
return te(() => {
|
|
290
|
+
l.current && (l.current.open = c);
|
|
291
|
+
}, [c]), /* @__PURE__ */ T.jsxs(
|
|
292
|
+
"details",
|
|
293
|
+
{
|
|
294
|
+
ref: l,
|
|
295
|
+
"data-testid": "rds-accordion",
|
|
296
|
+
className: `rds-accordion-details ${a ? "rds-accordion-details--light" : ""} ${a === "white" ? "rds-accordion-details--white" : ""} ${d}`,
|
|
297
|
+
...s,
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ T.jsxs("summary", { "data-testid": "rds-accordion-summary", className: "rds-accordion-details__summary", children: [
|
|
300
|
+
/* @__PURE__ */ T.jsx(ne, {}),
|
|
301
|
+
/* @__PURE__ */ T.jsx("div", { className: "rds-accordion-details__summary__content", children: f })
|
|
302
|
+
] }),
|
|
303
|
+
m
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
};
|
|
308
|
+
export {
|
|
309
|
+
ue as A,
|
|
310
|
+
T as j
|
|
311
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as w, useState as a } from "react";
|
|
3
|
+
import { H as y, B } from "../typography/Typography-BDz_QfCz.mjs";
|
|
4
|
+
import "../icons/HeartToggle-Buv7f9yB.mjs";
|
|
5
|
+
import { S as F, a as T, b as o, c as b } from "../icons/Icons-D0X7KrxA.mjs";
|
|
6
|
+
const O = "_rds-alert--icon_m8jce_67", R = "_rds-alert--content-title_m8jce_79", E = "_rds-alert--content_m8jce_79", H = "_rds-alert--dismiss_m8jce_109", D = "_dismissed_m8jce_138", M = "_dismiss-fade-out_m8jce_1", e = {
|
|
7
|
+
rdsAlertIcon: O,
|
|
8
|
+
rdsAlertContentTitle: R,
|
|
9
|
+
rdsAlertContent: E,
|
|
10
|
+
rdsAlertDismiss: H,
|
|
11
|
+
dismissed: D,
|
|
12
|
+
dismissFadeOut: M
|
|
13
|
+
}, V = {
|
|
14
|
+
warning: { title: "Advarsel", Icon: T },
|
|
15
|
+
error: { title: "Feil", Icon: o },
|
|
16
|
+
info: { title: "Informasjon", Icon: o },
|
|
17
|
+
success: { title: "Vellykket", Icon: b }
|
|
18
|
+
}, q = w(
|
|
19
|
+
({
|
|
20
|
+
className: d,
|
|
21
|
+
intent: r = "warning",
|
|
22
|
+
variant: i = "filled",
|
|
23
|
+
testId: c = "rds-alert",
|
|
24
|
+
heading: m,
|
|
25
|
+
children: A,
|
|
26
|
+
dismissible: f = !0,
|
|
27
|
+
lightBackground: j,
|
|
28
|
+
onDismissed: t,
|
|
29
|
+
LinkToDetails: _,
|
|
30
|
+
...v
|
|
31
|
+
}, u) => {
|
|
32
|
+
const [p, l] = a(!1), [x, n] = a(!1), C = ["rds-alert", j ? "rds-light" : "", p ? e.dismissed : "", d].filter(Boolean).join(" ");
|
|
33
|
+
if (x)
|
|
34
|
+
return null;
|
|
35
|
+
const I = () => {
|
|
36
|
+
l(!1), n(!1);
|
|
37
|
+
}, { title: g, Icon: h } = V[r], N = (k) => {
|
|
38
|
+
k.animationName === e.dismissFadeOut && (n(!0), t == null || t(I));
|
|
39
|
+
}, S = f && i !== "inline";
|
|
40
|
+
return /* @__PURE__ */ s.jsxs(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
role: "alert",
|
|
44
|
+
"aria-live": "polite",
|
|
45
|
+
ref: u,
|
|
46
|
+
className: C,
|
|
47
|
+
"data-testid": c,
|
|
48
|
+
"data-intent": r,
|
|
49
|
+
"data-variant": i,
|
|
50
|
+
onAnimationEnd: N,
|
|
51
|
+
...v,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ s.jsx(h, { className: e.rdsAlertIcon }),
|
|
54
|
+
/* @__PURE__ */ s.jsxs("div", { className: e.rdsAlertContent, children: [
|
|
55
|
+
/* @__PURE__ */ s.jsx(y, { className: e.rdsAlertContentTitle, as: "span", children: m || g }),
|
|
56
|
+
/* @__PURE__ */ s.jsx(B, { as: "div", children: A }),
|
|
57
|
+
_
|
|
58
|
+
] }),
|
|
59
|
+
S && /* @__PURE__ */ s.jsx("div", { className: e.rdsAlertDismiss, children: /* @__PURE__ */ s.jsx("button", { "aria-label": "Avvis varsel", onClick: () => l(!0), children: /* @__PURE__ */ s.jsx(F, {}) }) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
q.displayName = "Alert";
|
|
66
|
+
export {
|
|
67
|
+
q as A
|
|
68
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as u } from "react";
|
|
3
|
+
import { S as d } from "../typography/Typography-BDz_QfCz.mjs";
|
|
4
|
+
const b = u(({ className: a = "", crumbs: s, render: c, ...m }, i) => /* @__PURE__ */ r.jsx("nav", { className: `rds-breadcrumb ${a}`, ref: i, ...m, children: /* @__PURE__ */ r.jsx(d, { children: /* @__PURE__ */ r.jsx("ol", { className: "rds-breadcrumb__list", children: s.map(({ name: e, href: l }, n) => {
|
|
5
|
+
const t = n === s.length - 1;
|
|
6
|
+
return /* @__PURE__ */ r.jsx(
|
|
7
|
+
"li",
|
|
8
|
+
{
|
|
9
|
+
className: `rds-breadcrumb__list-item ${s.length >= 4 ? "rds-breadcrumb__list-item--truncate" : ""}`,
|
|
10
|
+
"data-testid": `rds-breadcrumb-${e}`,
|
|
11
|
+
"aria-current": t ? "page" : "false",
|
|
12
|
+
children: c(e, l, t)
|
|
13
|
+
},
|
|
14
|
+
e
|
|
15
|
+
);
|
|
16
|
+
}) }) }) })), _ = ({ children: a }) => /* @__PURE__ */ r.jsx(d, { className: "rds-breadcrumb__current", children: a });
|
|
17
|
+
b.displayName = "Breadcrumb";
|
|
18
|
+
export {
|
|
19
|
+
b as B,
|
|
20
|
+
_ as a
|
|
21
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as s } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { P as
|
|
4
|
-
import { A as c } from "../icons/Arrow-
|
|
5
|
-
const w = () => /* @__PURE__ */ s(c, {}), m = n(
|
|
6
|
-
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
|
|
7
|
-
|
|
3
|
+
import { P as e, S as u, T as d, G as b } from "./DecoratedButton-BPD31Ccf.mjs";
|
|
4
|
+
import { A as c } from "../icons/Arrow-DpNA_SD7.mjs";
|
|
5
|
+
const w = () => /* @__PURE__ */ s.jsx(c, {}), m = n(
|
|
6
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
7
|
+
e,
|
|
8
8
|
{
|
|
9
9
|
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
10
10
|
arrow: w,
|
|
@@ -16,8 +16,8 @@ const w = () => /* @__PURE__ */ s(c, {}), m = n(
|
|
|
16
16
|
);
|
|
17
17
|
m.displayName = "PrimaryArrowButton";
|
|
18
18
|
const y = n(
|
|
19
|
-
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
|
|
20
|
-
|
|
19
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
20
|
+
u,
|
|
21
21
|
{
|
|
22
22
|
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
23
23
|
arrow: w,
|
|
@@ -29,8 +29,8 @@ const y = n(
|
|
|
29
29
|
);
|
|
30
30
|
y.displayName = "SecondaryArrowButton";
|
|
31
31
|
const i = n(
|
|
32
|
-
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
|
|
33
|
-
|
|
32
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
33
|
+
d,
|
|
34
34
|
{
|
|
35
35
|
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
36
36
|
arrow: w,
|
|
@@ -42,7 +42,7 @@ const i = n(
|
|
|
42
42
|
);
|
|
43
43
|
i.displayName = "TertiaryArrowButton";
|
|
44
44
|
const p = n(
|
|
45
|
-
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
|
|
45
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
46
46
|
b,
|
|
47
47
|
{
|
|
48
48
|
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
const f = c(
|
|
4
|
+
({
|
|
5
|
+
children: d,
|
|
6
|
+
buttonType: n,
|
|
7
|
+
buttonStyle: r,
|
|
8
|
+
type: o = "button",
|
|
9
|
+
isLoading: t = !1,
|
|
10
|
+
lightBackground: a = !1,
|
|
11
|
+
transparent: i = !1,
|
|
12
|
+
disabled: u,
|
|
13
|
+
className: b = "",
|
|
14
|
+
"aria-busy": l,
|
|
15
|
+
icon: e,
|
|
16
|
+
iconClass: m = "",
|
|
17
|
+
...$
|
|
18
|
+
}, _) => /* @__PURE__ */ s.jsx(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
type: o,
|
|
22
|
+
...$,
|
|
23
|
+
ref: _,
|
|
24
|
+
disabled: t || u,
|
|
25
|
+
"aria-busy": t || l,
|
|
26
|
+
className: `
|
|
27
|
+
${n}
|
|
28
|
+
rds-button__shared
|
|
29
|
+
rds-button__shared--${r}
|
|
30
|
+
rds-button--${r}
|
|
31
|
+
${t ? "rds-button--loading" : ""}
|
|
32
|
+
${a ? "rds-light" : ""}
|
|
33
|
+
${a === "white" ? "rds-white" : ""}
|
|
34
|
+
${i ? "rds-transparent" : ""}
|
|
35
|
+
${b}`,
|
|
36
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
37
|
+
e && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${m}`, children: /* @__PURE__ */ s.jsx(e, {}) }),
|
|
38
|
+
d
|
|
39
|
+
] })
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
f.displayName = "BaseButton";
|
|
44
|
+
export {
|
|
45
|
+
f as B
|
|
46
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
1
|
+
import { ButtonHTMLAttributes, JSX } from 'react';
|
|
3
2
|
|
|
4
3
|
export type ButtonStyles = "primary" | "secondary" | "tertiary" | "ghost";
|
|
5
4
|
export type ButtonBackgroundStyles = boolean | "white";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { B as m } from "./BaseButton-BDwLDH8l.mjs";
|
|
4
|
+
const x = c(
|
|
5
|
+
({ children: n, buttonType: t, postfix: r, icon: a, arrow: o, iconClass: e = "", ...d }, i) => /* @__PURE__ */ s.jsx(m, { buttonType: t, ref: i, ...d, children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
6
|
+
a && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${e}`, children: /* @__PURE__ */ s.jsx(a, {}) }),
|
|
7
|
+
o && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ s.jsx(o, {}) }),
|
|
8
|
+
n,
|
|
9
|
+
!!r && t !== "rds-icon-button" && /* @__PURE__ */ s.jsx("span", { className: "rds-button__postfix", children: r })
|
|
10
|
+
] }) })
|
|
11
|
+
);
|
|
12
|
+
x.displayName = "BaseDecoratedButton";
|
|
13
|
+
export {
|
|
14
|
+
x as B
|
|
15
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import "./ArrowButton-
|
|
4
|
-
import { A as
|
|
5
|
-
const
|
|
1
|
+
import { j as r } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import "./ArrowButton-DMr9aNBX.mjs";
|
|
4
|
+
import { A as l } from "../icons/Arrow-DpNA_SD7.mjs";
|
|
5
|
+
const p = () => /* @__PURE__ */ r.jsx(l, {}), u = c(
|
|
6
6
|
({
|
|
7
|
-
element:
|
|
7
|
+
element: o,
|
|
8
8
|
buttonStyle: s = "primary",
|
|
9
|
-
className:
|
|
9
|
+
className: d = "",
|
|
10
10
|
withArrow: t,
|
|
11
11
|
arrowBackward: n,
|
|
12
12
|
iconClass: e = "",
|
|
@@ -14,8 +14,8 @@ const $ = () => /* @__PURE__ */ r(u, {}), w = p(
|
|
|
14
14
|
lightBackground: a,
|
|
15
15
|
transparent: m,
|
|
16
16
|
...h
|
|
17
|
-
}, b) => /* @__PURE__ */ r("div", { className: `rds-baselink-button ${
|
|
18
|
-
|
|
17
|
+
}, b) => /* @__PURE__ */ r.jsx("div", { className: `rds-baselink-button ${d}`, children: /* @__PURE__ */ r.jsx(
|
|
18
|
+
o,
|
|
19
19
|
{
|
|
20
20
|
className: `
|
|
21
21
|
rds-button rds-button__shared
|
|
@@ -28,14 +28,14 @@ const $ = () => /* @__PURE__ */ r(u, {}), w = p(
|
|
|
28
28
|
`,
|
|
29
29
|
ref: b,
|
|
30
30
|
...h,
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
t && /* @__PURE__ */ r("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ r(
|
|
31
|
+
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
32
|
+
t && /* @__PURE__ */ r.jsx("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ r.jsx(p, {}) }),
|
|
33
33
|
i
|
|
34
34
|
] })
|
|
35
35
|
}
|
|
36
36
|
) })
|
|
37
37
|
);
|
|
38
|
-
|
|
38
|
+
u.displayName = "BaseLinkButton";
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
u as B
|
|
41
41
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { B as s } from "./BaseButton-BDwLDH8l.mjs";
|
|
4
|
+
import "./ArrowButton-DMr9aNBX.mjs";
|
|
5
|
+
import "./BaseLinkButton-BsJ_29CO.mjs";
|
|
6
|
+
const a = n((t, o) => /* @__PURE__ */ r.jsx(s, { buttonType: "rds-button", buttonStyle: "primary", ref: o, ...t }));
|
|
7
|
+
a.displayName = "PrimaryButton";
|
|
8
|
+
const e = n((t, o) => /* @__PURE__ */ r.jsx(s, { buttonType: "rds-button", buttonStyle: "secondary", ref: o, ...t }));
|
|
9
|
+
e.displayName = "SecondaryButton";
|
|
10
|
+
const u = n((t, o) => /* @__PURE__ */ r.jsx(s, { buttonType: "rds-button", buttonStyle: "tertiary", ref: o, ...t }));
|
|
11
|
+
u.displayName = "TertiaryButton";
|
|
12
|
+
const y = n((t, o) => /* @__PURE__ */ r.jsx(s, { buttonType: "rds-button", buttonStyle: "ghost", ref: o, ...t }));
|
|
13
|
+
y.displayName = "GhostButton";
|
|
14
|
+
export {
|
|
15
|
+
y as G,
|
|
16
|
+
a as P,
|
|
17
|
+
e as S,
|
|
18
|
+
u as T
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as e } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { B as a } from "./BaseDecoratedButton-ChPN1ek7.mjs";
|
|
4
|
+
import "./ArrowButton-DMr9aNBX.mjs";
|
|
5
|
+
const s = r(
|
|
6
|
+
(t, o) => /* @__PURE__ */ e.jsx(a, { buttonStyle: "primary", ref: o, ...t })
|
|
7
|
+
);
|
|
8
|
+
s.displayName = "PrimaryDecoratedButton";
|
|
9
|
+
const n = r(
|
|
10
|
+
(t, o) => /* @__PURE__ */ e.jsx(a, { buttonStyle: "secondary", ref: o, ...t })
|
|
11
|
+
);
|
|
12
|
+
n.displayName = "SecondaryDecoratedButton";
|
|
13
|
+
const d = r(
|
|
14
|
+
(t, o) => /* @__PURE__ */ e.jsx(a, { buttonStyle: "tertiary", ref: o, ...t })
|
|
15
|
+
);
|
|
16
|
+
d.displayName = "TertiaryDecoratedButton";
|
|
17
|
+
const y = r(
|
|
18
|
+
(t, o) => /* @__PURE__ */ e.jsx(a, { buttonStyle: "ghost", ref: o, ...t })
|
|
19
|
+
);
|
|
20
|
+
y.displayName = "GhostDecoratedButton";
|
|
21
|
+
export {
|
|
22
|
+
y as G,
|
|
23
|
+
s as P,
|
|
24
|
+
n as S,
|
|
25
|
+
d as T
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as n } from "../accordion/Accordion-C-Lu1AN3.mjs";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { P as a, S as s, T as e, G as c } from "./DecoratedButton-BPD31Ccf.mjs";
|
|
4
|
+
import "./ArrowButton-DMr9aNBX.mjs";
|
|
5
|
+
const u = r((t, o) => /* @__PURE__ */ n.jsx(a, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
6
|
+
u.displayName = "PrimaryIconButton";
|
|
7
|
+
const i = r((t, o) => /* @__PURE__ */ n.jsx(s, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
8
|
+
i.displayName = "SecondaryIconButton";
|
|
9
|
+
const y = r((t, o) => /* @__PURE__ */ n.jsx(e, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
10
|
+
y.displayName = "TertiaryIconButton";
|
|
11
|
+
const d = r((t, o) => /* @__PURE__ */ n.jsx(c, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
12
|
+
d.displayName = "GhostIconButton";
|
|
13
|
+
export {
|
|
14
|
+
d as G,
|
|
15
|
+
u as P,
|
|
16
|
+
i as S,
|
|
17
|
+
y as T
|
|
18
|
+
};
|