@rikstv/shared-components 0.6.4 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/Accordion.css +1 -0
- package/dist/accordion/Accordion.d.ts +10 -0
- package/dist/accordion/Accordion.js +73 -0
- package/dist/accordion/accordion.scss +126 -0
- package/dist/button/BaseButton.d.ts +1 -0
- package/dist/button/BaseButton.js +80 -1
- package/dist/button/Button.css +1 -1
- package/dist/button/Button.js +40 -1
- package/dist/button/IconButton.js +40 -1
- package/dist/button/button-shared.scss +44 -0
- package/dist/core/Core.js +76 -1
- package/dist/core/LightMode.js +50 -1
- package/dist/core/RiksTV.css +1 -1
- package/dist/core/RiksTV.js +107 -2
- package/dist/core/Strim.css +1 -1
- package/dist/core/Strim.js +10 -1
- package/dist/core/rtv.scss +5 -1
- package/dist/core/strm.scss +12 -6
- package/dist/core/utils/generateId.d.ts +1 -0
- package/dist/icons/Chevron.d.ts +2 -0
- package/dist/icons/Chevron.js +16 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/shared-components.es.js +100 -1
- package/dist/textfield/TextField.d.ts +13 -0
- package/dist/textfield/textfield.scss +101 -0
- package/dist/toggle/FieldSet.js +66 -1
- package/dist/toggle/RadioToggle.css +1 -1
- package/dist/toggle/RadioToggle.js +65 -1
- package/dist/toggle/radioToggle.scss +7 -2
- package/dist/toggleButton/ToggleButton.css +1 -1
- package/dist/toggleButton/ToggleButton.js +106 -1
- package/dist/typography/Typography.css +1 -1
- package/dist/typography/Typography.js +95 -1
- package/dist/typography/typography.scss +9 -2
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.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:normal;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:normal;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:normal;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:normal;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:normal;line-height:1.2;color:var(--rds-foreground-primary)}.rds-body{font-family:var(--rds-font-family-body);font-size:clamp(1rem,calc(.9464285714rem + .1488095238vw),1.125rem);font-weight:normal;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:normal;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:normal;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:normal;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:normal;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{color:var(--rds-foreground-tertiary)}.rds-display-title--light{color:var(--rds-foreground-tertiary)}.rds-light .rds-title-1{color:var(--rds-button-primary-fg)}.rds-title-1--light{color:var(--rds-button-primary-fg)}.rds-light .rds-title-2{color:var(--rds-button-primary-fg)}.rds-title-2--light{color:var(--rds-button-primary-fg)}.rds-light .rds-title-3{color:var(--rds-button-primary-fg)}.rds-title-3--light{color:var(--rds-button-primary-fg)}.rds-light .rds-title-4{color:var(--rds-button-primary-fg)}.rds-title-4--light{color:var(--rds-button-primary-fg)}.rds-light .rds-body{color:var(--rds-background-primary)}.rds-body--light{color:var(--rds-background-primary)}.rds-light .rds-sub-body{color:var(--rds-button-primary-fg)}.rds-sub-body--light{color:var(--rds-button-primary-fg)}.rds-light .rds-tag{color:var(--rds-background-primary)}.rds-tag--light{color:var(--rds-background-primary)}.rds-light .rds-bold,.rds-light .rds-accordion-details__summary{color:var(--rds-background-primary)}.rds-bold--light{color:var(--rds-background-primary)}.rds-light .rds-meta{color:var(--rds-button-primary-fg)}.rds-meta--light{color:var(--rds-button-primary-fg)}@keyframes details-sweep{0%{opacity:0}to{opacity:1}}.rds-accordion-details{border-radius:var(--rds-roundness--default);transition:125ms ease-in-out box-shadow}.rds-accordion-details:hover{box-shadow:0 8px 18px #0000004d}.rds-accordion-details[open]{--chevron-direction: 180deg;background-color:var(--rds-foreground-solid-soft);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[open]:hover{box-shadow:0 8px 18px #0000004d}.rds-accordion-details:not([open]){--chevron-direction: 0}.rds-accordion-details:not([open]):hover{box-shadow:none}.rds-accordion-details:not([open]):hover .rds-accordion-details__summary{box-shadow:0 8px 18px #0000004d}.rds-accordion-details__summary{transition:125ms ease-in-out box-shadow;border-radius:var(--rds-roundness--default);background-color:var(--rds-foreground-solid-soft);color:var(--rds-foreground-primary)!important;cursor:pointer;list-style:none;user-select:none;height:3rem;display:flex;align-items:center;align-self:center;position:relative;padding:8px 32px 8px 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(--rds-foreground-primary)}.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:0 32px 16px 16px}.rds-accordion-details--left>summary{padding:8px 32px 8px 64px}.rds-accordion-details--left>summary>svg{right:initial;left:18px}.rds-accordion-details--hide-default-text>summary{max-width:100%;height:100%;background-color:transparent;margin-bottom:0}.rds-accordion-details--light[open],.rds-light [open].rds-accordion-details{background-color:var(--rds-surface-foreground)}.rds-accordion-details--light .rds-accordion-details__summary,.rds-light .rds-accordion-details .rds-accordion-details__summary{background-color:var(--rds-surface-foreground)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DetailedHTMLProps, FC, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./accordion.scss";
|
|
3
|
+
interface Props extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
heading: ReactNode;
|
|
5
|
+
initialOpen?: boolean;
|
|
6
|
+
alignChevronLeft?: boolean;
|
|
7
|
+
lightBackground?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const Accordion: FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { useRef, useEffect } from "react";
|
|
33
|
+
import { C as Chevron } from "../icons/Chevron.js";
|
|
34
|
+
import { a as jsxs, j as jsx } from "../core/RiksTV.js";
|
|
35
|
+
var accordion = "";
|
|
36
|
+
const Accordion = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
initialOpen = true,
|
|
39
|
+
children,
|
|
40
|
+
heading,
|
|
41
|
+
className = "",
|
|
42
|
+
alignChevronLeft = false,
|
|
43
|
+
lightBackground = false
|
|
44
|
+
} = _b, rest = __objRest(_b, [
|
|
45
|
+
"initialOpen",
|
|
46
|
+
"children",
|
|
47
|
+
"heading",
|
|
48
|
+
"className",
|
|
49
|
+
"alignChevronLeft",
|
|
50
|
+
"lightBackground"
|
|
51
|
+
]);
|
|
52
|
+
const ref = useRef(null);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (ref.current) {
|
|
55
|
+
ref.current.open = initialOpen;
|
|
56
|
+
}
|
|
57
|
+
}, [initialOpen]);
|
|
58
|
+
return /* @__PURE__ */ jsxs("details", __spreadProps(__spreadValues({
|
|
59
|
+
ref,
|
|
60
|
+
"data-testid": "rds-accordion",
|
|
61
|
+
className: `rds-accordion-details ${lightBackground ? "rds-accordion-details--light" : ""} ${alignChevronLeft ? "rds-accordion-details--left" : ""} ${className}`
|
|
62
|
+
}, rest), {
|
|
63
|
+
children: [/* @__PURE__ */ jsxs("summary", {
|
|
64
|
+
"data-testid": "rds-accordion-summary",
|
|
65
|
+
className: "rds-accordion-details__summary",
|
|
66
|
+
children: [/* @__PURE__ */ jsx(Chevron, {}), /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "rds-accordion-details__summary__content",
|
|
68
|
+
children: heading
|
|
69
|
+
})]
|
|
70
|
+
}), children]
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
export { Accordion as A };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@use "../typography/typography.scss";
|
|
2
|
+
@use "../core/mixin/focus.scss";
|
|
3
|
+
|
|
4
|
+
@keyframes details-sweep {
|
|
5
|
+
0% {
|
|
6
|
+
opacity: 0;
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rds-accordion-details {
|
|
14
|
+
border-radius: var(--rds-roundness--default);
|
|
15
|
+
transition: 125ms ease-in-out box-shadow;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.3);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&[open] {
|
|
22
|
+
--chevron-direction: 180deg;
|
|
23
|
+
background-color: var(--rds-foreground-solid-soft);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
|
|
26
|
+
& summary ~ * {
|
|
27
|
+
animation: details-sweep 0.5s ease-in-out forwards;
|
|
28
|
+
& > * {
|
|
29
|
+
--toggle-sweep-delay: 0;
|
|
30
|
+
opacity: 0;
|
|
31
|
+
animation: details-sweep 0.5s ease-in-out forwards;
|
|
32
|
+
animation-delay: var(--toggle-sweep-delay);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&:hover {
|
|
36
|
+
box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.3);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:not([open]) {
|
|
41
|
+
--chevron-direction: 0;
|
|
42
|
+
&:hover {
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
.rds-accordion-details__summary {
|
|
45
|
+
box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.3);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__summary {
|
|
51
|
+
@include focus.with-keyboard-focus();
|
|
52
|
+
@extend .rds-bold;
|
|
53
|
+
transition: 125ms ease-in-out box-shadow;
|
|
54
|
+
border-radius: var(--rds-roundness--default);
|
|
55
|
+
background-color: var(--rds-foreground-solid-soft);
|
|
56
|
+
color: var(--rds-foreground-primary) !important;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
list-style: none;
|
|
59
|
+
user-select: none;
|
|
60
|
+
height: 3rem;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
align-self: center;
|
|
64
|
+
position: relative;
|
|
65
|
+
padding: 8px 32px 8px 16px;
|
|
66
|
+
|
|
67
|
+
& > svg {
|
|
68
|
+
height: 100%;
|
|
69
|
+
& > path {
|
|
70
|
+
fill: var(--rds-foreground-primary);
|
|
71
|
+
}
|
|
72
|
+
transform: rotate(var(--chevron-direction));
|
|
73
|
+
transition: transform 125ms ease-in-out;
|
|
74
|
+
transform-origin: center;
|
|
75
|
+
position: absolute;
|
|
76
|
+
right: 18px;
|
|
77
|
+
top: 0;
|
|
78
|
+
}
|
|
79
|
+
&__content {
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
height: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&::marker,
|
|
87
|
+
&::-webkit-details-marker {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
& ~ * {
|
|
92
|
+
padding: 0px 32px 16px 16px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&--left > summary {
|
|
97
|
+
padding: 8px 32px 8px 64px;
|
|
98
|
+
|
|
99
|
+
& > svg {
|
|
100
|
+
right: initial;
|
|
101
|
+
left: 18px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--hide-default-text > summary {
|
|
106
|
+
max-width: 100%;
|
|
107
|
+
height: 100%;
|
|
108
|
+
background-color: transparent;
|
|
109
|
+
margin-bottom: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.rds-accordion-details--light {
|
|
114
|
+
&[open] {
|
|
115
|
+
background-color: var(--rds-surface-foreground);
|
|
116
|
+
}
|
|
117
|
+
.rds-accordion-details__summary {
|
|
118
|
+
background-color: var(--rds-surface-foreground);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.rds-light {
|
|
123
|
+
.rds-accordion-details {
|
|
124
|
+
@extend .rds-accordion-details--light;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -5,6 +5,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
5
5
|
icon?: () => JSX.Element;
|
|
6
6
|
className?: string;
|
|
7
7
|
iconClass?: string;
|
|
8
|
+
lightBackground?: boolean;
|
|
8
9
|
}
|
|
9
10
|
interface BaseButtonProps extends ButtonProps {
|
|
10
11
|
buttonType: "primary" | "secondary" | "tertiary";
|
|
@@ -1 +1,80 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { forwardRef } from "react";
|
|
33
|
+
import { a as jsxs, j as jsx } from "../core/RiksTV.js";
|
|
34
|
+
const BaseButton = forwardRef((_a, ref) => {
|
|
35
|
+
var _b = _a, {
|
|
36
|
+
children,
|
|
37
|
+
buttonType,
|
|
38
|
+
buttonStyle,
|
|
39
|
+
type = "button",
|
|
40
|
+
isLoading = false,
|
|
41
|
+
postfix,
|
|
42
|
+
icon: Icon,
|
|
43
|
+
iconClass = "",
|
|
44
|
+
lightBackground = false,
|
|
45
|
+
disabled,
|
|
46
|
+
className = "",
|
|
47
|
+
"aria-busy": ariaBusy
|
|
48
|
+
} = _b, rest = __objRest(_b, [
|
|
49
|
+
"children",
|
|
50
|
+
"buttonType",
|
|
51
|
+
"buttonStyle",
|
|
52
|
+
"type",
|
|
53
|
+
"isLoading",
|
|
54
|
+
"postfix",
|
|
55
|
+
"icon",
|
|
56
|
+
"iconClass",
|
|
57
|
+
"lightBackground",
|
|
58
|
+
"disabled",
|
|
59
|
+
"className",
|
|
60
|
+
"aria-busy"
|
|
61
|
+
]);
|
|
62
|
+
return /* @__PURE__ */ jsxs("button", __spreadProps(__spreadValues({
|
|
63
|
+
type
|
|
64
|
+
}, rest), {
|
|
65
|
+
ref,
|
|
66
|
+
disabled: isLoading || disabled,
|
|
67
|
+
"aria-busy": isLoading || ariaBusy,
|
|
68
|
+
className: `${buttonStyle} rds-button__shared rds-button__shared--${buttonType} rds-button--${buttonType} ${isLoading ? "rds-button--loading" : ""} ${lightBackground ? "rds-light" : ""} ${className}`,
|
|
69
|
+
children: [Icon && /* @__PURE__ */ jsx("span", {
|
|
70
|
+
"data-testid": "rds-button__icon",
|
|
71
|
+
className: `rds-button__icon ${iconClass}`,
|
|
72
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
73
|
+
}), children, !!postfix && buttonStyle !== "rds-icon-button" && /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "rds-button__postfix",
|
|
75
|
+
children: postfix
|
|
76
|
+
})]
|
|
77
|
+
}));
|
|
78
|
+
});
|
|
79
|
+
BaseButton.displayName = "BaseButton";
|
|
80
|
+
export { BaseButton as B };
|
package/dist/button/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rds-button{padding:.78125rem var(--rds-spacing--32);border-radius:var(--rds-roundness--button);overflow-y:hidden;cursor:pointer;font-size:1.125rem}.rds-button__icon{display:flex;align-items:center;align-self:center;margin-right:var(--rds-spacing--16);width:1.125rem}.rds-button__icon>svg{width:100%}.rds-button__postfix{position:relative;display:flex;align-items:center;margin-left:var(--rds-spacing--16);padding-left:var(--rds-spacing--16)}.rds-button__postfix:before{content:" ";position:absolute;width:1px;background-color:currentColor;height:200%;left:0}.rds-button--loading:disabled{cursor:wait!important}.rds-button--loading:disabled:hover{box-shadow:none}.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-tertiary);--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);border:2px solid 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}
|
|
1
|
+
.rds-button{padding:.78125rem var(--rds-spacing--32);border-radius:var(--rds-roundness--button);overflow-y:hidden;cursor:pointer;font-size:1.125rem}.rds-button__icon{display:flex;align-items:center;align-self:center;margin-right:var(--rds-spacing--16);width:1.125rem}.rds-button__icon>svg{width:100%}.rds-button__postfix{position:relative;display:flex;align-items:center;margin-left:var(--rds-spacing--16);padding-left:var(--rds-spacing--16)}.rds-button__postfix:before{content:" ";position:absolute;width:1px;background-color:currentColor;height:200%;left:0}.rds-button--loading:disabled{cursor:wait!important}.rds-button--loading:disabled:hover{box-shadow:none}.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-tertiary);--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);border:2px solid 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)}
|
package/dist/button/Button.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import { forwardRef } from "react";
|
|
18
|
+
import { B as BaseButton } from "./BaseButton.js";
|
|
19
|
+
import { j as jsx } from "../core/RiksTV.js";
|
|
20
|
+
var button = "";
|
|
21
|
+
var buttonShared = "";
|
|
22
|
+
const PrimaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
23
|
+
buttonStyle: "rds-button",
|
|
24
|
+
buttonType: "primary",
|
|
25
|
+
ref
|
|
26
|
+
}, props)));
|
|
27
|
+
PrimaryButton.displayName = "PrimaryButton";
|
|
28
|
+
const SecondaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
29
|
+
buttonStyle: "rds-button",
|
|
30
|
+
buttonType: "secondary",
|
|
31
|
+
ref
|
|
32
|
+
}, props)));
|
|
33
|
+
SecondaryButton.displayName = "SecondaryButton";
|
|
34
|
+
const TertiaryButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
35
|
+
buttonStyle: "rds-button",
|
|
36
|
+
buttonType: "tertiary",
|
|
37
|
+
ref
|
|
38
|
+
}, props)));
|
|
39
|
+
TertiaryButton.displayName = "TertiaryButton";
|
|
40
|
+
export { PrimaryButton as P, SecondaryButton as S, TertiaryButton as T };
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import { forwardRef } from "react";
|
|
18
|
+
import { B as BaseButton } from "./BaseButton.js";
|
|
19
|
+
import "./Button.js";
|
|
20
|
+
import { j as jsx } from "../core/RiksTV.js";
|
|
21
|
+
var iconButton = "";
|
|
22
|
+
const PrimaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
23
|
+
buttonStyle: "rds-icon-button",
|
|
24
|
+
buttonType: "primary",
|
|
25
|
+
ref
|
|
26
|
+
}, props)));
|
|
27
|
+
PrimaryIconButton.displayName = "PrimaryIconButton";
|
|
28
|
+
const SecondaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
29
|
+
buttonStyle: "rds-icon-button",
|
|
30
|
+
buttonType: "secondary",
|
|
31
|
+
ref
|
|
32
|
+
}, props)));
|
|
33
|
+
SecondaryIconButton.displayName = "SecondaryIconButton";
|
|
34
|
+
const TertiaryIconButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseButton, __spreadValues({
|
|
35
|
+
buttonStyle: "rds-icon-button",
|
|
36
|
+
buttonType: "tertiary",
|
|
37
|
+
ref
|
|
38
|
+
}, props)));
|
|
39
|
+
TertiaryIconButton.displayName = "TertiaryIconButton";
|
|
40
|
+
export { PrimaryIconButton as P, SecondaryIconButton as S, TertiaryIconButton as T };
|
|
@@ -110,3 +110,47 @@
|
|
|
110
110
|
|
|
111
111
|
@include mix.with-keyboard-focus;
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
.rds-light {
|
|
115
|
+
.rds-button__shared--primary,
|
|
116
|
+
&.rds-button__shared--primary {
|
|
117
|
+
--common-button--primary-color: var(--rds-foreground-primary);
|
|
118
|
+
--common-button--primary-bg: var(--rds-button-primary-fg);
|
|
119
|
+
|
|
120
|
+
&:hover {
|
|
121
|
+
--common-button--primary-hover-bg: var(--rds-foreground-tertiary);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:active {
|
|
125
|
+
box-shadow: none;
|
|
126
|
+
--common-button--primary-pressed-bg: var(--rds-background-primary);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:disabled {
|
|
130
|
+
--common-button--disabled-color: var(--rds-button-tertiary-hover-bg);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.rds-light {
|
|
136
|
+
.rds-button__shared--secondary,
|
|
137
|
+
&.rds-button__shared--secondary {
|
|
138
|
+
--common-button--secondary-color: var(--rds-button-tertiary-hover-bg);
|
|
139
|
+
--common-button--secondary-border-color: var(--rds-button-tertiary-hover-bg);
|
|
140
|
+
--common-button--secondary-bg: var(--surface-background);
|
|
141
|
+
|
|
142
|
+
&:hover {
|
|
143
|
+
--common-button--secondary-hover-bg: var(--rds-button-primary-fg);
|
|
144
|
+
--common-button--secondary-hover-color: var(--rds-foreground-primary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:active {
|
|
148
|
+
--common-button--secondary-pressed-color: var(--rds-foreground-primary);
|
|
149
|
+
--common-button--secondary-pressed-bg: var(--rds-button-primary-fg);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:disabled {
|
|
153
|
+
--common-button--disabled-color: var(--rds-button-primary-fg);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
package/dist/core/Core.js
CHANGED
|
@@ -1 +1,76 @@
|
|
|
1
|
-
import{j as
|
|
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 };
|
package/dist/core/LightMode.js
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { forwardRef } from "react";
|
|
33
|
+
import { j as jsx } from "./RiksTV.js";
|
|
34
|
+
const LightMode = forwardRef((_a, ref) => {
|
|
35
|
+
var _b = _a, {
|
|
36
|
+
children,
|
|
37
|
+
className = ""
|
|
38
|
+
} = _b, props = __objRest(_b, [
|
|
39
|
+
"children",
|
|
40
|
+
"className"
|
|
41
|
+
]);
|
|
42
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
43
|
+
ref,
|
|
44
|
+
className: `rds-light ${className}`
|
|
45
|
+
}, props), {
|
|
46
|
+
children
|
|
47
|
+
}));
|
|
48
|
+
});
|
|
49
|
+
LightMode.displayName = "LightMode";
|
|
50
|
+
export { LightMode as L };
|
package/dist/core/RiksTV.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
: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)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.rtv{--rds-button-primary-fg: #fff;--rds-button-secondary-pressed-fg: #666666;--rds-button-secondary-pressed-bg: #fff;--rds-button-tertirary-bg: #3b3b3b;--rds-button-tertiary-hover-bg: #434343;--rds-accent-color: #ee4642;--rds-accent-color-mid: #ed302b;--rds-accent-color-dark: #d41612;--rds-accent-hover: #d41612;--rds-foreground-primary: #fff;--rds-foreground-secondary: #a8a8a8;--rds-foreground-tertiary: #666;--rds-heading-accent: var(--rds-foreground-primary);--rds-background-primary-rgb: 37, 37, 37;--rds-background-primary: rgb(var(--rds-background-primary-rgb));--rds-background-secondary: #434343;--rds-background-tertiary: #0b0b0b;--rds-foreground-overlay-soft: rgba(255, 255, 255, .1);--rds-foreground-overlay-medium: rgba(255, 255, 255, .3);--rds-foreground-overlay-heavy: rgba(255, 255, 255, .7);--rds-background-overlay-soft: rgba(0, 0, 0, .1);--rds-background-overlay-medium: rgba(0, 0, 0, .5);--rds-background-overlay-heavy: rgba(0, 0, 0, .85);--rds-feedback-info: #00aec7;--rds-feedback-warning: #f2a900;--rds-feedback-confirm: #4cbb81;--rds-feedback-error: #e01c17;--rds-roundness--default: 4px;--rds-roundness--button: 34px;--rds-roundness--round: 50%;--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}
|
|
1
|
+
: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)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.rtv{--rds-button-primary-fg: #fff;--rds-button-secondary-pressed-fg: #666666;--rds-button-secondary-pressed-bg: #fff;--rds-button-tertirary-bg: #3b3b3b;--rds-button-tertiary-hover-bg: #434343;--rds-accent-color: #ee4642;--rds-accent-color-mid: #ed302b;--rds-accent-color-dark: #d41612;--rds-accent-hover: #d41612;--rds-foreground-primary: #fff;--rds-foreground-secondary: #a8a8a8;--rds-foreground-tertiary: #666;--rds-heading-accent: var(--rds-foreground-primary);--rds-background-primary-rgb: 37, 37, 37;--rds-background-primary: rgb(var(--rds-background-primary-rgb));--rds-background-secondary: #434343;--rds-background-tertiary: #0b0b0b;--rds-foreground-overlay-soft: rgba(255, 255, 255, .1);--rds-foreground-overlay-medium: rgba(255, 255, 255, .3);--rds-foreground-overlay-heavy: rgba(255, 255, 255, .7);--rds-foreground-solid-soft: #3c3c3c;--rds-surface-foreground: #434343;--rds-background-overlay-soft: rgba(0, 0, 0, .1);--rds-background-overlay-medium: rgba(0, 0, 0, .5);--rds-background-overlay-heavy: rgba(0, 0, 0, .85);--rds-feedback-info: #00aec7;--rds-feedback-warning: #f2a900;--rds-feedback-confirm: #4cbb81;--rds-feedback-error: #e01c17;--rds-roundness--default: 4px;--rds-roundness--button: 34px;--rds-roundness--round: 50%;--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}
|