@rikstv/shared-components 3.3.14 → 3.3.15-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/alert/Alert-B_ByWxdO.mjs +70 -0
- package/dist/components/core/Core-BdJiu9y4.mjs +46 -0
- package/dist/components/core/{RiksTV-CxHetJcp.mjs → RiksTV-D1wr-aYp.mjs} +1 -1
- package/dist/components/core/{Strim-C1ajVDCm.mjs → Strim-1ocLRXTP.mjs} +1 -1
- package/dist/components/dropdown/{Dropdown-CWVW7rKD.mjs → Dropdown-c9wdxVoJ.mjs} +18 -19
- package/dist/components/icons/{Icons-CgcqUFmH.mjs → Icons-2z4jxD15.mjs} +17 -19
- package/dist/components/icons/Icons.d.ts +1 -2
- package/dist/components/list/{CheckmarkListItem-DE0v1Zhg.mjs → CheckmarkListItem-B8_bwuQI.mjs} +3 -3
- package/dist/components/list/{CrossmarkListItem-DFXTjZR6.mjs → CrossmarkListItem-5UQyojvM.mjs} +3 -3
- package/dist/components/panel/Panel-7xoA4LFj.mjs +63 -0
- package/dist/components/toggleButton/{ToggleButton-CGLyQll6.mjs → ToggleButton-Dhxp8g2g.mjs} +17 -18
- package/dist/components/toggleInlineButton/ToggleInlineButton-9ZcLN5Lf.mjs +39 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton-B2qV94hy.mjs +36 -0
- package/dist/shared-components.mjs +159 -161
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/components/alert/Alert-Bib0anpB.mjs +0 -70
- package/dist/components/core/Core-DVnHiJm2.mjs +0 -46
- package/dist/components/panel/Panel-3hKyYFKO.mjs +0 -63
- package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +0 -40
- package/dist/components/toggleLinkButton/ToggleLinkButton-BzwzqRHv.mjs +0 -37
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as _, useRef as b, useState as C } from "react";
|
|
3
|
-
import { B as k } from "../checkbox/BaseCheckbox-BGkrjof6.mjs";
|
|
4
|
-
const N = _(
|
|
5
|
-
({
|
|
6
|
-
defaultChecked: a,
|
|
7
|
-
lightBackground: i,
|
|
8
|
-
children: r,
|
|
9
|
-
onChange: t,
|
|
10
|
-
id: c,
|
|
11
|
-
className: d = "",
|
|
12
|
-
inputClassName: g = "",
|
|
13
|
-
labelClassName: u = "",
|
|
14
|
-
...f
|
|
15
|
-
}, h) => {
|
|
16
|
-
const m = b(null), [n, o] = C(!!a), e = h || m;
|
|
17
|
-
return /* @__PURE__ */ s(
|
|
18
|
-
k,
|
|
19
|
-
{
|
|
20
|
-
id: c,
|
|
21
|
-
ref: e,
|
|
22
|
-
onChange: (p) => {
|
|
23
|
-
var l;
|
|
24
|
-
typeof t == "function" && t(p), o(typeof e != "function" ? !!((l = e.current) != null && l.checked) : !n);
|
|
25
|
-
},
|
|
26
|
-
checked: n,
|
|
27
|
-
dataTestId: "toggle-inline-button__label",
|
|
28
|
-
containerClassName: `rds-toggle-inline-button ${d}`,
|
|
29
|
-
inputClassName: `rds-toggle-inline-button__input ${g}`,
|
|
30
|
-
labelClassName: `${i ? "rds-light" : ""} ${u}`,
|
|
31
|
-
...f,
|
|
32
|
-
children: /* @__PURE__ */ s("span", { "data-testid": "toggle-inline-button__label__text", className: "rds-toggle-inline-button__content", children: r })
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
N.displayName = "ToggleInlineButton";
|
|
38
|
-
export {
|
|
39
|
-
N as T
|
|
40
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as b, useRef as p, useState as h } from "react";
|
|
3
|
-
import { B as C } from "../checkbox/BaseCheckbox-BGkrjof6.mjs";
|
|
4
|
-
import "../icons/HeartToggle-Bwgo4FxH.mjs";
|
|
5
|
-
import { f as N, g as x } from "../icons/Icons-CgcqUFmH.mjs";
|
|
6
|
-
const B = b(
|
|
7
|
-
({ defaultChecked: a, toggledContentId: i, lightBackground: r, children: c, onChange: o, id: g, className: d = "", ...u }, _) => {
|
|
8
|
-
const f = p(null), [t, l] = h(!!a), e = _ || f;
|
|
9
|
-
return /* @__PURE__ */ n(
|
|
10
|
-
C,
|
|
11
|
-
{
|
|
12
|
-
id: g,
|
|
13
|
-
ref: e,
|
|
14
|
-
onChange: (k) => {
|
|
15
|
-
var s;
|
|
16
|
-
typeof o == "function" && o(k), l(typeof e != "function" ? !!((s = e.current) != null && s.checked) : !t);
|
|
17
|
-
},
|
|
18
|
-
checked: t,
|
|
19
|
-
"aria-controls": i,
|
|
20
|
-
dataTestId: "toggle-link-button__label",
|
|
21
|
-
containerClassName: "rds-toggle-link-button",
|
|
22
|
-
inputClassName: "rds-toggle-link-button__input",
|
|
23
|
-
labelClassName: `rds-toggle-link-button__label ${r ? "rds-light" : ""} ${d}`,
|
|
24
|
-
...u,
|
|
25
|
-
children: /* @__PURE__ */ m("span", { className: "rds-toggle-link-button__label__content rds-link", "data-testid": "toggle-link-button__label__text", children: [
|
|
26
|
-
c,
|
|
27
|
-
!t && /* @__PURE__ */ n(N, { className: "rds-toggle-link-button__icon" }),
|
|
28
|
-
t && /* @__PURE__ */ n(x, { className: "rds-toggle-link-button__icon" })
|
|
29
|
-
] })
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
B.displayName = "ToggleLinkButton";
|
|
35
|
-
export {
|
|
36
|
-
B as T
|
|
37
|
-
};
|