@rikstv/shared-components 3.0.25 → 3.0.26-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/CHANGELOG.md +8 -2
- package/dist/components/accordion/{Accordion-b8669b7e.mjs → Accordion-CrPiD_81.mjs} +195 -215
- package/dist/components/accordion/Accordion.d.ts +2 -1
- package/dist/components/alert/{Alert-f7feb089.mjs → Alert-hg91bRVY.mjs} +4 -4
- package/dist/components/alert/Alert.d.ts +3 -2
- package/dist/components/breadcrumb/{Breadcrumb-64b3a50e.mjs → Breadcrumb-D8mAlrde.mjs} +6 -6
- package/dist/components/breadcrumb/Breadcrumb.d.ts +3 -2
- package/dist/components/button/ArrowButton-C0WywcBN.mjs +62 -0
- package/dist/components/button/ArrowButton.d.ts +6 -6
- package/dist/components/button/{BaseButton-a5548ee7.mjs → BaseButton-B2fMKlSI.mjs} +1 -1
- package/dist/components/button/BaseButton.d.ts +3 -2
- package/dist/components/button/{BaseDecoratedButton-ffa6f719.mjs → BaseDecoratedButton-C0cesANX.mjs} +2 -2
- package/dist/components/button/BaseDecoratedButton.d.ts +3 -3
- package/dist/components/button/{BaseLinkButton-c574a1a3.mjs → BaseLinkButton-CquLmqew.mjs} +15 -15
- package/dist/components/button/BaseLinkButton.d.ts +3 -3
- package/dist/components/button/{Button-0fc6c6f0.mjs → Button-Bs_Tl8uJ.mjs} +4 -4
- package/dist/components/button/Button.d.ts +8 -8
- package/dist/components/button/{DecoratedButton-d1dbe30e.mjs → DecoratedButton-B1ElGmyl.mjs} +3 -3
- package/dist/components/button/DecoratedButton.d.ts +6 -6
- package/dist/components/button/{IconButton-59e46ff2.mjs → IconButton-3TUWI6Mc.mjs} +5 -5
- package/dist/components/button/IconButton.d.ts +6 -6
- package/dist/components/checkbox/{BaseCheckbox-50df3aeb.mjs → BaseCheckbox-vLDQvJOz.mjs} +2 -2
- package/dist/components/checkbox/BaseCheckbox.d.ts +3 -2
- package/dist/components/checkbox/Checkbox-D6f5jfzl.mjs +22 -0
- package/dist/components/checkbox/Checkbox.d.ts +3 -2
- package/dist/components/core/{Core-b450ba6c.mjs → Core-BrDaupPg.mjs} +1 -1
- package/dist/components/core/Core.d.ts +2 -1
- package/dist/components/core/{LightMode-2d123160.mjs → LightMode-DENdo5SC.mjs} +1 -1
- package/dist/components/core/LightMode.d.ts +3 -2
- package/dist/components/core/{RiksTV-ca623c12.mjs → RiksTV-DwRmJooI.mjs} +2 -2
- package/dist/components/core/RiksTV.d.ts +2 -1
- package/dist/components/core/{Strim-d2a5664c.mjs → Strim-DzoD2YI9.mjs} +2 -2
- package/dist/components/core/Strim.d.ts +2 -1
- package/dist/components/core/docs/BrandVariables.d.ts +2 -1
- package/dist/components/core/docs/Colors.d.ts +2 -1
- package/dist/components/core/docs/Spacing.d.ts +2 -1
- package/dist/components/core/docs/Variables.d.ts +2 -1
- package/dist/components/core/docs/componets/BrandColors/BrandColors.d.ts +2 -1
- package/dist/components/core/docs/componets/ColorSwatch/ColorSwatch.d.ts +2 -1
- package/dist/components/core/docs/componets/ColorSwatch/ColorSwatchBtn.d.ts +2 -1
- package/dist/components/core/docs/componets/ExampleGrid/ExampleGrid.d.ts +2 -1
- package/dist/components/core/docs/componets/SpacingBlock/SpacingBlock.d.ts +2 -1
- package/dist/components/core/docs/context/ExampleContext.d.ts +1 -2
- package/dist/components/core/docs/hooks/ClickOutside.d.ts +2 -1
- package/dist/components/core/docs/hooks/Intersection.d.ts +2 -1
- package/dist/components/core/docs/hooks/Mutation.d.ts +0 -1
- package/dist/components/core/docs/hooks/animated.d.ts +2 -1
- package/dist/components/core/docs/utils/PropertyList.d.ts +2 -1
- package/dist/components/core/hooks/useAnimatedHeight.d.ts +2 -1
- package/dist/components/core/hooks/useClickOutsideListener.d.ts +2 -1
- package/dist/components/core/hooks/useMutationObserver.d.ts +2 -1
- package/dist/components/core/spacing/Gutter.d.ts +2 -1
- package/dist/components/core/spacing/GutterPadding.d.ts +2 -1
- package/dist/components/dropdown/{Dropdown-86ff9c1f.mjs → Dropdown-iW7aS3jx.mjs} +14 -14
- package/dist/components/dropdown/Dropdown.d.ts +2 -1
- package/dist/components/icons/{Arrow-ff62ab24.mjs → Arrow-CHtynMwo.mjs} +1 -1
- package/dist/components/icons/Arrow.d.ts +2 -1
- package/dist/components/icons/{Chevron-84c4ced9.mjs → Chevron-B0-9yMkO.mjs} +1 -1
- package/dist/components/icons/Chevron.d.ts +2 -1
- package/dist/components/icons/{HeartToggle-54bb18c7.mjs → HeartToggle-BHSYQIN4.mjs} +2 -3
- package/dist/components/icons/HeartToggle.d.ts +2 -1
- package/dist/components/icons/{Icons-2b68875c.mjs → Icons-p9ZleYOo.mjs} +3 -3
- package/dist/components/icons/Icons.d.ts +13 -12
- package/dist/components/index.d.ts +36 -36
- package/dist/components/list/CheckmarkListItem-Dew6gW7B.mjs +9 -0
- package/dist/components/list/CheckmarkListItem.d.ts +3 -2
- package/dist/components/list/CrossmarkListItem-CxKgvELN.mjs +9 -0
- package/dist/components/list/CrossmarkListItem.d.ts +3 -2
- package/dist/components/list/{List-d60c4585.mjs → List-CpfjceLN.mjs} +7 -7
- package/dist/components/list/List.d.ts +3 -2
- package/dist/components/list/{ListItem-72dbd18f.mjs → ListItem-JIUBy2_m.mjs} +7 -7
- package/dist/components/list/ListItem.d.ts +2 -1
- package/dist/components/list/OrderedListItem-CmneHG3P.mjs +5 -0
- package/dist/components/list/OrderedListItem.d.ts +2 -1
- package/dist/components/loader/{Loader-ff2a99f4.mjs → Loader-Bk0JZ1M5.mjs} +2 -2
- package/dist/components/loader/Loader.d.ts +3 -3
- package/dist/components/loader/{RawLoader-864bb620.mjs → RawLoader-7qDMD85G.mjs} +6 -6
- package/dist/components/loader/RawLoader.d.ts +3 -2
- package/dist/components/notificationDot/{NotificationDot-630a5e23.mjs → NotificationDot-C24-oy5e.mjs} +9 -9
- package/dist/components/notificationDot/NotificationDot.d.ts +2 -1
- package/dist/components/panel/{Panel-c778384b.mjs → Panel-AExfPAQQ.mjs} +4 -4
- package/dist/components/panel/Panel.d.ts +3 -2
- package/dist/components/progress/{CircularProgress-64666695.mjs → CircularProgress-nyrk426K.mjs} +7 -7
- package/dist/components/progress/CircularProgress.d.ts +3 -2
- package/dist/components/progress/{Progress-c5ae3c43.mjs → Progress-ZSILwF-g.mjs} +4 -4
- package/dist/components/progress/Progress.d.ts +3 -2
- package/dist/components/spacing/{Gutter-f31ec5ff.mjs → Gutter-CZQOVELR.mjs} +1 -1
- package/dist/components/spacing/{GutterPadding-eb4c4631.mjs → GutterPadding-Dm0Wv0tj.mjs} +1 -1
- package/dist/components/textfield/{TextField-ea15493f.mjs → TextField-Cada_h0q.mjs} +2 -2
- package/dist/components/textfield/TextField.d.ts +3 -2
- package/dist/components/toggle/{FieldSet-35743deb.mjs → FieldSet-Bq2lhIzg.mjs} +1 -1
- package/dist/components/toggle/FieldSet.d.ts +3 -2
- package/dist/components/toggle/RadioContext.d.ts +1 -2
- package/dist/components/toggle/{RadioToggle-33eef633.mjs → RadioToggle-BICr1hFE.mjs} +7 -7
- package/dist/components/toggle/RadioToggle.d.ts +3 -2
- package/dist/components/toggle/docs/Example.d.ts +2 -1
- package/dist/components/toggleButton/{ToggleButton-640707ba.mjs → ToggleButton-Cnjgoc3g.mjs} +9 -9
- package/dist/components/toggleButton/ToggleButton.d.ts +3 -2
- package/dist/components/toggleInlineButton/{ToggleInlineButton-abb231c4.mjs → ToggleInlineButton-BR5pxqVE.mjs} +9 -9
- package/dist/components/toggleInlineButton/ToggleInlineButton.d.ts +3 -2
- package/dist/components/toggleLinkButton/{ToggleLinkButton-b0d2f3b6.mjs → ToggleLinkButton-Ck1NEr07.mjs} +19 -19
- package/dist/components/toggleLinkButton/ToggleLinkButton.d.ts +3 -2
- package/dist/components/typography/{Typography-563b6318.mjs → Typography-Ke8WLclR.mjs} +4 -4
- package/dist/components/typography/Typography.d.ts +14 -13
- package/dist/shared-components.mjs +104 -113
- package/dist/style.css +1 -1
- package/package.json +3 -4
- package/dist/components/button/ArrowButton-fb6c0b61.mjs +0 -62
- package/dist/components/checkbox/Checkbox-33bf3bf6.mjs +0 -22
- package/dist/components/list/CheckmarkListItem-fee95140.mjs +0 -9
- package/dist/components/list/CrossmarkListItem-815e3296.mjs +0 -9
- package/dist/components/list/OrderedListItem-6d493abc.mjs +0 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes } from
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
progressRatio: number;
|
|
4
5
|
label: string;
|
|
@@ -6,5 +7,5 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const calculateProgress: ({ progressRatio }: Pick<Props, "progressRatio">) => number;
|
|
9
|
-
export declare const CircularProgress: import(
|
|
10
|
+
export declare const CircularProgress: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
11
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as s } from "../accordion/Accordion-
|
|
1
|
+
import { j as s } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
const i = g(
|
|
4
|
-
({ className: a = "", label: d, ratio: r, checkmarkOnDone: e = !1, animateIn:
|
|
4
|
+
({ className: a = "", label: d, ratio: r, checkmarkOnDone: e = !1, animateIn: t = !1, ...o }, p) => {
|
|
5
5
|
const l = { "--progress": r };
|
|
6
6
|
return /* @__PURE__ */ s.jsxs(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
"data-testid": "rds-progress__wrapper",
|
|
10
|
-
className: `rds-progress ${
|
|
10
|
+
className: `rds-progress ${t ? "rds-progress--animate" : ""} ${a}`,
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ s.jsxs("label", { "data-testid": "rds-progress__label", className: "sr-only", children: [
|
|
13
|
-
/* @__PURE__ */ s.jsx("progress", { "data-testid": "rds-progress__sr", max: 1, value: r, ref: p, ...
|
|
13
|
+
/* @__PURE__ */ s.jsx("progress", { "data-testid": "rds-progress__sr", max: 1, value: r, ref: p, ...o }),
|
|
14
14
|
d
|
|
15
15
|
] }),
|
|
16
16
|
r === 1 && e && /* @__PURE__ */ s.jsx("div", { "data-testid": "rds-progress__mark", className: "rds-progress--done" }),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes } from
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends HTMLAttributes<HTMLProgressElement> {
|
|
3
4
|
label: string;
|
|
4
5
|
ratio: number;
|
|
@@ -6,5 +7,5 @@ interface Props extends HTMLAttributes<HTMLProgressElement> {
|
|
|
6
7
|
animateIn?: boolean;
|
|
7
8
|
className?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const Progress: import(
|
|
10
|
+
export declare const Progress: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLProgressElement>>;
|
|
10
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "../accordion/Accordion-
|
|
1
|
+
import { j as e } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
const a = ({ className: t = "", children: r, ...s }) => /* @__PURE__ */ e.jsx("div", { className: `rds-gutter ${t}`, ...s, children: r });
|
|
3
3
|
export {
|
|
4
4
|
a as G
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as a } from "../accordion/Accordion-
|
|
1
|
+
import { j as a } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
const e = ({ className: t = "", children: r, ...s }) => /* @__PURE__ */ a.jsx("div", { className: `rds-gutter-padding ${t}`, ...s, children: r });
|
|
3
3
|
export {
|
|
4
4
|
e as G
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as t } from "../accordion/Accordion-
|
|
1
|
+
import { j as t } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as $ } from "react";
|
|
3
|
-
import { g as c } from "../checkbox/BaseCheckbox-
|
|
3
|
+
import { g as c } from "../checkbox/BaseCheckbox-vLDQvJOz.mjs";
|
|
4
4
|
const v = $(
|
|
5
5
|
({
|
|
6
6
|
className: o = "",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DetailedHTMLProps, InputHTMLAttributes } from
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> {
|
|
3
4
|
className?: string;
|
|
4
5
|
name: string;
|
|
@@ -8,5 +9,5 @@ interface Props extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElem
|
|
|
8
9
|
labelClass?: string;
|
|
9
10
|
errorMessage?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const TextField: import(
|
|
12
|
+
export declare const TextField: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
12
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "../accordion/Accordion-
|
|
1
|
+
import { j as e } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { createContext as o, forwardRef as n } from "react";
|
|
3
3
|
const m = o({ radioName: "" }), f = n(
|
|
4
4
|
({ legend: s, children: t, name: d, className: r = "", showLegend: a = !1, ...i }, l) => /* @__PURE__ */ e.jsx(m.Provider, { value: { radioName: d }, children: /* @__PURE__ */ e.jsxs("fieldset", { "data-testid": "fieldset", ...i, className: `rds-field-set ${r}`, ref: l, children: [
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FieldsetHTMLAttributes } from
|
|
1
|
+
import { FieldsetHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface FieldSetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
3
4
|
legend: string;
|
|
4
5
|
name: string;
|
|
5
6
|
showLegend?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const FieldSet: import(
|
|
8
|
+
export declare const FieldSet: import('react').ForwardRefExoticComponent<FieldSetProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
8
9
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as o } from "../accordion/Accordion-
|
|
1
|
+
import { j as o } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as d, useContext as l } from "react";
|
|
3
|
-
import { R as
|
|
4
|
-
import "../button/ArrowButton-
|
|
5
|
-
const
|
|
3
|
+
import { R as m } from "./FieldSet-Bq2lhIzg.mjs";
|
|
4
|
+
import "../button/ArrowButton-C0WywcBN.mjs";
|
|
5
|
+
const n = d(
|
|
6
6
|
({ label: a, name: e, className: r = "", ...s }, t) => {
|
|
7
|
-
const { radioName: i } = l(
|
|
7
|
+
const { radioName: i } = l(m);
|
|
8
8
|
return /* @__PURE__ */ o.jsxs("label", { className: `rds-radio-toggle ${r}`, children: [
|
|
9
9
|
/* @__PURE__ */ o.jsx("input", { className: "rds-radio-toggle__input", ...s, ref: t, type: "radio", name: i || e }),
|
|
10
10
|
/* @__PURE__ */ o.jsx("span", { className: "rds-radio-toggle__label", children: a })
|
|
11
11
|
] });
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
|
-
|
|
14
|
+
n.displayName = "RadioToggleInput";
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
n as R
|
|
17
17
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface RadioToggleInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
4
|
label: string;
|
|
4
5
|
}
|
|
5
|
-
export declare const RadioToggleInput: import(
|
|
6
|
+
export declare const RadioToggleInput: import('react').ForwardRefExoticComponent<RadioToggleInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
6
7
|
export {};
|
package/dist/components/toggleButton/{ToggleButton-640707ba.mjs → ToggleButton-Cnjgoc3g.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as t } from "../accordion/Accordion-
|
|
1
|
+
import { j as t } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as I, useRef as k, useState as C } from "react";
|
|
3
|
-
import { B as N } from "../checkbox/BaseCheckbox-
|
|
4
|
-
const
|
|
3
|
+
import { B as N } from "../checkbox/BaseCheckbox-vLDQvJOz.mjs";
|
|
4
|
+
const R = I(
|
|
5
5
|
({ children: s, className: _ = "", defaultChecked: l, icons: e, iconClass: i = "", id: h, onChange: a, alwaysShowLabel: x = !1, ...b }, f) => {
|
|
6
|
-
const m = k(null), [n, c] = C(!!l), g = e && "checkedIcon" in e ? e.checkedIcon : null, r = e && "uncheckedIcon" in e ? e.uncheckedIcon : null,
|
|
7
|
-
var
|
|
8
|
-
typeof a == "function" && a(j), c(typeof o != "function" ? !!((
|
|
6
|
+
const m = k(null), [n, c] = C(!!l), g = e && "checkedIcon" in e ? e.checkedIcon : null, r = e && "uncheckedIcon" in e ? e.uncheckedIcon : null, d = e && "toggleIcon" in e ? e.toggleIcon : null, o = f || m, p = (j) => {
|
|
7
|
+
var u;
|
|
8
|
+
typeof a == "function" && a(j), c(typeof o != "function" ? !!((u = o.current) != null && u.checked) : !n);
|
|
9
9
|
};
|
|
10
10
|
return /* @__PURE__ */ t.jsx(
|
|
11
11
|
N,
|
|
@@ -22,7 +22,7 @@ const B = I(
|
|
|
22
22
|
children: /* @__PURE__ */ t.jsxs("span", { className: "rds-toggle-button__content", children: [
|
|
23
23
|
e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
24
24
|
/* @__PURE__ */ t.jsxs("span", { className: `rds-toggle-button__icon ${i}`, children: [
|
|
25
|
-
|
|
25
|
+
d && /* @__PURE__ */ t.jsx(d, { checked: n }),
|
|
26
26
|
g && n && /* @__PURE__ */ t.jsx(g, {}),
|
|
27
27
|
r && !n && /* @__PURE__ */ t.jsx(r, {})
|
|
28
28
|
] }),
|
|
@@ -41,7 +41,7 @@ const B = I(
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
|
|
44
|
+
R.displayName = "ToggleButton";
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
R as T
|
|
47
47
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FC, InputHTMLAttributes } from
|
|
1
|
+
import { FC, InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
4
|
children: string;
|
|
4
5
|
alwaysShowLabel?: boolean;
|
|
@@ -12,5 +13,5 @@ interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
|
12
13
|
};
|
|
13
14
|
iconClass?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare const ToggleButton: import(
|
|
16
|
+
export declare const ToggleButton: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
16
17
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as l } from "../accordion/Accordion-
|
|
1
|
+
import { j as l } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as h, useRef as x, useState as C } from "react";
|
|
3
|
-
import { B as k } from "../checkbox/BaseCheckbox-
|
|
4
|
-
const
|
|
3
|
+
import { B as k } from "../checkbox/BaseCheckbox-vLDQvJOz.mjs";
|
|
4
|
+
const N = h(
|
|
5
5
|
({
|
|
6
6
|
defaultChecked: i,
|
|
7
7
|
lightBackground: a,
|
|
@@ -9,8 +9,8 @@ const B = h(
|
|
|
9
9
|
onChange: t,
|
|
10
10
|
id: c,
|
|
11
11
|
className: u = "",
|
|
12
|
-
inputClassName:
|
|
13
|
-
labelClassName:
|
|
12
|
+
inputClassName: d = "",
|
|
13
|
+
labelClassName: g = "",
|
|
14
14
|
...f
|
|
15
15
|
}, m) => {
|
|
16
16
|
const p = x(null), [n, o] = C(!!i), e = m || p, _ = (b) => {
|
|
@@ -26,15 +26,15 @@ const B = h(
|
|
|
26
26
|
checked: n,
|
|
27
27
|
dataTestId: "toggle-inline-button__label",
|
|
28
28
|
containerClassName: `rds-toggle-inline-button ${u}`,
|
|
29
|
-
inputClassName: `rds-toggle-inline-button__input ${
|
|
30
|
-
labelClassName: `${a ? "rds-light" : ""} ${
|
|
29
|
+
inputClassName: `rds-toggle-inline-button__input ${d}`,
|
|
30
|
+
labelClassName: `${a ? "rds-light" : ""} ${g}`,
|
|
31
31
|
...f,
|
|
32
32
|
children: /* @__PURE__ */ l.jsx("span", { "data-testid": "toggle-inline-button__label__text", className: "rds-toggle-inline-button__content", children: r })
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
|
-
|
|
37
|
+
N.displayName = "ToggleInlineButton";
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
N as T
|
|
40
40
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
4
|
lightBackground?: boolean;
|
|
4
5
|
inputClassName?: string;
|
|
5
6
|
labelClassName?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const ToggleInlineButton: import(
|
|
8
|
+
export declare const ToggleInlineButton: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
8
9
|
export {};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { j as t } from "../accordion/Accordion-
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { B as C } from "../checkbox/BaseCheckbox-
|
|
4
|
-
import { C as j } from "../icons/Chevron-
|
|
5
|
-
const N =
|
|
1
|
+
import { j as t } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
|
+
import { forwardRef as k, useRef as h, useState as x } from "react";
|
|
3
|
+
import { B as C } from "../checkbox/BaseCheckbox-vLDQvJOz.mjs";
|
|
4
|
+
import { C as j } from "../icons/Chevron-B0-9yMkO.mjs";
|
|
5
|
+
const N = k(
|
|
6
6
|
({
|
|
7
7
|
defaultChecked: a,
|
|
8
|
-
toggledContentId:
|
|
9
|
-
iconClass:
|
|
8
|
+
toggledContentId: r,
|
|
9
|
+
iconClass: i = "",
|
|
10
10
|
lightBackground: c,
|
|
11
|
-
children:
|
|
11
|
+
children: d,
|
|
12
12
|
onChange: n,
|
|
13
|
-
id:
|
|
14
|
-
className:
|
|
13
|
+
id: g,
|
|
14
|
+
className: u = "",
|
|
15
15
|
..._
|
|
16
16
|
}, f) => {
|
|
17
|
-
const
|
|
17
|
+
const m = h(null), [s, o] = x(!!a), e = f || m, p = (b) => {
|
|
18
18
|
var l;
|
|
19
|
-
typeof n == "function" && n(
|
|
19
|
+
typeof n == "function" && n(b), o(typeof e != "function" ? !!((l = e.current) != null && l.checked) : !s);
|
|
20
20
|
};
|
|
21
21
|
return /* @__PURE__ */ t.jsx(
|
|
22
22
|
C,
|
|
23
23
|
{
|
|
24
|
-
id:
|
|
24
|
+
id: g,
|
|
25
25
|
ref: e,
|
|
26
|
-
onChange:
|
|
27
|
-
checked:
|
|
28
|
-
"aria-controls":
|
|
26
|
+
onChange: p,
|
|
27
|
+
checked: s,
|
|
28
|
+
"aria-controls": r,
|
|
29
29
|
dataTestId: "toggle-link-button__label",
|
|
30
30
|
containerClassName: "rds-toggle-link-button",
|
|
31
31
|
inputClassName: "rds-toggle-link-button__input",
|
|
32
|
-
labelClassName: `rds-toggle-link-button__label ${c ? "rds-light" : ""} ${
|
|
32
|
+
labelClassName: `rds-toggle-link-button__label ${c ? "rds-light" : ""} ${u}`,
|
|
33
33
|
..._,
|
|
34
34
|
children: /* @__PURE__ */ t.jsxs("span", { className: "rds-toggle-link-button__label__content", children: [
|
|
35
|
-
/* @__PURE__ */ t.jsx("span", { "data-testid": "toggle-link-button__label__text", children:
|
|
36
|
-
/* @__PURE__ */ t.jsx("span", { className: `rds-toggle-link-button__label__chevron ${
|
|
35
|
+
/* @__PURE__ */ t.jsx("span", { "data-testid": "toggle-link-button__label__text", children: d }),
|
|
36
|
+
/* @__PURE__ */ t.jsx("span", { className: `rds-toggle-link-button__label__chevron ${i}`, children: /* @__PURE__ */ t.jsx(j, {}) })
|
|
37
37
|
] })
|
|
38
38
|
}
|
|
39
39
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
4
|
children: string;
|
|
4
5
|
toggledContentId: string;
|
|
5
6
|
iconClass?: string;
|
|
6
7
|
lightBackground?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const ToggleLinkButton: import(
|
|
9
|
+
export declare const ToggleLinkButton: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
9
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as c } from "../accordion/Accordion-
|
|
1
|
+
import { j as c } from "../accordion/Accordion-CrPiD_81.mjs";
|
|
2
2
|
import { forwardRef as k } from "react";
|
|
3
3
|
const e = (t) => (
|
|
4
4
|
// eslint-disable-next-line react/display-name
|
|
@@ -16,16 +16,16 @@ const e = (t) => (
|
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
)
|
|
19
|
-
),
|
|
19
|
+
), d = e({ semanticElement: "h1", lookLike: "display-title" }), p = e({ semanticElement: "h1", lookLike: "title-1" }), r = e({ semanticElement: "h2", lookLike: "title-2" }), y = e({ semanticElement: "h3", lookLike: "title-3" }), h = e({ semanticElement: "h4", lookLike: "title-4" }), b = e({ semanticElement: "p", lookLike: "lead" }), g = e({ semanticElement: "p", lookLike: "body" }), H = e({ semanticElement: "p", lookLike: "sub-body" }), f = e({ semanticElement: "span", lookLike: "tag" }), u = e({ semanticElement: "strong", lookLike: "bold" }), x = e({ semanticElement: "span", lookLike: "meta" }), B = e({ semanticElement: "span", lookLike: "span" });
|
|
20
20
|
export {
|
|
21
21
|
g as B,
|
|
22
|
-
|
|
22
|
+
d as D,
|
|
23
23
|
h as H,
|
|
24
24
|
b as L,
|
|
25
25
|
x as M,
|
|
26
26
|
B as S,
|
|
27
27
|
f as T,
|
|
28
|
-
|
|
28
|
+
p as a,
|
|
29
29
|
r as b,
|
|
30
30
|
y as c,
|
|
31
31
|
u as d,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, HTMLAttributes } from
|
|
1
|
+
import { ForwardRefExoticComponent, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
2
3
|
type HeadingLevels = 1 | 2 | 3 | 4;
|
|
3
4
|
type SubHeadingLevels = 2 | 3;
|
|
4
5
|
type AcceptedHTMLElements = HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement;
|
|
@@ -9,16 +10,16 @@ interface Props<T extends AcceptedHTMLElements> extends HTMLAttributes<T> {
|
|
|
9
10
|
/** Used to create element "as" a DIV instead of semantic element, useful for wrapper-elements that has block level children */
|
|
10
11
|
as?: "div" | "span";
|
|
11
12
|
}
|
|
12
|
-
export declare const DisplayTitle: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import(
|
|
13
|
-
export declare const H1: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import(
|
|
14
|
-
export declare const H2: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import(
|
|
15
|
-
export declare const H3: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import(
|
|
16
|
-
export declare const H4: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import(
|
|
17
|
-
export declare const Lead: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import(
|
|
18
|
-
export declare const Body: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import(
|
|
19
|
-
export declare const SubBody: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import(
|
|
20
|
-
export declare const Tag: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import(
|
|
21
|
-
export declare const Bold: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import(
|
|
22
|
-
export declare const Meta: ForwardRefExoticComponent<Props<HTMLSpanElement> & import(
|
|
23
|
-
export declare const Span: ForwardRefExoticComponent<Props<HTMLSpanElement> & import(
|
|
13
|
+
export declare const DisplayTitle: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
export declare const H1: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
export declare const H2: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
16
|
+
export declare const H3: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
export declare const H4: ForwardRefExoticComponent<Props<HTMLHeadingElement> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
export declare const Lead: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export declare const Body: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
20
|
+
export declare const SubBody: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
export declare const Tag: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
export declare const Bold: ForwardRefExoticComponent<Props<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export declare const Meta: ForwardRefExoticComponent<Props<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
export declare const Span: ForwardRefExoticComponent<Props<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
24
25
|
export {};
|