@cfx-dev/ui-components 4.3.2 → 4.3.4
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/{Combination-CSgOhzm-.js → Combination-BGYCZNoJ.js} +375 -367
- package/dist/Rail-CHFAf3wJ.js +81 -0
- package/dist/Table.module-DffST69u.js +17 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/Indicator.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Rail.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/components/Accordion/Accordion.js +5 -5
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/Box/Box.d.ts +6 -0
- package/dist/components/Box/Box.js +23 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Box/index.js +6 -0
- package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
- package/dist/components/BurgerMenu/BurgerMenuButton.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/ButtonShowcase.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +252 -157
- package/dist/components/DataTable/DataTable.js +2 -2
- package/dist/components/DataTable/DataTableShowcase.js +2 -2
- package/dist/components/DropdownSelect/DropdownSelect.js +13 -13
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flex/Flex.d.ts +7 -0
- package/dist/components/Flex/Flex.js +23 -0
- package/dist/components/Flex/index.d.ts +6 -0
- package/dist/components/{Layout/Flex → Flex}/index.js +2 -2
- package/dist/components/Flyout/Flyout.js +6 -6
- package/dist/components/InfoPanel/InfoPanel.js +3 -3
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.js +87 -87
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.js +42 -42
- package/dist/components/Island/Island.js +27 -27
- package/dist/components/Layout/Pad/Pad.js +20 -20
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +4 -4
- package/dist/components/OnScreenSensor.js +13 -13
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/PopoverShowcase.js +1 -1
- package/dist/components/{Layout → RSC}/Box/Box.d.ts +3 -2
- package/dist/components/RSC/Box/Box.js +101 -0
- package/dist/components/RSC/Box/index.d.ts +2 -0
- package/dist/components/RSC/Box/index.js +7 -0
- package/dist/components/{Layout → RSC}/Flex/Flex.d.ts +4 -2
- package/dist/components/RSC/Flex/Flex.js +119 -0
- package/dist/components/{Layout → RSC}/Flex/index.d.ts +1 -1
- package/dist/components/RSC/Flex/index.js +15 -0
- package/dist/components/Scrollable/Rail.js +9 -0
- package/dist/components/Scrollable/Scrollable.js +88 -0
- package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Separator/Separator.js +3 -3
- package/dist/components/Shroud/Shroud.js +7 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +5 -5
- package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.d.ts +1 -1
- package/dist/components/Table/TableCell.js +13 -12
- package/dist/components/Table/TableCellCheckbox.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableIconButton.js +1 -1
- package/dist/components/Table/TableRoot.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/TextShowcase.js +2 -2
- package/dist/components/Textarea/Textarea.js +32 -34
- package/dist/components/Title/Title.js +62 -62
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +7 -7
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-ByKwkZKY.js +239 -0
- package/dist/{index-HDl8nGsm.js → index-CriGVLlo.js} +1 -1
- package/dist/{index-DZEAOJqB.js → index-DlJ4qUbZ.js} +1 -1
- package/dist/main.d.ts +8 -6
- package/dist/main.js +212 -207
- package/dist/rsc.d.ts +4 -0
- package/dist/rsc.js +16 -0
- package/dist/styles-scss/_colors.scss +41 -32
- package/dist/styles-scss/_typography.scss +5 -5
- package/dist/styles-scss/_ui.scss +36 -20
- package/dist/styles-scss/global.scss +24 -13
- package/dist/styles-scss/themes/theme_cfx.scss +3 -5
- package/dist/styles-scss/themes/theme_fivem.scss +5 -7
- package/dist/styles-scss/themes/theme_redm.scss +4 -6
- package/dist/styles-scss/themes/theme_wireframe.scss +5 -7
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +2 -56
- package/dist/utils/formatCurrency.d.ts +5 -0
- package/dist/utils/formatCurrency.js +35 -0
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.js +13 -0
- package/dist/utils/hooks/useGlobalKeyboardEvent.js +3 -3
- package/dist/utils/hooks/useWindowResize.js +5 -5
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +23 -19
- package/package.json +10 -5
- package/dist/Rail-DcVowhML.js +0 -81
- package/dist/Table.module-DHI1mXN2.js +0 -17
- package/dist/components/Layout/Box/Box.js +0 -72
- package/dist/components/Layout/Box/index.d.ts +0 -2
- package/dist/components/Layout/Box/index.js +0 -5
- package/dist/components/Layout/Flex/Flex.js +0 -84
- package/dist/components/Layout/Scrollable/Rail.js +0 -9
- package/dist/components/Layout/Scrollable/Scrollable.js +0 -91
- package/dist/index-BHuChyf5.js +0 -238
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.js +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.js +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Rail.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Scrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/index.d.ts +0 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
2
|
@use "sass:list";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:color";
|
|
5
|
+
|
|
6
|
+
@function get-channel($color, $channel) {
|
|
7
|
+
@return color.channel($color, $channel, $space: rgb);
|
|
8
|
+
}
|
|
3
9
|
|
|
4
10
|
@function get-luminance($color) {
|
|
5
11
|
$colors: (
|
|
6
|
-
'red':
|
|
7
|
-
'green':
|
|
8
|
-
'blue':
|
|
12
|
+
'red': get-channel($color, "red"),
|
|
13
|
+
'green': get-channel($color, "green"),
|
|
14
|
+
'blue': get-channel($color, "blue"),
|
|
9
15
|
);
|
|
10
16
|
|
|
11
17
|
@each $name, $value in $colors {
|
|
@@ -19,20 +25,19 @@
|
|
|
19
25
|
$value: math.pow($value, 2.4);
|
|
20
26
|
}
|
|
21
27
|
|
|
22
|
-
$colors: map
|
|
28
|
+
$colors: map.merge($colors, ($name: $value));
|
|
23
29
|
}
|
|
24
30
|
|
|
25
|
-
@return (map
|
|
31
|
+
@return (map.get($colors, 'red') * .2126) + (map.get($colors, 'green') * .7152) + (map.get($colors, 'blue') * .0722);
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
@function interpolate($c1, $c2, $f) {
|
|
29
|
-
$c1r:
|
|
30
|
-
$c1g:
|
|
31
|
-
$c1b:
|
|
32
|
-
|
|
33
|
-
$
|
|
34
|
-
$
|
|
35
|
-
$c2b: blue($c2);
|
|
35
|
+
$c1r: get-channel($c1, "red");
|
|
36
|
+
$c1g: get-channel($c1, "green");
|
|
37
|
+
$c1b: get-channel($c1, "blue");
|
|
38
|
+
$c2r: get-channel($c2, "red");
|
|
39
|
+
$c2g: get-channel($c2, "green");
|
|
40
|
+
$c2b: get-channel($c2, "blue");
|
|
36
41
|
|
|
37
42
|
@return rgb(
|
|
38
43
|
$c1r + $f * ($c2r - $c1r),
|
|
@@ -43,8 +48,8 @@
|
|
|
43
48
|
|
|
44
49
|
@function set-luminance($color, $lum) {
|
|
45
50
|
$itersLeft: 20;
|
|
46
|
-
$low: rgb(0
|
|
47
|
-
$high: rgb(255
|
|
51
|
+
$low: rgb(0 0 0);
|
|
52
|
+
$high: rgb(255 255 255);
|
|
48
53
|
|
|
49
54
|
@if get-luminance($color) > $lum {
|
|
50
55
|
$high: $color;
|
|
@@ -55,9 +60,8 @@
|
|
|
55
60
|
$mid: interpolate($low, $high, .5);
|
|
56
61
|
$lm: get-luminance($mid);
|
|
57
62
|
|
|
58
|
-
@while math.abs($lum - $lm) >= 1e-7 and $itersLeft > 0 {
|
|
63
|
+
@while math.abs($lum - $lm) >= 1e - 7 and $itersLeft > 0 {
|
|
59
64
|
$itersLeft: $itersLeft - 1;
|
|
60
|
-
|
|
61
65
|
$mid: interpolate($low, $high, .5);
|
|
62
66
|
$lm: get-luminance($mid);
|
|
63
67
|
|
|
@@ -72,7 +76,7 @@
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
@function color-triplet($color) {
|
|
75
|
-
@return #{
|
|
79
|
+
@return #{get-channel($color, "red")}, #{get-channel($color, "green")}, #{get-channel($color, "blue")};
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
|
|
@@ -82,20 +86,22 @@ $_16OVER116: math.div(16, 116);
|
|
|
82
86
|
$_1OVER2P4: math.div(1, 2.4);
|
|
83
87
|
|
|
84
88
|
@function rgb2lab($color) {
|
|
85
|
-
$r: math.div(
|
|
86
|
-
$g: math.div(
|
|
87
|
-
$b: math.div(
|
|
89
|
+
$r: math.div(get-channel($color, "red"), 255);
|
|
90
|
+
$g: math.div(get-channel($color, "green"), 255);
|
|
91
|
+
$b: math.div(get-channel($color, "blue"), 255);
|
|
88
92
|
|
|
89
93
|
@if $r > 0.04045 {
|
|
90
94
|
$r: math.pow(math.div($r + 0.055, 1.055), 2.4);
|
|
91
95
|
} @else {
|
|
92
96
|
$r: math.div($r, 12.92);
|
|
93
97
|
}
|
|
98
|
+
|
|
94
99
|
@if $g > 0.04045 {
|
|
95
100
|
$g: math.pow(math.div($g + 0.055, 1.055), 2.4);
|
|
96
101
|
} @else {
|
|
97
102
|
$g: math.div($g, 12.92);
|
|
98
103
|
}
|
|
104
|
+
|
|
99
105
|
@if $b > 0.04045 {
|
|
100
106
|
$b: math.pow(math.div($b + 0.055, 1.055), 2.4);
|
|
101
107
|
} @else {
|
|
@@ -111,11 +117,13 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
111
117
|
} @else {
|
|
112
118
|
$x: (7.787 * $x) + $_16OVER116;
|
|
113
119
|
}
|
|
120
|
+
|
|
114
121
|
@if $y > 0.008856 {
|
|
115
122
|
$y: math.pow($y, $oneThird);
|
|
116
123
|
} @else {
|
|
117
124
|
$y: (7.787 * $y) + $_16OVER116;
|
|
118
125
|
}
|
|
126
|
+
|
|
119
127
|
@if $z > 0.008856 {
|
|
120
128
|
$z: math.pow($z, $oneThird);
|
|
121
129
|
} @else {
|
|
@@ -130,10 +138,9 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
@function lab2rgb($lab) {
|
|
133
|
-
$y: math.div(map
|
|
134
|
-
$x: math.div(map
|
|
135
|
-
$z: $y - math.div(map
|
|
136
|
-
|
|
141
|
+
$y: math.div(map.get($lab, 'L') + 16, 116);
|
|
142
|
+
$x: math.div(map.get($lab, 'a'), 500) + $y;
|
|
143
|
+
$z: $y - math.div(map.get($lab, 'b'), 200);
|
|
137
144
|
$x3: math.pow($x, 3);
|
|
138
145
|
$y3: math.pow($y, 3);
|
|
139
146
|
$z3: math.pow($z, 3);
|
|
@@ -143,11 +150,13 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
143
150
|
} @else {
|
|
144
151
|
$x: math.div($x - $_16OVER116 , 7.787);
|
|
145
152
|
}
|
|
153
|
+
|
|
146
154
|
@if $y3 > 0.008856 {
|
|
147
155
|
$y: $y3;
|
|
148
156
|
} @else {
|
|
149
157
|
$y: math.div($y - $_16OVER116 , 7.787);
|
|
150
158
|
}
|
|
159
|
+
|
|
151
160
|
@if $z3 > 0.008856 {
|
|
152
161
|
$z: $z3;
|
|
153
162
|
} @else {
|
|
@@ -157,21 +166,22 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
157
166
|
$x: $x * 0.95047;
|
|
158
167
|
$y: $y * 1.00000;
|
|
159
168
|
$z: $z * 1.08883;
|
|
160
|
-
|
|
161
|
-
$
|
|
162
|
-
$
|
|
163
|
-
$b: $x * 0.0557 + $y * -0.2040 + $z * 1.0570;
|
|
169
|
+
$r: $x * 3.2406 + $y * -1.5372 + $z * -0.4986;
|
|
170
|
+
$g: $x * -0.9689 + $y * 1.8758 + $z * 0.0415;
|
|
171
|
+
$b: $x * 0.0557 + $y * -0.2040 + $z * 1.0570;
|
|
164
172
|
|
|
165
173
|
@if $r > 0.0031308 {
|
|
166
174
|
$r: 1.055 * math.pow($r, $_1OVER2P4) - 0.055;
|
|
167
175
|
} @else {
|
|
168
176
|
$r: 12.92 * $r;
|
|
169
177
|
}
|
|
178
|
+
|
|
170
179
|
@if $g > 0.0031308 {
|
|
171
180
|
$g: 1.055 * math.pow($g, $_1OVER2P4) - 0.055;
|
|
172
181
|
} @else {
|
|
173
182
|
$g: 12.92 * $g;
|
|
174
183
|
}
|
|
184
|
+
|
|
175
185
|
@if $b > 0.0031308 {
|
|
176
186
|
$b: 1.055 * math.pow($b, $_1OVER2P4) - 0.055;
|
|
177
187
|
} @else {
|
|
@@ -198,14 +208,13 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
198
208
|
@function lab-gradient-step($s, $e, $i, $stop) {
|
|
199
209
|
$s: rgb2lab($s);
|
|
200
210
|
$e: rgb2lab($e);
|
|
201
|
-
|
|
202
211
|
$a: math.div($i, $stop - 1);
|
|
203
212
|
$ia: 1 - $a;
|
|
204
213
|
|
|
205
214
|
@return lab2rgb((
|
|
206
|
-
'L': $ia * map
|
|
207
|
-
'a': $ia * map
|
|
208
|
-
'b': $ia * map
|
|
215
|
+
'L': $ia * map.get($s, 'L') + $a * map.get($e, 'L'),
|
|
216
|
+
'a': $ia * map.get($s, 'a') + $a * map.get($e, 'a'),
|
|
217
|
+
'b': $ia * map.get($s, 'b') + $a * map.get($e, 'b'),
|
|
209
218
|
));
|
|
210
219
|
}
|
|
211
220
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@font-face {
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-weight: 400;
|
|
11
|
-
font-family:
|
|
11
|
+
font-family: HelveticaNowDisplay;
|
|
12
12
|
src: url("assets/fonts/HelveticaNow/HelveticaNowDisplay.woff2") format("woff2"),
|
|
13
13
|
url("assets/fonts/HelveticaNow/HelveticaNowDisplay.woff") format("woff"),
|
|
14
14
|
url("assets/fonts/HelveticaNow/HelveticaNowDisplay.ttf") format("truetype");
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@font-face {
|
|
18
18
|
font-style: normal;
|
|
19
19
|
font-weight: 700;
|
|
20
|
-
font-family:
|
|
20
|
+
font-family: HelveticaNowDisplay;
|
|
21
21
|
src: url("assets/fonts/HelveticaNow/HelveticaNowDisplayBold.woff2") format("woff2"),
|
|
22
22
|
url("assets/fonts/HelveticaNow/HelveticaNowDisplayBold.woff") format("woff"),
|
|
23
23
|
url("assets/fonts/HelveticaNow/HelveticaNowDisplayBold.ttf") format("truetype");
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
@font-face {
|
|
27
27
|
font-style: normal;
|
|
28
28
|
font-weight: 400;
|
|
29
|
-
font-family:
|
|
29
|
+
font-family: HelveticaNowText;
|
|
30
30
|
src: url("assets/fonts/HelveticaNow/HelveticaNowText.woff2") format("woff2"),
|
|
31
31
|
url("assets/fonts/HelveticaNow/HelveticaNowText.woff") format("woff"),
|
|
32
32
|
url("assets/fonts/HelveticaNow/HelveticaNowText.ttf") format("truetype");
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
@font-face {
|
|
36
36
|
font-style: normal;
|
|
37
37
|
font-weight: 700;
|
|
38
|
-
font-family:
|
|
38
|
+
font-family: HelveticaNowText;
|
|
39
39
|
src: url("assets/fonts/HelveticaNow/HelveticaNowTextBold.woff2") format("woff2"),
|
|
40
40
|
url("assets/fonts/HelveticaNow/HelveticaNowTextBold.woff") format("woff"),
|
|
41
41
|
url("assets/fonts/HelveticaNow/HelveticaNowTextBold.ttf") format("truetype");
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
@font-face {
|
|
45
45
|
font-style: italic;
|
|
46
46
|
font-weight: 400;
|
|
47
|
-
font-family:
|
|
47
|
+
font-family: HelveticaNowText;
|
|
48
48
|
src: url("assets/fonts/HelveticaNow/HelveticaNowTextIt.woff2") format("woff2"),
|
|
49
49
|
url("assets/fonts/HelveticaNow/HelveticaNowTextIt.woff") format("woff"),
|
|
50
50
|
url("assets/fonts/HelveticaNow/HelveticaNowTextIt.ttf") format("truetype");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
|
+
@use "sass:list";
|
|
2
3
|
@use "sass:map";
|
|
3
4
|
@use "sass:meta";
|
|
4
5
|
@use "colors";
|
|
@@ -6,6 +7,7 @@
|
|
|
6
7
|
@mixin def($var, $value) {
|
|
7
8
|
--#{$var}: #{$value};
|
|
8
9
|
}
|
|
10
|
+
|
|
9
11
|
@function use($var, $default: initial) {
|
|
10
12
|
@return var(--#{$var}, $default);
|
|
11
13
|
}
|
|
@@ -53,11 +55,12 @@
|
|
|
53
55
|
@function viewport-width($multiplier: 1.0) {
|
|
54
56
|
@return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
55
57
|
}
|
|
58
|
+
|
|
56
59
|
@function viewport-height($multiplier: 1.0) {
|
|
57
60
|
@return calc((var(--height) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
$
|
|
63
|
+
$cfxuiColorLuminance: (
|
|
61
64
|
'pure',
|
|
62
65
|
950,
|
|
63
66
|
900,
|
|
@@ -71,8 +74,7 @@ $cfxui-color-luminance: (
|
|
|
71
74
|
100,
|
|
72
75
|
50,
|
|
73
76
|
);
|
|
74
|
-
|
|
75
|
-
$cfxui-color-alpha: (
|
|
77
|
+
$cfxuiColorAlpha: (
|
|
76
78
|
'100': 1,
|
|
77
79
|
'90': 0.9,
|
|
78
80
|
'80': 0.8,
|
|
@@ -123,7 +125,7 @@ $cfxui-color-alpha: (
|
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
@mixin define-main-colors($bg, $fg, $overrides: ()) {
|
|
126
|
-
$colors: map
|
|
128
|
+
$colors: map.merge((
|
|
127
129
|
'primary': #f50551,
|
|
128
130
|
'success': #01a370,
|
|
129
131
|
'warning': #ffae00,
|
|
@@ -141,7 +143,7 @@ $cfxui-color-alpha: (
|
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
@mixin define-theme($bg, $fg, $overrides: ()) {
|
|
144
|
-
$colors: map
|
|
146
|
+
$colors: map.merge((
|
|
145
147
|
'accent': #F40552,
|
|
146
148
|
'primary': #F1F1E4,
|
|
147
149
|
'secondary': #9EA4BD,
|
|
@@ -156,7 +158,7 @@ $cfxui-color-alpha: (
|
|
|
156
158
|
'bg-light': #1C202E,
|
|
157
159
|
'bg-dark': #1C202E,
|
|
158
160
|
'bg-dark-grey': #1A1A1A,
|
|
159
|
-
'bg-black': #
|
|
161
|
+
'bg-black': #000,
|
|
160
162
|
), $overrides);
|
|
161
163
|
|
|
162
164
|
@each $colorName, $colorValue in $colors {
|
|
@@ -167,11 +169,11 @@ $cfxui-color-alpha: (
|
|
|
167
169
|
@mixin define-color-token($name, $color) {
|
|
168
170
|
--color-#{$name}: #{$color};
|
|
169
171
|
}
|
|
172
|
+
|
|
170
173
|
@function color-token($name, ) {
|
|
171
174
|
@return var(--color-#{$name});
|
|
172
175
|
}
|
|
173
176
|
|
|
174
|
-
|
|
175
177
|
@mixin border-radius($size: 'normal') {
|
|
176
178
|
border-radius: var(--border-radius-#{$size});
|
|
177
179
|
}
|
|
@@ -179,12 +181,15 @@ $cfxui-color-alpha: (
|
|
|
179
181
|
@mixin font-size($size: 'normal') {
|
|
180
182
|
font-size: var(--font-size-#{$size});
|
|
181
183
|
}
|
|
184
|
+
|
|
182
185
|
@mixin font-family($family: 'primary') {
|
|
183
186
|
font-family: var(--font-family-#{$family});
|
|
184
187
|
}
|
|
188
|
+
|
|
185
189
|
@mixin font-weight($weight: 'normal') {
|
|
186
190
|
font-weight: var(--font-weight-#{$weight});
|
|
187
191
|
}
|
|
192
|
+
|
|
188
193
|
@mixin font-color($colorToken) {
|
|
189
194
|
color: color-token($colorToken);
|
|
190
195
|
}
|
|
@@ -198,10 +203,11 @@ $cfxui-color-alpha: (
|
|
|
198
203
|
}
|
|
199
204
|
|
|
200
205
|
@mixin animated($props: 'all', $subClass: '&') {
|
|
201
|
-
@if type-of($props) == 'list' {
|
|
206
|
+
@if meta.type-of($props) == 'list' {
|
|
202
207
|
$transition: ();
|
|
208
|
+
|
|
203
209
|
@each $property in $props {
|
|
204
|
-
$transition: append(
|
|
210
|
+
$transition: list.append(
|
|
205
211
|
$transition, ($property .25s ease), $separator: comma
|
|
206
212
|
);
|
|
207
213
|
}
|
|
@@ -220,11 +226,11 @@ $cfxui-color-alpha: (
|
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
@mixin fake-backdrop-blur($topLayer: false, $topLayerBlend: false, $topLayerSize: false, $topLayerAttachement: false) {
|
|
223
|
-
--
|
|
224
|
-
--
|
|
229
|
+
--over-backdrop-color: var(--backdrop-color, transparent);
|
|
230
|
+
--over-backdrop-image-blur: var(--backdrop-image-blur, url("assets/images/bg2-blur.png"));
|
|
225
231
|
|
|
226
232
|
@if not $topLayer {
|
|
227
|
-
$topLayer: linear-gradient(use('
|
|
233
|
+
$topLayer: linear-gradient(use('over-backdrop-color'), use('over-backdrop-color'));
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
@if not $topLayerBlend {
|
|
@@ -239,12 +245,12 @@ $cfxui-color-alpha: (
|
|
|
239
245
|
$topLayerAttachement: scroll;
|
|
240
246
|
}
|
|
241
247
|
|
|
242
|
-
background-color: use('
|
|
248
|
+
background-color: use('over-backdrop-color');
|
|
243
249
|
background-image:
|
|
244
250
|
$topLayer,
|
|
245
251
|
linear-gradient(color-token('backdrop-shader'), color-token('backdrop-shader')),
|
|
246
|
-
use('
|
|
247
|
-
use('
|
|
252
|
+
use('over-backdrop-image-blur'),
|
|
253
|
+
use('over-backdrop-image-blur');
|
|
248
254
|
background-blend-mode: $topLayerBlend, normal, overlay;
|
|
249
255
|
background-size: $topLayerSize, cover, cover, cover;
|
|
250
256
|
background-attachment: $topLayerAttachement, scroll, fixed, fixed;
|
|
@@ -276,12 +282,15 @@ $offsets: (
|
|
|
276
282
|
::-webkit-scrollbar {
|
|
277
283
|
width: use('scrollable-thumb-size');
|
|
278
284
|
}
|
|
285
|
+
|
|
279
286
|
::-webkit-scrollbar:horizontal {
|
|
280
287
|
height: use('scrollable-thumb-size');
|
|
281
288
|
}
|
|
289
|
+
|
|
282
290
|
::-webkit-scrollbar-track {
|
|
283
291
|
background-color: color-token('scrollbar-track-background');
|
|
284
292
|
}
|
|
293
|
+
|
|
285
294
|
::-webkit-scrollbar-thumb {
|
|
286
295
|
@include border-radius('pill');
|
|
287
296
|
|
|
@@ -290,10 +299,12 @@ $offsets: (
|
|
|
290
299
|
&:hover {
|
|
291
300
|
background-color: color-token('scrollbar-hover');
|
|
292
301
|
}
|
|
302
|
+
|
|
293
303
|
&:active {
|
|
294
304
|
background-color: color-token('scrollbar-active');
|
|
295
305
|
}
|
|
296
306
|
}
|
|
307
|
+
|
|
297
308
|
::-webkit-scrollbar-corner {
|
|
298
309
|
display: none;
|
|
299
310
|
}
|
|
@@ -301,15 +312,22 @@ $offsets: (
|
|
|
301
312
|
|
|
302
313
|
@mixin placeholder-color($color) {
|
|
303
314
|
&::placeholder {color: $color}
|
|
315
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
304
316
|
&::-webkit-input-placeholder {color: $color}
|
|
317
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
305
318
|
&::-moz-placeholder {color: $color}
|
|
319
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
306
320
|
&:-ms-input-placeholder {color: $color}
|
|
307
321
|
}
|
|
308
322
|
|
|
309
323
|
@mixin placeholder-animated($props: 'all', $subClass: '&') {
|
|
324
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
310
325
|
&::placeholder {@include animated($props, $subClass)}
|
|
326
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
311
327
|
&::-webkit-input-placeholder {@include animated($props, $subClass)}
|
|
328
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
312
329
|
&::-moz-placeholder {@include animated($props, $subClass)}
|
|
330
|
+
/* stylelint-disable-next-line selector-no-vendor-prefix */
|
|
313
331
|
&:-ms-input-placeholder {@include animated($props, $subClass)}
|
|
314
332
|
}
|
|
315
333
|
|
|
@@ -339,7 +357,7 @@ $mediaMap: (
|
|
|
339
357
|
@if $size == 'initial' {
|
|
340
358
|
@content;
|
|
341
359
|
} @else {
|
|
342
|
-
@media (
|
|
360
|
+
@media (width >= calc(map.get($mediaMap, $size) - 1px)) { @content; }
|
|
343
361
|
}
|
|
344
362
|
} @else {
|
|
345
363
|
@media (min-width: $fix) { @content; }
|
|
@@ -370,8 +388,7 @@ $mpMap: (
|
|
|
370
388
|
pb: padding-bottom,
|
|
371
389
|
pl: padding-left,
|
|
372
390
|
);
|
|
373
|
-
|
|
374
|
-
$controlHeights: (
|
|
391
|
+
$controlHeightsMap: (
|
|
375
392
|
'xxsmall': q(1.5),
|
|
376
393
|
'xsmall': q(3),
|
|
377
394
|
'small': q(4),
|
|
@@ -379,8 +396,7 @@ $controlHeights: (
|
|
|
379
396
|
'large': q(7),
|
|
380
397
|
'xlarge': q(10),
|
|
381
398
|
);
|
|
382
|
-
|
|
383
|
-
$borderRadius: (
|
|
399
|
+
$borderRadiusMap: (
|
|
384
400
|
'none': 0px,
|
|
385
401
|
'xxsmall': q(.25),
|
|
386
402
|
'xsmall': q(.5),
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
@use "tokens";
|
|
3
3
|
|
|
4
4
|
body {
|
|
5
|
+
// Set default font styles
|
|
6
|
+
@include ui.font-color('text');
|
|
7
|
+
@include ui.font-family('primary');
|
|
8
|
+
@include ui.font-weight('normal');
|
|
9
|
+
@include ui.line-height('normal');
|
|
10
|
+
@include ui.letter-spacing('normal');
|
|
11
|
+
|
|
5
12
|
// initiat tokens
|
|
6
13
|
@include tokens.color-tokens;
|
|
7
14
|
@include tokens.offset-tokens;
|
|
@@ -27,6 +34,9 @@ body {
|
|
|
27
34
|
@include tokens.separator-tokens;
|
|
28
35
|
@include tokens.zindex-tokens;
|
|
29
36
|
|
|
37
|
+
// initiat fonts
|
|
38
|
+
@include typography.font-HelveticaNow;
|
|
39
|
+
|
|
30
40
|
// responsive
|
|
31
41
|
@include tokens.mp-tokens;
|
|
32
42
|
@include tokens.responsive-tokens('display');
|
|
@@ -40,16 +50,6 @@ body {
|
|
|
40
50
|
@include tokens.responsive-tokens('flex');
|
|
41
51
|
@include tokens.responsive-tokens('font-size');
|
|
42
52
|
@include tokens.responsive-tokens('line-height');
|
|
43
|
-
|
|
44
|
-
// initiat fonts
|
|
45
|
-
@include typography.font-HelveticaNow;
|
|
46
|
-
|
|
47
|
-
// Set default font styles
|
|
48
|
-
@include ui.font-color('text');
|
|
49
|
-
@include ui.font-family('primary');
|
|
50
|
-
@include ui.font-weight('normal');
|
|
51
|
-
@include ui.line-height('normal');
|
|
52
|
-
@include ui.letter-spacing('normal');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
a {
|
|
@@ -59,16 +59,16 @@ a {
|
|
|
59
59
|
text-decoration: underline;
|
|
60
60
|
border-radius: ui.border-radius('xxsmall');
|
|
61
61
|
|
|
62
|
-
@include ui.animated
|
|
62
|
+
@include ui.animated;
|
|
63
63
|
|
|
64
64
|
&:not([aria-disabled="true"]) {
|
|
65
|
-
text-decoration-color:
|
|
65
|
+
text-decoration-color: currentcolor;
|
|
66
66
|
|
|
67
67
|
&:hover {
|
|
68
68
|
text-decoration-color: ui.color('tertiary', $alpha: 0.5);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
&:focus-visible:not(:active
|
|
71
|
+
&:focus-visible:not(:active, :hover) {
|
|
72
72
|
box-shadow: 0 0 0 ui.use('anchor-outline-size') ui.color-token('anchor-focus-outline');
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -94,26 +94,31 @@ h1 {
|
|
|
94
94
|
@include ui.line-height('xxxlarge');
|
|
95
95
|
@include ui.font-weight('bold');
|
|
96
96
|
}
|
|
97
|
+
|
|
97
98
|
h2 {
|
|
98
99
|
@include ui.font-size('xxlarge');
|
|
99
100
|
@include ui.line-height('xxlarge');
|
|
100
101
|
@include ui.font-weight('bold');
|
|
101
102
|
}
|
|
103
|
+
|
|
102
104
|
h3 {
|
|
103
105
|
@include ui.font-size('xlarge');
|
|
104
106
|
@include ui.line-height('xlarge');
|
|
105
107
|
@include ui.font-weight('bold');
|
|
106
108
|
}
|
|
109
|
+
|
|
107
110
|
h4 {
|
|
108
111
|
@include ui.font-size('large');
|
|
109
112
|
@include ui.line-height('large');
|
|
110
113
|
@include ui.font-weight('bold');
|
|
111
114
|
}
|
|
115
|
+
|
|
112
116
|
h5 {
|
|
113
117
|
@include ui.font-size('medium');
|
|
114
118
|
@include ui.line-height('medium');
|
|
115
119
|
@include ui.font-weight('bold');
|
|
116
120
|
}
|
|
121
|
+
|
|
117
122
|
h6 {
|
|
118
123
|
@include ui.font-size('medium');
|
|
119
124
|
@include ui.line-height('medium');
|
|
@@ -140,23 +145,29 @@ li::marker {
|
|
|
140
145
|
.util-full-height {
|
|
141
146
|
height: 100%;
|
|
142
147
|
}
|
|
148
|
+
|
|
143
149
|
.util-full-width {
|
|
144
150
|
width: 100%;
|
|
145
151
|
}
|
|
152
|
+
|
|
146
153
|
.util-z-index-9000 {
|
|
147
154
|
z-index: ui.zindex('max');
|
|
148
155
|
}
|
|
156
|
+
|
|
149
157
|
.util-text-unselectable,
|
|
150
158
|
.util-text-unselectable * {
|
|
151
159
|
user-select: none !important;
|
|
152
160
|
}
|
|
161
|
+
|
|
153
162
|
.util-text-selectable,
|
|
154
163
|
.util-text-selectable * {
|
|
155
164
|
user-select: text;
|
|
156
165
|
}
|
|
166
|
+
|
|
157
167
|
.util-flex-grow {
|
|
158
168
|
flex-grow: 1;
|
|
159
169
|
}
|
|
170
|
+
|
|
160
171
|
.util-flex-no-shrink {
|
|
161
172
|
flex-shrink: 0;
|
|
162
173
|
}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
$fg: #fffff0;
|
|
4
4
|
$bg: #161923;
|
|
5
|
-
|
|
6
|
-
$theme-cfx-colors: (
|
|
5
|
+
$colors: (
|
|
7
6
|
'accent': #F40552,
|
|
8
7
|
'primary': #F1F1E4,
|
|
9
8
|
'secondary': #9EA4BD,
|
|
@@ -18,14 +17,13 @@ $theme-cfx-colors: (
|
|
|
18
17
|
'bg-light': #1C202E,
|
|
19
18
|
'bg-dark': #1C202E,
|
|
20
19
|
'bg-dark-grey': #1A1A1A,
|
|
21
|
-
'bg-black': #
|
|
20
|
+
'bg-black': #000,
|
|
22
21
|
);
|
|
23
22
|
|
|
24
23
|
.cfxui-theme-cfx {
|
|
25
24
|
// TODO: remove
|
|
26
25
|
@include ui.define-main-colors($bg, $fg);
|
|
27
|
-
|
|
28
|
-
@include ui.define-theme($bg, $fg, $theme-cfx-colors);
|
|
26
|
+
@include ui.define-theme($bg, $fg, $colors);
|
|
29
27
|
|
|
30
28
|
// Invert black indicators for date/time inputs
|
|
31
29
|
::-webkit-calendar-picker-indicator {
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
$fg: #fffff0;
|
|
4
4
|
$bg: #161923;
|
|
5
|
-
|
|
6
|
-
$theme-fivem-colors: (
|
|
5
|
+
$colors: (
|
|
7
6
|
'accent': #5B8F22,
|
|
8
|
-
'primary': #
|
|
7
|
+
'primary': #FFF,
|
|
9
8
|
'secondary': #ABABAB,
|
|
10
9
|
'tertiary': #BBE093,
|
|
11
10
|
'green': #22BF4E,
|
|
@@ -14,18 +13,17 @@ $theme-fivem-colors: (
|
|
|
14
13
|
'argentum': #A3A3A3,
|
|
15
14
|
'aurum': #BFA45E,
|
|
16
15
|
'platinum': #F1F1F1,
|
|
17
|
-
'bg': #
|
|
16
|
+
'bg': #000,
|
|
18
17
|
'bg-light': #252525,
|
|
19
18
|
'bg-dark': #131313,
|
|
20
19
|
'bg-dark-grey': #1A1A1A,
|
|
21
|
-
'bg-black': #
|
|
20
|
+
'bg-black': #000,
|
|
22
21
|
);
|
|
23
22
|
|
|
24
23
|
.cfxui-theme-fivem {
|
|
25
24
|
// TODO: remove
|
|
26
25
|
@include ui.define-main-colors($bg, $fg);
|
|
27
|
-
|
|
28
|
-
@include ui.define-theme($bg, $fg, $theme-fivem-colors);
|
|
26
|
+
@include ui.define-theme($bg, $fg, $colors);
|
|
29
27
|
|
|
30
28
|
// Invert black indicators for date/time inputs
|
|
31
29
|
::-webkit-calendar-picker-indicator {
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
$fg: #fffff0;
|
|
4
4
|
$bg: #161923;
|
|
5
|
-
|
|
6
|
-
$theme-redm-colors: (
|
|
5
|
+
$colors: (
|
|
7
6
|
'accent': #D80D0D,
|
|
8
7
|
'primary': #F1F1E4,
|
|
9
8
|
'secondary': #ABABAB,
|
|
@@ -14,18 +13,17 @@ $theme-redm-colors: (
|
|
|
14
13
|
'argentum': #A3A3A3,
|
|
15
14
|
'aurum': #BFA45E,
|
|
16
15
|
'platinum': #F1F1F1,
|
|
17
|
-
'bg': #
|
|
16
|
+
'bg': #000,
|
|
18
17
|
'bg-light': #252525,
|
|
19
18
|
'bg-dark': #131313,
|
|
20
19
|
'bg-dark-grey': #1A1A1A,
|
|
21
|
-
'bg-black': #
|
|
20
|
+
'bg-black': #000,
|
|
22
21
|
);
|
|
23
22
|
|
|
24
23
|
.cfxui-theme-redm {
|
|
25
24
|
// TODO: remove
|
|
26
25
|
@include ui.define-main-colors($bg, $fg);
|
|
27
|
-
|
|
28
|
-
@include ui.define-theme($bg, $fg, $theme-redm-colors);
|
|
26
|
+
@include ui.define-theme($bg, $fg, $colors);
|
|
29
27
|
|
|
30
28
|
// Invert black indicators for date/time inputs
|
|
31
29
|
::-webkit-calendar-picker-indicator {
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
$fg: #fffff0;
|
|
4
4
|
$bg: #161923;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'accent': #444444,
|
|
5
|
+
$colors: (
|
|
6
|
+
'accent': #444,
|
|
8
7
|
'primary': #202123,
|
|
9
8
|
'secondary': #797979,
|
|
10
9
|
'tertiary': #9D9D9D,
|
|
@@ -14,18 +13,17 @@ $theme-wireframe-colors: (
|
|
|
14
13
|
'argentum': #A3A3A3,
|
|
15
14
|
'aurum': #BFA45E,
|
|
16
15
|
'platinum': #F1F1F1,
|
|
17
|
-
'bg': #
|
|
16
|
+
'bg': #FFF,
|
|
18
17
|
'bg-light': #DADADA,
|
|
19
18
|
'bg-dark': #DADADA,
|
|
20
19
|
'bg-dark-grey': #1A1A1A,
|
|
21
|
-
'bg-black': #
|
|
20
|
+
'bg-black': #444,
|
|
22
21
|
);
|
|
23
22
|
|
|
24
23
|
.cfxui-theme-wireframe {
|
|
25
24
|
// TODO: remove
|
|
26
25
|
@include ui.define-main-colors($bg, $fg);
|
|
27
|
-
|
|
28
|
-
@include ui.define-theme($bg, $fg, $theme-wireframe-colors);
|
|
26
|
+
@include ui.define-theme($bg, $fg, $colors);
|
|
29
27
|
|
|
30
28
|
// Invert black indicators for date/time inputs
|
|
31
29
|
::-webkit-calendar-picker-indicator {
|