@cfx-dev/ui-components 2.1.24 → 3.0.1
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/LICENSE +20 -20
- package/README.md +38 -38
- package/dist/{Rail-nVRissv6.js → Rail-XT5PwAlx.js} +1 -1
- package/dist/assets/all_css.css +55 -0
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/ButtonBar.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/ClipboardButton/ClipboardButton.js +1 -1
- package/dist/components/ControlBox/ControlBox.js +1 -1
- package/dist/components/CountryFlag/CountryFlag.js +1 -1
- package/dist/components/Decorate/Decorate.js +1 -1
- package/dist/components/Dot/Dot.js +1 -1
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/IconBig/IconBig.js +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Indicator/Indicator.js +1 -1
- package/dist/components/InfoPanel/InfoPanel.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/RichInput.js +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1 -1
- package/dist/components/InputDropzone/ItemPreview.js +1 -1
- package/dist/components/Interactive/Interactive.js +1 -1
- package/dist/components/Island/Island.js +1 -1
- package/dist/components/Layout/Box/Box.js +1 -1
- package/dist/components/Layout/Center/Center.js +1 -1
- package/dist/components/Layout/Flex/Flex.js +1 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +1 -1
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Pad/Pad.js +1 -1
- package/dist/components/Layout/Page/Page.js +1 -1
- package/dist/components/Layout/Scrollable/Rail.js +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +1 -1
- package/dist/components/Layout/Scrollable/index.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/Loaf/Loaf.js +1 -1
- package/dist/components/Logos/LogosShowcase.js +2 -2
- package/dist/components/Logos/cfx/CompositeLogo.js +74 -14
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/NavList/NavList.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverShowcase.js +1 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +1 -1
- package/dist/components/Prose/Prose.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Separator/Separator.js +1 -1
- package/dist/components/Shroud/Shroud.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Spacer/Spacer.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Tabular/Tabular.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Text/TextShowcase.js +1 -1
- package/dist/components/Textarea/Textarea.js +1 -1
- package/dist/components/Title/Title.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/main.js +1 -1
- package/dist/styles-scss/_colors.scss +211 -211
- package/dist/styles-scss/_typography.scss +51 -51
- package/dist/styles-scss/_ui.scss +359 -359
- package/dist/styles-scss/global.scss +142 -142
- package/dist/styles-scss/themes/theme_cfx.scss +32 -32
- package/dist/styles-scss/themes/theme_fivem.scss +32 -32
- package/dist/styles-scss/themes/theme_redm.scss +32 -32
- package/dist/styles-scss/themes/theme_wireframe.scss +32 -32
- package/dist/styles-scss/themes.scss +3 -3
- package/dist/styles-scss/tokens.scss +409 -409
- package/package.json +70 -71
- package/dist/assets/ColorShowcase.css +0 -1
- package/dist/assets/ColorVariationsShowcase.css +0 -1
- package/dist/assets/ColorsShowcase.css +0 -1
- package/dist/assets/ControlHeightShowcase.css +0 -1
- package/dist/assets/OffsetShowcase.css +0 -1
- package/dist/assets/QuantShowcase.css +0 -1
- package/dist/style-guide/Colors/ColorShowcase.d.ts +0 -21
- package/dist/style-guide/Colors/ColorShowcase.js +0 -1881
- package/dist/style-guide/Colors/ColorVariationsShowcase.d.ts +0 -5
- package/dist/style-guide/Colors/ColorVariationsShowcase.js +0 -43
- package/dist/style-guide/Colors/ColorsShowcase.d.ts +0 -5
- package/dist/style-guide/Colors/ColorsShowcase.js +0 -43
- package/dist/style-guide/Layout/ControlHeightShowcase.d.ts +0 -5
- package/dist/style-guide/Layout/ControlHeightShowcase.js +0 -27
- package/dist/style-guide/Layout/OffsetShowcase.d.ts +0 -5
- package/dist/style-guide/Layout/OffsetShowcase.js +0 -32
- package/dist/style-guide/Layout/QuantShowcase.d.ts +0 -5
- package/dist/style-guide/Layout/QuantShowcase.js +0 -36
- /package/dist/assets/{Accordion.css → css/Accordion.css} +0 -0
- /package/dist/assets/{Avatar.css → css/Avatar.css} +0 -0
- /package/dist/assets/{Badge.css → css/Badge.css} +0 -0
- /package/dist/assets/{Box.css → css/Box.css} +0 -0
- /package/dist/assets/{Button.css → css/Button.css} +0 -0
- /package/dist/assets/{ButtonBar.css → css/ButtonBar.css} +0 -0
- /package/dist/assets/{Center.css → css/Center.css} +0 -0
- /package/dist/assets/{Checkbox.css → css/Checkbox.css} +0 -0
- /package/dist/assets/{ClipboardButton.css → css/ClipboardButton.css} +0 -0
- /package/dist/assets/{ControlBox.css → css/ControlBox.css} +0 -0
- /package/dist/assets/{CountryFlag.css → css/CountryFlag.css} +0 -0
- /package/dist/assets/{Decorate.css → css/Decorate.css} +0 -0
- /package/dist/assets/{Dot.css → css/Dot.css} +0 -0
- /package/dist/assets/{Flex.css → css/Flex.css} +0 -0
- /package/dist/assets/{FlexRestricter.css → css/FlexRestricter.css} +0 -0
- /package/dist/assets/{FlexShowcase.css → css/FlexShowcase.css} +0 -0
- /package/dist/assets/{Flyout.css → css/Flyout.css} +0 -0
- /package/dist/assets/{Icon.css → css/Icon.css} +0 -0
- /package/dist/assets/{IconBig.css → css/IconBig.css} +0 -0
- /package/dist/assets/{IconButton.css → css/IconButton.css} +0 -0
- /package/dist/assets/{Indicator.css → css/Indicator.css} +0 -0
- /package/dist/assets/{InfoPanel.css → css/InfoPanel.css} +0 -0
- /package/dist/assets/{Input.css → css/Input.css} +0 -0
- /package/dist/assets/{InputDropzone.css → css/InputDropzone.css} +0 -0
- /package/dist/assets/{Interactive.css → css/Interactive.css} +0 -0
- /package/dist/assets/{Island.css → css/Island.css} +0 -0
- /package/dist/assets/{ItemPreview.css → css/ItemPreview.css} +0 -0
- /package/dist/assets/{Link.css → css/Link.css} +0 -0
- /package/dist/assets/{Loaf.css → css/Loaf.css} +0 -0
- /package/dist/assets/{Modal.css → css/Modal.css} +0 -0
- /package/dist/assets/{NavList.css → css/NavList.css} +0 -0
- /package/dist/assets/{Overlay.css → css/Overlay.css} +0 -0
- /package/dist/assets/{Pad.css → css/Pad.css} +0 -0
- /package/dist/assets/{Page.css → css/Page.css} +0 -0
- /package/dist/assets/{Popover.css → css/Popover.css} +0 -0
- /package/dist/assets/{PopoverShowcase.css → css/PopoverShowcase.css} +0 -0
- /package/dist/assets/{PremiumBadge.css → css/PremiumBadge.css} +0 -0
- /package/dist/assets/{Prose.css → css/Prose.css} +0 -0
- /package/dist/assets/{Radio.css → css/Radio.css} +0 -0
- /package/dist/assets/{Rail.css → css/Rail.css} +0 -0
- /package/dist/assets/{RichInput.css → css/RichInput.css} +0 -0
- /package/dist/assets/{Select.css → css/Select.css} +0 -0
- /package/dist/assets/{Separator.css → css/Separator.css} +0 -0
- /package/dist/assets/{Shroud.css → css/Shroud.css} +0 -0
- /package/dist/assets/{Skeleton.css → css/Skeleton.css} +0 -0
- /package/dist/assets/{Spacer.css → css/Spacer.css} +0 -0
- /package/dist/assets/{Switch.css → css/Switch.css} +0 -0
- /package/dist/assets/{Table.css → css/Table.css} +0 -0
- /package/dist/assets/{Tabular.css → css/Tabular.css} +0 -0
- /package/dist/assets/{Text.css → css/Text.css} +0 -0
- /package/dist/assets/{TextShowcase.css → css/TextShowcase.css} +0 -0
- /package/dist/assets/{Textarea.css → css/Textarea.css} +0 -0
- /package/dist/assets/{Title.css → css/Title.css} +0 -0
- /package/dist/assets/{ToggleGroup.css → css/ToggleGroup.css} +0 -0
- /package/dist/assets/{global.css → general/global.css} +0 -0
- /package/dist/assets/{themes.css → general/themes.css} +0 -0
|
@@ -1,359 +1,359 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
@use "sass:meta";
|
|
4
|
-
@use "colors";
|
|
5
|
-
|
|
6
|
-
@mixin def($var, $value) {
|
|
7
|
-
--#{$var}: #{$value};
|
|
8
|
-
}
|
|
9
|
-
@function use($var, $default: initial) {
|
|
10
|
-
@return var(--#{$var}, $default);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@function color($name, $luminance: 'pure', $alpha: 1.0) {
|
|
14
|
-
@if $luminance == 'pure' {
|
|
15
|
-
@return rgba(var(--color-#{$name}), #{$alpha});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@return rgba(var(--color-#{$name}-#{$luminance}), #{$alpha});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@function offset($size: 'normal') {
|
|
22
|
-
@return var(--offset-#{$size});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@function q($multiplier: 1) {
|
|
26
|
-
@if $multiplier == 1 {
|
|
27
|
-
@return var(--quant);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@return calc(var(--quant) * #{$multiplier});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@function control-height($size: 'normal') {
|
|
34
|
-
@return var(--control-height-#{$size});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@function font-size($size: 'normal') {
|
|
38
|
-
@return var(--font-size-#{$size});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@function font-weight($weight: 'normal') {
|
|
42
|
-
@return var(--font-weight-#{$weight});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@function negative($cssValue) {
|
|
46
|
-
@return calc(-1 * #{$cssValue});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@function border-radius($size: 'normal') {
|
|
50
|
-
@return var(--border-radius-#{$size});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@function viewport-width($multiplier: 1.0) {
|
|
54
|
-
@return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
55
|
-
}
|
|
56
|
-
@function viewport-height($multiplier: 1.0) {
|
|
57
|
-
@return calc((var(--height) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
$cfxui-color-luminance: (
|
|
61
|
-
'pure',
|
|
62
|
-
950,
|
|
63
|
-
900,
|
|
64
|
-
800,
|
|
65
|
-
700,
|
|
66
|
-
600,
|
|
67
|
-
500,
|
|
68
|
-
400,
|
|
69
|
-
300,
|
|
70
|
-
200,
|
|
71
|
-
100,
|
|
72
|
-
50,
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
$cfxui-color-alpha: (
|
|
76
|
-
'100': 1,
|
|
77
|
-
'90': 0.9,
|
|
78
|
-
'80': 0.8,
|
|
79
|
-
'70': 0.7,
|
|
80
|
-
'60': 0.6,
|
|
81
|
-
'50': 0.5,
|
|
82
|
-
'40': 0.4,
|
|
83
|
-
'30': 0.3,
|
|
84
|
-
'20': 0.2,
|
|
85
|
-
'10': 0.1,
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
@mixin define-font-size($name, $size, $line-height: 1.3) {
|
|
89
|
-
@include def('font-size-#{$name}', $size);
|
|
90
|
-
@include def('line-height-#{$name}', $line-height);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@mixin define-color($name, $color, $bg, $fg) {
|
|
94
|
-
.cfx-color-#{$name} { color: $color }
|
|
95
|
-
|
|
96
|
-
--color-#{$name}: #{colors.color-triplet($color)};
|
|
97
|
-
--color-#{$name}-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 1, 7))};
|
|
98
|
-
--color-#{$name}-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 2, 7))};
|
|
99
|
-
--color-#{$name}-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 3, 7))};
|
|
100
|
-
--color-#{$name}-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 4, 7))};
|
|
101
|
-
--color-#{$name}-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 5, 7))};
|
|
102
|
-
--color-#{$name}-500: #{colors.color-triplet($color)};
|
|
103
|
-
--color-#{$name}-600: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 1, 7))};
|
|
104
|
-
--color-#{$name}-700: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 2, 7))};
|
|
105
|
-
--color-#{$name}-800: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 3, 7))};
|
|
106
|
-
--color-#{$name}-900: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 4, 7))};
|
|
107
|
-
--color-#{$name}-950: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 5, 7))};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@mixin define-main-color($bg, $fg) {
|
|
111
|
-
--color-main: #{colors.color-triplet($bg)};
|
|
112
|
-
--color-main-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 1, 12))};
|
|
113
|
-
--color-main-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 2, 12))};
|
|
114
|
-
--color-main-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 3, 12))};
|
|
115
|
-
--color-main-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 4, 12))};
|
|
116
|
-
--color-main-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 5, 12))};
|
|
117
|
-
--color-main-500: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 6, 12))};
|
|
118
|
-
--color-main-600: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 7, 12))};
|
|
119
|
-
--color-main-700: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 8, 12))};
|
|
120
|
-
--color-main-800: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 9, 12))};
|
|
121
|
-
--color-main-900: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 10, 12))};
|
|
122
|
-
--color-main-950: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 11, 12))};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@mixin define-main-colors($bg, $fg, $overrides: ()) {
|
|
126
|
-
$colors: map-merge((
|
|
127
|
-
'primary': #f50551,
|
|
128
|
-
'success': #01a370,
|
|
129
|
-
'warning': #ffae00,
|
|
130
|
-
'error': #ff2600,
|
|
131
|
-
'teal': #007892,
|
|
132
|
-
'aurum': #aa6f0d,
|
|
133
|
-
'silver': #a5a5a5
|
|
134
|
-
), $overrides);
|
|
135
|
-
|
|
136
|
-
@include define-main-color($bg, $fg);
|
|
137
|
-
|
|
138
|
-
@each $colorName, $colorValue in $colors {
|
|
139
|
-
@include define-color($colorName, $colorValue, $bg, $fg);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@mixin define-theme($bg, $fg, $overrides: ()) {
|
|
144
|
-
$colors: map-merge((
|
|
145
|
-
'accent': #F40552,
|
|
146
|
-
'primary': #F1F1E4,
|
|
147
|
-
'secondary': #9EA4BD,
|
|
148
|
-
'tertiary': #FF75AC,
|
|
149
|
-
'green': #22BF4E,
|
|
150
|
-
'yellow': #FDA640,
|
|
151
|
-
'red': #E33131,
|
|
152
|
-
'argentum': #A3A3A3,
|
|
153
|
-
'aurum': #BFA45E,
|
|
154
|
-
'platinum': #F1F1F1,
|
|
155
|
-
'bg': #11131C,
|
|
156
|
-
'bg-light': #1C202E,
|
|
157
|
-
'bg-dark': #1C202E,
|
|
158
|
-
'bg-dark-grey': #1A1A1A,
|
|
159
|
-
'bg-black': #000000,
|
|
160
|
-
), $overrides);
|
|
161
|
-
|
|
162
|
-
@each $colorName, $colorValue in $colors {
|
|
163
|
-
@include define-color($colorName, $colorValue, $bg, $fg);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@mixin define-color-token($name, $color) {
|
|
168
|
-
--color-#{$name}: #{$color};
|
|
169
|
-
}
|
|
170
|
-
@function color-token($name, ) {
|
|
171
|
-
@return var(--color-#{$name});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
@mixin border-radius($size: 'normal') {
|
|
176
|
-
border-radius: var(--border-radius-#{$size});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@mixin font-size($size: 'normal') {
|
|
180
|
-
font-size: var(--font-size-#{$size});
|
|
181
|
-
}
|
|
182
|
-
@mixin font-family($family: 'primary') {
|
|
183
|
-
font-family: var(--font-family-#{$family});
|
|
184
|
-
}
|
|
185
|
-
@mixin font-weight($weight: 'normal') {
|
|
186
|
-
font-weight: var(--font-weight-#{$weight});
|
|
187
|
-
}
|
|
188
|
-
@mixin font-color($colorToken) {
|
|
189
|
-
color: color-token($colorToken);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@mixin letter-spacing($size: 'normal') {
|
|
193
|
-
letter-spacing: var(--letter-spacing-#{$size});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
@mixin line-height($size: 'normal') {
|
|
197
|
-
line-height: var(--line-height-#{$size});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@mixin animated($props: 'all', $subClass: '&') {
|
|
201
|
-
@if type-of($props) == 'list' {
|
|
202
|
-
$transition: ();
|
|
203
|
-
@each $property in $props {
|
|
204
|
-
$transition: append(
|
|
205
|
-
$transition, ($property .25s ease), $separator: comma
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
#{$subClass} {
|
|
209
|
-
transition: $transition,
|
|
210
|
-
outline-offset 0s,
|
|
211
|
-
outline 0s;
|
|
212
|
-
}
|
|
213
|
-
} @else {
|
|
214
|
-
#{$subClass} {
|
|
215
|
-
transition: #{$props} .25s ease,
|
|
216
|
-
outline-offset 0s,
|
|
217
|
-
outline 0s;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@mixin fake-backdrop-blur($topLayer: false, $topLayerBlend: false, $topLayerSize: false, $topLayerAttachement: false) {
|
|
223
|
-
--_backdrop-color: var(--backdrop-color, transparent);
|
|
224
|
-
--_backdrop-image-blur: var(--backdrop-image-blur, url(assets/images/bg2-blur.png));
|
|
225
|
-
|
|
226
|
-
@if not $topLayer {
|
|
227
|
-
$topLayer: linear-gradient(use('_backdrop-color'), use('_backdrop-color'));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
@if not $topLayerBlend {
|
|
231
|
-
$topLayerBlend: normal;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
@if not $topLayerSize {
|
|
235
|
-
$topLayerSize: cover;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
@if not $topLayerAttachement {
|
|
239
|
-
$topLayerAttachement: scroll;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
background-color: use('_backdrop-color');
|
|
243
|
-
background-image:
|
|
244
|
-
$topLayer,
|
|
245
|
-
linear-gradient(color-token('backdrop-shader'), color-token('backdrop-shader')),
|
|
246
|
-
use('_backdrop-image-blur'),
|
|
247
|
-
use('_backdrop-image-blur');
|
|
248
|
-
background-blend-mode: $topLayerBlend, normal, overlay;
|
|
249
|
-
background-size: $topLayerSize, cover, cover, cover;
|
|
250
|
-
background-attachment: $topLayerAttachement, scroll, fixed, fixed;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
$offsets: (
|
|
254
|
-
'none': 0px,
|
|
255
|
-
'hairthin': 1px,
|
|
256
|
-
'thin': 2px,
|
|
257
|
-
'xxsmall': q(.25),
|
|
258
|
-
'xsmall': q(.5),
|
|
259
|
-
'small': q(1),
|
|
260
|
-
'normal': q(2),
|
|
261
|
-
'medium': q(2.5),
|
|
262
|
-
'large': q(4),
|
|
263
|
-
'xlarge': q(6),
|
|
264
|
-
'safezone': q(8),
|
|
265
|
-
);
|
|
266
|
-
|
|
267
|
-
@mixin offset-classes($prefix: 'offset', $property: 'gap') {
|
|
268
|
-
@each $name, $value in $offsets {
|
|
269
|
-
&.#{$prefix}-#{$name} {
|
|
270
|
-
#{$property}: offset('#{$name}');
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
@mixin webkit-scrollbar() {
|
|
276
|
-
::-webkit-scrollbar {
|
|
277
|
-
width: use('scrollable-thumb-size');
|
|
278
|
-
}
|
|
279
|
-
::-webkit-scrollbar:horizontal {
|
|
280
|
-
height: use('scrollable-thumb-size');
|
|
281
|
-
}
|
|
282
|
-
::-webkit-scrollbar-track {
|
|
283
|
-
background-color: color-token('scrollbar-track-background');
|
|
284
|
-
}
|
|
285
|
-
::-webkit-scrollbar-thumb {
|
|
286
|
-
@include border-radius('pill');
|
|
287
|
-
|
|
288
|
-
background-color: color-token('scrollbar');
|
|
289
|
-
|
|
290
|
-
&:hover {
|
|
291
|
-
background-color: color-token('scrollbar-hover');
|
|
292
|
-
}
|
|
293
|
-
&:active {
|
|
294
|
-
background-color: color-token('scrollbar-active');
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
::-webkit-scrollbar-corner {
|
|
298
|
-
display: none;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@mixin placeholder-color($color) {
|
|
303
|
-
&::placeholder {color: $color}
|
|
304
|
-
&::-webkit-input-placeholder {color: $color}
|
|
305
|
-
&::-moz-placeholder {color: $color}
|
|
306
|
-
&:-ms-input-placeholder {color: $color}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
@mixin placeholder-animated($props: 'all', $subClass: '&') {
|
|
310
|
-
&::placeholder {@include animated($props, $subClass)}
|
|
311
|
-
&::-webkit-input-placeholder {@include animated($props, $subClass)}
|
|
312
|
-
&::-moz-placeholder {@include animated($props, $subClass)}
|
|
313
|
-
&:-ms-input-placeholder {@include animated($props, $subClass)}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
$zindexMap: (
|
|
317
|
-
'zero': 0,
|
|
318
|
-
'first': 1,
|
|
319
|
-
'second': 2,
|
|
320
|
-
'max': 9000,
|
|
321
|
-
);
|
|
322
|
-
|
|
323
|
-
@function zindex($index) {
|
|
324
|
-
@return map.get($zindexMap, $index);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
$mediaMap: (
|
|
328
|
-
'initial': 0px,
|
|
329
|
-
'xxsmall': 360px,
|
|
330
|
-
'xsmall': 640px,
|
|
331
|
-
'small': 768px,
|
|
332
|
-
'medium': 1024px,
|
|
333
|
-
'large': 1280px,
|
|
334
|
-
'xlarge': 1536px,
|
|
335
|
-
);
|
|
336
|
-
|
|
337
|
-
@mixin media-max($size: 'medium', $fix: 'empty') {
|
|
338
|
-
@if $fix == 'empty' {
|
|
339
|
-
@if $size == 'initial' {
|
|
340
|
-
@content;
|
|
341
|
-
} @else {
|
|
342
|
-
@media (min-width: calc(map.get($mediaMap, $size) - 1px)) { @content; }
|
|
343
|
-
}
|
|
344
|
-
} @else {
|
|
345
|
-
@media (min-width: $fix) { @content; }
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
@mixin media-min($size: 'medium', $fix: 'empty') {
|
|
350
|
-
@if $fix == 'empty' {
|
|
351
|
-
@if $size == 'initial' {
|
|
352
|
-
@content;
|
|
353
|
-
} @else {
|
|
354
|
-
@media (min-width: map.get($mediaMap, $size)) { @content; }
|
|
355
|
-
}
|
|
356
|
-
} @else {
|
|
357
|
-
@media (min-width: $fix) { @content; }
|
|
358
|
-
}
|
|
359
|
-
}
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "sass:meta";
|
|
4
|
+
@use "colors";
|
|
5
|
+
|
|
6
|
+
@mixin def($var, $value) {
|
|
7
|
+
--#{$var}: #{$value};
|
|
8
|
+
}
|
|
9
|
+
@function use($var, $default: initial) {
|
|
10
|
+
@return var(--#{$var}, $default);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@function color($name, $luminance: 'pure', $alpha: 1.0) {
|
|
14
|
+
@if $luminance == 'pure' {
|
|
15
|
+
@return rgba(var(--color-#{$name}), #{$alpha});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@return rgba(var(--color-#{$name}-#{$luminance}), #{$alpha});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@function offset($size: 'normal') {
|
|
22
|
+
@return var(--offset-#{$size});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@function q($multiplier: 1) {
|
|
26
|
+
@if $multiplier == 1 {
|
|
27
|
+
@return var(--quant);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@return calc(var(--quant) * #{$multiplier});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@function control-height($size: 'normal') {
|
|
34
|
+
@return var(--control-height-#{$size});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@function font-size($size: 'normal') {
|
|
38
|
+
@return var(--font-size-#{$size});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@function font-weight($weight: 'normal') {
|
|
42
|
+
@return var(--font-weight-#{$weight});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@function negative($cssValue) {
|
|
46
|
+
@return calc(-1 * #{$cssValue});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@function border-radius($size: 'normal') {
|
|
50
|
+
@return var(--border-radius-#{$size});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@function viewport-width($multiplier: 1.0) {
|
|
54
|
+
@return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
55
|
+
}
|
|
56
|
+
@function viewport-height($multiplier: 1.0) {
|
|
57
|
+
@return calc((var(--height) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$cfxui-color-luminance: (
|
|
61
|
+
'pure',
|
|
62
|
+
950,
|
|
63
|
+
900,
|
|
64
|
+
800,
|
|
65
|
+
700,
|
|
66
|
+
600,
|
|
67
|
+
500,
|
|
68
|
+
400,
|
|
69
|
+
300,
|
|
70
|
+
200,
|
|
71
|
+
100,
|
|
72
|
+
50,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
$cfxui-color-alpha: (
|
|
76
|
+
'100': 1,
|
|
77
|
+
'90': 0.9,
|
|
78
|
+
'80': 0.8,
|
|
79
|
+
'70': 0.7,
|
|
80
|
+
'60': 0.6,
|
|
81
|
+
'50': 0.5,
|
|
82
|
+
'40': 0.4,
|
|
83
|
+
'30': 0.3,
|
|
84
|
+
'20': 0.2,
|
|
85
|
+
'10': 0.1,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
@mixin define-font-size($name, $size, $line-height: 1.3) {
|
|
89
|
+
@include def('font-size-#{$name}', $size);
|
|
90
|
+
@include def('line-height-#{$name}', $line-height);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@mixin define-color($name, $color, $bg, $fg) {
|
|
94
|
+
.cfx-color-#{$name} { color: $color }
|
|
95
|
+
|
|
96
|
+
--color-#{$name}: #{colors.color-triplet($color)};
|
|
97
|
+
--color-#{$name}-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 1, 7))};
|
|
98
|
+
--color-#{$name}-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 2, 7))};
|
|
99
|
+
--color-#{$name}-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 3, 7))};
|
|
100
|
+
--color-#{$name}-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 4, 7))};
|
|
101
|
+
--color-#{$name}-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 5, 7))};
|
|
102
|
+
--color-#{$name}-500: #{colors.color-triplet($color)};
|
|
103
|
+
--color-#{$name}-600: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 1, 7))};
|
|
104
|
+
--color-#{$name}-700: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 2, 7))};
|
|
105
|
+
--color-#{$name}-800: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 3, 7))};
|
|
106
|
+
--color-#{$name}-900: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 4, 7))};
|
|
107
|
+
--color-#{$name}-950: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 5, 7))};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@mixin define-main-color($bg, $fg) {
|
|
111
|
+
--color-main: #{colors.color-triplet($bg)};
|
|
112
|
+
--color-main-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 1, 12))};
|
|
113
|
+
--color-main-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 2, 12))};
|
|
114
|
+
--color-main-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 3, 12))};
|
|
115
|
+
--color-main-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 4, 12))};
|
|
116
|
+
--color-main-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 5, 12))};
|
|
117
|
+
--color-main-500: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 6, 12))};
|
|
118
|
+
--color-main-600: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 7, 12))};
|
|
119
|
+
--color-main-700: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 8, 12))};
|
|
120
|
+
--color-main-800: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 9, 12))};
|
|
121
|
+
--color-main-900: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 10, 12))};
|
|
122
|
+
--color-main-950: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 11, 12))};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin define-main-colors($bg, $fg, $overrides: ()) {
|
|
126
|
+
$colors: map-merge((
|
|
127
|
+
'primary': #f50551,
|
|
128
|
+
'success': #01a370,
|
|
129
|
+
'warning': #ffae00,
|
|
130
|
+
'error': #ff2600,
|
|
131
|
+
'teal': #007892,
|
|
132
|
+
'aurum': #aa6f0d,
|
|
133
|
+
'silver': #a5a5a5
|
|
134
|
+
), $overrides);
|
|
135
|
+
|
|
136
|
+
@include define-main-color($bg, $fg);
|
|
137
|
+
|
|
138
|
+
@each $colorName, $colorValue in $colors {
|
|
139
|
+
@include define-color($colorName, $colorValue, $bg, $fg);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@mixin define-theme($bg, $fg, $overrides: ()) {
|
|
144
|
+
$colors: map-merge((
|
|
145
|
+
'accent': #F40552,
|
|
146
|
+
'primary': #F1F1E4,
|
|
147
|
+
'secondary': #9EA4BD,
|
|
148
|
+
'tertiary': #FF75AC,
|
|
149
|
+
'green': #22BF4E,
|
|
150
|
+
'yellow': #FDA640,
|
|
151
|
+
'red': #E33131,
|
|
152
|
+
'argentum': #A3A3A3,
|
|
153
|
+
'aurum': #BFA45E,
|
|
154
|
+
'platinum': #F1F1F1,
|
|
155
|
+
'bg': #11131C,
|
|
156
|
+
'bg-light': #1C202E,
|
|
157
|
+
'bg-dark': #1C202E,
|
|
158
|
+
'bg-dark-grey': #1A1A1A,
|
|
159
|
+
'bg-black': #000000,
|
|
160
|
+
), $overrides);
|
|
161
|
+
|
|
162
|
+
@each $colorName, $colorValue in $colors {
|
|
163
|
+
@include define-color($colorName, $colorValue, $bg, $fg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@mixin define-color-token($name, $color) {
|
|
168
|
+
--color-#{$name}: #{$color};
|
|
169
|
+
}
|
|
170
|
+
@function color-token($name, ) {
|
|
171
|
+
@return var(--color-#{$name});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@mixin border-radius($size: 'normal') {
|
|
176
|
+
border-radius: var(--border-radius-#{$size});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@mixin font-size($size: 'normal') {
|
|
180
|
+
font-size: var(--font-size-#{$size});
|
|
181
|
+
}
|
|
182
|
+
@mixin font-family($family: 'primary') {
|
|
183
|
+
font-family: var(--font-family-#{$family});
|
|
184
|
+
}
|
|
185
|
+
@mixin font-weight($weight: 'normal') {
|
|
186
|
+
font-weight: var(--font-weight-#{$weight});
|
|
187
|
+
}
|
|
188
|
+
@mixin font-color($colorToken) {
|
|
189
|
+
color: color-token($colorToken);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@mixin letter-spacing($size: 'normal') {
|
|
193
|
+
letter-spacing: var(--letter-spacing-#{$size});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@mixin line-height($size: 'normal') {
|
|
197
|
+
line-height: var(--line-height-#{$size});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@mixin animated($props: 'all', $subClass: '&') {
|
|
201
|
+
@if type-of($props) == 'list' {
|
|
202
|
+
$transition: ();
|
|
203
|
+
@each $property in $props {
|
|
204
|
+
$transition: append(
|
|
205
|
+
$transition, ($property .25s ease), $separator: comma
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
#{$subClass} {
|
|
209
|
+
transition: $transition,
|
|
210
|
+
outline-offset 0s,
|
|
211
|
+
outline 0s;
|
|
212
|
+
}
|
|
213
|
+
} @else {
|
|
214
|
+
#{$subClass} {
|
|
215
|
+
transition: #{$props} .25s ease,
|
|
216
|
+
outline-offset 0s,
|
|
217
|
+
outline 0s;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@mixin fake-backdrop-blur($topLayer: false, $topLayerBlend: false, $topLayerSize: false, $topLayerAttachement: false) {
|
|
223
|
+
--_backdrop-color: var(--backdrop-color, transparent);
|
|
224
|
+
--_backdrop-image-blur: var(--backdrop-image-blur, url(assets/images/bg2-blur.png));
|
|
225
|
+
|
|
226
|
+
@if not $topLayer {
|
|
227
|
+
$topLayer: linear-gradient(use('_backdrop-color'), use('_backdrop-color'));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@if not $topLayerBlend {
|
|
231
|
+
$topLayerBlend: normal;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@if not $topLayerSize {
|
|
235
|
+
$topLayerSize: cover;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@if not $topLayerAttachement {
|
|
239
|
+
$topLayerAttachement: scroll;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
background-color: use('_backdrop-color');
|
|
243
|
+
background-image:
|
|
244
|
+
$topLayer,
|
|
245
|
+
linear-gradient(color-token('backdrop-shader'), color-token('backdrop-shader')),
|
|
246
|
+
use('_backdrop-image-blur'),
|
|
247
|
+
use('_backdrop-image-blur');
|
|
248
|
+
background-blend-mode: $topLayerBlend, normal, overlay;
|
|
249
|
+
background-size: $topLayerSize, cover, cover, cover;
|
|
250
|
+
background-attachment: $topLayerAttachement, scroll, fixed, fixed;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
$offsets: (
|
|
254
|
+
'none': 0px,
|
|
255
|
+
'hairthin': 1px,
|
|
256
|
+
'thin': 2px,
|
|
257
|
+
'xxsmall': q(.25),
|
|
258
|
+
'xsmall': q(.5),
|
|
259
|
+
'small': q(1),
|
|
260
|
+
'normal': q(2),
|
|
261
|
+
'medium': q(2.5),
|
|
262
|
+
'large': q(4),
|
|
263
|
+
'xlarge': q(6),
|
|
264
|
+
'safezone': q(8),
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
@mixin offset-classes($prefix: 'offset', $property: 'gap') {
|
|
268
|
+
@each $name, $value in $offsets {
|
|
269
|
+
&.#{$prefix}-#{$name} {
|
|
270
|
+
#{$property}: offset('#{$name}');
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@mixin webkit-scrollbar() {
|
|
276
|
+
::-webkit-scrollbar {
|
|
277
|
+
width: use('scrollable-thumb-size');
|
|
278
|
+
}
|
|
279
|
+
::-webkit-scrollbar:horizontal {
|
|
280
|
+
height: use('scrollable-thumb-size');
|
|
281
|
+
}
|
|
282
|
+
::-webkit-scrollbar-track {
|
|
283
|
+
background-color: color-token('scrollbar-track-background');
|
|
284
|
+
}
|
|
285
|
+
::-webkit-scrollbar-thumb {
|
|
286
|
+
@include border-radius('pill');
|
|
287
|
+
|
|
288
|
+
background-color: color-token('scrollbar');
|
|
289
|
+
|
|
290
|
+
&:hover {
|
|
291
|
+
background-color: color-token('scrollbar-hover');
|
|
292
|
+
}
|
|
293
|
+
&:active {
|
|
294
|
+
background-color: color-token('scrollbar-active');
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
::-webkit-scrollbar-corner {
|
|
298
|
+
display: none;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@mixin placeholder-color($color) {
|
|
303
|
+
&::placeholder {color: $color}
|
|
304
|
+
&::-webkit-input-placeholder {color: $color}
|
|
305
|
+
&::-moz-placeholder {color: $color}
|
|
306
|
+
&:-ms-input-placeholder {color: $color}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@mixin placeholder-animated($props: 'all', $subClass: '&') {
|
|
310
|
+
&::placeholder {@include animated($props, $subClass)}
|
|
311
|
+
&::-webkit-input-placeholder {@include animated($props, $subClass)}
|
|
312
|
+
&::-moz-placeholder {@include animated($props, $subClass)}
|
|
313
|
+
&:-ms-input-placeholder {@include animated($props, $subClass)}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
$zindexMap: (
|
|
317
|
+
'zero': 0,
|
|
318
|
+
'first': 1,
|
|
319
|
+
'second': 2,
|
|
320
|
+
'max': 9000,
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
@function zindex($index) {
|
|
324
|
+
@return map.get($zindexMap, $index);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
$mediaMap: (
|
|
328
|
+
'initial': 0px,
|
|
329
|
+
'xxsmall': 360px,
|
|
330
|
+
'xsmall': 640px,
|
|
331
|
+
'small': 768px,
|
|
332
|
+
'medium': 1024px,
|
|
333
|
+
'large': 1280px,
|
|
334
|
+
'xlarge': 1536px,
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
@mixin media-max($size: 'medium', $fix: 'empty') {
|
|
338
|
+
@if $fix == 'empty' {
|
|
339
|
+
@if $size == 'initial' {
|
|
340
|
+
@content;
|
|
341
|
+
} @else {
|
|
342
|
+
@media (min-width: calc(map.get($mediaMap, $size) - 1px)) { @content; }
|
|
343
|
+
}
|
|
344
|
+
} @else {
|
|
345
|
+
@media (min-width: $fix) { @content; }
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@mixin media-min($size: 'medium', $fix: 'empty') {
|
|
350
|
+
@if $fix == 'empty' {
|
|
351
|
+
@if $size == 'initial' {
|
|
352
|
+
@content;
|
|
353
|
+
} @else {
|
|
354
|
+
@media (min-width: map.get($mediaMap, $size)) { @content; }
|
|
355
|
+
}
|
|
356
|
+
} @else {
|
|
357
|
+
@media (min-width: $fix) { @content; }
|
|
358
|
+
}
|
|
359
|
+
}
|