@rikstv/shared-components 3.0.16 → 3.0.18

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.
@@ -5,6 +5,10 @@ import { HTMLAttributes, ReactElement } from "react";
5
5
  * intents include: `"warning", "error", "success", "info"`
6
6
  *
7
7
  * variants include: `"filled", "translucent", "inline"`
8
+ *
9
+ * Dismiss icon can be hidden by passing `dismissible={false}`
10
+ *
11
+ * An optional link to details can be passed as `LinkToDetails={JsxElement}`
8
12
  */
9
13
  export declare const Alert: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
10
14
  export interface Props extends HTMLAttributes<HTMLDivElement> {
@@ -1,5 +1,3 @@
1
- @use "../core/mixin/breakpoints" as break;
2
-
3
1
  .rds-breadcrumb {
4
2
  --rds-crumb-separator: "/";
5
3
  // --rds-crumb-separator: "›";
@@ -39,7 +37,7 @@
39
37
  // you're most likely to either go all the way back to the start, or back one step, so that's
40
38
  // the ones we show
41
39
  &--truncate {
42
- @include break.breakpoint("sm") {
40
+ @media (max-width: 768px) {
43
41
  // Flip everything to be not visible
44
42
  display: none;
45
43
  &::after {
@@ -1,8 +1,6 @@
1
- @use "../core/mixin/rem";
2
-
3
1
  .rds-arrow-button {
4
- --default-arrow-size: #{rem.convert(18px)};
5
- --default-arrow-margin: #{rem.convert(10px)};
2
+ --default-arrow-size: 1.125rem;
3
+ --default-arrow-margin: 0.625rem;
6
4
  --hover-transform: 4px;
7
5
 
8
6
  align-items: center;
@@ -1,13 +1,11 @@
1
- @use "../core/mixin/rem";
2
-
3
1
  .rds-arrow-button,
4
2
  .rds-button {
5
- --fluid-block: clamp(#{rem.convert(10.5px)}, 2vw, #{rem.convert(12.5px)});
6
- --fluid-inline: clamp(#{rem.convert(16px)}, 2vw, #{rem.convert(24px)});
3
+ --fluid-block: clamp(0.65625rem, 2vw, 0.78125rem);
4
+ --fluid-inline: clamp(1rem, 2vw, 1.5rem);
7
5
 
8
6
  padding: var(--fluid-block) var(--fluid-inline);
9
7
  border-radius: var(--rds-roundness--button);
10
- font-size: rem.convert(18px);
8
+ font-size: 1.125rem;
11
9
  overflow-y: hidden;
12
10
  cursor: pointer;
13
11
 
@@ -1,8 +1,6 @@
1
- @use '../core/mixin/rem';
2
-
3
1
  .rds-icon-button {
4
- --default-icon-size: #{rem.convert(48px)};
5
- --default-icon-margin: #{rem.convert(12px)};
2
+ --default-icon-size: 3rem;
3
+ --default-icon-margin: 0.75rem;
6
4
 
7
5
  border-radius: 50%;
8
6
  max-height: var(--default-icon-size);
@@ -1,5 +1,75 @@
1
- @use "./core";
2
- @use "./rikstvColors";
1
+ @import "./core.css";
2
+
3
+ /* RIKSTV COLORS */
4
+ .rtv {
5
+ // RiksTV Red
6
+ --rikstv-red: #ef4642;
7
+ --rikstv-red-120: #d41612;
8
+
9
+ // Neutrals
10
+ --rikstv-white: #ffffff;
11
+ --rikstv-black: #000000;
12
+
13
+ // Onyx
14
+ --rikstv-onyx-150: #0f0f0f;
15
+ --rikstv-onyx: #1d1d1d;
16
+ --rikstv-onyx-90: #313131;
17
+
18
+ // Slate
19
+ --rikstv-slate: #353535;
20
+ --rikstv-slate-80: #626262;
21
+ --rikstv-slate-60: #828282;
22
+ --rikstv-slate-40: #afafaf;
23
+ --rikstv-slate-20: #ddd;
24
+
25
+ // Ask
26
+ --rikstv-ask: #5c5c5c;
27
+ --rikstv-ask-80: #787878;
28
+ --rikstv-ask-60: #9c9c9c;
29
+ --rikstv-ask-40: #c0c0c0;
30
+
31
+ // Sterling
32
+ --rikstv-sterling: #b8b8b8;
33
+ --rikstv-sterling-40: #e5e5e5;
34
+ --rikstv-sterling-20: #f1f1f1;
35
+ --rikstv-sterling-10: #f8f8f8;
36
+
37
+ // Secondary
38
+ --rikstv-purple: #542453;
39
+ --rikstv-green: #00816d;
40
+ --rikstv-blue: #195a89;
41
+ --rikstv-light-blue: #0f7ca2;
42
+ --rikstv-yellow: #f2a900;
43
+
44
+ // Feedback colors
45
+ --rikstv-info-light: #00aec7;
46
+ --rikstv-warning-light: #f2a900;
47
+ --rikstv-success-light: #4cbb81;
48
+ --rikstv-error-light: #f17774;
49
+
50
+ --rikstv-info-dark: #007485;
51
+ --rikstv-warning-dark: #996b00;
52
+ --rikstv-success-dark: #2a6f4b;
53
+ --rikstv-error-dark: #e01c17;
54
+
55
+ // NEEDS HANDLING
56
+ // Background
57
+ --rikstv-background-gray-150: #0b0b0b;
58
+ --rikstv-background-gray: #252525;
59
+ --rikstv-background-gray-90: #3b3b3b;
60
+ --rikstv-banner-background: #e9e9e9;
61
+ --rikstv-background: #f9f9f9;
62
+
63
+ // Card
64
+ --rikstv-card-gray: #434343;
65
+ --rikstv-card-gray-80: #333333;
66
+ --rikstv-card-gray-60: #6e6e6e;
67
+ --rikstv-card-gray-20: #d9d9d9;
68
+
69
+ // Foreground
70
+ --rikstv-foreground-gray: #666666;
71
+ --rikstv-foreground-gray-80: #858585;
72
+ }
3
73
 
4
74
  // Source of truth: https://www.figma.com/file/eZpToN8EpnZiD9AU2Xc8bN/Global-%2F-Farger?node-id=399%3A0&mode=dev
5
75
 
@@ -1,5 +1,52 @@
1
- @use "./core";
2
- @use "./strimColors";
1
+ @import "./core.css";
2
+
3
+ /** STRIM COLORS */
4
+ .strm {
5
+ // Yellow
6
+ --strim-action-yellow: #faed6f;
7
+ --strim-action-yellow-60: #fcf4a9;
8
+ --strim-action-yellow-40: #fefbe2;
9
+
10
+ // Neutrals
11
+ --strim-white: #ffffff;
12
+ --strim-black: #000000;
13
+
14
+ // Fantasy green
15
+ --strim-fantasy-green-150: #001515;
16
+ --strim-fantasy-green: #002a2a;
17
+ --strim-fantasy-green-90: #193f3f;
18
+ --strim-fantasy-green-60: #4c7571;
19
+
20
+ // Thriller teal
21
+ --strim-thriller-teal: #004b50;
22
+ --strim-thriller-teal-80: #267c82;
23
+ --strim-thriller-teal-60: #419da2;
24
+ --strim-thriller-teal-40: #79c6c6;
25
+ --strim-thriller-teal-20: #c3e8e7;
26
+
27
+ // Romance green
28
+ --strim-romance-green: #356e63;
29
+ --strim-romance-green-80: #429181;
30
+ --strim-romance-green-60: #62b7a5;
31
+ --strim-romance-green-40: #93d6c9;
32
+
33
+ // Standup green
34
+ --strim-standup-green: #49f5a4;
35
+ --strim-standup-green-40: #bcfbde;
36
+ --strim-standup-green-20: #d6ffec;
37
+ --strim-standup-green-10: #edfef6;
38
+
39
+ // Feedback colors
40
+ --strim-info-light: #30d7f9;
41
+ --strim-warning-light: #f2a900;
42
+ --strim-success-light: #80ed99;
43
+ --strim-error-light: #ff8fa3;
44
+
45
+ --strim-info-dark: #167183;
46
+ --strim-warning-dark: #996b00;
47
+ --strim-success-dark: #13862d;
48
+ --strim-error-dark: #d91b4e;
49
+ }
3
50
 
4
51
  // Source of truth: https://www.figma.com/file/eZpToN8EpnZiD9AU2Xc8bN/Global-%2F-Farger?node-id=399%3A0&mode=dev
5
52
 
@@ -1,5 +1,3 @@
1
- @use "../core/mixin/rem";
2
-
3
1
  .rds-list {
4
2
  --list-item__spacing: var(--rds-list-gap, 1em);
5
3
 
@@ -13,6 +11,6 @@
13
11
 
14
12
  & .rds-list > li {
15
13
  // Targets only nested lists
16
- padding-left: rem.convert(32px);
14
+ padding-left: 2rem;
17
15
  }
18
16
  }
@@ -1,6 +1,5 @@
1
1
  @use "../core/mixin/fluid";
2
2
  @use "../core/mixin/focus";
3
- @use "../core/mixin/breakpoints" as break;
4
3
 
5
4
  .rds-panel {
6
5
  --panel-info-background-color: var(--rds-heading-accent);
@@ -12,6 +11,7 @@
12
11
  --panel-border: none;
13
12
  --panel-color: #fff;
14
13
 
14
+ container-type: inline-size; /* enables container queries */
15
15
  padding: var(--panel-fluid-padding);
16
16
  border-radius: var(--rds-roundness--medium);
17
17
  border: var(--panel-border);
@@ -58,7 +58,7 @@
58
58
  }
59
59
  }
60
60
 
61
- @include break.breakpoint("sm") {
61
+ @container (max-width: 768px) {
62
62
  flex-direction: column;
63
63
  align-items: flex-start;
64
64
 
@@ -1,7 +1,5 @@
1
- @use "../core/mixin/rem";
2
-
3
1
  .rds-progress {
4
- --rds-progress-height: #{rem.convert(3px)};
2
+ --rds-progress-height: 0.1875rem;
5
3
  --rds-progress-color: var(--rds-accent-color);
6
4
  --rds-progress-track-color: var(--rds-foreground-overlay-medium);
7
5
 
@@ -1,6 +1,5 @@
1
1
  @use "../core/mixin/focus" as mix;
2
2
  @use "../core/mixin/fluid";
3
- @use "../core/mixin/rem";
4
3
 
5
4
  .rds-textfield {
6
5
  --textfield-color: var(--rds-foreground-primary);
@@ -102,7 +101,7 @@
102
101
  transition-property: top, font-size;
103
102
  border-radius: 8px;
104
103
 
105
- font-size: rem.convert(18px);
104
+ font-size: 1.125rem;
106
105
  color: var(--textfield-label-color);
107
106
  font-family: var(--rds-font-family-body);
108
107
  font-weight: normal;
@@ -1,5 +1,4 @@
1
1
  @use "../core/mixin/focus" as mix;
2
- @use "../core/mixin/rem";
3
2
  @use "../button/button-shared";
4
3
  @use "../button/button";
5
4
 
@@ -44,7 +43,7 @@
44
43
  display: grid;
45
44
  place-items: center;
46
45
  transition: 125ms ease background-color;
47
- padding: rem.convert(12.5px) var(--rds-spacing--24);
46
+ padding: 0.78125rem var(--rds-spacing--24);
48
47
  box-sizing: border-box;
49
48
  user-select: none;
50
49
  }
@@ -1,6 +1,5 @@
1
1
  @use "../button/button-shared";
2
2
  @use "../button/button";
3
- @use "../core/mixin/breakpoints" as break;
4
3
  @use "../core/mixin/focus.scss" as mix;
5
4
 
6
5
  .rds-toggle-button-container:focus-within {
@@ -52,7 +51,7 @@
52
51
  display: none;
53
52
  margin-left: var(--rds-spacing--16);
54
53
 
55
- @include break.min("sm") {
54
+ @media (min-width: 768px) {
56
55
  display: block;
57
56
  }
58
57
 
@@ -86,7 +86,7 @@
86
86
 
87
87
  .rds-title-4 {
88
88
  font-family: var(--rds-font-family-m-headlines);
89
- font-size: fluid.get-clamp(16, 18);
89
+ font-size: fluid.get-clamp(16, 20);
90
90
  font-weight: normal;
91
91
  line-height: 1.2;
92
92
  color: var(--rds-foreground-primary);
@@ -6,7 +6,7 @@ import { G as Y } from "./components/spacing/GutterPadding-eb4c4631.mjs";
6
6
  import { N as ee } from "./components/notificationDot/NotificationDot-630a5e23.mjs";
7
7
  import { A as te } from "./components/accordion/Accordion-b8669b7e.mjs";
8
8
  import { P as oe } from "./components/panel/Panel-aba8ed29.mjs";
9
- import { A as ie } from "./components/alert/Alert-0d6a7d07.mjs";
9
+ import { A as ie } from "./components/alert/Alert-cf8930d7.mjs";
10
10
  import { B as ce, a as ue } from "./components/breadcrumb/Breadcrumb-64b3a50e.mjs";
11
11
  import { P as de } from "./components/progress/Progress-c5ae3c43.mjs";
12
12
  import { L as le } from "./components/loader/Loader-ff2a99f4.mjs";