@rikstv/shared-components 1.1.97 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/components/accordion/Accordion-4b8edd28.mjs +669 -0
  2. package/dist/components/breadcrumb/Breadcrumb-1b579cc3.mjs +21 -0
  3. package/dist/components/button/ArrowButton-af5de307.mjs +48 -0
  4. package/dist/components/button/BaseButton-4f6e9dd4.mjs +46 -0
  5. package/dist/components/button/BaseButton.d.ts +2 -2
  6. package/dist/components/button/BaseDecoratedButton-c5799b0f.mjs +15 -0
  7. package/dist/components/button/BaseLinkButton-348be18c.mjs +42 -0
  8. package/dist/components/button/BaseLinkButton.d.ts +2 -2
  9. package/dist/components/button/Button-4e09c58d.mjs +17 -0
  10. package/dist/components/button/DecoratedButton-ab90a6bd.mjs +21 -0
  11. package/dist/components/button/IconButton-dd3478ff.mjs +15 -0
  12. package/dist/components/button/LinkButton-85fc759b.mjs +8 -0
  13. package/dist/components/button/LinkButton.d.ts +1 -1
  14. package/dist/components/checkbox/BaseCheckbox-6fed1663.mjs +41 -0
  15. package/dist/components/checkbox/Checkbox-cc58a275.mjs +22 -0
  16. package/dist/components/core/Core-ba0340f6.mjs +46 -0
  17. package/dist/components/core/LightMode-b458f91d.mjs +9 -0
  18. package/dist/components/core/RiksTV-698a6154.mjs +6 -0
  19. package/dist/components/core/Strim-51ea8e08.mjs +6 -0
  20. package/dist/components/core/core.scss +20 -6
  21. package/dist/components/core/hooks/useBrowserPreferences.d.ts +1 -1
  22. package/dist/components/core/mixin/breakpoints.scss +1 -1
  23. package/dist/components/icons/{Arrow.js → Arrow-feb3e25e.mjs} +9 -10
  24. package/dist/components/icons/{Chevron.js → Chevron-ef147695.mjs} +9 -12
  25. package/dist/components/list/CheckmarkListItem-f9df7013.mjs +38 -0
  26. package/dist/components/list/CrossmarkListItem-348c226a.mjs +28 -0
  27. package/dist/components/list/List-86ad4810.mjs +27 -0
  28. package/dist/components/list/ListItem-4e47bb2e.mjs +5 -0
  29. package/dist/components/list/OrderedListItem-a70598a1.mjs +5 -0
  30. package/dist/components/loader/Loader-7ab4a8f0.mjs +21 -0
  31. package/dist/components/loader/RawLoader-7e00f143.mjs +47 -0
  32. package/dist/components/notificationDot/NotificationDot-b03fa811.mjs +26 -0
  33. package/dist/components/panel/{Info.js → Info-7fe85f53.mjs} +20 -12
  34. package/dist/components/panel/Panel-5cd1bda7.mjs +50 -0
  35. package/dist/components/panel/{Success.js → Success-c116cc05.mjs} +75 -23
  36. package/dist/components/panel/Warning-fa1839e3.mjs +11 -0
  37. package/dist/components/progress/CircularProgress-e4622fd6.mjs +52 -0
  38. package/dist/components/progress/Progress-ef42810b.mjs +26 -0
  39. package/dist/components/spacing/Gutter-32112716.mjs +5 -0
  40. package/dist/components/spacing/GutterPadding-6be6c9d9.mjs +5 -0
  41. package/dist/components/textfield/TextField-765a87bf.mjs +70 -0
  42. package/dist/components/toggle/FieldSet-4bdc4b7e.mjs +13 -0
  43. package/dist/components/toggle/RadioToggle-1528c002.mjs +17 -0
  44. package/dist/components/toggleButton/ToggleButton-a2d4302f.mjs +47 -0
  45. package/dist/components/toggleInlineButton/ToggleInlineButton-1e480eaa.mjs +40 -0
  46. package/dist/components/toggleLinkButton/ToggleLinkButton-08c60e4d.mjs +45 -0
  47. package/dist/components/typography/Typography-91af1c48.mjs +33 -0
  48. package/dist/components/typography/Typography.d.ts +2 -2
  49. package/dist/shared-components.mjs +199 -0
  50. package/dist/style.css +1 -1
  51. package/package.json +2 -4
  52. package/dist/components/accordion/Accordion.js +0 -34
  53. package/dist/components/breadcrumb/Breadcrumb.js +0 -39
  54. package/dist/components/button/ArrowButton.js +0 -44
  55. package/dist/components/button/BaseButton.js +0 -42
  56. package/dist/components/button/BaseDecoratedButton.js +0 -32
  57. package/dist/components/button/BaseLinkButton.js +0 -44
  58. package/dist/components/button/Button.js +0 -29
  59. package/dist/components/button/DecoratedButton.js +0 -23
  60. package/dist/components/button/IconButton.js +0 -24
  61. package/dist/components/button/LinkButton.js +0 -10
  62. package/dist/components/checkbox/BaseCheckbox.js +0 -35
  63. package/dist/components/checkbox/Checkbox.js +0 -26
  64. package/dist/components/core/Core.js +0 -76
  65. package/dist/components/core/LightMode.js +0 -14
  66. package/dist/components/core/RiksTV.js +0 -43
  67. package/dist/components/core/Strim.js +0 -10
  68. package/dist/components/list/CheckmarkListItem.js +0 -36
  69. package/dist/components/list/CrossmarkListItem.js +0 -27
  70. package/dist/components/list/List.js +0 -28
  71. package/dist/components/list/ListItem.js +0 -19
  72. package/dist/components/list/OrderedListItem.js +0 -19
  73. package/dist/components/loader/Loader.js +0 -31
  74. package/dist/components/loader/RawLoader.js +0 -30
  75. package/dist/components/notificationDot/NotificationDot.js +0 -22
  76. package/dist/components/panel/Panel.js +0 -55
  77. package/dist/components/panel/Warning.js +0 -14
  78. package/dist/components/progress/CircularProgress.js +0 -87
  79. package/dist/components/progress/Progress.js +0 -42
  80. package/dist/components/spacing/Gutter.js +0 -13
  81. package/dist/components/spacing/GutterPadding.js +0 -13
  82. package/dist/components/textfield/TextField.js +0 -63
  83. package/dist/components/toggle/FieldSet.js +0 -29
  84. package/dist/components/toggle/RadioToggle.js +0 -30
  85. package/dist/components/toggleButton/ToggleButton.js +0 -64
  86. package/dist/components/toggleInlineButton/ToggleInlineButton.js +0 -48
  87. package/dist/components/toggleLinkButton/ToggleLinkButton.js +0 -55
  88. package/dist/components/typography/Typography.js +0 -67
  89. package/dist/shared-components.es.js +0 -213
