@rikstv/shared-components 3.3.15-alpha.3 → 3.3.15

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.
Files changed (24) hide show
  1. package/CHANGELOG.md +0 -5
  2. package/dist/components/alert/Alert-BvwcxnzO.mjs +70 -0
  3. package/dist/components/core/Core-BdJiu9y4.mjs +46 -0
  4. package/dist/components/core/{RiksTV-CxHetJcp.mjs → RiksTV-D1wr-aYp.mjs} +1 -1
  5. package/dist/components/core/{Strim-C1ajVDCm.mjs → Strim-1ocLRXTP.mjs} +1 -1
  6. package/dist/components/dropdown/{Dropdown-CWVW7rKD.mjs → Dropdown-c9wdxVoJ.mjs} +18 -19
  7. package/dist/components/icons/{Icons-knwkK_Mh.mjs → Icons-CgcqUFmH.mjs} +2 -2
  8. package/dist/components/index.d.ts +1 -1
  9. package/dist/components/list/{CheckmarkListItem-DokxieXU.mjs → CheckmarkListItem-DE0v1Zhg.mjs} +1 -1
  10. package/dist/components/list/{CrossmarkListItem-CRelk7jn.mjs → CrossmarkListItem-DFXTjZR6.mjs} +1 -1
  11. package/dist/components/panel/Panel-D2Nkdd54.mjs +63 -0
  12. package/dist/components/toggleButton/{ToggleButton-CGLyQll6.mjs → ToggleButton-Dhxp8g2g.mjs} +17 -18
  13. package/dist/components/toggleInlineButton/ToggleInlineButton-9ZcLN5Lf.mjs +39 -0
  14. package/dist/components/toggleLinkButton/ToggleLinkButton-B01oBGAX.mjs +36 -0
  15. package/dist/components/toggleLinkButton/ToggleLinkButton.d.ts +3 -11
  16. package/dist/components/toggleLinkButton/toggleLinkButton.scss +14 -17
  17. package/dist/shared-components.mjs +159 -161
  18. package/dist/style.css +1 -1
  19. package/package.json +3 -2
  20. package/dist/components/alert/Alert-CX6wPqur.mjs +0 -70
  21. package/dist/components/core/Core-DVnHiJm2.mjs +0 -46
  22. package/dist/components/panel/Panel-BaTG2zyz.mjs +0 -63
  23. package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +0 -40
  24. package/dist/components/toggleLinkButton/ToggleLinkButton-DRGFajD0.mjs +0 -34
@@ -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,34 +0,0 @@
1
- import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
- import { forwardRef as f, useState as h } from "react";
3
- import "../icons/HeartToggle-Bwgo4FxH.mjs";
4
- import { f as x, g as N } from "../icons/Icons-knwkK_Mh.mjs";
5
- const S = f(
6
- ({ toggledContentId: s, lightBackground: a, children: r, checked: l, defaultChecked: d, onChange: t, id: c, className: g = "", ...k }, u) => {
7
- const [_, m] = h(!!d), n = l !== void 0, e = n ? l : _, b = () => {
8
- const i = !e;
9
- n || m(i), t == null || t({ target: { checked: i } });
10
- };
11
- return /* @__PURE__ */ o(
12
- "button",
13
- {
14
- ref: u,
15
- type: "button",
16
- id: c,
17
- className: `rds-toggle-link-button ${a ? "rds-light" : ""} ${g}`.trim(),
18
- "aria-expanded": e,
19
- "aria-controls": s,
20
- onClick: b,
21
- "data-testid": "toggle-link-button__label",
22
- ...k,
23
- children: /* @__PURE__ */ p("span", { className: "rds-toggle-link-button__label__content rds-link", "data-testid": "toggle-link-button__label__text", children: [
24
- r,
25
- e ? /* @__PURE__ */ o(x, { className: "rds-toggle-link-button__icon", "aria-hidden": !0 }) : /* @__PURE__ */ o(N, { className: "rds-toggle-link-button__icon", "aria-hidden": !0 })
26
- ] })
27
- }
28
- );
29
- }
30
- );
31
- S.displayName = "ToggleLinkButton";
32
- export {
33
- S as T
34
- };