@rikstv/shared-components 2.0.21 → 3.0.1
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/button/{ArrowButton-4fa3c028.mjs → ArrowButton-470c0575.mjs} +13 -13
- package/dist/components/button/{BaseButton-4350803a.mjs → BaseButton-82123b7e.mjs} +8 -8
- package/dist/components/button/BaseButton.d.ts +3 -3
- package/dist/components/button/{BaseDecoratedButton-510bde9f.mjs → BaseDecoratedButton-9280b7ce.mjs} +2 -2
- package/dist/components/button/BaseLinkButton-e79602f8.mjs +41 -0
- package/dist/components/button/BaseLinkButton.d.ts +18 -4
- package/dist/components/button/Button-ec434dd2.mjs +16 -0
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/{DecoratedButton-373af81a.mjs → DecoratedButton-ab2e8ed4.mjs} +5 -5
- package/dist/components/button/DecoratedButton.d.ts +3 -3
- package/dist/components/button/IconButton-537e3543.mjs +15 -0
- package/dist/components/button/button-shared.scss +0 -47
- package/dist/components/core/core.scss +1 -1
- package/dist/components/icons/Icons-4022b869.mjs +8 -0
- package/dist/components/icons/Icons.d.ts +2 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/list/CheckmarkListItem-b9d00a82.mjs +9 -0
- package/dist/components/list/CheckmarkListItem.d.ts +3 -6
- package/dist/components/list/CrossmarkListItem-f74a8cf6.mjs +9 -0
- package/dist/components/list/CrossmarkListItem.d.ts +3 -6
- package/dist/components/list/List.scss +3 -1
- package/dist/components/list/ListItem-748523c2.mjs +34 -0
- package/dist/components/list/ListItem.d.ts +5 -3
- package/dist/components/list/ListItem.scss +15 -16
- package/dist/components/list/OrderedListItem.scss +0 -5
- package/dist/components/list/internal/getMarkColor.d.ts +1 -1
- package/dist/components/panel/panel.scss +2 -1
- package/dist/components/toggle/{RadioToggle-5ddf1bfd.mjs → RadioToggle-4df6de4c.mjs} +1 -1
- package/dist/shared-components.mjs +21 -23
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/button/BaseLinkButton-d325fecb.mjs +0 -42
- package/dist/components/button/Button-3754ac0a.mjs +0 -17
- package/dist/components/button/IconButton-be3ae8eb.mjs +0 -15
- package/dist/components/button/LinkButton-3a3f73b6.mjs +0 -8
- package/dist/components/button/LinkButton.d.ts +0 -5
- package/dist/components/button/LinkButton.test.d.ts +0 -1
- package/dist/components/button/link-button.scss +0 -22
- package/dist/components/icons/Icons-32b173f0.mjs +0 -7
- package/dist/components/list/CheckmarkListItem-f97a2aae.mjs +0 -44
- package/dist/components/list/CheckmarkListItem.scss +0 -22
- package/dist/components/list/CrossmarkListItem-60e093df.mjs +0 -28
- package/dist/components/list/CrossmarkListItem.scss +0 -41
- package/dist/components/list/ListItem-fe58799f.mjs +0 -5
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { j as s } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { P as u, S as w, T as d } from "./DecoratedButton-
|
|
3
|
+
import { P as u, S as w, T as d } from "./DecoratedButton-ab2e8ed4.mjs";
|
|
4
4
|
import { A as c } from "../icons/Arrow-48abbbdf.mjs";
|
|
5
5
|
const e = () => /* @__PURE__ */ s.jsx(c, {}), m = n(
|
|
6
|
-
({ forwards: r = !0, className:
|
|
6
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
7
7
|
u,
|
|
8
8
|
{
|
|
9
|
-
className: `${
|
|
9
|
+
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
10
10
|
arrow: e,
|
|
11
|
-
|
|
11
|
+
buttonType: "rds-arrow-button",
|
|
12
12
|
ref: a,
|
|
13
|
-
...
|
|
13
|
+
...t
|
|
14
14
|
}
|
|
15
15
|
)
|
|
16
16
|
);
|
|
17
17
|
m.displayName = "PrimaryArrowButton";
|
|
18
18
|
const b = n(
|
|
19
|
-
({ forwards: r = !0, className:
|
|
19
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
20
20
|
w,
|
|
21
21
|
{
|
|
22
|
-
className: `${
|
|
22
|
+
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
23
23
|
arrow: e,
|
|
24
|
-
|
|
24
|
+
buttonType: "rds-arrow-button",
|
|
25
25
|
ref: a,
|
|
26
|
-
...
|
|
26
|
+
...t
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
30
|
b.displayName = "SecondaryArrowButton";
|
|
31
31
|
const y = n(
|
|
32
|
-
({ forwards: r = !0, className:
|
|
32
|
+
({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
|
|
33
33
|
d,
|
|
34
34
|
{
|
|
35
|
-
className: `${
|
|
35
|
+
className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
|
|
36
36
|
arrow: e,
|
|
37
|
-
|
|
37
|
+
buttonType: "rds-arrow-button",
|
|
38
38
|
ref: a,
|
|
39
|
-
...
|
|
39
|
+
...t
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
);
|
|
@@ -3,15 +3,15 @@ import { forwardRef as c } from "react";
|
|
|
3
3
|
const f = c(
|
|
4
4
|
({
|
|
5
5
|
children: d,
|
|
6
|
-
buttonType:
|
|
7
|
-
buttonStyle:
|
|
6
|
+
buttonType: n,
|
|
7
|
+
buttonStyle: r,
|
|
8
8
|
type: o = "button",
|
|
9
9
|
isLoading: t = !1,
|
|
10
10
|
lightBackground: a = !1,
|
|
11
11
|
transparent: i = !1,
|
|
12
|
-
disabled:
|
|
13
|
-
className:
|
|
14
|
-
"aria-busy":
|
|
12
|
+
disabled: u,
|
|
13
|
+
className: b = "",
|
|
14
|
+
"aria-busy": l,
|
|
15
15
|
icon: e,
|
|
16
16
|
iconClass: m = "",
|
|
17
17
|
...$
|
|
@@ -21,8 +21,8 @@ const f = c(
|
|
|
21
21
|
type: o,
|
|
22
22
|
...$,
|
|
23
23
|
ref: _,
|
|
24
|
-
disabled: t ||
|
|
25
|
-
"aria-busy": t ||
|
|
24
|
+
disabled: t || u,
|
|
25
|
+
"aria-busy": t || l,
|
|
26
26
|
className: `
|
|
27
27
|
${n}
|
|
28
28
|
rds-button__shared
|
|
@@ -32,7 +32,7 @@ const f = c(
|
|
|
32
32
|
${a ? "rds-light" : ""}
|
|
33
33
|
${a === "white" ? "rds-white" : ""}
|
|
34
34
|
${i ? "rds-transparent" : ""}
|
|
35
|
-
${
|
|
35
|
+
${b}`,
|
|
36
36
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
37
37
|
e && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${m}`, children: /* @__PURE__ */ s.jsx(e, {}) }),
|
|
38
38
|
d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from "react";
|
|
2
|
-
export type
|
|
2
|
+
export type ButtonStyles = "primary" | "secondary" | "tertiary";
|
|
3
3
|
export type ButtonBackgroundStyles = boolean | "white";
|
|
4
4
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
isLoading?: boolean;
|
|
@@ -12,7 +12,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
12
12
|
iconClass?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface BaseButtonProps extends ButtonProps {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
buttonStyle: ButtonStyles;
|
|
16
|
+
buttonType: "rds-button" | "rds-arrow-button" | "rds-icon-button";
|
|
17
17
|
}
|
|
18
18
|
export declare const BaseButton: import("react").ForwardRefExoticComponent<BaseButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
package/dist/components/button/{BaseDecoratedButton-510bde9f.mjs → BaseDecoratedButton-9280b7ce.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as s } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
2
|
import { forwardRef as c } from "react";
|
|
3
|
-
import { B as m } from "./BaseButton-
|
|
3
|
+
import { B as m } from "./BaseButton-82123b7e.mjs";
|
|
4
4
|
const x = c(
|
|
5
|
-
({ children: n,
|
|
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
6
|
a && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${e}`, children: /* @__PURE__ */ s.jsx(a, {}) }),
|
|
7
7
|
o && /* @__PURE__ */ s.jsx("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ s.jsx(o, {}) }),
|
|
8
8
|
n,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
import "./ArrowButton-470c0575.mjs";
|
|
4
|
+
import { A as l } from "../icons/Arrow-48abbbdf.mjs";
|
|
5
|
+
const u = () => /* @__PURE__ */ r.jsx(l, {}), p = h(
|
|
6
|
+
({
|
|
7
|
+
element: o,
|
|
8
|
+
buttonStyle: s = "primary",
|
|
9
|
+
className: n = "",
|
|
10
|
+
withArrow: t,
|
|
11
|
+
arrowBackward: d,
|
|
12
|
+
iconClass: e = "",
|
|
13
|
+
children: i,
|
|
14
|
+
lightBackground: a,
|
|
15
|
+
transparent: m,
|
|
16
|
+
...b
|
|
17
|
+
}, c) => /* @__PURE__ */ r.jsx("div", { className: `rds-baselink-button ${n}`, children: /* @__PURE__ */ r.jsx(
|
|
18
|
+
o,
|
|
19
|
+
{
|
|
20
|
+
className: `
|
|
21
|
+
rds-button rds-button__shared
|
|
22
|
+
${s === "highlighted" ? "rds-baselink-button--highlighted" : `rds-button__shared--${s}`}
|
|
23
|
+
${a ? "rds-light" : ""}
|
|
24
|
+
${a === "white" ? "rds-white" : ""}
|
|
25
|
+
${m && s === "secondary" ? "rds-transparent" : ""}
|
|
26
|
+
${t ? "rds-arrow-button" : ""}
|
|
27
|
+
${t === void 0 ? "" : d ? "rds-arrow-button--backwards" : "rds-arrow-button--forwards"}
|
|
28
|
+
`,
|
|
29
|
+
ref: c,
|
|
30
|
+
...b,
|
|
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(u, {}) }),
|
|
33
|
+
i
|
|
34
|
+
] })
|
|
35
|
+
}
|
|
36
|
+
) })
|
|
37
|
+
);
|
|
38
|
+
p.displayName = "BaseLinkButton";
|
|
39
|
+
export {
|
|
40
|
+
p as B
|
|
41
|
+
};
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonBackgroundStyles } from "./BaseButton";
|
|
3
|
-
export type
|
|
2
|
+
import { ButtonBackgroundStyles, ButtonStyles } from "./BaseButton";
|
|
3
|
+
export type LinkButtonStyles = ButtonStyles | "highlighted";
|
|
4
4
|
interface BaseLinkButtonPropsWithElement<ElementProps> {
|
|
5
5
|
element: (props: ElementProps) => JSX.Element;
|
|
6
|
-
|
|
6
|
+
buttonStyle?: LinkButtonStyles;
|
|
7
7
|
lightBackground?: ButtonBackgroundStyles;
|
|
8
8
|
transparent?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
withArrow?: boolean;
|
|
11
|
-
|
|
11
|
+
arrowBackward?: boolean;
|
|
12
12
|
iconClass?: string;
|
|
13
13
|
}
|
|
14
14
|
type Props<ElementProps> = BaseLinkButtonPropsWithElement<ElementProps> & ElementProps;
|
|
15
15
|
export type BaseLinkButtonProps<ElementProps> = Omit<Props<ElementProps>, "element">;
|
|
16
|
+
/**
|
|
17
|
+
* We don't know the type of the element being passed (react router link, wouter link, etc),
|
|
18
|
+
* so we let it through. You should create a wrapper component in your
|
|
19
|
+
* client app to add correct types back.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // LinkProps imported from react-router-dom
|
|
23
|
+
* type LinkBtnProps = BaseLinkButtonProps<LinkProps>;
|
|
24
|
+
*
|
|
25
|
+
* const LinkBtn = ((props: LinkBtnProps) => (
|
|
26
|
+
* <BaseLinkButton element={Link} {...props} />
|
|
27
|
+
* ))
|
|
28
|
+
* const TestApp = () => <LinkBtn to="#">React Router Link</LinkBtn>
|
|
29
|
+
*/
|
|
16
30
|
export declare const BaseLinkButton: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
17
31
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { B as a } from "./BaseButton-82123b7e.mjs";
|
|
4
|
+
import "./ArrowButton-470c0575.mjs";
|
|
5
|
+
import "./BaseLinkButton-e79602f8.mjs";
|
|
6
|
+
const s = n((t, o) => /* @__PURE__ */ r.jsx(a, { buttonType: "rds-button", buttonStyle: "primary", ref: o, ...t }));
|
|
7
|
+
s.displayName = "PrimaryButton";
|
|
8
|
+
const e = n((t, o) => /* @__PURE__ */ r.jsx(a, { buttonType: "rds-button", buttonStyle: "secondary", ref: o, ...t }));
|
|
9
|
+
e.displayName = "SecondaryButton";
|
|
10
|
+
const y = n((t, o) => /* @__PURE__ */ r.jsx(a, { buttonType: "rds-button", buttonStyle: "tertiary", ref: o, ...t }));
|
|
11
|
+
y.displayName = "TertiaryButton";
|
|
12
|
+
export {
|
|
13
|
+
s as P,
|
|
14
|
+
e as S,
|
|
15
|
+
y as T
|
|
16
|
+
};
|
|
@@ -3,5 +3,5 @@ import { ButtonProps } from "./BaseButton";
|
|
|
3
3
|
export declare const PrimaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export declare const SecondaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export declare const TertiaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
export { LinkButton } from "./LinkButton";
|
|
7
6
|
export { BaseLinkButton } from "./BaseLinkButton";
|
|
7
|
+
export type { BaseLinkButtonProps } from "./BaseLinkButton";
|
package/dist/components/button/{DecoratedButton-373af81a.mjs → DecoratedButton-ab2e8ed4.mjs}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as r } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
2
|
import { forwardRef as e } from "react";
|
|
3
|
-
import { B as a } from "./BaseDecoratedButton-
|
|
4
|
-
import "./ArrowButton-
|
|
3
|
+
import { B as a } from "./BaseDecoratedButton-9280b7ce.mjs";
|
|
4
|
+
import "./ArrowButton-470c0575.mjs";
|
|
5
5
|
const s = e(
|
|
6
|
-
(t, o) => /* @__PURE__ */ r.jsx(a, {
|
|
6
|
+
(t, o) => /* @__PURE__ */ r.jsx(a, { buttonStyle: "primary", ref: o, ...t })
|
|
7
7
|
);
|
|
8
8
|
s.displayName = "PrimaryDecoratedButton";
|
|
9
9
|
const n = e(
|
|
10
|
-
(t, o) => /* @__PURE__ */ r.jsx(a, {
|
|
10
|
+
(t, o) => /* @__PURE__ */ r.jsx(a, { buttonStyle: "secondary", ref: o, ...t })
|
|
11
11
|
);
|
|
12
12
|
n.displayName = "SecondaryDecoratedButton";
|
|
13
13
|
const y = e(
|
|
14
|
-
(t, o) => /* @__PURE__ */ r.jsx(a, {
|
|
14
|
+
(t, o) => /* @__PURE__ */ r.jsx(a, { buttonStyle: "tertiary", ref: o, ...t })
|
|
15
15
|
);
|
|
16
16
|
y.displayName = "TertiaryDecoratedButton";
|
|
17
17
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseDecoratedButtonProps } from "./BaseDecoratedButton";
|
|
3
|
-
export declare const PrimaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "
|
|
4
|
-
export declare const SecondaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "
|
|
5
|
-
export declare const TertiaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "
|
|
3
|
+
export declare const PrimaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonStyle"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export declare const SecondaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonStyle"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const TertiaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonStyle"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { j as n } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { P as a, S as s, T as e } from "./DecoratedButton-ab2e8ed4.mjs";
|
|
4
|
+
import "./ArrowButton-470c0575.mjs";
|
|
5
|
+
const c = r((t, o) => /* @__PURE__ */ n.jsx(a, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
6
|
+
c.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 u = r((t, o) => /* @__PURE__ */ n.jsx(e, { buttonType: "rds-icon-button", ref: o, ...t }));
|
|
10
|
+
u.displayName = "TertiaryIconButton";
|
|
11
|
+
export {
|
|
12
|
+
c as P,
|
|
13
|
+
i as S,
|
|
14
|
+
u as T
|
|
15
|
+
};
|
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
--common-button--tertiary-pressed-color: var(--rds-foreground-primary);
|
|
22
22
|
--common-button--tertiary-pressed-bg: var(--rds-background-secondary);
|
|
23
23
|
|
|
24
|
-
--common-button--highlighted-color: var(--rds-foreground-primary);
|
|
25
|
-
--common-button--highlighted-bg: transparent;
|
|
26
|
-
--common-button--highlighted-border-color: var(--rds-toggle-collapsed);
|
|
27
|
-
--common-button--highlighted-hover-border: var(--rds-heading-accent);
|
|
28
|
-
--common-button--highlighted-pressed-color: var(--rds-heading-accent);
|
|
29
|
-
|
|
30
24
|
--common-button--disabled-color: var(--rds-foreground-tertiary);
|
|
31
25
|
--common-button--disabled-bg: var(--rds-foreground-secondary);
|
|
32
26
|
|
|
@@ -113,27 +107,6 @@
|
|
|
113
107
|
}
|
|
114
108
|
}
|
|
115
109
|
|
|
116
|
-
&--highlighted {
|
|
117
|
-
color: var(--common-button--highlighted-color);
|
|
118
|
-
background-color: var(--common-button--highlighted-bg);
|
|
119
|
-
border-bottom: 2px solid var(--common-button--highlighted-border-color);
|
|
120
|
-
border-radius: 0;
|
|
121
|
-
transition: color 125ms, border-color 125ms, box-shadow 125ms;
|
|
122
|
-
|
|
123
|
-
@media (hover: hover) {
|
|
124
|
-
&:hover {
|
|
125
|
-
border-color: var(--common-button--highlighted-hover-border);
|
|
126
|
-
box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.5);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&:active {
|
|
131
|
-
color: var(--common-button--highlighted-pressed-color);
|
|
132
|
-
border-color: var(--common-button--highlighted-border-color-hover);
|
|
133
|
-
box-shadow: none;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
110
|
&:disabled {
|
|
138
111
|
color: var(--common-button--disabled-color);
|
|
139
112
|
background-color: var(--common-button--disabled-bg);
|
|
@@ -189,26 +162,6 @@
|
|
|
189
162
|
}
|
|
190
163
|
}
|
|
191
164
|
|
|
192
|
-
.rds-button__shared--highlighted,
|
|
193
|
-
&.rds-button__shared--highlighted {
|
|
194
|
-
--common-button--highlighted-color: var(--rds-surface-foreground);
|
|
195
|
-
--common-button--highlighted-border-color: var(--strim-romance-green-80); // Add variables in strm.scss and rtv.scss
|
|
196
|
-
|
|
197
|
-
@media (hover: hover) {
|
|
198
|
-
&:hover {
|
|
199
|
-
--common-button--highlighted-hover-border: var(--rds-surface-foreground);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&:active {
|
|
204
|
-
--common-button--highlighted-pressed-color: var(--rds-surface-foreground);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
&:disabled {
|
|
208
|
-
--common-button--disabled-color: var(--rds-button-primary-fg);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
165
|
&.rds-white {
|
|
213
166
|
&.rds-button__shared--secondary {
|
|
214
167
|
--common-button--secondary-bg: var(--rds-foreground-primary);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import "../accordion/Accordion-5e72e67b.mjs";
|
|
3
|
+
import "./HeartToggle-a5a93ca7.mjs";
|
|
4
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-label": "Avmerking", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M13.4614 23.777C13.2314 23.777 13.0114 23.687 12.8514 23.517L7.24137 17.727C6.91137 17.387 6.92138 16.847 7.26138 16.527C7.60138 16.197 8.14138 16.207 8.46138 16.547L13.3714 21.617L23.1714 8.34705C23.4514 7.96705 23.9814 7.88705 24.3614 8.16705C24.7414 8.44705 24.8214 8.97705 24.5414 9.35705L14.1514 23.427C14.0014 23.627 13.7714 23.757 13.5214 23.767C13.5014 23.767 13.4814 23.767 13.4614 23.767V23.777Z" })), o = (t) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M17.0475 15.8475L23.4475 9.4475C23.7775 9.1175 23.7775 8.5775 23.4475 8.2475C23.1175 7.9175 22.5775 7.9175 22.2475 8.2475L15.8475 14.6475L9.4475 8.2475C9.1175 7.9175 8.5775 7.9175 8.2475 8.2475C7.9175 8.5775 7.9175 9.1175 8.2475 9.4475L14.6475 15.8475L8.2475 22.2475C7.9175 22.5775 7.9175 23.1175 8.2475 23.4475C8.4175 23.6175 8.6275 23.6975 8.8475 23.6975C9.0675 23.6975 9.2875 23.6175 9.4475 23.4475L15.8475 17.0475L22.2475 23.4475C22.4175 23.6175 22.6275 23.6975 22.8475 23.6975C23.0675 23.6975 23.2875 23.6175 23.4475 23.4475C23.7775 23.1175 23.7775 22.5775 23.4475 22.2475L17.0475 15.8475Z", fill: "currentColor" }));
|
|
5
|
+
export {
|
|
6
|
+
l as S,
|
|
7
|
+
o as a
|
|
8
|
+
};
|
|
@@ -6,4 +6,5 @@ import { ReactComponent as Heart } from "./HeartFilled.svg";
|
|
|
6
6
|
import { ReactComponent as HeartUnfilled } from "./HeartUnfilled.svg";
|
|
7
7
|
import { ReactComponent as Pause } from "./Pause.svg";
|
|
8
8
|
import { ReactComponent as Play } from "./Play.svg";
|
|
9
|
-
|
|
9
|
+
import { ReactComponent as Close } from "./Close.svg";
|
|
10
|
+
export { Arrow, Checkmark, Chevron, Heart, HeartToggle, HeartUnfilled, Pause, Play, Close };
|
|
@@ -11,7 +11,7 @@ export { Progress } from "./progress/Progress";
|
|
|
11
11
|
export { Loader } from "./loader/Loader";
|
|
12
12
|
export { CircularProgress } from "./progress/CircularProgress";
|
|
13
13
|
export { Dropdown } from "./dropdown/Dropdown";
|
|
14
|
-
export { PrimaryButton, SecondaryButton, TertiaryButton,
|
|
14
|
+
export { PrimaryButton, SecondaryButton, TertiaryButton, BaseLinkButton } from "./button/Button";
|
|
15
15
|
export { PrimaryArrowButton, SecondaryArrowButton, TertiaryArrowButton } from "./button/ArrowButton";
|
|
16
16
|
export { PrimaryIconButton, SecondaryIconButton, TertiaryIconButton } from "./button/IconButton";
|
|
17
17
|
export { ToggleButton } from "./toggleButton/ToggleButton";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { j as t } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../icons/HeartToggle-a5a93ca7.mjs";
|
|
4
|
+
import { S as s } from "../icons/Icons-4022b869.mjs";
|
|
5
|
+
import { L as o } from "./ListItem-748523c2.mjs";
|
|
6
|
+
const k = ({ children: r, ...m }) => /* @__PURE__ */ t.jsx(o, { testId: "rds-list-item--check", icon: /* @__PURE__ */ t.jsx(s, {}), ...m, children: r });
|
|
7
|
+
export {
|
|
8
|
+
k as C
|
|
9
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
color?: "error" | "success";
|
|
5
|
-
innerClassName?: string;
|
|
6
|
-
}
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ListItemProps } from "./ListItem";
|
|
3
|
+
type Props = Omit<ListItemProps, "icon" | "testId">;
|
|
7
4
|
export declare const CheckmarkListItem: FC<Props>;
|
|
8
5
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../icons/HeartToggle-a5a93ca7.mjs";
|
|
4
|
+
import { a as o } from "../icons/Icons-4022b869.mjs";
|
|
5
|
+
import { L as m } from "./ListItem-748523c2.mjs";
|
|
6
|
+
const j = ({ children: t, ...r }) => /* @__PURE__ */ s.jsx(m, { testId: "rds-list-item--cross", icon: /* @__PURE__ */ s.jsx(o, {}), ...r, children: t });
|
|
7
|
+
export {
|
|
8
|
+
j as C
|
|
9
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
color?: "error" | "success";
|
|
5
|
-
innerClassName?: string;
|
|
6
|
-
}
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ListItemProps } from "./ListItem";
|
|
3
|
+
type Props = Omit<ListItemProps, "icon" | "testId">;
|
|
7
4
|
export declare const CrossmarkListItem: FC<Props>;
|
|
8
5
|
export {};
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
list-style: none;
|
|
7
7
|
padding: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--list-item__spacing);
|
|
8
11
|
|
|
9
12
|
counter-reset: listCounter;
|
|
10
13
|
|
|
11
14
|
& .rds-list > li {
|
|
12
15
|
// Targets only nested lists
|
|
13
16
|
padding-left: rem.convert(32px);
|
|
14
|
-
margin-bottom: var(--list-item__spacing);
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
|
+
const n = (s) => {
|
|
3
|
+
switch (s) {
|
|
4
|
+
case "error":
|
|
5
|
+
return { "--mark-color": "var(--rds-feedback-error-object)" };
|
|
6
|
+
case "success":
|
|
7
|
+
return { "--mark-color": "var(--rds-feedback-confirm)" };
|
|
8
|
+
case "faded":
|
|
9
|
+
return { "--mark-color": "var(--rds-foreground-secondary)" };
|
|
10
|
+
default:
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
}, u = ({
|
|
14
|
+
className: s = "",
|
|
15
|
+
children: e,
|
|
16
|
+
innerClassName: t = "",
|
|
17
|
+
icon: c,
|
|
18
|
+
testId: a = "rds-list-item",
|
|
19
|
+
style: o,
|
|
20
|
+
color: l,
|
|
21
|
+
...i
|
|
22
|
+
}) => {
|
|
23
|
+
const d = {
|
|
24
|
+
...o,
|
|
25
|
+
...n(l)
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ r.jsxs("li", { className: `rds-list__item ${s}`, "data-testid": a, style: d, ...i, children: [
|
|
28
|
+
/* @__PURE__ */ r.jsx("span", { className: "rds-list__item--svg-wrapper", children: c || /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "5", fill: "currentColor" }) }) }),
|
|
29
|
+
/* @__PURE__ */ r.jsx("span", { className: `${t}`, children: e })
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
u as L
|
|
34
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from "react";
|
|
2
|
-
interface
|
|
2
|
+
export interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
3
3
|
className?: string;
|
|
4
|
+
color?: "error" | "success" | "faded";
|
|
4
5
|
innerClassName?: string;
|
|
6
|
+
icon?: JSX.Element;
|
|
7
|
+
testId?: string;
|
|
5
8
|
}
|
|
6
|
-
export declare const ListItem: FC<
|
|
7
|
-
export {};
|
|
9
|
+
export declare const ListItem: FC<ListItemProps>;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
.rds-list__item {
|
|
2
|
-
--
|
|
2
|
+
--mark-color: currentColor;
|
|
3
3
|
|
|
4
4
|
display: flex;
|
|
5
|
+
gap: 0.75rem;
|
|
5
6
|
align-items: flex-start;
|
|
6
|
-
margin-bottom: var(--list-item__spacing);
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
// first child is a dot or an icon
|
|
9
|
+
& *:first-child {
|
|
10
|
+
width: 1.25rem;
|
|
11
|
+
height: 1.25em;
|
|
12
|
+
flex-shrink: 0;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
margin-right: calc(1rem + 0.25em);
|
|
21
|
-
margin-left: 0.25em;
|
|
22
|
-
background-color: currentColor;
|
|
23
|
-
border-radius: 50%;
|
|
15
|
+
// styles when icon is included
|
|
16
|
+
&--svg-wrapper {
|
|
17
|
+
display: flex;
|
|
18
|
+
|
|
19
|
+
& svg {
|
|
20
|
+
width: 100%;
|
|
21
|
+
color: var(--mark-color);
|
|
22
|
+
}
|
|
24
23
|
}
|
|
25
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as o } from "../accordion/Accordion-5e72e67b.mjs";
|
|
2
2
|
import { forwardRef as d, useContext as l } from "react";
|
|
3
3
|
import { R as n } from "./FieldSet-00f1fc56.mjs";
|
|
4
|
-
import "../button/ArrowButton-
|
|
4
|
+
import "../button/ArrowButton-470c0575.mjs";
|
|
5
5
|
const m = d(
|
|
6
6
|
({ label: a, name: e, className: r = "", ...s }, t) => {
|
|
7
7
|
const { radioName: i } = l(n);
|