@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.
- package/CHANGELOG.md +659 -0
- package/dist/components/alert/Alert-cf8930d7.mjs +68 -0
- package/dist/components/alert/Alert.d.ts +4 -0
- package/dist/components/breadcrumb/breadcrumb.scss +1 -3
- package/dist/components/button/arrow-button.scss +2 -4
- package/dist/components/button/button.scss +3 -5
- package/dist/components/button/icon-button.scss +2 -4
- package/dist/components/core/rtv.scss +72 -2
- package/dist/components/core/strm.scss +49 -2
- package/dist/components/list/List.scss +1 -3
- package/dist/components/panel/panel.scss +2 -2
- package/dist/components/progress/Progress.scss +1 -3
- package/dist/components/textfield/textfield.scss +1 -2
- package/dist/components/toggle/radioToggle.scss +1 -2
- package/dist/components/toggleButton/toggleButton.scss +1 -2
- package/dist/components/typography/typography.scss +1 -1
- package/dist/shared-components.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/dist/components/alert/Alert-0d6a7d07.mjs +0 -68
- package/dist/components/core/core.scss +0 -130
- package/dist/components/core/mixin/breakpoints.scss +0 -44
- package/dist/components/core/mixin/rem.scss +0 -115
- package/dist/components/core/rikstvColors.scss +0 -71
- package/dist/components/core/strimColors.scss +0 -48
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Function for converting a px size to rem;
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@function convert($pxSize) {
|
|
8
|
-
$remSize: math.div($pxSize, 16px);
|
|
9
|
-
//Default font size on html element is 100%, equivalent to 16px;
|
|
10
|
-
@return to-number(#{$remSize}rem);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
///
|
|
14
|
-
/// Casts a string into a number
|
|
15
|
-
/// https://hugogiraudel.com/2014/01/15/sass-string-to-number/
|
|
16
|
-
/// @author Hugo Giraudel
|
|
17
|
-
/// @access private
|
|
18
|
-
/// @param {String | Number} $value - Value to be parsed
|
|
19
|
-
///
|
|
20
|
-
/// @return {Number}
|
|
21
|
-
///
|
|
22
|
-
@function to-number($value) {
|
|
23
|
-
@if type-of($value) == "number" {
|
|
24
|
-
@return $value;
|
|
25
|
-
} @else if type-of($value) != "string" {
|
|
26
|
-
$_: log("Value for `to-number` should be a number or a string.");
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
$result: 0;
|
|
30
|
-
$digits: 0;
|
|
31
|
-
$minus: str-slice($value, 1, 1) == "-";
|
|
32
|
-
$numbers: (
|
|
33
|
-
"0": 0,
|
|
34
|
-
"1": 1,
|
|
35
|
-
"2": 2,
|
|
36
|
-
"3": 3,
|
|
37
|
-
"4": 4,
|
|
38
|
-
"5": 5,
|
|
39
|
-
"6": 6,
|
|
40
|
-
"7": 7,
|
|
41
|
-
"8": 8,
|
|
42
|
-
"9": 9,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
@for $i from if($minus, 2, 1) through str-length($value) {
|
|
46
|
-
$character: str-slice($value, $i, $i);
|
|
47
|
-
|
|
48
|
-
@if not(index(map-keys($numbers), $character) or $character == ".") {
|
|
49
|
-
@return to-length(if($minus, -$result, $result), str-slice($value, $i));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@if $character == "." {
|
|
53
|
-
$digits: 1;
|
|
54
|
-
} @else if $digits == 0 {
|
|
55
|
-
$result: $result * 10 + map-get($numbers, $character);
|
|
56
|
-
} @else {
|
|
57
|
-
$digits: $digits * 10;
|
|
58
|
-
$result: $result + math.div(map-get($numbers, $character), $digits);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@return if($minus, -$result, $result);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
///
|
|
66
|
-
/// Add `$unit` to `$value`
|
|
67
|
-
///
|
|
68
|
-
/// @param {Number} $value - Value to add unit to
|
|
69
|
-
/// @param {String} $unit - String representation of the unit
|
|
70
|
-
///
|
|
71
|
-
/// @return {Number} - `$value` expressed in `$unit`
|
|
72
|
-
///
|
|
73
|
-
@function to-length($value, $unit) {
|
|
74
|
-
$units: (
|
|
75
|
-
"px": 1px,
|
|
76
|
-
"cm": 1cm,
|
|
77
|
-
"mm": 1mm,
|
|
78
|
-
"%": 1%,
|
|
79
|
-
"ch": 1ch,
|
|
80
|
-
"pc": 1pc,
|
|
81
|
-
"in": 1in,
|
|
82
|
-
"em": 1em,
|
|
83
|
-
"rem": 1rem,
|
|
84
|
-
"pt": 1pt,
|
|
85
|
-
"ex": 1ex,
|
|
86
|
-
"vw": 1vw,
|
|
87
|
-
"vh": 1vh,
|
|
88
|
-
"vmin": 1vmin,
|
|
89
|
-
"vmax": 1vmax,
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
@if not index(map-keys($units), $unit) {
|
|
93
|
-
$_: log("Invalid unit `#{$unit}`.");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@return $value * map-get($units, $unit);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
///
|
|
100
|
-
/// Calculate a responsive size value relative to a given screen size
|
|
101
|
-
/// Will return a CSS rule that corresponds to the given pixel size at
|
|
102
|
-
/// the given screen size and scales with changes in screen size
|
|
103
|
-
///
|
|
104
|
-
/// @param {Number} $pxSize - Size to calculate from, in px without unit
|
|
105
|
-
/// @param {Number} $screenWidth - Screen width to calculate from, in px without unit, default 1400
|
|
106
|
-
/// @param {Number} $screenHeight - Screen height to calculate from, in px without unit, default 900
|
|
107
|
-
///
|
|
108
|
-
/// @return `$pxSize` expressed as a responsive value
|
|
109
|
-
///
|
|
110
|
-
@function relativeSize($pxSize, $screenWidth: 1400, $screenHeight: 900) {
|
|
111
|
-
$horSize: math.div($pxSize, $screenWidth) * 100 * 1vw;
|
|
112
|
-
$verSize: math.div($pxSize, $screenHeight) * 100 * 1vh;
|
|
113
|
-
|
|
114
|
-
@return min(#{$horSize}, #{$verSize});
|
|
115
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
@use "./core";
|
|
2
|
-
|
|
3
|
-
.rtv {
|
|
4
|
-
// RiksTV Red
|
|
5
|
-
--rikstv-red: #ef4642;
|
|
6
|
-
--rikstv-red-120: #d41612;
|
|
7
|
-
|
|
8
|
-
// Neutrals
|
|
9
|
-
--rikstv-white: #ffffff;
|
|
10
|
-
--rikstv-black: #000000;
|
|
11
|
-
|
|
12
|
-
// Onyx
|
|
13
|
-
--rikstv-onyx-150: #0f0f0f;
|
|
14
|
-
--rikstv-onyx: #1d1d1d;
|
|
15
|
-
--rikstv-onyx-90: #313131;
|
|
16
|
-
|
|
17
|
-
// Slate
|
|
18
|
-
--rikstv-slate: #353535;
|
|
19
|
-
--rikstv-slate-80: #626262;
|
|
20
|
-
--rikstv-slate-60: #828282;
|
|
21
|
-
--rikstv-slate-40: #afafaf;
|
|
22
|
-
--rikstv-slate-20: #ddd;
|
|
23
|
-
|
|
24
|
-
// Ask
|
|
25
|
-
--rikstv-ask: #5c5c5c;
|
|
26
|
-
--rikstv-ask-80: #787878;
|
|
27
|
-
--rikstv-ask-60: #9c9c9c;
|
|
28
|
-
--rikstv-ask-40: #c0c0c0;
|
|
29
|
-
|
|
30
|
-
// Sterling
|
|
31
|
-
--rikstv-sterling: #b8b8b8;
|
|
32
|
-
--rikstv-sterling-40: #e5e5e5;
|
|
33
|
-
--rikstv-sterling-20: #f1f1f1;
|
|
34
|
-
--rikstv-sterling-10: #f8f8f8;
|
|
35
|
-
|
|
36
|
-
// Secondary
|
|
37
|
-
--rikstv-purple: #542453;
|
|
38
|
-
--rikstv-green: #00816d;
|
|
39
|
-
--rikstv-blue: #195a89;
|
|
40
|
-
--rikstv-light-blue: #0f7ca2;
|
|
41
|
-
--rikstv-yellow: #f2a900;
|
|
42
|
-
|
|
43
|
-
// Feedback colors
|
|
44
|
-
--rikstv-info-light: #00aec7;
|
|
45
|
-
--rikstv-warning-light: #f2a900;
|
|
46
|
-
--rikstv-success-light: #4cbb81;
|
|
47
|
-
--rikstv-error-light: #f17774;
|
|
48
|
-
|
|
49
|
-
--rikstv-info-dark: #007485;
|
|
50
|
-
--rikstv-warning-dark: #996b00;
|
|
51
|
-
--rikstv-success-dark: #2a6f4b;
|
|
52
|
-
--rikstv-error-dark: #e01c17;
|
|
53
|
-
|
|
54
|
-
// NEEDS HANDLING
|
|
55
|
-
// Background
|
|
56
|
-
--rikstv-background-gray-150: #0b0b0b;
|
|
57
|
-
--rikstv-background-gray: #252525;
|
|
58
|
-
--rikstv-background-gray-90: #3b3b3b;
|
|
59
|
-
--rikstv-banner-background: #e9e9e9;
|
|
60
|
-
--rikstv-background: #f9f9f9;
|
|
61
|
-
|
|
62
|
-
// Card
|
|
63
|
-
--rikstv-card-gray: #434343;
|
|
64
|
-
--rikstv-card-gray-80: #333333;
|
|
65
|
-
--rikstv-card-gray-60: #6e6e6e;
|
|
66
|
-
--rikstv-card-gray-20: #d9d9d9;
|
|
67
|
-
|
|
68
|
-
// Foreground
|
|
69
|
-
--rikstv-foreground-gray: #666666;
|
|
70
|
-
--rikstv-foreground-gray-80: #858585;
|
|
71
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@use "./core";
|
|
2
|
-
|
|
3
|
-
.strm {
|
|
4
|
-
// Yellow
|
|
5
|
-
--strim-action-yellow: #faed6f;
|
|
6
|
-
--strim-action-yellow-60: #fcf4a9;
|
|
7
|
-
--strim-action-yellow-40: #fefbe2;
|
|
8
|
-
|
|
9
|
-
// Neutrals
|
|
10
|
-
--strim-white: #ffffff;
|
|
11
|
-
--strim-black: #000000;
|
|
12
|
-
|
|
13
|
-
// Fantasy green
|
|
14
|
-
--strim-fantasy-green-150: #001515;
|
|
15
|
-
--strim-fantasy-green: #002a2a;
|
|
16
|
-
--strim-fantasy-green-90: #193f3f;
|
|
17
|
-
--strim-fantasy-green-60: #4c7571;
|
|
18
|
-
|
|
19
|
-
// Thriller teal
|
|
20
|
-
--strim-thriller-teal: #004b50;
|
|
21
|
-
--strim-thriller-teal-80: #267c82;
|
|
22
|
-
--strim-thriller-teal-60: #419da2;
|
|
23
|
-
--strim-thriller-teal-40: #79c6c6;
|
|
24
|
-
--strim-thriller-teal-20: #c3e8e7;
|
|
25
|
-
|
|
26
|
-
// Romance green
|
|
27
|
-
--strim-romance-green: #356e63;
|
|
28
|
-
--strim-romance-green-80: #429181;
|
|
29
|
-
--strim-romance-green-60: #62b7a5;
|
|
30
|
-
--strim-romance-green-40: #93d6c9;
|
|
31
|
-
|
|
32
|
-
// Standup green
|
|
33
|
-
--strim-standup-green: #49f5a4;
|
|
34
|
-
--strim-standup-green-40: #bcfbde;
|
|
35
|
-
--strim-standup-green-20: #d6ffec;
|
|
36
|
-
--strim-standup-green-10: #edfef6;
|
|
37
|
-
|
|
38
|
-
// Feedback colors
|
|
39
|
-
--strim-info-light: #30d7f9;
|
|
40
|
-
--strim-warning-light: #f2a900;
|
|
41
|
-
--strim-success-light: #80ed99;
|
|
42
|
-
--strim-error-light: #ff8fa3;
|
|
43
|
-
|
|
44
|
-
--strim-info-dark: #167183;
|
|
45
|
-
--strim-warning-dark: #996b00;
|
|
46
|
-
--strim-success-dark: #13862d;
|
|
47
|
-
--strim-error-dark: #d91b4e;
|
|
48
|
-
}
|