@@ -1,34 +0,0 @@
1
- import { useRef, useEffect } from "react";
2
- import { C as Chevron } from "../icons/Chevron.js";
3
- import { a as jsxs, j as jsx } from "../core/RiksTV.js";
4
- var accordion = /* @__PURE__ */ (() => ".rtv{--sub-body-color--light: var(--rds-foreground-solid-soft)}.strm{--sub-body-color--light: var(--rds-button-primary-fg)}.rds-link{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:var(--rds-foreground-primary);transition:75ms ease color}.rds-link:visited{color:var(--rds-foreground-primary)}.rds-link:hover{text-decoration-thickness:2px;color:var(--rds-heading-accent)}.rds-link:active{text-decoration:none;text-shadow:0px 0px 1px var(--rds-foreground-primary)}.rds-link--active,.rds-link[aria-current=page]{text-shadow:0px 0px 1px var(--rds-foreground-primary)}.rds-link:focus::-moz-focus-inner{border-style:none;outline:0}.rds-link:focus button::-moz-focus-inner,.rds-link:focus [type=button]::-moz-focus-inner,.rds-link:focus [type=reset]::-moz-focus-inner,.rds-link:focus [type=submit]::-moz-focus-inner{border-style:none}.rds-link:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .rds-link:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.rds-display-title{font-family:var(--rds-font-family-lg-headlines);font-size:clamp(2.5rem,calc(1.4285714286rem + 2.9761904762vw),5rem);font-weight:400;line-height:1.2;color:var(--rds-foreground-primary)}.rds-title-1{font-family:var(--rds-font-family-lg-headlines);font-size:clamp(1.875rem,calc(1.1785714286rem + 1.9345238095vw),3.5rem);font-weight:400;line-height:1.2;color:var(--rds-foreground-primary)}.rds-title-2{font-family:var(--rds-font-family-lg-headlines);font-size:clamp(1.5rem,calc(1.0714285714rem + 1.1904761905vw),2.5rem);font-weight:400;line-height:1.2;color:var(--rds-foreground-primary)}.rds-sub-title-2{font-family:var(--rds-font-family-lg-headlines);font-size:clamp(1.375rem,calc(1.1071428571rem + .744047619vw),2rem);font-weight:400;line-height:1.2;color:var(--rds-foreground-primary)}.rds-title-3{font-family:var(--rds-font-family-m-headlines);font-size:clamp(1.25rem,calc(1.1964285714rem + .1488095238vw),1.375rem);font-weight:400;line-height:1.2;color:var(--rds-heading-accent)}.rds-title-4{font-family:var(--rds-font-family-m-headlines);font-size:clamp(1rem,calc(.9464285714rem + .1488095238vw),1.125rem);font-weight:400;line-height:1.2;color:var(--rds-foreground-primary)}.rds-lead{font-family:var(--rds-font-family-lead);font-size:clamp(1rem,calc(.9464285714rem + .1488095238vw),1.125rem);font-weight:400;line-height:1.5;color:var(--rds-foreground-primary)}.rds-body,.rds-span{font-family:var(--rds-font-family-body);font-size:clamp(1rem,calc(.9464285714rem + .1488095238vw),1.125rem);font-weight:400;line-height:1.5;color:var(--rds-foreground-primary)}.rds-sub-body{font-family:var(--rds-font-family-body);font-size:clamp(.875rem,calc(.8214285714rem + .1488095238vw),1rem);font-weight:400;line-height:1.5;color:var(--rds-foreground-primary)}.rds-tag{font-family:var(--rds-font-family-headlines);text-transform:uppercase;font-size:clamp(.75rem,calc(.6964285714rem + .1488095238vw),.875rem);line-height:1.2;font-weight:400;letter-spacing:.09375rem;color:var(--rds-foreground-primary)}.rds-bold,.rds-accordion-details__summary{font-family:var(--rds-font-family-headlines);font-size:clamp(1.125rem,calc(1.125rem + 0vw),1.125rem);font-weight:400;line-height:1.5;color:var(--rds-foreground-primary)}.rds-meta{font-family:var(--rds-font-family-body);font-size:clamp(.75rem,calc(.6964285714rem + .1488095238vw),.875rem);font-weight:400;line-height:1.5;color:var(--rds-foreground-overlay-heavy)}.rds-link--light,.rds-light .rds-link{color:var(--rds-background-primary)}.rds-link--light:hover,.rds-light .rds-link:hover{color:var(--rds-foreground-tertiary)}.rds-link--light:active,.rds-light .rds-link:active{text-shadow:0px 0px 1px var(--rds-background-primary)}.rds-link--light:visited,.rds-light .rds-link:visited{color:var(--rds-background-primary)}.rds-link--light--active,.rds-link--light[aria-current=page],.rds-light [aria-current=page].rds-link{text-shadow:0px 0px 1px var(--rds-background-primary)}.rds-light .rds-display-title,.rds-display-title--light{color:var(--rds-foreground-tertiary)}.rds-light .rds-title-1,.rds-title-1--light,.rds-light .rds-title-2,.rds-title-2--light,.rds-light .rds-title-3,.rds-title-3--light,.rds-light .rds-title-4,.rds-title-4--light,.rds-light .rds-sub-title-2,.rds-sub-title-2--light,.rds-light .rds-lead,.rds-lead--light{color:var(--rds-button-primary-fg)}.rds-light .rds-body,.rds-light .rds-span,.rds-body--light{color:var(--rds-background-primary)}.rds-light .rds-sub-body,.rds-sub-body--light{color:var(--sub-body-color--light)}.rds-light .rds-tag,.rds-tag--light,.rds-light .rds-bold,.rds-light .rds-accordion-details__summary,.rds-bold--light{color:var(--rds-background-primary)}.rds-light .rds-meta,.rds-meta--light{color:var(--rds-button-primary-fg)}@keyframes details-sweep{0%{opacity:0}to{opacity:1}}.rtv{--accordion-border-color: #d9d9d9}.strm{--accordion-border-color: #99b7b9}.rds-accordion-details{--accordion-hover-bg: var(--rds-background-tertiary);--accordion-active-bg: var(--rds-background-card);--accordion-color: var(--rds-foreground-primary);--accordion-shadow: 0px 8px 18px rgba(0, 0, 0, .3);border-radius:var(--rds-roundness--default);transition:125ms ease-in-out;transition-property:box-shadow,background-color;border:1.5px solid var(--accordion-border-color)}@media (hover: hover){.rds-accordion-details[open]:hover,.rds-accordion-details:hover{background-color:var(--accordion-hover-bg);box-shadow:0 8px 18px #0000004d}}.rds-accordion-details[open]:active,.rds-accordion-details:active{background-color:var(--accordion-active-bg)}.rds-accordion-details[open]{--chevron-direction: 180deg;background-color:transparent;overflow:hidden}.rds-accordion-details[open] summary~*{animation:details-sweep .5s ease-in-out forwards}.rds-accordion-details[open] summary~*>*{--toggle-sweep-delay: 0;opacity:0;animation:details-sweep .5s ease-in-out forwards;animation-delay:var(--toggle-sweep-delay)}.rds-accordion-details:not([open]){--chevron-direction: 0;height:fit-content}@media (hover: hover){.rds-accordion-details:not([open]):hover{box-shadow:none}.rds-accordion-details:not([open]):hover .rds-accordion-details__summary{box-shadow:var(--accordion-shadow)}}.rds-accordion-details__summary{transition:125ms ease-in-out box-shadow;border-radius:var(--rds-roundness--default);background-color:transparent;color:var(--accordion-color)!important;cursor:pointer;list-style:none;user-select:none;height:fit-content;display:flex;align-items:center;align-self:center;position:relative;padding-block:clamp(9px,2vw,16px);padding-right:56px;padding-left:16px}.rds-accordion-details__summary:focus::-moz-focus-inner{border-style:none;outline:0}.rds-accordion-details__summary:focus button::-moz-focus-inner,.rds-accordion-details__summary:focus [type=button]::-moz-focus-inner,.rds-accordion-details__summary:focus [type=reset]::-moz-focus-inner,.rds-accordion-details__summary:focus [type=submit]::-moz-focus-inner{border-style:none}.rds-accordion-details__summary:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .rds-accordion-details__summary:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.rds-accordion-details__summary>svg{height:100%;transform:rotate(var(--chevron-direction));transition:transform 125ms ease-in-out;transform-origin:center;position:absolute;right:18px;top:0}.rds-accordion-details__summary>svg>path{fill:var(--accordion-color)}.rds-accordion-details__summary__content{box-sizing:border-box;display:flex;align-items:center;height:100%}.rds-accordion-details__summary::marker,.rds-accordion-details__summary::-webkit-details-marker{display:none}.rds-accordion-details__summary~*{padding-right:32px;padding-left:16px}.rds-accordion-details--light,.rds-light .rds-accordion-details{--accordion-color: var(--rds-background-tertiary);--accordion-hover-bg: #d6ffec;--accordion-active-bg: #bcfbde;--accordion-border-color: #5d8b82;--accordion-shadow: 0px 4px 8px rgba(0, 75, 80, .2)}.rds-accordion-details--white{--accordion-hover-bg: #edfef6}\n")();
5
- const Accordion = ({
6
- initialOpen = true,
7
- children,
8
- heading,
9
- className = "",
10
- lightBackground = false,
11
- ...rest
12
- }) => {
13
- const ref = useRef(null);
14
- useEffect(() => {
15
- if (ref.current) {
16
- ref.current.open = initialOpen;
17
- }
18
- }, [initialOpen]);
19
- return /* @__PURE__ */ jsxs("details", {
20
- ref,
21
- "data-testid": "rds-accordion",
22
- className: `rds-accordion-details ${lightBackground ? "rds-accordion-details--light" : ""} ${lightBackground === "white" ? "rds-accordion-details--white" : ""} ${className}`,
23
- ...rest,
24
- children: [/* @__PURE__ */ jsxs("summary", {
25
- "data-testid": "rds-accordion-summary",
26
- className: "rds-accordion-details__summary",
27
- children: [/* @__PURE__ */ jsx(Chevron, {}), /* @__PURE__ */ jsx("div", {
28
- className: "rds-accordion-details__summary__content",
29
- children: heading
30
- })]
31
- }), children]
32
- });
33
- };
34
- export { Accordion as A };
@@ -1,39 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { S as Span } from "../typography/Typography.js";
3
- import { j as jsx } from "../core/RiksTV.js";
4
- var breadcrumb = /* @__PURE__ */ (() => '.rds-breadcrumb{--rds-crumb-separator: "/"}.rds-breadcrumb__list{list-style:none;padding:0;display:flex;flex-wrap:nowrap}.rds-breadcrumb__list-item{padding-inline-end:var(--rds-spacing--24);position:relative;display:flex;flex-wrap:nowrap;white-space:nowrap}.rds-breadcrumb__list-item:after{content:var(--rds-crumb-separator);position:absolute;right:var(--rds-spacing--8)}.rds-breadcrumb__list-item:last-of-type:after{display:none}@media (max-width: 768px){.rds-breadcrumb__list-item--truncate{display:none}.rds-breadcrumb__list-item--truncate:after{display:none}.rds-breadcrumb__list-item--truncate:first-of-type{display:flex;padding-inline-end:var(--rds-spacing--48)}.rds-breadcrumb__list-item--truncate:first-of-type:after{content:var(--rds-crumb-separator) " ... " var(--rds-crumb-separator);display:initial;position:absolute;right:var(--rds-spacing--8)}.rds-breadcrumb__list-item--truncate:nth-last-child(2){display:flex}}.rds-breadcrumb__current{color:var(--rds-foreground-overlay-heavy)}\n')();
5
- const Breadcrumb = forwardRef(({
6
- className = "",
7
- crumbs,
8
- render,
9
- ...rest
10
- }, ref) => /* @__PURE__ */ jsx("nav", {
11
- className: `rds-breadcrumb ${className}`,
12
- ref,
13
- ...rest,
14
- children: /* @__PURE__ */ jsx(Span, {
15
- children: /* @__PURE__ */ jsx("ol", {
16
- className: "rds-breadcrumb__list",
17
- children: crumbs.map(({
18
- name,
19
- href
20
- }, idx) => {
21
- const isCurrent = idx === crumbs.length - 1;
22
- return /* @__PURE__ */ jsx("li", {
23
- className: `rds-breadcrumb__list-item ${crumbs.length >= 4 ? "rds-breadcrumb__list-item--truncate" : ""}`,
24
- "data-testid": `rds-breadcrumb-${name}`,
25
- "aria-current": isCurrent ? "page" : "false",
26
- children: render(name, href, isCurrent)
27
- }, name);
28
- })
29
- })
30
- })
31
- }));
32
- const BreadcrumbCurrent = ({
33
- children
34
- }) => /* @__PURE__ */ jsx(Span, {
35
- className: "rds-breadcrumb__current",
36
- children
37
- });
38
- Breadcrumb.displayName = "Breadcrumb";
39
- export { Breadcrumb as B, BreadcrumbCurrent as a };
@@ -1,44 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { P as PrimaryDecoratedButton, S as SecondaryDecoratedButton, T as TertiaryDecoratedButton } from "./DecoratedButton.js";
3
- import { A as Arrow } from "../icons/Arrow.js";
4
- import "./Button.js";
5
- import { j as jsx } from "../core/RiksTV.js";
6
- var arrowButton = /* @__PURE__ */ (() => ".rds-arrow-button{--default-arrow-size: 1.125rem;--default-arrow-margin: .75rem;align-items:center}.rds-arrow-button>svg{width:100%}.rds-arrow-button .rds-button__arrow{margin:0;box-sizing:border-box;margin-inline:var(--default-arrow-margin) -6px;height:var(--default-arrow-size);width:var(--default-arrow-size)}.rds-arrow-button .rds-button__arrow>svg{width:100%}.rds-arrow-button--backwards .rds-button__arrow{margin-inline:-6px var(--default-arrow-margin)}.rds-arrow-button--backwards .rds-button__arrow>svg{transform:rotate(180deg)}.rds-arrow-button--forwards{flex-direction:row-reverse}\n")();
7
- const A = () => /* @__PURE__ */ jsx(Arrow, {});
8
- const PrimaryArrowButton = forwardRef(({
9
- forwards = true,
10
- className = "",
11
- ...props
12
- }, ref) => /* @__PURE__ */ jsx(PrimaryDecoratedButton, {
13
- className: `${className} ${forwards ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
14
- arrow: A,
15
- buttonStyle: "rds-arrow-button",
16
- ref,
17
- ...props
18
- }));
19
- PrimaryArrowButton.displayName = "PrimaryArrowButton";
20
- const SecondaryArrowButton = forwardRef(({
21
- forwards = true,
22
- className = "",
23
- ...props
24
- }, ref) => /* @__PURE__ */ jsx(SecondaryDecoratedButton, {
25
- className: `${className} ${forwards ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
26
- arrow: A,
27
- buttonStyle: "rds-arrow-button",
28
- ref,
29
- ...props
30
- }));
31
- SecondaryArrowButton.displayName = "SecondaryArrowButton";
32
- const TertiaryArrowButton = forwardRef(({
33
- forwards = true,
34
- className = "",
35
- ...props
36
- }, ref) => /* @__PURE__ */ jsx(TertiaryDecoratedButton, {
37
- className: `${className} ${forwards ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
38
- arrow: A,
39
- buttonStyle: "rds-arrow-button",
40
- ref,
41
- ...props
42
- }));
43
- TertiaryArrowButton.displayName = "TertiaryArrowButton";
44
- export { PrimaryArrowButton as P, SecondaryArrowButton as S, TertiaryArrowButton as T };
@@ -1,42 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { j as jsx, a as jsxs, F as Fragment } from "../core/RiksTV.js";
3
- const BaseButton = forwardRef(({
4
- children,
5
- buttonType,
6
- buttonStyle,
7
- type = "button",
8
- isLoading = false,
9
- lightBackground = false,
10
- transparent = false,
11
- disabled,
12
- className = "",
13
- "aria-busy": ariaBusy,
14
- icon: Icon,
15
- iconClass = "",
16
- ...rest
17
- }, ref) => /* @__PURE__ */ jsx("button", {
18
- type,
19
- ...rest,
20
- ref,
21
- disabled: isLoading || disabled,
22
- "aria-busy": isLoading || ariaBusy,
23
- className: `
24
- ${buttonStyle}
25
- rds-button__shared
26
- rds-button__shared--${buttonType}
27
- rds-button--${buttonType}
28
- ${isLoading ? "rds-button--loading" : ""}
29
- ${lightBackground ? "rds-light" : ""}
30
- ${lightBackground === "white" ? "rds-white" : ""}
31
- ${transparent ? "rds-transparent" : ""}
32
- ${className}`,
33
- children: /* @__PURE__ */ jsxs(Fragment, {
34
- children: [Icon && /* @__PURE__ */ jsx("span", {
35
- "data-testid": "rds-button__icon",
36
- className: `rds-button__icon ${iconClass}`,
37
- children: /* @__PURE__ */ jsx(Icon, {})
38
- }), children]
39
- })
40
- }));
41
- BaseButton.displayName = "BaseButton";
42
- export { BaseButton as B };
@@ -1,32 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { B as BaseButton } from "./BaseButton.js";
3
- import { j as jsx, a as jsxs, F as Fragment } from "../core/RiksTV.js";
4
- const BaseDecoratedButton = forwardRef(({
5
- children,
6
- buttonStyle,
7
- postfix,
8
- icon: Icon,
9
- arrow: Arrow,
10
- iconClass = "",
11
- ...rest
12
- }, ref) => /* @__PURE__ */ jsx(BaseButton, {
13
- buttonStyle,
14
- ref,
15
- ...rest,
16
- children: /* @__PURE__ */ jsxs(Fragment, {
17
- children: [Icon && /* @__PURE__ */ jsx("span", {
18
- "data-testid": "rds-button__icon",
19
- className: `rds-button__icon ${iconClass}`,
20
- children: /* @__PURE__ */ jsx(Icon, {})
21
- }), Arrow && /* @__PURE__ */ jsx("span", {
22
- "data-testid": "rds-button__arrow",
23
- className: `rds-button__arrow ${iconClass}`,
24
- children: /* @__PURE__ */ jsx(Arrow, {})
25
- }), children, !!postfix && buttonStyle !== "rds-icon-button" && /* @__PURE__ */ jsx("span", {
26
- className: "rds-button__postfix",
27
- children: postfix
28
- })]
29
- })
30
- }));
31
- BaseDecoratedButton.displayName = "BaseDecoratedButton";
32
- export { BaseDecoratedButton as B };
@@ -1,44 +0,0 @@
1
- import { forwardRef } from "react";
2
- import "./Button.js";
3
- import "./ArrowButton.js";
4
- import { A as Arrow } from "../icons/Arrow.js";
5
- import { j as jsx, a as jsxs, F as Fragment } from "../core/RiksTV.js";
6
- var linkButton = /* @__PURE__ */ (() => ".rds-link-button{width:fit-content}.rds-link-button>*{text-decoration:none}\n")();
7
- const A = () => /* @__PURE__ */ jsx(Arrow, {});
8
- const BaseLinkButton = forwardRef(({
9
- element: Element,
10
- variant = "primary",
11
- className = "",
12
- withArrow,
13
- arrowForward,
14
- iconClass = "",
15
- children,
16
- lightBackground,
17
- transparent = false,
18
- ...rest
19
- }, ref) => /* @__PURE__ */ jsx("div", {
20
- className: `rds-link-button ${className}`,
21
- children: /* @__PURE__ */ jsx(Element, {
22
- className: `
23
- rds-button rds-button__shared
24
- rds-button__shared--${variant}
25
- rds-button--${variant}
26
- ${lightBackground ? "rds-light" : ""}
27
- ${lightBackground === "white" ? "rds-white" : ""}
28
- ${transparent ? "rds-transparent" : ""}
29
- ${withArrow ? "rds-arrow-button" : ""}
30
- ${arrowForward === void 0 ? "" : arrowForward ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}
31
- `,
32
- ref,
33
- ...rest,
34
- children: /* @__PURE__ */ jsxs(Fragment, {
35
- children: [withArrow && /* @__PURE__ */ jsx("span", {
36
- "data-testid": "rds-button__arrow",
37
- className: `rds-button__arrow ${iconClass}`,
38
- children: /* @__PURE__ */ jsx(A, {})
39
- }), children]
40
- })
41
- })
42
- }));
43
- BaseLinkButton.displayName = "BaseLinkButton";
44
- export { BaseLinkButton as B };
@@ -1,29 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { B as BaseButton } from "./BaseButton.js";
3
- import { j as jsx } from "../core/RiksTV.js";
4
- import "./LinkButton.js";
5
- import "./BaseLinkButton.js";
6
- var button = /* @__PURE__ */ (() => '.rds-arrow-button,.rds-button{--fluid-block: clamp(.65625rem, 2vw, .78125rem);--fluid-inline: clamp(1rem, 2vw, 1.5rem);padding:var(--fluid-block) var(--fluid-inline);border-radius:var(--rds-roundness--button);overflow-y:hidden;cursor:pointer;font-size:1.125rem}.rds-arrow-button__icon,.rds-button__icon{display:flex;align-items:center;align-self:center;margin-right:var(--rds-spacing--16);width:1.125rem}.rds-arrow-button__icon>svg,.rds-button__icon>svg{width:100%}.rds-arrow-button__postfix,.rds-button__postfix{position:relative;display:flex;align-items:center;margin-left:var(--rds-spacing--16);padding-left:var(--rds-spacing--16)}.rds-arrow-button__postfix:before,.rds-button__postfix:before{content:" ";position:absolute;width:1px;background-color:currentColor;height:220%;left:0}.rds-arrow-button--loading:disabled,.rds-button--loading:disabled{cursor:wait!important;position:relative;overflow:hidden}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.rds-arrow-button--loading:disabled:before,.rds-button--loading:disabled:before{content:"";position:absolute;inset:0;background-color:var(--rds-background-overlay-medium)}.rds-arrow-button--loading:disabled:after,.rds-button--loading:disabled:after{--button-spinner-size: 24px;--button-spinner-width: 3px;--calculated-spinner-size: calc( calc(var(--button-spinner-size) + var(--button-spinner-width) + var(--button-spinner-width)) / 2 );content:"";position:absolute;left:calc(50% - var(--calculated-spinner-size));top:calc(50% - var(--calculated-spinner-size));height:var(--button-spinner-size);width:var(--button-spinner-size);background-color:transparent;border-top:var(--button-spinner-width) solid var(--rds-accent-color-dark);border-left:var(--button-spinner-width) solid var(--rds-accent-color-dark);border-right:var(--button-spinner-width) solid var(--rds-accent-color-dark);border-bottom:var(--button-spinner-width) solid transparent;border-radius:50px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}.rds-arrow-button--loading:disabled:hover,.rds-button--loading:disabled:hover{box-shadow:none}\n')();
7
- var buttonShared = /* @__PURE__ */ (() => ".rds-button__shared{--common-button--primary-color: var(--rds-button-primary-fg);--common-button--primary-bg: var(--rds-accent-color);--common-button--primary-hover-bg: var(--rds-accent-hover);--common-button--primary-pressed-bg: var(--rds-accent-color);--common-button--secondary-border-color: var(--rds-foreground-primary);--common-button--secondary-color: var(--rds-foreground-primary);--common-button--secondary-bg: var(--rds-background-primary);--common-button--secondary-hover-color: var(--rds-background-primary);--common-button--secondary-hover-bg: var(--rds-foreground-primary);--common-button--secondary-pressed-color: var(--rds-button-secondary-pressed-fg);--common-button--secondary-pressed-bg: var(--rds-button-secondary-pressed-bg);--common-button--tertiary-bg: var(--rds-button-tertirary-bg);--common-button--tertiary-color: var(--rds-foreground-primary);--common-button--tertiary-hover-bg: var(--rds-button-tertiary-hover-bg);--common-button--tertiary-hover-color: var(--rds-foreground-primary);--common-button--tertiary-pressed-bg: var(--rds-background-secondary);--common-button--tertiary-pressed-color: var(--rds-foreground-primary);--common-button--disabled-bg: var(--rds-foreground-secondary);--common-button--disabled-color: var(--rds-foreground-tertiary);border:none;width:auto;background:transparent;line-height:normal;-webkit-appearance:none;display:flex;transition:125ms ease-in-out;transition-property:color,box-shadow,background-color;font-family:var(--rds-font-family-m-headlines)}.rds-button__shared::-moz-focus-inner{border:0;padding:0}.rds-button__shared--primary{color:var(--common-button--primary-color);background-color:var(--common-button--primary-bg)}.rds-button__shared--primary:hover{background-color:var(--common-button--primary-hover-bg)}.rds-button__shared--primary:active{box-shadow:none;background-color:var(--common-button--primary-pressed-bg)}.rds-button__shared--secondary{background-color:var(--common-button--secondary-bg);box-shadow:inset 0 0 0 2px var(--common-button--secondary-border-color);color:var(--common-button--secondary-color)}.rds-button__shared--secondary:hover{background-color:var(--common-button--secondary-hover-bg);color:var(--common-button--secondary-hover-color)}.rds-button__shared--secondary:active{background-color:var(--common-button--secondary-pressed-bg);color:var(--common-button--secondary-pressed-color);border-color:var(--common-button--secondary-pressed-bg)}.rds-button__shared--tertiary{background-color:var(--common-button--tertiary-bg);color:var(--common-button--tertiary-color)}.rds-button__shared--tertiary:hover{background-color:var(--common-button--tertiary-hover-bg);color:var(--common-button--tertiary-hover-color)}.rds-button__shared--tertiary:active{background-color:var(--common-button--tertiary-pressed-bg);color:var(--common-button--tertiary-pressed-color)}.rds-button__shared:disabled{background-color:var(--common-button--disabled-bg);color:var(--common-button--disabled-color);box-shadow:none;cursor:not-allowed;border:none}.rds-button__shared:hover{box-shadow:var(--rds-box-shadow--default)}.rds-button__shared:active{box-shadow:none}.rds-button__shared:focus::-moz-focus-inner{border-style:none;outline:0}.rds-button__shared:focus button::-moz-focus-inner,.rds-button__shared:focus [type=button]::-moz-focus-inner,.rds-button__shared:focus [type=reset]::-moz-focus-inner,.rds-button__shared:focus [type=submit]::-moz-focus-inner{border-style:none}.rds-button__shared:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .rds-button__shared:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.rds-light .rds-button__shared--primary,.rds-light.rds-button__shared--primary{--common-button--primary-color: var(--rds-foreground-primary);--common-button--primary-bg: var(--rds-button-primary-fg)}.rds-light .rds-button__shared--primary:hover,.rds-light.rds-button__shared--primary:hover{--common-button--primary-hover-bg: var(--rds-foreground-tertiary)}.rds-light .rds-button__shared--primary:active,.rds-light.rds-button__shared--primary:active{box-shadow:none;--common-button--primary-pressed-bg: var(--rds-background-primary)}.rds-light .rds-button__shared--primary:disabled,.rds-light.rds-button__shared--primary:disabled{--common-button--disabled-color: var(--rds-button-tertiary-hover-bg)}.rds-light .rds-button__shared--secondary,.rds-light.rds-button__shared--secondary{--common-button--secondary-color: var(--rds-button-tertiary-hover-bg);--common-button--secondary-border-color: var(--rds-button-tertiary-hover-bg);--common-button--secondary-bg: var(--surface-background)}.rds-light .rds-button__shared--secondary:hover,.rds-light.rds-button__shared--secondary:hover{--common-button--secondary-hover-bg: var(--rds-button-primary-fg);--common-button--secondary-hover-color: var(--rds-foreground-primary)}.rds-light .rds-button__shared--secondary:active,.rds-light.rds-button__shared--secondary:active{--common-button--secondary-pressed-color: var(--rds-foreground-primary);--common-button--secondary-pressed-bg: var(--rds-button-primary-fg)}.rds-light .rds-button__shared--secondary:disabled,.rds-light.rds-button__shared--secondary:disabled{--common-button--disabled-color: var(--rds-button-primary-fg)}.rds-light.rds-white.rds-button__shared--secondary{--common-button--secondary-bg: var(--rds-foreground-primary)}.rds-transparent.rds-button__shared--secondary{--common-button--secondary-bg: transparent}\n")();
8
- const PrimaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, {
9
- buttonStyle: "rds-button",
10
- buttonType: "primary",
11
- ref,
12
- ...props
13
- }));
14
- PrimaryButton.displayName = "PrimaryButton";
15
- const SecondaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, {
16
- buttonStyle: "rds-button",
17
- buttonType: "secondary",
18
- ref,
19
- ...props
20
- }));
21
- SecondaryButton.displayName = "SecondaryButton";
22
- const TertiaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, {
23
- buttonStyle: "rds-button",
24
- buttonType: "tertiary",
25
- ref,
26
- ...props
27
- }));
28
- TertiaryButton.displayName = "TertiaryButton";
29
- export { PrimaryButton as P, SecondaryButton as S, TertiaryButton as T };
@@ -1,23 +0,0 @@
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,24 +0,0 @@
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 };
@@ -1,10 +0,0 @@
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 };
@@ -1,35 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { g as generateId } from "../textfield/TextField.js";
3
- import { a as jsxs, j as jsx } from "../core/RiksTV.js";
4
- const BaseCheckbox = forwardRef(({
5
- containerClassName = "",
6
- inputClassName = "",
7
- labelClassName = "",
8
- dataTestId = "rds-checkbox__label",
9
- id,
10
- hasError,
11
- style,
12
- children,
13
- ...props
14
- }, ref) => {
15
- const internalId = generateId(id);
16
- return /* @__PURE__ */ jsxs("div", {
17
- style,
18
- className: containerClassName,
19
- children: [/* @__PURE__ */ jsx("input", {
20
- ref,
21
- className: inputClassName,
22
- id: internalId,
23
- type: "checkbox",
24
- "aria-invalid": hasError,
25
- ...props
26
- }), /* @__PURE__ */ jsx("label", {
27
- "data-testid": dataTestId,
28
- htmlFor: internalId,
29
- className: labelClassName,
30
- children
31
- })]
32
- });
33
- });
34
- BaseCheckbox.displayName = "BaseCheckbox";
35
- export { BaseCheckbox as B };
@@ -1,26 +0,0 @@
1
- import { forwardRef } from "react";
2
- import { B as BaseCheckbox } from "./BaseCheckbox.js";
3
- import { j as jsx } from "../core/RiksTV.js";
4
- 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')();
5
- const Checkbox = forwardRef(({
6
- className = "",
7
- id,
8
- lightBackground,
9
- hasError,
10
- style,
11
- children,
12
- ...props
13
- }, ref) => {
14
- return /* @__PURE__ */ jsx(BaseCheckbox, {
15
- style,
16
- id,
17
- ref,
18
- containerClassName: `rds-form-group-box ${className} ${hasError ? "rds-form-group-box--error" : ""}`,
19
- inputClassName: `rds-checkbox rds-checkbox__input ${lightBackground ? "rds-light" : ""}`,
20
- labelClassName: "rds-checkbox__label",
21
- ...props,
22
- children
23
- });
24
- });
25
- Checkbox.displayName = "Checkbox";
26
- export { Checkbox as C };
@@ -1,76 +0,0 @@
1
- import { j as jsx } from "./RiksTV.js";
2
- let mousenavigation = false;
3
- let touchnavigation = false;
4
- let touchEventFired = false;
5
- const listeners = {
6
- mousedown: handleMouseDown,
7
- keydown: handleKeydown,
8
- touchstart: handleTouchStart
9
- };
10
- function removeAllListeners() {
11
- Object.keys(listeners).forEach((listenerType) => {
12
- document.removeEventListener(listenerType, listeners[listenerType]);
13
- });
14
- }
15
- function addListener(listenerType) {
16
- document.addEventListener(listenerType, listeners[listenerType]);
17
- }
18
- function handleMouseDown() {
19
- if (!mousenavigation && !touchEventFired) {
20
- mousenavigation = true;
21
- touchnavigation = false;
22
- const htmlElement = document.querySelector("html");
23
- htmlElement == null ? void 0 : htmlElement.setAttribute("data-mousenavigation", "true");
24
- htmlElement == null ? void 0 : htmlElement.removeAttribute("data-touchnavigation");
25
- removeAllListeners();
26
- addListener("touchstart");
27
- addListener("keydown");
28
- }
29
- }
30
- function handleKeydown(event) {
31
- if (event.key === "Tab") {
32
- const htmlElement = document.querySelector("html");
33
- removeAllListeners();
34
- htmlElement == null ? void 0 : htmlElement.removeAttribute("data-mousenavigation");
35
- htmlElement == null ? void 0 : htmlElement.removeAttribute("data-touchnavigation");
36
- mousenavigation = false;
37
- touchnavigation = false;
38
- addListener("touchstart");
39
- addListener("mousedown");
40
- }
41
- }
42
- function handleTouchStart() {
43
- if (!touchnavigation) {
44
- mousenavigation = false;
45
- touchnavigation = true;
46
- const htmlElement = document.querySelector("html");
47
- htmlElement == null ? void 0 : htmlElement.setAttribute("data-touchnavigation", "true");
48
- htmlElement == null ? void 0 : htmlElement.removeAttribute("data-mousenavigation");
49
- removeAllListeners();
50
- addListener("touchstart");
51
- addListener("keydown");
52
- addListener("mousedown");
53
- }
54
- touchEventFired = true;
55
- setTimeout(() => {
56
- touchEventFired = false;
57
- }, 150);
58
- }
59
- function detectUserInputMethod() {
60
- if (typeof document !== "undefined") {
61
- addListener("touchstart");
62
- addListener("mousedown");
63
- }
64
- }
65
- detectUserInputMethod();
66
- const Core = ({
67
- brand,
68
- children
69
- }) => {
70
- return /* @__PURE__ */ jsx("div", {
71
- "data-testid": "core-entry",
72
- className: brand,
73
- children
74
- });
75
- };
76
- export { Core as C };
@@ -1,14 +0,0 @@
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 };
@@ -1,43 +0,0 @@
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
- * @license React
7
- * react-jsx-runtime.production.min.js
8
- *
9
- * Copyright (c) Facebook, Inc. and its affiliates.
10
- *
11
- * This source code is licensed under the MIT license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- */
14
- var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
15
- function q(c, a, g) {
16
- var b, d = {}, e = null, h = null;
17
- g !== void 0 && (e = "" + g);
18
- a.key !== void 0 && (e = "" + a.key);
19
- a.ref !== void 0 && (h = a.ref);
20
- for (b in a)
21
- m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
22
- if (c && c.defaultProps)
23
- for (b in a = c.defaultProps, a)
24
- d[b] === void 0 && (d[b] = a[b]);
25
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
26
- }
27
- reactJsxRuntime_production_min.Fragment = l;
28
- reactJsxRuntime_production_min.jsx = q;
29
- reactJsxRuntime_production_min.jsxs = q;
30
- {
31
- jsxRuntime.exports = reactJsxRuntime_production_min;
32
- }
33
- const jsx = jsxRuntime.exports.jsx;
34
- const jsxs = jsxRuntime.exports.jsxs;
35
- const Fragment = jsxRuntime.exports.Fragment;
36
- 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--40: 2.5rem;--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}.with-keyboard-focus-within:focus::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus-within:focus button::-moz-focus-inner,.with-keyboard-focus-within:focus [type=button]::-moz-focus-inner,.with-keyboard-focus-within:focus [type=reset]::-moz-focus-inner,.with-keyboard-focus-within:focus [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus-within:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus-within:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.with-keyboard-focus-within:focus-within::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus-within:focus-within button::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=button]::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=reset]::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus-within:focus-within input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus-within:focus-within{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:HALMatexLight;src:url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Light.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Light.woff) format("woff");font-weight:400;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-background-primary--heavy: #252525b3;--rds-background-primary--medium: #25252580;--rds-background-primary--very-heavy: #252525e6;--rds-foreground-overlay-soft: #ffffff1a;--rds-foreground-overlay-medium: #ffffff4d;--rds-foreground-overlay-heavy: #ffffffb3;--rds-foreground-overlay-dark-soft: #ffffff;--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-roundness--image: 8px;--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-lead: "AvertaSemibold", 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')();
37
- const RiksTVProvider = ({
38
- children
39
- }) => /* @__PURE__ */ jsx(Core, {
40
- brand: "rtv",
41
- children
42
- });
43
- export { Fragment as F, RiksTVProvider as R, jsxs as a, jsx as j };
@@ -1,10 +0,0 @@
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--40: 2.5rem;--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}.with-keyboard-focus-within:focus::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus-within:focus button::-moz-focus-inner,.with-keyboard-focus-within:focus [type=button]::-moz-focus-inner,.with-keyboard-focus-within:focus [type=reset]::-moz-focus-inner,.with-keyboard-focus-within:focus [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus-within:focus input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus-within:focus{outline-offset:2px;outline:2px solid var(--rds-feedback-info);transition:outline-offset .25s ease}.with-keyboard-focus-within:focus-within::-moz-focus-inner{border-style:none;outline:0}.with-keyboard-focus-within:focus-within button::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=button]::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=reset]::-moz-focus-inner,.with-keyboard-focus-within:focus-within [type=submit]::-moz-focus-inner{border-style:none}.with-keyboard-focus-within:focus-within input[type=button]::-moz-focus-inner{outline:0}html:not([data-mousenavigation]):not([data-touchnavigation]) .with-keyboard-focus-within:focus-within{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:HALMatexLight;src:url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Light.woff2) format("woff2"),url(https://static.rikstv.no/strim/fonts/HALMatexStrim-Light.woff) format("woff");font-weight:400;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-background-primary--heavy: #002a2ab3;--rds-background-primary--medium: #002a2a80;--rds-background-primary--very-heavy: #002a2ae6;--rds-foreground-overlay-soft: #ffffff1a;--rds-foreground-overlay-medium: #ffffff4d;--rds-foreground-overlay-heavy: #ffffffb3;--rds-foreground-overlay-dark-soft: #004b501a;--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-roundness--image: 8px;--rds-font-family-lg-headlines: "HALMatex", "system-ui", sans-serif;--rds-font-family-lead: "HALMatexLight", "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 };