@rikstv/shared-components 0.8.1 → 1.1.82
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/README.md +21 -2
- package/dist/{accordion → components/accordion}/Accordion.d.ts +1 -2
- package/dist/components/accordion/Accordion.js +34 -0
- package/dist/{accordion → components/accordion}/accordion.scss +58 -39
- package/dist/components/breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/components/breadcrumb/Breadcrumb.js +39 -0
- package/dist/components/breadcrumb/breadcrumb.scss +75 -0
- package/dist/components/button/ArrowButton.d.ts +12 -0
- package/dist/components/button/ArrowButton.js +44 -0
- package/dist/components/button/BaseButton.d.ts +18 -0
- package/dist/components/button/BaseButton.js +42 -0
- package/dist/components/button/BaseDecoratedButton.d.ts +11 -0
- package/dist/components/button/BaseDecoratedButton.js +32 -0
- package/dist/components/button/BaseLinkButton.d.ts +20 -0
- package/dist/components/button/BaseLinkButton.js +44 -0
- package/dist/{button → components/button}/Button.d.ts +2 -0
- package/dist/components/button/Button.js +29 -0
- package/dist/components/button/DecoratedButton.d.ts +7 -0
- package/dist/components/button/DecoratedButton.js +23 -0
- package/dist/{button → components/button}/IconButton.d.ts +2 -3
- package/dist/components/button/IconButton.js +24 -0
- package/dist/components/button/LinkButton.d.ts +5 -0
- package/dist/components/button/LinkButton.js +10 -0
- package/dist/components/button/arrow-button.scss +37 -0
- package/dist/{button → components/button}/button-shared.scss +14 -3
- package/dist/components/button/button.scss +93 -0
- package/dist/{button → components/button}/icon-button.scss +0 -0
- package/dist/components/button/link-button.scss +6 -0
- package/dist/components/checkbox/Checkbox.d.ts +9 -0
- package/dist/components/checkbox/Checkbox.js +40 -0
- package/dist/components/checkbox/checkbox.scss +116 -0
- package/dist/{core → components/core}/Core.d.ts +0 -0
- package/dist/{core → components/core}/Core.js +0 -0
- package/dist/{core → components/core}/LightMode.d.ts +0 -0
- package/dist/components/core/LightMode.js +14 -0
- package/dist/{core → components/core}/RiksTV.d.ts +0 -0
- package/dist/components/core/RiksTV.js +116 -0
- package/dist/{core → components/core}/Strim.d.ts +0 -0
- package/dist/components/core/Strim.js +10 -0
- package/dist/components/core/core.scss +102 -0
- package/dist/components/core/docs/Spacing.scss +12 -0
- package/dist/components/core/docs/componets/ColorSwatch/ColorSwatch.scss +66 -0
- package/dist/components/core/docs/componets/ColorSwatch/ColorSwatchBtn.scss +19 -0
- package/dist/components/core/docs/componets/ExampleGrid/ExampleGrid.scss +12 -0
- package/dist/components/core/docs/componets/SpacingBlock/SpacingBlock.scss +6 -0
- package/dist/components/core/docs/hooks/animated.scss +12 -0
- package/dist/components/core/docs/hooks/clickOutside.scss +11 -0
- package/dist/components/core/docs/hooks/intersection.scss +14 -0
- package/dist/components/core/hooks/useAnimatedHeight.d.ts +19 -0
- package/dist/components/core/hooks/useBrowserPreferences.d.ts +5 -0
- package/dist/components/core/hooks/useClickOutsideListener.d.ts +8 -0
- package/dist/components/core/hooks/useIntersectionObserver.d.ts +2 -0
- package/dist/components/core/hooks/useMutationObserver.d.ts +2 -0
- package/dist/components/core/mixin/breakpoints.scss +44 -0
- package/dist/{core → components/core}/mixin/fluid.scss +0 -0
- package/dist/{core → components/core}/mixin/focus.scss +0 -0
- package/dist/{core → components/core}/mixin/navigation.scss +0 -0
- package/dist/{core → components/core}/mixin/rem.scss +0 -0
- package/dist/components/core/rikstvColors.scss +71 -0
- package/dist/components/core/rtv.scss +75 -0
- package/dist/components/core/spacing/Gutter.d.ts +2 -0
- package/dist/components/core/spacing/GutterPadding.d.ts +2 -0
- package/dist/components/core/strimColors.scss +48 -0
- package/dist/components/core/strm.scss +79 -0
- package/dist/{core → components/core}/utils/detectUserInputMethod.d.ts +0 -0
- package/dist/components/icons/Arrow.d.ts +2 -0
- package/dist/components/icons/Arrow.js +12 -0
- package/dist/{icons → components/icons}/Chevron.d.ts +0 -0
- package/dist/{icons → components/icons}/Chevron.js +0 -0
- package/dist/{icons → components/icons}/heartToggle.scss +12 -6
- package/dist/components/index.d.ts +31 -0
- package/dist/components/list/CheckmarkListItem.d.ts +8 -0
- package/dist/components/list/CheckmarkListItem.js +32 -0
- package/dist/components/list/CheckmarkListItem.scss +41 -0
- package/dist/components/list/CrossmarkListItem.d.ts +8 -0
- package/dist/components/list/CrossmarkListItem.js +23 -0
- package/dist/components/list/CrossmarkListItem.scss +42 -0
- package/dist/components/list/List.d.ts +8 -0
- package/dist/components/list/List.js +28 -0
- package/dist/components/list/List.scss +15 -0
- package/dist/components/list/ListItem.d.ts +8 -0
- package/dist/components/list/ListItem.js +19 -0
- package/dist/components/list/ListItem.scss +25 -0
- package/dist/components/list/OrderedListItem.d.ts +7 -0
- package/dist/components/list/OrderedListItem.js +15 -0
- package/dist/components/list/OrderedListItem.scss +21 -0
- package/dist/components/list/internal/getMarkColor.d.ts +3 -0
- package/dist/components/loader/Loader.d.ts +7 -0
- package/dist/components/loader/Loader.js +31 -0
- package/dist/components/loader/Loader.scss +148 -0
- package/dist/components/loader/RawLoader.d.ts +10 -0
- package/dist/components/loader/RawLoader.js +30 -0
- package/dist/components/panel/Info.d.ts +2 -0
- package/dist/components/panel/Info.js +25 -0
- package/dist/components/panel/Panel.d.ts +15 -0
- package/dist/components/panel/Panel.js +55 -0
- package/dist/components/panel/Success.d.ts +2 -0
- package/dist/components/panel/Success.js +80 -0
- package/dist/components/panel/Warning.d.ts +2 -0
- package/dist/components/panel/Warning.js +14 -0
- package/dist/components/panel/panel.scss +95 -0
- package/dist/components/progress/CircularProgress.d.ts +11 -0
- package/dist/components/progress/CircularProgress.js +87 -0
- package/dist/components/progress/Progress.d.ts +11 -0
- package/dist/components/progress/Progress.js +42 -0
- package/dist/components/progress/Progress.scss +76 -0
- package/dist/components/progress/circularProgress.scss +70 -0
- package/dist/components/spacing/Gutter.js +13 -0
- package/dist/components/spacing/GutterPadding.js +13 -0
- package/dist/{textfield → components/textfield}/TextField.d.ts +6 -5
- package/dist/components/textfield/TextField.js +57 -0
- package/dist/components/textfield/textfield.scss +178 -0
- package/dist/{toggle → components/toggle}/FieldSet.d.ts +0 -0
- package/dist/components/toggle/FieldSet.js +29 -0
- package/dist/{toggle → components/toggle}/RadioContext.d.ts +0 -0
- package/dist/{toggle → components/toggle}/RadioToggle.d.ts +0 -0
- package/dist/components/toggle/RadioToggle.js +30 -0
- package/dist/{toggle → components/toggle}/radioToggle.scss +2 -1
- package/dist/{toggleButton → components/toggleButton}/ToggleButton.d.ts +1 -0
- package/dist/components/toggleButton/ToggleButton.js +70 -0
- package/dist/{toggleButton → components/toggleButton}/toggleButton.scss +16 -8
- package/dist/components/toggleLinkButton/ToggleLinkButton.d.ts +10 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton.js +60 -0
- package/dist/components/toggleLinkButton/toggleLinkButton.scss +54 -0
- package/dist/{typography → components/typography}/Typography.d.ts +3 -1
- package/dist/components/typography/Typography.js +67 -0
- package/dist/{typography → components/typography}/typography.scss +30 -1
- package/dist/shared-components.es.js +210 -15
- package/dist/style.css +1 -1
- package/dist/{core/utils → utils}/generateId.d.ts +0 -0
- package/package.json +12 -17
- package/dist/accordion/Accordion.js +0 -73
- package/dist/button/BaseButton.d.ts +0 -15
- package/dist/button/BaseButton.js +0 -80
- package/dist/button/Button.js +0 -40
- package/dist/button/IconButton.js +0 -40
- package/dist/button/button.scss +0 -46
- package/dist/core/LightMode.js +0 -50
- package/dist/core/RiksTV.js +0 -115
- package/dist/core/Strim.js +0 -10
- package/dist/core/core.scss +0 -29
- package/dist/core/rtv.scss +0 -58
- package/dist/core/strm.scss +0 -62
- package/dist/index.d.ts +0 -11
- package/dist/textfield/TextField.js +0 -87
- package/dist/textfield/textfield.scss +0 -101
- package/dist/toggle/FieldSet.js +0 -66
- package/dist/toggle/RadioToggle.js +0 -65
- package/dist/toggleButton/ToggleButton.js +0 -106
- package/dist/toggleButton/internal/generateId.d.ts +0 -1
- package/dist/typography/Typography.js +0 -95
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseDecoratedButtonProps } from "./BaseDecoratedButton";
|
|
3
|
+
import "./button.scss";
|
|
4
|
+
import "./button-shared.scss";
|
|
5
|
+
export declare const PrimaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const SecondaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare const TertiaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { B as BaseDecoratedButton } from "./BaseDecoratedButton.js";
|
|
3
|
+
import "./Button.js";
|
|
4
|
+
import { j as jsx } from "../core/RiksTV.js";
|
|
5
|
+
const PrimaryDecoratedButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseDecoratedButton, {
|
|
6
|
+
buttonType: "primary",
|
|
7
|
+
ref,
|
|
8
|
+
...props
|
|
9
|
+
}));
|
|
10
|
+
PrimaryDecoratedButton.displayName = "PrimaryDecoratedButton";
|
|
11
|
+
const SecondaryDecoratedButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseDecoratedButton, {
|
|
12
|
+
buttonType: "secondary",
|
|
13
|
+
ref,
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
SecondaryDecoratedButton.displayName = "SecondaryDecoratedButton";
|
|
17
|
+
const TertiaryDecoratedButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseDecoratedButton, {
|
|
18
|
+
buttonType: "tertiary",
|
|
19
|
+
ref,
|
|
20
|
+
...props
|
|
21
|
+
}));
|
|
22
|
+
TertiaryDecoratedButton.displayName = "TertiaryDecoratedButton";
|
|
23
|
+
export { PrimaryDecoratedButton as P, SecondaryDecoratedButton as S, TertiaryDecoratedButton as T };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { DecoratedButtonProps } from "./BaseDecoratedButton";
|
|
3
3
|
import "./icon-button.scss";
|
|
4
4
|
import "./button-shared.scss";
|
|
5
|
-
interface IconButtonProps extends Omit<
|
|
6
|
-
["aria-label"]: string;
|
|
5
|
+
interface IconButtonProps extends Omit<DecoratedButtonProps, "icon"> {
|
|
7
6
|
icon: () => JSX.Element;
|
|
8
7
|
}
|
|
9
8
|
export declare const PrimaryIconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { P as PrimaryDecoratedButton, S as SecondaryDecoratedButton, T as TertiaryDecoratedButton } from "./DecoratedButton.js";
|
|
3
|
+
import "./Button.js";
|
|
4
|
+
import { j as jsx } from "../core/RiksTV.js";
|
|
5
|
+
var iconButton = /* @__PURE__ */ (() => ".rds-icon-button{--default-icon-size: 3rem;--default-icon-margin: .75rem;border-radius:50%;max-height:var(--default-icon-size);max-width:var(--default-icon-size);display:flex;justify-content:center;align-items:center;box-sizing:border-box;margin:0;padding:0}.rds-icon-button .rds-button__icon{margin:0;box-sizing:border-box;margin:var(--default-icon-margin);height:var(--default-icon-size);width:var(--default-icon-size)}.rds-icon-button .rds-button__icon>svg{width:100%}\n")();
|
|
6
|
+
const PrimaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(PrimaryDecoratedButton, {
|
|
7
|
+
buttonStyle: "rds-icon-button",
|
|
8
|
+
ref,
|
|
9
|
+
...props
|
|
10
|
+
}));
|
|
11
|
+
PrimaryIconButton.displayName = "PrimaryIconButton";
|
|
12
|
+
const SecondaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(SecondaryDecoratedButton, {
|
|
13
|
+
buttonStyle: "rds-icon-button",
|
|
14
|
+
ref,
|
|
15
|
+
...props
|
|
16
|
+
}));
|
|
17
|
+
SecondaryIconButton.displayName = "SecondaryIconButton";
|
|
18
|
+
const TertiaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(TertiaryDecoratedButton, {
|
|
19
|
+
buttonStyle: "rds-icon-button",
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}));
|
|
23
|
+
TertiaryIconButton.displayName = "TertiaryIconButton";
|
|
24
|
+
export { PrimaryIconButton as P, SecondaryIconButton as S, TertiaryIconButton as T };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes } from "react";
|
|
2
|
+
import { BaseLinkButtonProps } from "./BaseLinkButton";
|
|
3
|
+
declare type Props = BaseLinkButtonProps<AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
4
|
+
export declare const LinkButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { B as BaseLinkButton } from "./BaseLinkButton.js";
|
|
3
|
+
import { j as jsx } from "../core/RiksTV.js";
|
|
4
|
+
const LinkButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseLinkButton, {
|
|
5
|
+
element: "a",
|
|
6
|
+
...props,
|
|
7
|
+
ref
|
|
8
|
+
}));
|
|
9
|
+
LinkButton.displayName = "LinkButton";
|
|
10
|
+
export { LinkButton as L };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use "../core/mixin/rem";
|
|
2
|
+
|
|
3
|
+
.rds-arrow-button {
|
|
4
|
+
--default-arrow-size: #{rem.convert(18px)};
|
|
5
|
+
--default-arrow-margin: #{rem.convert(12px)};
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
8
|
+
& > svg {
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
& .rds-button__arrow {
|
|
13
|
+
margin: 0;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
margin-inline: var(--default-arrow-margin) -6px; //-6px minus pga optisk illusjon pga pila, ref Linn
|
|
16
|
+
height: var(--default-arrow-size);
|
|
17
|
+
width: var(--default-arrow-size);
|
|
18
|
+
|
|
19
|
+
& > svg {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--backwards {
|
|
25
|
+
& .rds-button__arrow {
|
|
26
|
+
margin-inline: -6px var(--default-arrow-margin); //-6px minus pga optisk illusjon pga pila, ref Linn
|
|
27
|
+
|
|
28
|
+
& > svg {
|
|
29
|
+
transform: rotate(180deg);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--forwards {
|
|
35
|
+
flex-direction: row-reverse;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../core/mixin/focus" as mix;
|
|
2
2
|
|
|
3
3
|
.rds-button__shared {
|
|
4
4
|
--common-button--primary-color: var(--rds-button-primary-fg);
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--common-button--tertiary-color: var(--rds-foreground-primary);
|
|
19
19
|
--common-button--tertiary-hover-bg: var(--rds-button-tertiary-hover-bg);
|
|
20
20
|
--common-button--tertiary-hover-color: var(--rds-foreground-primary);
|
|
21
|
-
--common-button--tertiary-pressed-bg: var(--rds-background-
|
|
21
|
+
--common-button--tertiary-pressed-bg: var(--rds-background-secondary);
|
|
22
22
|
--common-button--tertiary-pressed-color: var(--rds-foreground-primary);
|
|
23
23
|
|
|
24
24
|
--common-button--disabled-bg: var(--rds-foreground-secondary);
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
&--secondary {
|
|
64
64
|
background-color: var(--common-button--secondary-bg);
|
|
65
|
-
|
|
65
|
+
box-shadow: inset 0px 0px 0px 2px var(--common-button--secondary-border-color);
|
|
66
66
|
color: var(--common-button--secondary-color);
|
|
67
67
|
|
|
68
68
|
&:hover {
|
|
@@ -153,4 +153,15 @@
|
|
|
153
153
|
--common-button--disabled-color: var(--rds-button-primary-fg);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
&.rds-white {
|
|
157
|
+
&.rds-button__shared--secondary {
|
|
158
|
+
--common-button--secondary-bg: var(--rds-foreground-primary);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.rds-transparent {
|
|
164
|
+
&.rds-button__shared--secondary {
|
|
165
|
+
--common-button--secondary-bg: transparent;
|
|
166
|
+
}
|
|
156
167
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@use "../core/mixin/rem";
|
|
2
|
+
|
|
3
|
+
.rds-arrow-button,
|
|
4
|
+
.rds-button {
|
|
5
|
+
--fluid-block: clamp(#{rem.convert(10.5px)}, 2vw, #{rem.convert(12.5px)});
|
|
6
|
+
--fluid-inline: clamp(#{rem.convert(16px)}, 2vw, #{rem.convert(24px)});
|
|
7
|
+
|
|
8
|
+
padding: var(--fluid-block) var(--fluid-inline);
|
|
9
|
+
border-radius: var(--rds-roundness--button);
|
|
10
|
+
overflow-y: hidden;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
font-size: rem.convert(18px);
|
|
13
|
+
|
|
14
|
+
&__icon {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
align-self: center;
|
|
18
|
+
margin-right: var(--rds-spacing--16);
|
|
19
|
+
width: 1.125rem;
|
|
20
|
+
|
|
21
|
+
& > svg {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__postfix {
|
|
27
|
+
position: relative;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
margin-left: var(--rds-spacing--16);
|
|
31
|
+
padding-left: var(--rds-spacing--16);
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
content: " ";
|
|
35
|
+
position: absolute;
|
|
36
|
+
width: 1px;
|
|
37
|
+
background-color: currentColor;
|
|
38
|
+
height: 220%;
|
|
39
|
+
left: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--loading:disabled {
|
|
44
|
+
cursor: wait !important;
|
|
45
|
+
position: relative;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
|
|
48
|
+
@keyframes spin {
|
|
49
|
+
0% {
|
|
50
|
+
transform: rotate(0deg);
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
transform: rotate(360deg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&::before {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset: 0;
|
|
61
|
+
background-color: var(--rds-background-overlay-medium);
|
|
62
|
+
}
|
|
63
|
+
&::after {
|
|
64
|
+
--button-spinner-size: 24px;
|
|
65
|
+
--button-spinner-width: 3px;
|
|
66
|
+
|
|
67
|
+
--calculated-spinner-size: calc(
|
|
68
|
+
calc(var(--button-spinner-size) + var(--button-spinner-width) + var(--button-spinner-width)) / 2
|
|
69
|
+
);
|
|
70
|
+
content: "";
|
|
71
|
+
position: absolute;
|
|
72
|
+
left: calc(50% - var(--calculated-spinner-size));
|
|
73
|
+
top: calc(50% - var(--calculated-spinner-size));
|
|
74
|
+
height: var(--button-spinner-size);
|
|
75
|
+
width: var(--button-spinner-size);
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
border-top: var(--button-spinner-width) solid var(--rds-accent-color-dark);
|
|
78
|
+
border-left: var(--button-spinner-width) solid var(--rds-accent-color-dark);
|
|
79
|
+
border-right: var(--button-spinner-width) solid var(--rds-accent-color-dark);
|
|
80
|
+
border-bottom: var(--button-spinner-width) solid transparent;
|
|
81
|
+
border-radius: 50px;
|
|
82
|
+
animation-duration: 1000ms;
|
|
83
|
+
animation-fill-mode: forwards;
|
|
84
|
+
animation-iteration-count: infinite;
|
|
85
|
+
animation-name: spin;
|
|
86
|
+
animation-timing-function: linear;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
box-shadow: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import "./checkbox.scss";
|
|
3
|
+
export interface Props extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
lightBackground?: boolean;
|
|
6
|
+
id?: string;
|
|
7
|
+
hasError?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { a as jsxs, j as jsx } from "../core/RiksTV.js";
|
|
3
|
+
const generateId = (id) => {
|
|
4
|
+
if (id) {
|
|
5
|
+
return id;
|
|
6
|
+
}
|
|
7
|
+
const r = (Math.random() + 1).toString(36).substring(7);
|
|
8
|
+
return `${new Date().valueOf()}-${r}`;
|
|
9
|
+
};
|
|
10
|
+
var checkbox = /* @__PURE__ */ (() => '.rds-form-group-box{--checkbox-border-color: var(--rds-accent-color);--checkbox-background-color: transparent;--checkbox-checkmark-color: var(--rds-background-primary);--checkbox-label-color: var(--rds-foreground-primary);--checkbox-error-color: var(--rds-feedback-error-text);display:flex;gap:.75em}.rds-form-group-box .rds-checkbox__input{cursor:pointer;appearance:none;-webkit-appearance:none;background-color:var(--checkbox-background-color);margin:0;width:1.75em;height:1.75em;border:2px solid var(--checkbox-border-color);border-radius:.15em;display:grid;place-content:center}.rds-form-group-box .rds-checkbox__input:focus::-moz-focus-inner{border-style:none;outline:0}.rds-form-group-box .rds-checkbox__input:focus button::-moz-focus-inner,.rds-form-group-box .rds-checkbox__input:focus [type=button]::-moz-focus-inner,.rds-form-group-box .rds-checkbox__input:focus [type=reset]::-moz-focus-inner,.rds-form-group-box .rds-checkbox__input:focus [type=submit]::-moz-focus-inner{border-style:none}.rds-form-group-box .rds-checkbox__input:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .rds-form-group-box .rds-checkbox__input:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.rds-form-group-box .rds-checkbox__input:before{content:"";width:1.35em;height:1.35em;clip-path:polygon(33.59% 75.55%,2.27% 44.24%,2.27% 33.29%,13.21% 33.29%,35.62% 55.65%,89% 2.27%,100% 2.27%,100% 13.21%,37.6% 75.55%,33.59% 75.55%);transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;background-color:var(--checkbox-checkmark-color)}.rds-form-group-box .rds-checkbox__input:checked{--checkbox-background-color: var(--rds-accent-color)}.rds-form-group-box .rds-checkbox__input:checked:before{transform:scale(1) translateY(.15em)}.rds-form-group-box .rds-checkbox__label{font-family:var(--rds-font-family-headlines);font-size:clamp(.875rem,calc(.8214285714rem + .1488095238vw),1rem);font-weight:400;line-height:1.85;user-select:none;cursor:pointer;color:var(--checkbox-label-color)}.rds-form-group-box--error{--checkbox-border-color: var(--checkbox-error-color);--checkbox-label-color: var(--checkbox-error-color)}.rds-form-group-box--error .rds-checkbox__input{box-shadow:0 0 0 1px var(--checkbox-border-color)}.rds-form-group-box--error .rds-checkbox__input:checked{--checkbox-background-color: var(--checkbox-error-color)}.rds-light .rds-form-group-box,.rds-light.rds-form-group-box{--checkbox-border-color: var(--rds-button-primary-fg);--checkbox-checkmark-color: var(--surface-background);--checkbox-error-color: var(--rds-feedback-error-object)}.rds-light .rds-form-group-box .rds-checkbox__label,.rds-light.rds-form-group-box .rds-checkbox__label{--checkbox-label-color: var(--rds-background-primary)}.rds-light .rds-form-group-box .rds-checkbox__input:checked,.rds-light.rds-form-group-box .rds-checkbox__input:checked{--checkbox-background-color: var(--rds-button-primary-fg)}.rds-light .rds-form-group-box--error,.rds-light.rds-form-group-box--error{--checkbox-border-color: var(--checkbox-error-color);--checkbox-label-color: var(--checkbox-error-color)}.rds-light .rds-form-group-box--error .rds-checkbox__label,.rds-light.rds-form-group-box--error .rds-checkbox__label{--checkbox-label-color: var(--checkbox-error-color)}.rds-light .rds-form-group-box--error .rds-checkbox__input:checked,.rds-light.rds-form-group-box--error .rds-checkbox__input:checked{--checkbox-background-color: var(--checkbox-error-color)}\n')();
|
|
11
|
+
const Checkbox = forwardRef(({
|
|
12
|
+
className = "",
|
|
13
|
+
id,
|
|
14
|
+
lightBackground,
|
|
15
|
+
hasError,
|
|
16
|
+
style,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) => {
|
|
20
|
+
const internalId = generateId(id);
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
style,
|
|
23
|
+
className: `rds-form-group-box ${className} ${hasError ? "rds-form-group-box--error" : ""}`,
|
|
24
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
25
|
+
ref,
|
|
26
|
+
className: `rds-checkbox rds-checkbox__input ${lightBackground ? "rds-light" : ""}`,
|
|
27
|
+
id: internalId,
|
|
28
|
+
type: "checkbox",
|
|
29
|
+
"aria-invalid": hasError,
|
|
30
|
+
...props
|
|
31
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
32
|
+
"data-testid": "rds-checkbox__label",
|
|
33
|
+
htmlFor: internalId,
|
|
34
|
+
className: "rds-checkbox__label",
|
|
35
|
+
children
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
Checkbox.displayName = "Checkbox";
|
|
40
|
+
export { Checkbox as C, generateId as g };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@use "../core/mixin/fluid";
|
|
2
|
+
@use "../core/mixin/focus" as mix;
|
|
3
|
+
|
|
4
|
+
.rds-form-group-box {
|
|
5
|
+
--checkbox-border-color: var(--rds-accent-color);
|
|
6
|
+
--checkbox-background-color: transparent;
|
|
7
|
+
--checkbox-checkmark-color: var(--rds-background-primary);
|
|
8
|
+
--checkbox-label-color: var(--rds-foreground-primary);
|
|
9
|
+
--checkbox-error-color: var(--rds-feedback-error-text);
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: 0.75em;
|
|
13
|
+
|
|
14
|
+
.rds-checkbox {
|
|
15
|
+
&__input {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
appearance: none;
|
|
18
|
+
-webkit-appearance: none;
|
|
19
|
+
background-color: var(--checkbox-background-color);
|
|
20
|
+
margin: 0;
|
|
21
|
+
width: 1.75em;
|
|
22
|
+
height: 1.75em;
|
|
23
|
+
border: 2px solid var(--checkbox-border-color);
|
|
24
|
+
border-radius: 0.15em;
|
|
25
|
+
display: grid;
|
|
26
|
+
place-content: center;
|
|
27
|
+
@include mix.with-keyboard-focus;
|
|
28
|
+
|
|
29
|
+
&::before {
|
|
30
|
+
content: "";
|
|
31
|
+
width: 1.35em;
|
|
32
|
+
height: 1.35em;
|
|
33
|
+
clip-path: polygon(
|
|
34
|
+
33.59% 75.55%,
|
|
35
|
+
2.27% 44.24%,
|
|
36
|
+
2.27% 33.29%,
|
|
37
|
+
13.21% 33.29%,
|
|
38
|
+
35.62% 55.65%,
|
|
39
|
+
89% 2.27%,
|
|
40
|
+
100% 2.27%,
|
|
41
|
+
100% 13.21%,
|
|
42
|
+
37.6% 75.55%,
|
|
43
|
+
33.59% 75.55%
|
|
44
|
+
);
|
|
45
|
+
transform: scale(0);
|
|
46
|
+
transform-origin: bottom left;
|
|
47
|
+
transition: 120ms transform ease-in-out;
|
|
48
|
+
/* Windows High Contrast Mode */
|
|
49
|
+
background-color: var(--checkbox-checkmark-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:checked {
|
|
53
|
+
--checkbox-background-color: var(--rds-accent-color);
|
|
54
|
+
&::before {
|
|
55
|
+
transform: scale(1) translateY(0.15em);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__label {
|
|
61
|
+
font-family: var(--rds-font-family-headlines);
|
|
62
|
+
font-size: fluid.get-clamp(14, 16);
|
|
63
|
+
font-weight: normal;
|
|
64
|
+
line-height: 1.85;
|
|
65
|
+
user-select: none;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
color: var(--checkbox-label-color);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--error {
|
|
72
|
+
--checkbox-border-color: var(--checkbox-error-color);
|
|
73
|
+
--checkbox-label-color: var(--checkbox-error-color);
|
|
74
|
+
|
|
75
|
+
.rds-checkbox__input {
|
|
76
|
+
box-shadow: 0 0 0 1px var(--checkbox-border-color);
|
|
77
|
+
&:checked {
|
|
78
|
+
--checkbox-background-color: var(--checkbox-error-color);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.rds-light {
|
|
85
|
+
.rds-form-group-box,
|
|
86
|
+
&.rds-form-group-box {
|
|
87
|
+
--checkbox-border-color: var(--rds-button-primary-fg);
|
|
88
|
+
--checkbox-checkmark-color: var(--surface-background);
|
|
89
|
+
--checkbox-error-color: var(--rds-feedback-error-object);
|
|
90
|
+
|
|
91
|
+
.rds-checkbox__label {
|
|
92
|
+
--checkbox-label-color: var(--rds-background-primary);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.rds-checkbox__input {
|
|
96
|
+
&:checked {
|
|
97
|
+
--checkbox-background-color: var(--rds-button-primary-fg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--error {
|
|
102
|
+
--checkbox-border-color: var(--checkbox-error-color);
|
|
103
|
+
--checkbox-label-color: var(--checkbox-error-color);
|
|
104
|
+
|
|
105
|
+
.rds-checkbox__label {
|
|
106
|
+
--checkbox-label-color: var(--checkbox-error-color);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.rds-checkbox__input {
|
|
110
|
+
&:checked {
|
|
111
|
+
--checkbox-background-color: var(--checkbox-error-color);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { j as jsx } from "./RiksTV.js";
|
|
3
|
+
const LightMode = forwardRef(({
|
|
4
|
+
children,
|
|
5
|
+
className = "",
|
|
6
|
+
...props
|
|
7
|
+
}, ref) => /* @__PURE__ */ jsx("div", {
|
|
8
|
+
ref,
|
|
9
|
+
className: `rds-light ${className}`,
|
|
10
|
+
...props,
|
|
11
|
+
children
|
|
12
|
+
}));
|
|
13
|
+
LightMode.displayName = "LightMode";
|
|
14
|
+
export { LightMode as L };
|
|
File without changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import require$$0 from "react";
|
|
2
|
+
import { C as Core } from "./Core.js";
|
|
3
|
+
var jsxRuntime = { exports: {} };
|
|
4
|
+
var reactJsxRuntime_production_min = {};
|
|
5
|
+
/*
|
|
6
|
+
object-assign
|
|
7
|
+
(c) Sindre Sorhus
|
|
8
|
+
@license MIT
|
|
9
|
+
*/
|
|
10
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
12
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
function toObject(val) {
|
|
14
|
+
if (val === null || val === void 0) {
|
|
15
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
16
|
+
}
|
|
17
|
+
return Object(val);
|
|
18
|
+
}
|
|
19
|
+
function shouldUseNative() {
|
|
20
|
+
try {
|
|
21
|
+
if (!Object.assign) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
var test1 = new String("abc");
|
|
25
|
+
test1[5] = "de";
|
|
26
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
var test2 = {};
|
|
30
|
+
for (var i = 0; i < 10; i++) {
|
|
31
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
32
|
+
}
|
|
33
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n2) {
|
|
34
|
+
return test2[n2];
|
|
35
|
+
});
|
|
36
|
+
if (order2.join("") !== "0123456789") {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
var test3 = {};
|
|
40
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
41
|
+
test3[letter] = letter;
|
|
42
|
+
});
|
|
43
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
} catch (err) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
shouldUseNative() ? Object.assign : function(target, source) {
|
|
52
|
+
var from;
|
|
53
|
+
var to = toObject(target);
|
|
54
|
+
var symbols;
|
|
55
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
56
|
+
from = Object(arguments[s]);
|
|
57
|
+
for (var key in from) {
|
|
58
|
+
if (hasOwnProperty.call(from, key)) {
|
|
59
|
+
to[key] = from[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (getOwnPropertySymbols) {
|
|
63
|
+
symbols = getOwnPropertySymbols(from);
|
|
64
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
65
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
66
|
+
to[symbols[i]] = from[symbols[i]];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return to;
|
|
72
|
+
};
|
|
73
|
+
/** @license React v17.0.2
|
|
74
|
+
* react-jsx-runtime.production.min.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/
|
|
81
|
+
var f = require$$0, g = 60103;
|
|
82
|
+
reactJsxRuntime_production_min.Fragment = 60107;
|
|
83
|
+
if (typeof Symbol === "function" && Symbol.for) {
|
|
84
|
+
var h = Symbol.for;
|
|
85
|
+
g = h("react.element");
|
|
86
|
+
reactJsxRuntime_production_min.Fragment = h("react.fragment");
|
|
87
|
+
}
|
|
88
|
+
var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
|
|
89
|
+
function q(c, a, k) {
|
|
90
|
+
var b, d = {}, e = null, l = null;
|
|
91
|
+
k !== void 0 && (e = "" + k);
|
|
92
|
+
a.key !== void 0 && (e = "" + a.key);
|
|
93
|
+
a.ref !== void 0 && (l = a.ref);
|
|
94
|
+
for (b in a)
|
|
95
|
+
n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
96
|
+
if (c && c.defaultProps)
|
|
97
|
+
for (b in a = c.defaultProps, a)
|
|
98
|
+
d[b] === void 0 && (d[b] = a[b]);
|
|
99
|
+
return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
|
|
100
|
+
}
|
|
101
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
102
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
103
|
+
{
|
|
104
|
+
jsxRuntime.exports = reactJsxRuntime_production_min;
|
|
105
|
+
}
|
|
106
|
+
const jsx = jsxRuntime.exports.jsx;
|
|
107
|
+
const jsxs = jsxRuntime.exports.jsxs;
|
|
108
|
+
const Fragment = jsxRuntime.exports.Fragment;
|
|
109
|
+
var rtv = /* @__PURE__ */ (() => ':root{--rds-spacing--2: .125rem;--rds-spacing--4: .25rem;--rds-spacing--8: .5rem;--rds-spacing--16: 1rem;--rds-spacing--24: 1.5rem;--rds-spacing--32: 2rem;--rds-spacing--48: 3rem;--rds-spacing--64: 4rem;--rds-spacing--80: 5rem;--rds-spacing--96: 6rem;--rds-box-shadow--default: 0px 8px 16px rgba(0, 0, 0, .5);--rds-readability-width: 60ch;--rds-content-width--default: 1070px;--rds-breakpoint--sm: 768px;--rds-breakpoint--md: 992px;--rds-breakpoint--lg: 1200px;--rds-gutter--sm: 1rem;--rds-gutter--md: 5vw;--rds-gutter--lg: 7.5vw;--rds-gutter: var(--rds-gutter--sm)}@media (min-width: 768px){:root{--rds-gutter: var(--rds-gutter--md)}}@media (min-width: 1200px){:root{--rds-gutter: var(--rds-gutter--lg)}}.rds-gutter{margin-inline:var(--rds-gutter)}.rds-gutter-padding{padding-inline:var(--rds-gutter)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.with-keyboard-focus:focus::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus:focus button::-moz-focus-inner,.with-keyboard-focus:focus [type=button]::-moz-focus-inner,.with-keyboard-focus:focus [type=reset]::-moz-focus-inner,.with-keyboard-focus:focus [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}@font-face{font-family:HALMatex;src:url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Regular.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Regular.woff) format("woff");font-style:normal;font-display:swap}@font-face{font-family:AvertaRegular;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardRegular.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:AvertaSemibold;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardSemibold.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Semibold.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:AvertaBold;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardBold.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}.rtv{--rikstv-red: #ef4642;--rikstv-red-120: #d41612;--rikstv-white: #ffffff;--rikstv-black: #000000;--rikstv-onyx-150: #0f0f0f;--rikstv-onyx: #1d1d1d;--rikstv-onyx-90: #313131;--rikstv-slate: #353535;--rikstv-slate-80: #626262;--rikstv-slate-60: #828282;--rikstv-slate-40: #afafaf;--rikstv-slate-20: #ddd;--rikstv-ask: #5c5c5c;--rikstv-ask-80: #787878;--rikstv-ask-60: #9c9c9c;--rikstv-ask-40: #c0c0c0;--rikstv-sterling: #b8b8b8;--rikstv-sterling-40: #e5e5e5;--rikstv-sterling-20: #f1f1f1;--rikstv-sterling-10: #f8f8f8;--rikstv-purple: #542453;--rikstv-green: #00816d;--rikstv-blue: #195a89;--rikstv-light-blue: #0f7ca2;--rikstv-yellow: #f2a900;--rikstv-info-light: #00aec7;--rikstv-warning-light: #f2a900;--rikstv-success-light: #4cbb81;--rikstv-error-light: #f17774;--rikstv-info-dark: #007485;--rikstv-warning-dark: #996b00;--rikstv-success-dark: #2a6f4b;--rikstv-error-dark: #e01c17;--rikstv-background-gray-150: #0b0b0b;--rikstv-background-gray: #252525;--rikstv-background-gray-90: #3b3b3b;--rikstv-banner-background: #e9e9e9;--rikstv-background: #f9f9f9;--rikstv-card-gray: #434343;--rikstv-card-gray-80: #333333;--rikstv-card-gray-60: #6e6e6e;--rikstv-card-gray-20: #d9d9d9;--rikstv-foreground-gray: #666666;--rikstv-foreground-gray-80: #858585}.rtv{--rds-heading-accent: var(--rikstv-white);--rds-accent-color: var(--rikstv-red);--rds-accent-color-mid: #ed302b;--rds-accent-color-dark: var(--rikstv-red-120);--rds-accent-hover: var(--rikstv-red-120);--rds-button-primary-fg: var(--rikstv-white);--rds-button-secondary-pressed-fg: var(--rikstv-foreground-gray);--rds-button-secondary-pressed-bg: var(--rikstv-white);--rds-button-tertirary-bg: var(--rikstv-background-gray-90);--rds-button-tertiary-hover-bg: var(--rikstv-card-gray);--rds-foreground-primary: var(--rikstv-white);--rds-foreground-secondary: #a8a8a8;--rds-foreground-tertiary: var(--rikstv-foreground-gray);--rds-background-primary-rgb: var(--rikstv-background-gray);--rds-background-primary: var(--rikstv-background-gray);--rds-background-secondary: var(--rikstv-background-gray-150);--rds-background-tertiary: var(--rikstv-card-gray);--rds-background-card: var(--rikstv-background-gray-90);--rds-foreground-overlay-soft: #ffffff1a;--rds-foreground-overlay-medium: #ffffff4d;--rds-foreground-overlay-heavy: #ffffffb3;--rds-foreground-solid-soft: #3c3c3c;--rds-surface-foreground: var(--rikstv-card-gray);--rds-toggle-collapsed: var(--rds-accent-color);--rds-toggle-expanded: var(--rds-accent-color-dark);--rds-background-overlay-soft: #0000001a;--rds-background-overlay-medium: #00000080;--rds-background-overlay-heavy: #000000d9;--rds-feedback-info: var(--rikstv-light-blue);--rds-feedback-warning: var(--rikstv-yellow);--rds-feedback-confirm: var(--rikstv-success-light);--rds-feedback-error: var(--rikstv-error-dark);--rds-feedback-error-text: var(--rikstv-error-light);--rds-feedback-error-object: var(--rikstv-error-dark);--rds-roundness--default: 4px;--rds-roundness--medium: 6px;--rds-roundness--large: 8px;--rds-roundness--xlarge: 12px;--rds-roundness--button: 34px;--rds-font-family-lg-headlines: "AvertaBold", Arial, Helvetica, "system-ui", sans-serif;--rds-font-family-headlines: "AvertaBold", Arial, Helvetica, "system-ui", sans-serif;--rds-font-family-m-headlines: "AvertaSemibold", Arial, Helvetica, "system-ui", sans-serif;--rds-font-family-body: "AvertaRegular", Arial, Helvetica, "system-ui", sans-serif;--rds-font-size--default: 1.125rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}\n')();
|
|
110
|
+
const RiksTVProvider = ({
|
|
111
|
+
children
|
|
112
|
+
}) => /* @__PURE__ */ jsx(Core, {
|
|
113
|
+
brand: "rtv",
|
|
114
|
+
children
|
|
115
|
+
});
|
|
116
|
+
export { Fragment as F, RiksTVProvider as R, jsxs as a, jsx as j };
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { C as Core } from "./Core.js";
|
|
2
|
+
import { j as jsx } from "./RiksTV.js";
|
|
3
|
+
var strm = /* @__PURE__ */ (() => ':root{--rds-spacing--2: .125rem;--rds-spacing--4: .25rem;--rds-spacing--8: .5rem;--rds-spacing--16: 1rem;--rds-spacing--24: 1.5rem;--rds-spacing--32: 2rem;--rds-spacing--48: 3rem;--rds-spacing--64: 4rem;--rds-spacing--80: 5rem;--rds-spacing--96: 6rem;--rds-box-shadow--default: 0px 8px 16px rgba(0, 0, 0, .5);--rds-readability-width: 60ch;--rds-content-width--default: 1070px;--rds-breakpoint--sm: 768px;--rds-breakpoint--md: 992px;--rds-breakpoint--lg: 1200px;--rds-gutter--sm: 1rem;--rds-gutter--md: 5vw;--rds-gutter--lg: 7.5vw;--rds-gutter: var(--rds-gutter--sm)}@media (min-width: 768px){:root{--rds-gutter: var(--rds-gutter--md)}}@media (min-width: 1200px){:root{--rds-gutter: var(--rds-gutter--lg)}}.rds-gutter{margin-inline:var(--rds-gutter)}.rds-gutter-padding{padding-inline:var(--rds-gutter)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.with-keyboard-focus:focus::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus:focus button::-moz-focus-inner,.with-keyboard-focus:focus [type=button]::-moz-focus-inner,.with-keyboard-focus:focus [type=reset]::-moz-focus-inner,.with-keyboard-focus:focus [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}@font-face{font-family:HALMatex;src:url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Regular.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Regular.woff) format("woff");font-style:normal;font-display:swap}@font-face{font-family:AvertaRegular;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardRegular.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:AvertaSemibold;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardSemibold.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Semibold.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:AvertaBold;src:url(https://static.rikstv.no/strim/fonts/AvertaStandardBold.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/hinted-AvertaStd-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}.strm{--strim-action-yellow: #faed6f;--strim-action-yellow-60: #fcf4a9;--strim-action-yellow-40: #fefbe2;--strim-white: #ffffff;--strim-black: #000000;--strim-fantasy-green-150: #001515;--strim-fantasy-green: #002a2a;--strim-fantasy-green-90: #193f3f;--strim-fantasy-green-60: #4c7571;--strim-thriller-teal: #004b50;--strim-thriller-teal-80: #267c82;--strim-thriller-teal-60: #419da2;--strim-thriller-teal-40: #79c6c6;--strim-thriller-teal-20: #c3e8e7;--strim-romance-green: #356e63;--strim-romance-green-80: #429181;--strim-romance-green-60: #62b7a5;--strim-romance-green-40: #93d6c9;--strim-standup-green: #49f5a4;--strim-standup-green-40: #bcfbde;--strim-standup-green-20: #d6ffec;--strim-standup-green-10: #edfef6;--strim-info-light: #30d7f9;--strim-warning-light: #f2a900;--strim-success-light: #80ed99;--strim-error-light: #ff8fa3;--strim-info-dark: #167183;--strim-warning-dark: #996b00;--strim-success-dark: #13862d;--strim-error-dark: #d91b4e}.strm{--stand-up-green: var(--strim-standup-green);--surface-background: var(--strim-standup-green-10);--faded-text: var(--strim-thriller-teal-40);--rds-heading-accent: var(--stand-up-green);--rds-accent-color: var(--strim-action-yellow);--rds-accent-color-mid: #f7e426;--rds-accent-color-dark: #f7e426;--rds-accent-hover: var(--strim-action-yellow-60);--rds-button-primary-fg: var(--strim-thriller-teal);--rds-button-secondary-pressed-fg: var(--strim-white);--rds-button-secondary-pressed-bg: #001d1d;--rds-button-tertirary-bg: var(--strim-fantasy-green-90);--rds-button-tertiary-hover-bg: var(--strim-thriller-teal);--rds-foreground-primary: var(--strim-white);--rds-foreground-secondary: #b2bfbf;--rds-foreground-tertiary: var(--strim-romance-green);--rds-background-primary-rgb: var(--strim-fantasy-green);--rds-background-primary: var(--strim-fantasy-green);--rds-background-secondary: var(--strim-fantasy-green-150);--rds-background-tertiary: var(--strim-thriller-teal);--rds-background-card: var(--strim-fantasy-green-90);--rds-foreground-overlay-soft: #ffffff1a;--rds-foreground-overlay-medium: #ffffff4d;--rds-foreground-overlay-heavy: #ffffffb3;--rds-foreground-solid-soft: #1a4040;--rds-surface-foreground: var(--strim-thriller-teal);--rds-toggle-collapsed: var(--strim-standup-green-40);--rds-toggle-expanded: var(--strim-standup-green);--rds-background-overlay-soft: #0000001a;--rds-background-overlay-medium: #00000080;--rds-background-overlay-heavy: #000000d9;--rds-feedback-info: var(--strim-info-light);--rds-feedback-warning: var(--strim-warning-light);--rds-feedback-confirm: #4cbb81;--rds-feedback-error: #e01c17;--rds-feedback-error-text: var(--strim-error-light);--rds-feedback-error-object: var(--strim-error-dark);--rds-roundness--default: 12px;--rds-roundness--medium: 16px;--rds-roundness--large: 24px;--rds-roundness--xlarge: 40px;--rds-roundness--button: 12px;--rds-font-family-lg-headlines: "HALMatex", "system-ui", sans-serif;--rds-font-family-headlines: "AvertaBold", Arial, Helvetica, "system-ui", sans-serif;--rds-font-family-m-headlines: "AvertaSemibold", Arial, Helvetica, "system-ui", sans-serif;--rds-font-family-body: "AvertaRegular", Arial, Helvetica, "system-ui", sans-serif;--rds-font-size--default: 1.125rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}\n')();
|
|
4
|
+
const StrimProvider = ({
|
|
5
|
+
children
|
|
6
|
+
}) => /* @__PURE__ */ jsx(Core, {
|
|
7
|
+
brand: "strm",
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
export { StrimProvider as S };
|