@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,4 +1,4 @@
|
|
|
1
|
-
@use "./themes/theme_cfx
|
|
2
|
-
@use "./themes/theme_fivem
|
|
3
|
-
@use "./themes/theme_redm
|
|
4
|
-
@use "./themes/theme_wireframe
|
|
1
|
+
@use "./themes/theme_cfx";
|
|
2
|
+
@use "./themes/theme_fivem";
|
|
3
|
+
@use "./themes/theme_redm";
|
|
4
|
+
@use "./themes/theme_wireframe";
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@mixin border-radius-tokens() {
|
|
38
|
-
@each $name, $value in ui.$
|
|
38
|
+
@each $name, $value in ui.$borderRadiusMap {
|
|
39
39
|
@include ui.def('border-radius-#{$name}', $value);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -47,26 +47,21 @@
|
|
|
47
47
|
|
|
48
48
|
// normal is mirroring small, becouse it's the default size
|
|
49
49
|
@include ui.define-font-size('normal', ui.q(2.5), 1.5);
|
|
50
|
-
|
|
51
50
|
@include ui.define-font-size('medium', ui.q(3.125), 1.3);
|
|
52
51
|
@include ui.define-font-size('large', ui.q(3.75), 1.3);
|
|
53
52
|
@include ui.define-font-size('xlarge', ui.q(5), 1.3);
|
|
54
53
|
@include ui.define-font-size('xxlarge', ui.q(6.25), 1.3);
|
|
55
54
|
@include ui.define-font-size('xxxlarge', ui.q(8.75), 1.15);
|
|
56
|
-
|
|
57
55
|
@include ui.def('font-weight-thin', 100);
|
|
58
56
|
@include ui.def('font-weight-small', 300);
|
|
59
57
|
@include ui.def('font-weight-normal', 400);
|
|
60
58
|
@include ui.def('font-weight-bold', 700);
|
|
61
59
|
@include ui.def('font-weight-bolder', 800);
|
|
62
60
|
@include ui.def('font-weight-boldest', 900);
|
|
63
|
-
|
|
64
61
|
@include ui.def('letter-spacing-normal', -0.025em);
|
|
65
62
|
@include ui.def('letter-spacing-large', 0);
|
|
66
|
-
|
|
67
63
|
@include ui.def('font-family-primary', 'HelveticaNowText');
|
|
68
64
|
@include ui.def('font-family-secondary', 'HelveticaNowDisplay');
|
|
69
|
-
|
|
70
65
|
@include ui.define-color-token('text', ui.color('primary', 'pure' ));
|
|
71
66
|
@include ui.def ('text-opacity-10', .10);
|
|
72
67
|
@include ui.define-color-token('text-a10', ui.color('primary', $alpha: .10));
|
|
@@ -85,7 +80,7 @@
|
|
|
85
80
|
}
|
|
86
81
|
|
|
87
82
|
@mixin control-height-tokens() {
|
|
88
|
-
@each $name, $value in ui.$
|
|
83
|
+
@each $name, $value in ui.$controlHeightsMap {
|
|
89
84
|
@include ui.def('control-height-#{$name}', $value);
|
|
90
85
|
}
|
|
91
86
|
}
|
|
@@ -105,7 +100,6 @@
|
|
|
105
100
|
@mixin input-dropzone-tokens() {
|
|
106
101
|
@include ui.define-color-token('dropzone-focus-border-color', ui.color('primary'));
|
|
107
102
|
@include ui.def('dropzone-focus-border-size', ui.q(.25));
|
|
108
|
-
|
|
109
103
|
@include ui.define-color-token('dropzone-border-color', ui.color('bg-light'));
|
|
110
104
|
@include ui.def('dropzone-border-size', 1px);
|
|
111
105
|
}
|
|
@@ -113,16 +107,13 @@
|
|
|
113
107
|
@mixin input-tokens() {
|
|
114
108
|
@include ui.define-color-token('input-placeholder', ui.color('primary', $alpha: .4));
|
|
115
109
|
@include ui.define-color-token('input-placeholder-hover', ui.color('primary', $alpha: .6));
|
|
116
|
-
|
|
117
110
|
@include ui.define-color-token('input-text', ui.color('primary'));
|
|
118
111
|
@include ui.define-color-token('input-background', ui.color('bg'));
|
|
119
|
-
|
|
120
112
|
@include ui.def('input-border-size', 1px);
|
|
121
113
|
@include ui.define-color-token('input-border', ui.color('bg-light'));
|
|
122
114
|
@include ui.define-color-token('input-hover-border', ui.color('primary', $alpha: .1));
|
|
123
115
|
@include ui.define-color-token('input-focus-border', ui.color('bg-dark'));
|
|
124
116
|
@include ui.define-color-token('input-disabled-border', ui.color('bg-light'));
|
|
125
|
-
|
|
126
117
|
@include ui.define-color-token('input-onlight-border', ui.color('primary', $alpha: .1));
|
|
127
118
|
@include ui.define-color-token('input-onlight-hover-border', ui.color('primary', $alpha: .2));
|
|
128
119
|
@include ui.define-color-token('input-onlight-focus-border', ui.color('primary', $alpha: .2));
|
|
@@ -151,19 +142,15 @@
|
|
|
151
142
|
|
|
152
143
|
@mixin info-panel-tokens() {
|
|
153
144
|
@include ui.def('info-panel-focus-border-size', ui.q(.25));
|
|
154
|
-
|
|
155
145
|
@include ui.define-color-token('info-panel-border', ui.color('primary', 950, .7));
|
|
156
146
|
@include ui.define-color-token('info-panel-background', ui.color('primary', 950, .1));
|
|
157
147
|
@include ui.define-color-token('info-panel-background-hover', ui.color('primary', 950, .2));
|
|
158
|
-
|
|
159
148
|
@include ui.define-color-token('info-panel-error-border', ui.color('red'));
|
|
160
149
|
@include ui.define-color-token('info-panel-error-background', ui.color('red', $alpha: .2));
|
|
161
150
|
@include ui.define-color-token('info-panel-error-background-hover', ui.color('red', $alpha: .4));
|
|
162
|
-
|
|
163
151
|
@include ui.define-color-token('info-panel-success-border', ui.color('green'));
|
|
164
152
|
@include ui.define-color-token('info-panel-success-background', ui.color('green', $alpha: .2));
|
|
165
153
|
@include ui.define-color-token('info-panel-success-background-hover', ui.color('green', $alpha: .4));
|
|
166
|
-
|
|
167
154
|
@include ui.define-color-token('info-panel-warning-border', ui.color('yellow'));
|
|
168
155
|
@include ui.define-color-token('info-panel-warning-background', ui.color('yellow', $alpha: .2));
|
|
169
156
|
@include ui.define-color-token('info-panel-warning-background-hover', ui.color('yellow', $alpha: .4));
|
|
@@ -172,18 +159,13 @@
|
|
|
172
159
|
@mixin tabular-tokens() {
|
|
173
160
|
@include ui.define-color-token('tabular-color-dark', ui.color('primary'));
|
|
174
161
|
@include ui.define-color-token('tabular-color-light', ui.color('accent'));
|
|
175
|
-
|
|
176
162
|
@include ui.def('tabular-notification-gap', ui.q(.75));
|
|
177
|
-
|
|
178
163
|
@include ui.def('tabular-small-item-height', ui.q(5));
|
|
179
164
|
@include ui.def('tabular-small-item-padding', ui.offset('medium'));
|
|
180
|
-
|
|
181
165
|
@include ui.def('tabular-medium-item-height', ui.q(7.5));
|
|
182
166
|
@include ui.def('tabular-medium-item-padding', ui.offset('medium'));
|
|
183
|
-
|
|
184
167
|
@include ui.def('tabular-large-item-height', ui.q(10));
|
|
185
168
|
@include ui.def('tabular-large-item-padding', ui.offset('medium'));
|
|
186
|
-
|
|
187
169
|
@include ui.def('tabular-item-border-size', ui.q(.25));
|
|
188
170
|
}
|
|
189
171
|
|
|
@@ -214,7 +196,6 @@
|
|
|
214
196
|
|
|
215
197
|
@mixin button-tokens() {
|
|
216
198
|
@include ui.define-color-token('button-focus-outline', ui.color('primary', $alpha: .5));
|
|
217
|
-
|
|
218
199
|
@include ui.define-color-token('button-text', ui.color('primary'));
|
|
219
200
|
@include ui.define-color-token('button-border', transparent);
|
|
220
201
|
@include ui.define-color-token('button-background', ui.color('primary', $alpha: .15));
|
|
@@ -222,7 +203,6 @@
|
|
|
222
203
|
@include ui.define-color-token('button-hover-background', ui.color('primary', $alpha: .1));
|
|
223
204
|
@include ui.define-color-token('button-active-border', ui.color('primary', $alpha: .15));
|
|
224
205
|
@include ui.define-color-token('button-active-background', transparent);
|
|
225
|
-
|
|
226
206
|
@include ui.define-color-token('button-primary-text', ui.color('primary'));
|
|
227
207
|
@include ui.define-color-token('button-primary-border', ui.color('accent'));
|
|
228
208
|
@include ui.define-color-token('button-primary-background', ui.color('accent', $alpha: .4));
|
|
@@ -235,7 +215,6 @@
|
|
|
235
215
|
@include ui.define-color-token('button-primary-disabled-text', ui.color('accent', $alpha: .4));
|
|
236
216
|
@include ui.define-color-token('button-primary-disabled-border', ui.color('accent', $alpha: .4));
|
|
237
217
|
@include ui.define-color-token('button-primary-disabled-background', transparent);
|
|
238
|
-
|
|
239
218
|
@include ui.define-color-token('button-secondary-text', ui.color('primary'));
|
|
240
219
|
@include ui.define-color-token('button-secondary-border', ui.color('primary'));
|
|
241
220
|
@include ui.define-color-token('button-secondary-background', ui.color('primary', 'pure', 0));
|
|
@@ -248,7 +227,6 @@
|
|
|
248
227
|
@include ui.define-color-token('button-secondary-disabled-text', ui.color('primary', $alpha: .4));
|
|
249
228
|
@include ui.define-color-token('button-secondary-disabled-border', ui.color('primary', $alpha: .4));
|
|
250
229
|
@include ui.define-color-token('button-secondary-disabled-background', transparent);
|
|
251
|
-
|
|
252
230
|
@include ui.define-color-token('button-onlight-text', ui.color('primary'));
|
|
253
231
|
@include ui.define-color-token('button-onlight-border', ui.color('bg-dark'));
|
|
254
232
|
@include ui.define-color-token('button-onlight-background', ui.color('bg-dark'));
|
|
@@ -261,7 +239,6 @@
|
|
|
261
239
|
@include ui.define-color-token('button-onlight-disabled-text', ui.color('bg-dark', $alpha: .4));
|
|
262
240
|
@include ui.define-color-token('button-onlight-disabled-border', ui.color('bg-dark', $alpha: .4));
|
|
263
241
|
@include ui.define-color-token('button-onlight-disabled-background', transparent);
|
|
264
|
-
|
|
265
242
|
@include ui.define-color-token('button-linked-text', ui.color('tertiary'));
|
|
266
243
|
@include ui.define-color-token('button-linked-border', transparent);
|
|
267
244
|
@include ui.define-color-token('button-linked-background', transparent);
|
|
@@ -274,7 +251,6 @@
|
|
|
274
251
|
@include ui.define-color-token('button-linked-disabled-text', ui.color('primary', $alpha: .4));
|
|
275
252
|
@include ui.define-color-token('button-linked-disabled-border', transparent);
|
|
276
253
|
@include ui.define-color-token('button-linked-disabled-background', transparent);
|
|
277
|
-
|
|
278
254
|
@include ui.define-color-token('button-quicklink-text', ui.color('primary'));
|
|
279
255
|
@include ui.define-color-token('button-quicklink-border', transparent);
|
|
280
256
|
@include ui.define-color-token('button-quicklink-background', ui.color('bg-light'));
|
|
@@ -293,15 +269,12 @@
|
|
|
293
269
|
@include ui.define-color-token('badge-success-text', ui.color('green'));
|
|
294
270
|
@include ui.define-color-token('badge-success-background', ui.color('green', $alpha: .2));
|
|
295
271
|
@include ui.define-color-token('badge-success-background-hover', ui.color('green', $alpha: .4));
|
|
296
|
-
|
|
297
272
|
@include ui.define-color-token('badge-neutral-text', ui.color('secondary'));
|
|
298
273
|
@include ui.define-color-token('badge-neutral-background', ui.color('secondary', $alpha: .2));
|
|
299
274
|
@include ui.define-color-token('badge-neutral-background-hover', ui.color('secondary', $alpha: .4));
|
|
300
|
-
|
|
301
275
|
@include ui.define-color-token('badge-warning-text', ui.color('yellow'));
|
|
302
276
|
@include ui.define-color-token('badge-warning-background', ui.color('yellow', $alpha: .2));
|
|
303
277
|
@include ui.define-color-token('badge-warning-background-hover', ui.color('yellow', $alpha: .4));
|
|
304
|
-
|
|
305
278
|
@include ui.define-color-token('badge-error-text', ui.color('red'));
|
|
306
279
|
@include ui.define-color-token('badge-error-background', ui.color('red', $alpha: .2));
|
|
307
280
|
@include ui.define-color-token('badge-error-background-hover', ui.color('red', $alpha: .4));
|
|
@@ -317,90 +290,63 @@
|
|
|
317
290
|
*/
|
|
318
291
|
@mixin color-tokens() {
|
|
319
292
|
@include ui.define-color-token('li-marker', ui.color('main', 950, .75));
|
|
320
|
-
|
|
321
293
|
@include ui.define-color-token('kbd-border', ui.color('main', 300));
|
|
322
294
|
@include ui.define-color-token('kbd-background', ui.color('main', 200));
|
|
323
|
-
|
|
324
295
|
@include ui.define-color-token('shadow-small', rgba(0, 0, 0, .5));
|
|
325
296
|
@include ui.def('shadow-small', 0 2.5px 5px ui.color-token('shadow-small'));
|
|
326
|
-
|
|
327
297
|
@include ui.define-color-token('shadow-large', rgba(0, 0, 0, .5));
|
|
328
298
|
@include ui.def('shadow-large', 0 ui.q(2) ui.q(8) 2px ui.color-token('shadow-large'));
|
|
329
299
|
|
|
330
300
|
// TODO: add text warning, success and error
|
|
331
301
|
|
|
332
302
|
@include ui.define-color-token('link-hover-decoration', ui.color('primary', 950));
|
|
333
|
-
|
|
334
303
|
@include ui.define-color-token('scrollbar', ui.color('secondary', $alpha: .4));
|
|
335
304
|
@include ui.define-color-token('scrollbar-hover', ui.color('secondary', $alpha: .6));
|
|
336
305
|
@include ui.define-color-token('scrollbar-active', ui.color('secondary', $alpha: .8));
|
|
337
|
-
|
|
338
306
|
@include ui.define-color-token('backdrop', ui.color('bg', $alpha: .75));
|
|
339
307
|
@include ui.define-color-token('backdrop-100', ui.color('bg', $alpha: .25));
|
|
340
308
|
@include ui.define-color-token('backdrop-200', ui.color('bg', $alpha: .5));
|
|
341
309
|
@include ui.define-color-token('backdrop-300', ui.color('bg', $alpha: .75));
|
|
342
|
-
|
|
343
310
|
@include ui.define-color-token('backdrop-shader', ui.color('bg', $alpha: .75));
|
|
344
311
|
|
|
345
312
|
|
|
346
313
|
// COMPONENTS
|
|
347
314
|
@include ui.define-color-token('avatar-background', ui.color('main'));
|
|
348
|
-
|
|
349
|
-
|
|
350
315
|
@include ui.define-color-token('checkbox-focus-outline', ui.color('primary', $alpha: .5));
|
|
351
316
|
@include ui.define-color-token('checkbox-indicator', ui.color('primary', 800));
|
|
352
|
-
|
|
353
317
|
@include ui.define-color-token('checkbox-text', ui.color('main', 950));
|
|
354
318
|
@include ui.define-color-token('checkbox-border', ui.color('main', 950, .25));
|
|
355
319
|
@include ui.define-color-token('checkbox-background', ui.color('main', 950, .1));
|
|
356
320
|
@include ui.define-color-token('checkbox-hover-background', ui.color('main', 950, .05));
|
|
357
|
-
|
|
358
|
-
|
|
359
321
|
@include ui.define-color-token('flyout-backdrop-background', ui.color('main', 100, .9));
|
|
360
322
|
@include ui.define-color-token('flyout-holder-border', ui.color('main', 100, .25));
|
|
361
323
|
@include ui.define-color-token('flyout-holder-blur-background', ui.color('main', 50, .75));
|
|
362
324
|
@include ui.define-color-token('flyout-holder-unblur-background', ui.color('main'));
|
|
363
|
-
|
|
364
|
-
|
|
365
325
|
@include ui.define-color-token('indicator-bright', ui.color('primary'));
|
|
366
326
|
@include ui.define-color-token('indicator-dim', transparent);
|
|
367
|
-
|
|
368
|
-
|
|
369
327
|
@include ui.define-color-token('island-border', ui.color('main', 50, .25));
|
|
370
328
|
@include ui.define-color-token('island-blur-background', ui.color('main', 50, .75));
|
|
371
329
|
@include ui.define-color-token('island-unblur-background', ui.color('main', 50, .95));
|
|
372
|
-
|
|
373
|
-
|
|
374
330
|
@include ui.define-color-token('loaf-text', ui.color('main', 950, .5));
|
|
375
331
|
@include ui.define-color-token('loaf-background', ui.color('main', 950, .05));
|
|
376
332
|
@include ui.define-color-token('loaf-bright-text', ui.color('main', 950));
|
|
377
|
-
|
|
378
333
|
@include ui.define-color-token('loaf-gold-text', ui.color('aurum', 500, .5));
|
|
379
334
|
@include ui.define-color-token('loaf-gold-background', ui.color('main', 950, .05));
|
|
380
335
|
@include ui.define-color-token('loaf-gold-bright-text', ui.color('aurum', 500));
|
|
381
|
-
|
|
382
336
|
@include ui.define-color-token('loaf-error-text', ui.color('error', 500));
|
|
383
337
|
@include ui.define-color-token('loaf-error-background', ui.color('error', 500, .15));
|
|
384
338
|
@include ui.define-color-token('loaf-error-bright-text', ui.color('error', 500));
|
|
385
|
-
|
|
386
|
-
|
|
387
339
|
@include ui.define-color-token('navlist-item-border', ui.color('main', 950, .1));
|
|
388
340
|
@include ui.define-color-token('navlist-item-background', transparent);
|
|
389
341
|
@include ui.define-color-token('navlist-item-active-border', transparent);
|
|
390
342
|
@include ui.define-color-token('navlist-item-active-background', ui.color('main', 950, .1));
|
|
391
343
|
@include ui.define-color-token('navlist-item-hover-border', transparent);
|
|
392
344
|
@include ui.define-color-token('navlist-item-hover-background', ui.color('main', 950, .2));
|
|
393
|
-
|
|
394
|
-
|
|
395
345
|
@include ui.define-color-token('overlay-backdrop-background', ui.color('bg', $alpha: .65));
|
|
396
|
-
|
|
397
|
-
|
|
398
346
|
@include ui.define-color-token('toggle-description-text', ui.color('main', 950, .5));
|
|
399
347
|
@include ui.define-color-token('toggle-border', ui.color('main', 950, .25));
|
|
400
|
-
|
|
401
348
|
@include ui.define-color-token('toggle-background', ui.color('main', 950, .1));
|
|
402
349
|
@include ui.define-color-token('toggle-hover-background', ui.color('main', 200));
|
|
403
|
-
|
|
404
350
|
@include ui.define-color-token('toggle-active-text', ui.color('main'));
|
|
405
351
|
@include ui.define-color-token('toggle-active-background', ui.color('main', 950, .75));
|
|
406
352
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FREE_PRICE_TEXT = "free";
|
|
2
|
+
export declare function buildCurrencySymbol(currency: string): string;
|
|
3
|
+
export declare const CURRENCY_MAP: Record<string, string>;
|
|
4
|
+
export declare function getCurrencySymbol(currency: string): string;
|
|
5
|
+
export declare const formatCurrency: (price: number, currency: string, fixToTwoDecimalsRaw?: boolean) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = "free";
|
|
2
|
+
function i(t) {
|
|
3
|
+
return 0 .toLocaleString(
|
|
4
|
+
"en-US",
|
|
5
|
+
{
|
|
6
|
+
style: "currency",
|
|
7
|
+
currency: t,
|
|
8
|
+
minimumFractionDigits: 0,
|
|
9
|
+
maximumFractionDigits: 0
|
|
10
|
+
}
|
|
11
|
+
).replace(/\d/g, "").trim();
|
|
12
|
+
}
|
|
13
|
+
const c = {
|
|
14
|
+
USD: i("USD"),
|
|
15
|
+
EUR: i("EUR")
|
|
16
|
+
};
|
|
17
|
+
function C(t) {
|
|
18
|
+
return c[t] ? c[t] : i(t);
|
|
19
|
+
}
|
|
20
|
+
const S = (t, n, r) => {
|
|
21
|
+
if (n === "")
|
|
22
|
+
return e;
|
|
23
|
+
const m = r === void 0 ? t % 100 !== 0 : r, s = C(n), o = t === 0 ? 0 : t / 100, u = m ? o.toFixed(2) : o, [l, a] = u.toString().split("."), d = [
|
|
24
|
+
l.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
|
|
25
|
+
a
|
|
26
|
+
].filter(Boolean).join(".");
|
|
27
|
+
return o === 0 ? e : `${s}${d}`;
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
c as CURRENCY_MAP,
|
|
31
|
+
e as FREE_PRICE_TEXT,
|
|
32
|
+
i as buildCurrencySymbol,
|
|
33
|
+
S as formatCurrency,
|
|
34
|
+
C as getCurrencySymbol
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatDate(date: string | number | null | undefined, noTime?: boolean): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r(i, e = !1) {
|
|
2
|
+
return i ? new Intl.DateTimeFormat(void 0, {
|
|
3
|
+
year: "numeric",
|
|
4
|
+
month: "2-digit",
|
|
5
|
+
day: "2-digit",
|
|
6
|
+
hour: e ? void 0 : "numeric",
|
|
7
|
+
minute: e ? void 0 : "numeric",
|
|
8
|
+
second: e ? void 0 : "numeric"
|
|
9
|
+
}).format(new Date(i)) : "N/A";
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as formatDate
|
|
13
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import u from "react";
|
|
2
2
|
function o(e, t = "keydown", r) {
|
|
3
|
-
|
|
3
|
+
u.useEffect(() => {
|
|
4
4
|
const n = (s) => {
|
|
5
5
|
o.shouldProcessEvent(s) && e.current(s);
|
|
6
6
|
};
|
|
7
7
|
return window.addEventListener(t, n, r), () => {
|
|
8
8
|
window.removeEventListener(t, n, r);
|
|
9
9
|
};
|
|
10
|
-
}, [t, r]);
|
|
10
|
+
}, [t, r, e]);
|
|
11
11
|
}
|
|
12
12
|
o.shouldProcessEvent = (e) => {
|
|
13
13
|
if (e.target instanceof Element) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { useDynamicRef as i } from "./useDynamicRef.js";
|
|
3
|
-
function c(
|
|
4
|
-
const
|
|
3
|
+
function c(r) {
|
|
4
|
+
const e = i(r);
|
|
5
5
|
t.useEffect(() => {
|
|
6
|
-
const
|
|
7
|
-
return window.addEventListener("resize",
|
|
8
|
-
}, []);
|
|
6
|
+
const n = () => e.current();
|
|
7
|
+
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
8
|
+
}, [e]);
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
11
|
c as useWindowResize
|
package/dist/utils/string.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare function replaceRange(str: string, replacement: string, start: nu
|
|
|
4
4
|
export declare function normalizeSlashes(str: string): string;
|
|
5
5
|
export declare function isTrueString(str: string): boolean;
|
|
6
6
|
export declare function isFalseString(str: string): boolean;
|
|
7
|
+
export declare function capitalize(val: string | number): string;
|
package/dist/utils/string.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
function p(t, e) {
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
return
|
|
2
|
+
const n = t.charCodeAt(e);
|
|
3
|
+
let r;
|
|
4
|
+
return n >= 55296 && n <= 56319 && t.length > e + 1 && (r = t.charCodeAt(e + 1), r >= 56320 && r <= 57343) ? t.substring(e, e + 2) : t[e];
|
|
5
5
|
}
|
|
6
6
|
function A(t, e) {
|
|
7
7
|
return t[e];
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function S(t, e) {
|
|
10
10
|
return t - e;
|
|
11
11
|
}
|
|
12
|
-
function C(t, e,
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
12
|
+
function C(t, e, n = !1) {
|
|
13
|
+
const r = n ? p : A, u = e.filter((c, h, g) => g.lastIndexOf(c) !== h ? !1 : c < t.length && c > 0).sort(S);
|
|
14
|
+
if (u.length === 0)
|
|
15
15
|
return /* @__PURE__ */ new Map([[0, t]]);
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
for (;
|
|
19
|
-
const
|
|
20
|
-
|
|
16
|
+
const i = /* @__PURE__ */ new Map();
|
|
17
|
+
let l = "", f = 0, o = 0, s = 0, a = 0;
|
|
18
|
+
for (; o < t.length; ) {
|
|
19
|
+
const c = r(t, o);
|
|
20
|
+
l += c, o += c.length, f += 1, u[s] === f && (i.set(a, l), l = "", a = u[s], s += 1);
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return l && i.set(a, l), i;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
return `${
|
|
24
|
+
function b(t, e, n, r) {
|
|
25
|
+
const u = t.substring(0, n), i = t.substring(r);
|
|
26
|
+
return `${u}${e}${i}`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function I(t) {
|
|
29
29
|
return t.replace(/\\/g, "/");
|
|
30
30
|
}
|
|
31
31
|
function d(t) {
|
|
@@ -34,11 +34,15 @@ function d(t) {
|
|
|
34
34
|
function w(t) {
|
|
35
35
|
return !t || t === "false" || t === "0";
|
|
36
36
|
}
|
|
37
|
+
function P(t) {
|
|
38
|
+
return String(t).charAt(0).toUpperCase() + String(t).slice(1);
|
|
39
|
+
}
|
|
37
40
|
export {
|
|
41
|
+
P as capitalize,
|
|
38
42
|
w as isFalseString,
|
|
39
43
|
d as isTrueString,
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
I as normalizeSlashes,
|
|
45
|
+
b as replaceRange,
|
|
42
46
|
C as splitByIndices,
|
|
43
47
|
p as unicodeCharAt
|
|
44
48
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfx-dev/ui-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/main.js",
|
|
@@ -15,8 +15,12 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev": "vite",
|
|
17
17
|
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
18
|
-
"lint": "eslint --quiet \"src/**/*{ts,tsx}\" \"lib/**/*{ts,tsx}\"",
|
|
19
|
-
"lint:fix": "eslint --fix --quiet \"src/**/*{ts,tsx}\" \"lib/**/*{ts,tsx}\"",
|
|
18
|
+
"lint-es": "eslint --quiet \"src/**/*{ts,tsx}\" \"lib/**/*{ts,tsx}\"",
|
|
19
|
+
"lint-es:fix": "eslint --fix --quiet \"src/**/*{ts,tsx}\" \"lib/**/*{ts,tsx}\"",
|
|
20
|
+
"lint-style": "stylelint \"src/**/*{css,scss}\" \"lib/**/*{css,scss}\"",
|
|
21
|
+
"lint-style:fix": "stylelint --fix \"src/**/*{css,scss}\" \"lib/**/*{css,scss}\"",
|
|
22
|
+
"lint": "yarn lint-es && yarn lint-style",
|
|
23
|
+
"lint:fix": "yarn lint-es:fix && yarn lint-style:fix",
|
|
20
24
|
"test": "vitest run",
|
|
21
25
|
"preview": "vite preview",
|
|
22
26
|
"prepublishOnly": "yarn build",
|
|
@@ -39,13 +43,13 @@
|
|
|
39
43
|
"react-window": "^1.8.8"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
|
-
"@cfx-dev/eslint-config-ui": "^1.1.
|
|
46
|
+
"@cfx-dev/eslint-config-ui": "^1.1.1",
|
|
47
|
+
"@cfx-dev/stylelint-config-ui": "^1.0.0",
|
|
43
48
|
"@chromatic-com/storybook": "1.5.0",
|
|
44
49
|
"@storybook/addon-essentials": "^8.1.5",
|
|
45
50
|
"@storybook/addon-interactions": "^8.1.5",
|
|
46
51
|
"@storybook/addon-links": "^8.1.5",
|
|
47
52
|
"@storybook/addon-onboarding": "^8.1.5",
|
|
48
|
-
"@storybook/addons": "^7.6.17",
|
|
49
53
|
"@storybook/blocks": "^8.1.5",
|
|
50
54
|
"@storybook/react": "^8.1.5",
|
|
51
55
|
"@storybook/react-vite": "^8.1.5",
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
"remark-gfm": "^4.0.1",
|
|
62
66
|
"sass": "^1.77.4",
|
|
63
67
|
"storybook": "^8.1.5",
|
|
68
|
+
"stylelint": "^16.19.1",
|
|
64
69
|
"typescript": "^5.2.2",
|
|
65
70
|
"vite": "^5.2.0",
|
|
66
71
|
"vite-plugin-dts": "^3.9.1",
|
package/dist/Rail-DcVowhML.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import t from "react";
|
|
3
|
-
import { Interactive as w } from "./components/Interactive/Interactive.js";
|
|
4
|
-
import { clsx as g } from "./utils/clsx.js";
|
|
5
|
-
import { clamp01 as C } from "./utils/math.js";
|
|
6
|
-
const P = "cfxui__Scrollable__virtual__355e6", T = "cfxui__Scrollable__root__32c21", R = "cfxui__Scrollable__rail__2624b", M = "cfxui__Scrollable__active__fd553", y = "cfxui__Scrollable__scroller__0d77d", z = "cfxui__Scrollable__content__0fd73", E = "cfxui__Scrollable__thumb__a7819", i = {
|
|
7
|
-
virtual: P,
|
|
8
|
-
root: T,
|
|
9
|
-
rail: R,
|
|
10
|
-
active: M,
|
|
11
|
-
scroller: y,
|
|
12
|
-
"no-x-scroll": "cfxui__Scrollable__no-x-scroll__26dde",
|
|
13
|
-
"no-y-scroll": "cfxui__Scrollable__no-y-scroll__192e6",
|
|
14
|
-
content: z,
|
|
15
|
-
thumb: E,
|
|
16
|
-
"axis-x": "cfxui__Scrollable__axis-x__f462a",
|
|
17
|
-
"axis-y": "cfxui__Scrollable__axis-y__e8e3f"
|
|
18
|
-
}, L = {
|
|
19
|
-
pos: 0,
|
|
20
|
-
ratio: 1,
|
|
21
|
-
height: 0,
|
|
22
|
-
offset: 0,
|
|
23
|
-
dragging: !1,
|
|
24
|
-
dragStartAtCursor: 0,
|
|
25
|
-
dragStartAtPos: 0,
|
|
26
|
-
movementMultiplier: 1
|
|
27
|
-
};
|
|
28
|
-
function Y(v) {
|
|
29
|
-
const {
|
|
30
|
-
axis: n,
|
|
31
|
-
pos: s,
|
|
32
|
-
size: o,
|
|
33
|
-
scrollSize: f,
|
|
34
|
-
rootRef: m,
|
|
35
|
-
setRootActive: c,
|
|
36
|
-
minThumbSize: l
|
|
37
|
-
} = v, [h, S] = t.useState(!1), e = t.useRef({ ...L }), r = t.useMemo(() => n === "x" ? {
|
|
38
|
-
sizeCSS: "width",
|
|
39
|
-
offsetCSSTransform: "translateX",
|
|
40
|
-
scrollToSide: "left",
|
|
41
|
-
mousePosAxis: "clientX"
|
|
42
|
-
} : {
|
|
43
|
-
sizeCSS: "height",
|
|
44
|
-
offsetCSSTransform: "translateY",
|
|
45
|
-
scrollToSide: "top",
|
|
46
|
-
mousePosAxis: "clientY"
|
|
47
|
-
}, [n]), b = {
|
|
48
|
-
[r.sizeCSS]: `${e.current.height}px`,
|
|
49
|
-
transform: `${r.offsetCSSTransform}(${e.current.offset}px)`
|
|
50
|
-
}, p = t.useCallback((_) => {
|
|
51
|
-
e.current.dragging = !0, e.current.dragStartAtPos = e.current.pos, e.current.dragStartAtCursor = _[r.mousePosAxis], S(!0), c(!0);
|
|
52
|
-
}, [r.mousePosAxis, c]), a = t.useCallback((_) => {
|
|
53
|
-
var d;
|
|
54
|
-
if (!e.current.dragging)
|
|
55
|
-
return;
|
|
56
|
-
const A = _[r.mousePosAxis] - e.current.dragStartAtCursor;
|
|
57
|
-
(d = m.current) == null || d.scrollTo({
|
|
58
|
-
[r.scrollToSide]: e.current.dragStartAtPos + A * e.current.movementMultiplier,
|
|
59
|
-
behavior: "auto"
|
|
60
|
-
});
|
|
61
|
-
}, [r.mousePosAxis, r.scrollToSide, m]), u = t.useCallback(() => {
|
|
62
|
-
e.current.dragging && (e.current.dragging = !1, S(!1), c(!1));
|
|
63
|
-
}, [c]);
|
|
64
|
-
return t.useEffect(() => {
|
|
65
|
-
e.current.pos = s, e.current.ratio = C(o / f), e.current.height = o * e.current.ratio, e.current.offset = s * e.current.ratio, e.current.height < l && (e.current.height = l, e.current.offset = s * e.current.ratio * ((o - l) / o)), e.current.movementMultiplier = 1 / e.current.ratio;
|
|
66
|
-
}, [l, s, f, o]), t.useEffect(() => (window.addEventListener("mousemove", a), window.addEventListener("mouseup", u), () => {
|
|
67
|
-
window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", u);
|
|
68
|
-
}), [a, u]), /* @__PURE__ */ x("div", { className: g(i.rail, i[`axis-${n}`]), children: /* @__PURE__ */ x(
|
|
69
|
-
w,
|
|
70
|
-
{
|
|
71
|
-
showPointer: !1,
|
|
72
|
-
style: b,
|
|
73
|
-
className: g(i.thumb, { [i.active]: h }),
|
|
74
|
-
onMouseDown: p
|
|
75
|
-
}
|
|
76
|
-
) });
|
|
77
|
-
}
|
|
78
|
-
export {
|
|
79
|
-
Y as R,
|
|
80
|
-
i as s
|
|
81
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const _ = "cfxui__Table__tableIcon__f8e96", e = "cfxui__Table__iconButton__ac6da", t = "cfxui__Table__tableRoot__4c74e", a = "cfxui__Table__tableHeader__a6fa6", l = "cfxui__Table__sticky__fe0cf", c = "cfxui__Table__tableCell__bf8d9", o = "cfxui__Table__tableBody__508b5", b = "cfxui__Table__tableRow__ede78", n = "cfxui__Table__normal__eab0a", i = "cfxui__Table__large__e3861", s = "cfxui__Table__selected__e347d", f = "cfxui__Table__interactive__94da5", u = {
|
|
2
|
-
tableIcon: _,
|
|
3
|
-
iconButton: e,
|
|
4
|
-
tableRoot: t,
|
|
5
|
-
tableHeader: a,
|
|
6
|
-
sticky: l,
|
|
7
|
-
tableCell: c,
|
|
8
|
-
tableBody: o,
|
|
9
|
-
tableRow: b,
|
|
10
|
-
normal: n,
|
|
11
|
-
large: i,
|
|
12
|
-
selected: s,
|
|
13
|
-
interactive: f
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
u as s
|
|
17
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
-
import R from "react";
|
|
3
|
-
import { clsx as C } from "../../../utils/clsx.js";
|
|
4
|
-
import { ui as o } from "../../../utils/ui/ui.js";
|
|
5
|
-
const S = "cfxui__Box__root__299ae", k = "cfxui__Box__grow__7ee8d", e = {
|
|
6
|
-
root: S,
|
|
7
|
-
"full-width": "cfxui__Box__full-width__2b253",
|
|
8
|
-
"fit-content-width": "cfxui__Box__fit-content-width__eff85",
|
|
9
|
-
"full-height": "cfxui__Box__full-height__1d61f",
|
|
10
|
-
"no-overflow": "cfxui__Box__no-overflow__68f14",
|
|
11
|
-
"no-shrink": "cfxui__Box__no-shrink__fbd72",
|
|
12
|
-
grow: k,
|
|
13
|
-
"no-grow": "cfxui__Box__no-grow__7c039"
|
|
14
|
-
}, h = (t) => t;
|
|
15
|
-
function N(t) {
|
|
16
|
-
const {
|
|
17
|
-
noOverflow: a = !1,
|
|
18
|
-
noShrink: c = !1,
|
|
19
|
-
grow: s = void 0,
|
|
20
|
-
width: l,
|
|
21
|
-
height: n,
|
|
22
|
-
children: g,
|
|
23
|
-
className: x,
|
|
24
|
-
fullWidth: d,
|
|
25
|
-
fullHeight: w,
|
|
26
|
-
fitContentWidth: u,
|
|
27
|
-
flex: _,
|
|
28
|
-
display: f,
|
|
29
|
-
style: p,
|
|
30
|
-
ref: m,
|
|
31
|
-
as: v = "div",
|
|
32
|
-
...r
|
|
33
|
-
} = t, y = C(
|
|
34
|
-
e.root,
|
|
35
|
-
x,
|
|
36
|
-
o.getResponsiveClassnames("width", l),
|
|
37
|
-
o.getResponsiveClassnames("height", n),
|
|
38
|
-
o.getResponsiveClassnames("flex", _),
|
|
39
|
-
o.getResponsiveClassnames("display", f),
|
|
40
|
-
o.getAllMPClassnames(r),
|
|
41
|
-
{
|
|
42
|
-
[e["full-width"]]: d,
|
|
43
|
-
[e["full-height"]]: w,
|
|
44
|
-
[e["fit-content-width"]]: u,
|
|
45
|
-
[e["no-overflow"]]: a,
|
|
46
|
-
[e["no-shrink"]]: c,
|
|
47
|
-
[e["no-grow"]]: s === !1,
|
|
48
|
-
[e.grow]: s === !0
|
|
49
|
-
}
|
|
50
|
-
), i = {
|
|
51
|
-
...o.getResponsiveStyles("width", l),
|
|
52
|
-
...o.getResponsiveStyles("height", n),
|
|
53
|
-
...o.getResponsiveStyles("flex", _, h),
|
|
54
|
-
...o.getResponsiveStyles("display", f, h),
|
|
55
|
-
...o.getAllMPStyles(r),
|
|
56
|
-
...p || {}
|
|
57
|
-
};
|
|
58
|
-
return !i.width && s === !0 && (i.width = "1px"), /* @__PURE__ */ B(
|
|
59
|
-
v,
|
|
60
|
-
{
|
|
61
|
-
ref: m,
|
|
62
|
-
className: y,
|
|
63
|
-
style: i,
|
|
64
|
-
children: g
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
const W = R.memo(N);
|
|
69
|
-
export {
|
|
70
|
-
W as default,
|
|
71
|
-
h as stringPropFormater
|
|
72
|
-
};
|