@cfx-dev/ui-components 4.0.2 → 4.2.0
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-BRUj3CHE.js → Combination-Cbiw1XRb.js} +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Accordion/Accordion.js +18 -17
- package/dist/components/Accordion/AccordionShowcase.js +3 -2
- package/dist/components/Avatar/AvatarShowcase.js +3 -2
- package/dist/components/Badge/BadgeShowcase.js +5 -4
- package/dist/components/Button/ButtonShowcase.js +3 -2
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +4 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +739 -715
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +11 -10
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Icon/Icon.d.ts +4 -3
- package/dist/components/Icon/Icon.js +27 -25
- package/dist/components/IconBig/IconBig.js +3 -2
- package/dist/components/InfoPanel/InfoPanelShowcase.js +11 -10
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Input/Input.js +96 -75
- package/dist/components/Input/InputShowcase.js +6 -5
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +60 -43
- package/dist/components/Layout/Box/Box.d.ts +4 -11
- package/dist/components/Layout/Box/Box.js +58 -96
- package/dist/components/Layout/Flex/Flex.d.ts +7 -3
- package/dist/components/Layout/Flex/Flex.js +70 -62
- package/dist/components/Layout/Flex/Flex.types.d.ts +42 -0
- package/dist/components/Layout/Flex/Flex.types.js +7 -0
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -0
- package/dist/components/Link/LinkShowcase.js +1 -0
- package/dist/components/Logos/LogosShowcase.js +3 -2
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Select/Select.d.ts +2 -3
- package/dist/components/Select/Select.js +1922 -7
- package/dist/components/Select/SelectShowcase.js +4 -3
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +2 -3
- package/dist/components/Separator/Separator.d.ts +2 -2
- package/dist/components/Separator/Separator.js +35 -25
- package/dist/components/Skeleton/Skeleton.d.ts +7 -6
- package/dist/components/Skeleton/Skeleton.js +35 -22
- package/dist/components/Skeleton/SkeletonShowcase.js +14 -13
- package/dist/components/Slider/Slider.js +11 -9
- package/dist/components/Slider/SliderShowcase.js +10 -9
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Table/Table.js +3 -2
- package/dist/components/Table/TableShowcase.js +7 -6
- package/dist/components/Tabular/Tabular.d.ts +6 -1
- package/dist/components/Tabular/Tabular.js +93 -64
- package/dist/components/Tabular/TabularShowcase.js +51 -25
- package/dist/components/Text/Text.d.ts +3 -1
- package/dist/components/Text/Text.js +61 -52
- package/dist/components/Text/Text.types.d.ts +4 -13
- package/dist/components/Text/Text.types.js +1 -4
- package/dist/components/Text/index.d.ts +3 -2
- package/dist/components/Text/index.js +9 -6
- package/dist/components/Title/TitleShowcase.js +4 -3
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +36 -33
- package/dist/components/ToggleGroup/ToggleGroupShowcase.d.ts +5 -0
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +60 -0
- package/dist/components/ToggleGroup/index.d.ts +2 -0
- package/dist/components/ToggleGroup/index.js +4 -0
- package/dist/components/ui.d.ts +37 -12
- package/dist/components/ui.js +61 -57
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-ByaXH_ih.js +10 -0
- package/dist/index-Cf5Yu9oD.js +67 -0
- package/dist/index-DBus3GoO.js +1342 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +14 -14
- package/dist/{medium-JVtzoF2c.js → medium-BA3EQDZW.js} +2 -2
- package/dist/styles-scss/_ui.scss +10 -1
- package/dist/styles-scss/global.scss +39 -26
- package/dist/styles-scss/themes/theme_cfx.scss +2 -0
- package/dist/styles-scss/themes/theme_fivem.scss +2 -0
- package/dist/styles-scss/themes/theme_redm.scss +2 -0
- package/dist/styles-scss/themes/theme_wireframe.scss +2 -0
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +30 -17
- package/package.json +1 -1
- package/dist/Select-Ds-fm4CN.js +0 -3245
- package/dist/index-BCnz73Lm.js +0 -72
- package/dist/index-BW3WdIgK.js +0 -14
- package/dist/types/Offset.d.ts +0 -1
- package/dist/types/Offset.js +0 -1
package/dist/main.d.ts
CHANGED
|
@@ -94,5 +94,5 @@ export type { PopoverProps } from './components/Popover';
|
|
|
94
94
|
export type { AvatarProps, AvatarSize } from './components/Avatar';
|
|
95
95
|
export { OnScreenSensor } from './components/OnScreenSensor';
|
|
96
96
|
export { ui } from './components/ui';
|
|
97
|
-
export type {
|
|
97
|
+
export type { OffsetType, OffsetEnum, MediaQueryType, MediaQueryEnum, ResponsiveOffsetType, MPProps, } from './components/ui';
|
|
98
98
|
export { Symbols } from './components/Symbols';
|
package/dist/main.js
CHANGED
|
@@ -60,7 +60,7 @@ import { Popover as zr } from "./components/Popover/Popover.js";
|
|
|
60
60
|
import { PremiumBadge as Vr } from "./components/PremiumBadge/PremiumBadge.js";
|
|
61
61
|
import { Prose as Yr } from "./components/Prose/Prose.js";
|
|
62
62
|
import { Radio as Mr } from "./components/Radio/Radio.js";
|
|
63
|
-
import {
|
|
63
|
+
import { Select as jr } from "./components/Select/Select.js";
|
|
64
64
|
import { DropdownSelect as Jr } from "./components/DropdownSelect/DropdownSelect.js";
|
|
65
65
|
import { Separator as Xr } from "./components/Separator/Separator.js";
|
|
66
66
|
import { Shroud as $r } from "./components/Shroud/Shroud.js";
|
|
@@ -72,13 +72,13 @@ import { ToggleGroup as ne } from "./components/ToggleGroup/ToggleGroup.js";
|
|
|
72
72
|
import { Tabular as se } from "./components/Tabular/Tabular.js";
|
|
73
73
|
import { Table as ce, TableIconButton as de } from "./components/Table/Table.js";
|
|
74
74
|
import { Text as Te, TextBlock as Le, getTextOpacity as ge } from "./components/Text/Text.js";
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
75
|
+
import { ui as Se } from "./components/ui.js";
|
|
76
|
+
import { Textarea as ke } from "./components/Textarea/Textarea.js";
|
|
77
|
+
import { TITLE_OUTLET_ID as Re, Title as be } from "./components/Title/Title.js";
|
|
78
|
+
import { default as Oe } from "./components/InputDropzone/InputDropzone.js";
|
|
78
79
|
import "./components/InputDropzone/ItemPreview.js";
|
|
79
|
-
import { default as
|
|
80
|
-
import { OnScreenSensor as
|
|
81
|
-
import { ui as _e } from "./components/ui.js";
|
|
80
|
+
import { default as De } from "./components/Skeleton/Skeleton.js";
|
|
81
|
+
import { OnScreenSensor as _e } from "./components/OnScreenSensor.js";
|
|
82
82
|
import { Symbols as ve } from "./components/Symbols.js";
|
|
83
83
|
export {
|
|
84
84
|
po as Accordion,
|
|
@@ -115,7 +115,7 @@ export {
|
|
|
115
115
|
or as Indicator,
|
|
116
116
|
er as InfoPanel,
|
|
117
117
|
pr as Input,
|
|
118
|
-
|
|
118
|
+
Oe as InputDropzone,
|
|
119
119
|
ar as Interactive,
|
|
120
120
|
nr as Island,
|
|
121
121
|
go as Link,
|
|
@@ -126,7 +126,7 @@ export {
|
|
|
126
126
|
_r as Modal,
|
|
127
127
|
vr as NavList,
|
|
128
128
|
Ur as OVERLAY_OUTLET_ID,
|
|
129
|
-
|
|
129
|
+
_e as OnScreenSensor,
|
|
130
130
|
Nr as Overlay,
|
|
131
131
|
Br as Pad,
|
|
132
132
|
Cr as Page,
|
|
@@ -140,20 +140,20 @@ export {
|
|
|
140
140
|
jr as Select,
|
|
141
141
|
Xr as Separator,
|
|
142
142
|
$r as Shroud,
|
|
143
|
-
|
|
143
|
+
De as Skeleton,
|
|
144
144
|
re as Slider,
|
|
145
145
|
te as Spacer,
|
|
146
146
|
fe as Style,
|
|
147
147
|
ae as Switch,
|
|
148
148
|
ve as Symbols,
|
|
149
|
-
|
|
149
|
+
Re as TITLE_OUTLET_ID,
|
|
150
150
|
ce as Table,
|
|
151
151
|
de as TableIconButton,
|
|
152
152
|
se as Tabular,
|
|
153
153
|
Te as Text,
|
|
154
154
|
Le as TextBlock,
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
ke as Textarea,
|
|
156
|
+
be as Title,
|
|
157
157
|
ne as ToggleGroup,
|
|
158
158
|
Or as VirtualScrollable,
|
|
159
159
|
V as clamp,
|
|
@@ -183,7 +183,7 @@ export {
|
|
|
183
183
|
D as returnTrue,
|
|
184
184
|
q as splitByIndices,
|
|
185
185
|
Z as throttle,
|
|
186
|
-
|
|
186
|
+
Se as ui,
|
|
187
187
|
J as unicodeCharAt,
|
|
188
188
|
y as useClipboardComponent,
|
|
189
189
|
me as useContextualStyle,
|
|
@@ -371,7 +371,7 @@ $mpMap: (
|
|
|
371
371
|
pl: padding-left,
|
|
372
372
|
);
|
|
373
373
|
|
|
374
|
-
$
|
|
374
|
+
$controlHeights: (
|
|
375
375
|
'xxsmall': q(1.5),
|
|
376
376
|
'xsmall': q(3),
|
|
377
377
|
'small': q(4),
|
|
@@ -379,3 +379,12 @@ $control-heights: (
|
|
|
379
379
|
'large': q(7),
|
|
380
380
|
'xlarge': q(10),
|
|
381
381
|
);
|
|
382
|
+
|
|
383
|
+
$borderRadius: (
|
|
384
|
+
'none': 0px,
|
|
385
|
+
'xxsmall': q(.25),
|
|
386
|
+
'xsmall': q(.5),
|
|
387
|
+
'small': q(.75),
|
|
388
|
+
'normal': q(1.5),
|
|
389
|
+
'pill': 9999px,
|
|
390
|
+
)
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use "typography";
|
|
2
|
+
@use "tokens";
|
|
3
3
|
|
|
4
4
|
body {
|
|
5
5
|
// initiat tokens
|
|
6
|
-
@include color-tokens;
|
|
7
|
-
@include offset-tokens;
|
|
8
|
-
@include control-height-tokens;
|
|
9
|
-
@include text-tokens;
|
|
10
|
-
@include border-radius-tokens;
|
|
11
|
-
@include switch-tokens;
|
|
12
|
-
@include input-dropzone-tokens;
|
|
13
|
-
@include checkbox-tokens;
|
|
14
|
-
@include input-tokens;
|
|
15
|
-
@include select-tokens;
|
|
16
|
-
@include icon-tokens;
|
|
17
|
-
@include info-panel-tokens;
|
|
18
|
-
@include tabular-tokens;
|
|
19
|
-
@include modal-tokens;
|
|
20
|
-
@include scrollable-tokens;
|
|
21
|
-
@include avatar-tokens;
|
|
22
|
-
@include title-tokens;
|
|
23
|
-
@include button-tokens;
|
|
24
|
-
@include badge-tokens;
|
|
25
|
-
@include accordion-tokens;
|
|
26
|
-
@include
|
|
27
|
-
@include
|
|
28
|
-
@include zindex-tokens;
|
|
6
|
+
@include tokens.color-tokens;
|
|
7
|
+
@include tokens.offset-tokens;
|
|
8
|
+
@include tokens.control-height-tokens;
|
|
9
|
+
@include tokens.text-tokens;
|
|
10
|
+
@include tokens.border-radius-tokens;
|
|
11
|
+
@include tokens.switch-tokens;
|
|
12
|
+
@include tokens.input-dropzone-tokens;
|
|
13
|
+
@include tokens.checkbox-tokens;
|
|
14
|
+
@include tokens.input-tokens;
|
|
15
|
+
@include tokens.select-tokens;
|
|
16
|
+
@include tokens.icon-tokens;
|
|
17
|
+
@include tokens.info-panel-tokens;
|
|
18
|
+
@include tokens.tabular-tokens;
|
|
19
|
+
@include tokens.modal-tokens;
|
|
20
|
+
@include tokens.scrollable-tokens;
|
|
21
|
+
@include tokens.avatar-tokens;
|
|
22
|
+
@include tokens.title-tokens;
|
|
23
|
+
@include tokens.button-tokens;
|
|
24
|
+
@include tokens.badge-tokens;
|
|
25
|
+
@include tokens.accordion-tokens;
|
|
26
|
+
@include tokens.anchor-tokens;
|
|
27
|
+
@include tokens.separator-tokens;
|
|
28
|
+
@include tokens.zindex-tokens;
|
|
29
|
+
|
|
30
|
+
// responsive
|
|
31
|
+
@include tokens.mp-tokens;
|
|
32
|
+
@include tokens.responsive-tokens('width');
|
|
33
|
+
@include tokens.responsive-tokens('height');
|
|
34
|
+
@include tokens.responsive-tokens('gap');
|
|
35
|
+
@include tokens.responsive-tokens('flex-direction');
|
|
36
|
+
@include tokens.responsive-tokens('align-items');
|
|
37
|
+
@include tokens.responsive-tokens('justify-content');
|
|
38
|
+
@include tokens.responsive-tokens('flex-wrap');
|
|
39
|
+
@include tokens.responsive-tokens('flex');
|
|
40
|
+
@include tokens.responsive-tokens('font-size');
|
|
41
|
+
@include tokens.responsive-tokens('line-height');
|
|
29
42
|
|
|
30
43
|
// initiat fonts
|
|
31
|
-
@include font-HelveticaNow;
|
|
44
|
+
@include typography.font-HelveticaNow;
|
|
32
45
|
|
|
33
46
|
// Set default font styles
|
|
34
47
|
@include ui.font-color('text');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "./themes/theme_cfx.scss";
|
|
2
|
+
@use "./themes/theme_fivem.scss";
|
|
3
|
+
@use "./themes/theme_redm.scss";
|
|
4
|
+
@use "./themes/theme_wireframe.scss";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "ui";
|
|
3
|
-
@import "ui";
|
|
4
3
|
|
|
5
4
|
@mixin zindex-tokens() {
|
|
6
5
|
@each $name, $value in ui.$zindexMap {
|
|
@@ -10,9 +9,9 @@
|
|
|
10
9
|
|
|
11
10
|
@mixin mp-tokens() {
|
|
12
11
|
@each $name, $value in ui.$mediaMap {
|
|
13
|
-
@include media-min($name) {
|
|
12
|
+
@include ui.media-min($name) {
|
|
14
13
|
@each $mpName, $mpProp in ui.$mpMap {
|
|
15
|
-
|
|
14
|
+
.ui-#{$mpName}-#{$name} {
|
|
16
15
|
#{$mpProp}: var(--#{$mpName}-#{$name});
|
|
17
16
|
}
|
|
18
17
|
}
|
|
@@ -20,6 +19,16 @@
|
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
|
|
22
|
+
@mixin responsive-tokens($propName) {
|
|
23
|
+
@each $name, $value in ui.$mediaMap {
|
|
24
|
+
@include ui.media-min($name) {
|
|
25
|
+
.ui-#{$propName}-#{$name} {
|
|
26
|
+
#{$propName}: var(--#{$propName}-#{$name});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
@mixin anchor-tokens() {
|
|
24
33
|
@include ui.define-color-token('anchor-color', ui.color('tertiary'));
|
|
25
34
|
@include ui.define-color-token('anchor-decoration-color-hover', ui.color('tertiary', $alpha: .5));
|
|
@@ -30,12 +39,9 @@
|
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
@mixin border-radius-tokens() {
|
|
33
|
-
@
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@include ui.def('border-radius-small', ui.q(.75));
|
|
37
|
-
@include ui.def('border-radius-normal', ui.q(1.5));
|
|
38
|
-
@include ui.def('border-radius-pill', 9999px);
|
|
42
|
+
@each $name, $value in ui.$borderRadius {
|
|
43
|
+
@include ui.def('border-radius-#{$name}', $value);
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
@mixin text-tokens() {
|
|
@@ -77,13 +83,13 @@
|
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
@mixin offset-tokens() {
|
|
80
|
-
@each $name, $value in
|
|
86
|
+
@each $name, $value in ui.$offsets {
|
|
81
87
|
@include ui.def('offset-#{$name}', $value);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
@mixin control-height-tokens() {
|
|
86
|
-
@each $name, $value in ui.$
|
|
92
|
+
@each $name, $value in ui.$controlHeights {
|
|
87
93
|
@include ui.def('control-height-#{$name}', $value);
|
|
88
94
|
}
|
|
89
95
|
}
|
|
@@ -171,8 +177,14 @@
|
|
|
171
177
|
|
|
172
178
|
@include ui.def('tabular-notification-gap', ui.q(.75));
|
|
173
179
|
|
|
174
|
-
@include ui.def('tabular-item-height', ui.
|
|
175
|
-
@include ui.def('tabular-item-padding', ui.offset('medium'));
|
|
180
|
+
@include ui.def('tabular-small-item-height', ui.q(5));
|
|
181
|
+
@include ui.def('tabular-small-item-padding', ui.offset('medium'));
|
|
182
|
+
|
|
183
|
+
@include ui.def('tabular-medium-item-height', ui.q(7.5));
|
|
184
|
+
@include ui.def('tabular-medium-item-padding', ui.offset('medium'));
|
|
185
|
+
|
|
186
|
+
@include ui.def('tabular-large-item-height', ui.q(10));
|
|
187
|
+
@include ui.def('tabular-large-item-padding', ui.offset('medium'));
|
|
176
188
|
|
|
177
189
|
@include ui.def('tabular-item-border-size', ui.q(.25));
|
|
178
190
|
}
|
|
@@ -297,6 +309,11 @@
|
|
|
297
309
|
@include ui.define-color-token('badge-error-background-hover', ui.color('red', $alpha: .4));
|
|
298
310
|
}
|
|
299
311
|
|
|
312
|
+
@mixin separator-tokens() {
|
|
313
|
+
@include ui.define-color-token('separator-text', ui.color('secondary', $alpha: .4));
|
|
314
|
+
@include ui.define-color-token('separator-background', ui.color('secondary', $alpha: .2));
|
|
315
|
+
}
|
|
316
|
+
|
|
300
317
|
/**
|
|
301
318
|
* Look for usages by searching for `ui.color-token('name')`
|
|
302
319
|
*/
|
|
@@ -380,10 +397,6 @@
|
|
|
380
397
|
@include ui.define-color-token('overlay-backdrop-background', ui.color('bg', $alpha: .65));
|
|
381
398
|
|
|
382
399
|
|
|
383
|
-
@include ui.define-color-token('separator-text', ui.color('main', 950, .25));
|
|
384
|
-
@include ui.define-color-token('separator-background', ui.color('main', 950, .1));
|
|
385
|
-
|
|
386
|
-
|
|
387
400
|
@include ui.define-color-token('toggle-description-text', ui.color('main', 950, .5));
|
|
388
401
|
@include ui.define-color-token('toggle-border', ui.color('main', 950, .25));
|
|
389
402
|
|