@cfx-dev/ui-components 4.3.18 → 4.5.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/assets/css/Select.css +1 -1
- package/dist/assets/css/TextShowcase.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/components/Text/Text.d.ts +2 -2
- package/dist/components/Text/Text.js +69 -72
- package/dist/components/Text/Text.types.d.ts +4 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +8 -7
- package/dist/main.d.ts +2 -2
- package/dist/main.js +154 -153
- package/dist/styles-scss/_colors.scss +31 -20
- package/dist/styles-scss/_ui.scss +30 -30
- package/dist/styles-scss/tokens.scss +61 -11
- package/dist/utils/ui/index.d.ts +1 -1
- package/dist/utils/ui/ui.types.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeRefs as
|
|
1
|
+
import { mergeRefs as r } from "./utils/mergeRefs.js";
|
|
2
2
|
import { clsx as a } from "./utils/clsx.js";
|
|
3
3
|
import { getValue as m } from "./utils/getValue.js";
|
|
4
4
|
import { usePopoverController as x } from "./utils/hooks/usePopoverController.js";
|
|
@@ -11,10 +11,10 @@ import { useOutlet as g } from "./utils/hooks/useOutlet.js";
|
|
|
11
11
|
import { CLIPBOARD_TITLE_APPEARANCE as B, useClipboardComponent as R } from "./utils/hooks/useClipboardComponent.js";
|
|
12
12
|
import { formatDate as D, formatLocaleDate as y, formatShortDate as P } from "./utils/formatDate.js";
|
|
13
13
|
import { CURRENCY_MAP as A, FREE_PRICE_TEXT as k, formatCurrency as _ } from "./utils/formatCurrency.js";
|
|
14
|
-
import { identity as
|
|
15
|
-
import { Linkify as z, defaultLinkReplacer as N, defaultLinkReplacerx as
|
|
14
|
+
import { identity as O, invoke as v, noop as h, returnFalse as U, returnTrue as M } from "./utils/functional.js";
|
|
15
|
+
import { Linkify as z, defaultLinkReplacer as N, defaultLinkReplacerx as V, isExternalUrl as G, linkify as Y, linkifyx as H, matchLinkNodes as K, matchLinks as X } from "./utils/links.js";
|
|
16
16
|
import { clamp as j, clamp01 as J, minmax as Q } from "./utils/math.js";
|
|
17
|
-
import { isFalseString as q, isTrueString as $, normalizeSlashes as oo, replaceRange as
|
|
17
|
+
import { isFalseString as q, isTrueString as $, normalizeSlashes as oo, replaceRange as eo, splitByIndices as ro, unicodeCharAt as to } from "./utils/string.js";
|
|
18
18
|
import { debounce as fo, throttle as mo } from "./utils/execution.js";
|
|
19
19
|
import { getColor as xo } from "./utils/color.js";
|
|
20
20
|
import { ui as lo } from "./utils/ui/ui.js";
|
|
@@ -23,186 +23,186 @@ import { isInEnum as go } from "./utils/enum.js";
|
|
|
23
23
|
import { joaat32 as Bo } from "./utils/joaat32.js";
|
|
24
24
|
import { default as So } from "./components/IconButton/IconButton.js";
|
|
25
25
|
import { Accordion as yo, AccordionContent as Po, AccordionHeader as bo, AccordionItem as Ao, AccordionTrigger as ko } from "./components/Accordion/Accordion.js";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as Fo } from "./components/ClipboardButton/ClipboardButton.js";
|
|
27
27
|
import { default as vo } from "./components/Checkbox/Checkbox.js";
|
|
28
28
|
import { default as Uo, ButtonContent as Mo, getButtonClassName as wo } from "./components/Button/Button.js";
|
|
29
29
|
import { ButtonBar as No } from "./components/Button/ButtonBar.js";
|
|
30
|
-
import { LinkButton as
|
|
31
|
-
import { BurgerMenuButton as
|
|
32
|
-
import { BurgerMenu as
|
|
30
|
+
import { LinkButton as Go } from "./components/Button/LinkButton.js";
|
|
31
|
+
import { BurgerMenuButton as Ho } from "./components/BurgerMenu/BurgerMenuButton.js";
|
|
32
|
+
import { BurgerMenu as Xo } from "./components/BurgerMenu/BurgerMenu.js";
|
|
33
33
|
import { default as jo, getLinkClassName as Jo, getLinkStyles as Qo } from "./components/Link/Link.js";
|
|
34
34
|
import { default as qo } from "./components/Link/ButtonLink.js";
|
|
35
|
-
import { Avatar as
|
|
36
|
-
import { BACKDROP_OUTLET_ID as
|
|
37
|
-
import { Badge as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { Dot as
|
|
42
|
-
import { FLYOUT_OUTLET_ID as
|
|
43
|
-
import { Logos as
|
|
44
|
-
import { I as
|
|
45
|
-
import { I as
|
|
46
|
-
import { Icon as
|
|
47
|
-
import { IconBig as
|
|
48
|
-
import { Indicator as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { Interactive as
|
|
53
|
-
import { Island as
|
|
54
|
-
import { default as
|
|
55
|
-
import { stringPropFormater as
|
|
56
|
-
import { Center as
|
|
57
|
-
import { default as
|
|
58
|
-
import { FlexAlignItemsEnum as
|
|
59
|
-
import { FlexRestricter as
|
|
60
|
-
import { Pad as
|
|
61
|
-
import { Page as
|
|
62
|
-
import { R as
|
|
63
|
-
import { Scrollable as
|
|
64
|
-
import { VirtualScrollable as
|
|
65
|
-
import { Loaf as
|
|
66
|
-
import { Modal as
|
|
67
|
-
import { NavList as
|
|
68
|
-
import { OVERLAY_OUTLET_ID as
|
|
69
|
-
import { default as
|
|
70
|
-
import { Popover as
|
|
71
|
-
import { PremiumBadge as
|
|
72
|
-
import { Prose as
|
|
73
|
-
import { Radio as
|
|
74
|
-
import { Select as
|
|
75
|
-
import { DropdownSelect as
|
|
76
|
-
import { default as
|
|
77
|
-
import { Separator as
|
|
78
|
-
import { Shroud as
|
|
79
|
-
import { Slider as
|
|
80
|
-
import { Spacer as
|
|
81
|
-
import { Style as
|
|
82
|
-
import { default as
|
|
83
|
-
import { ToggleGroup as
|
|
84
|
-
import { Tabular as
|
|
85
|
-
import { DataTable as ot, DataTableHeaderItem as
|
|
35
|
+
import { Avatar as oe } from "./components/Avatar/Avatar.js";
|
|
36
|
+
import { BACKDROP_OUTLET_ID as re, default as te } from "./components/BackdropPortal/BackdropPortal.js";
|
|
37
|
+
import { Badge as fe } from "./components/Badge/Badge.js";
|
|
38
|
+
import { default as pe } from "./components/ControlBox/ControlBox.js";
|
|
39
|
+
import { default as ne } from "./components/CountryFlag/CountryFlag.js";
|
|
40
|
+
import { default as ue } from "./components/Decorate/Decorate.js";
|
|
41
|
+
import { Dot as ie } from "./components/Dot/Dot.js";
|
|
42
|
+
import { FLYOUT_OUTLET_ID as ce, Flyout as Te } from "./components/Flyout/Flyout.js";
|
|
43
|
+
import { Logos as Ce } from "./components/Logos/index.js";
|
|
44
|
+
import { I as ge } from "./cfxIcons-B9nzO6TW.js";
|
|
45
|
+
import { I as Be } from "./cfxIconsBig-BLJjMT-Y.js";
|
|
46
|
+
import { Icon as Se } from "./components/Icon/Icon.js";
|
|
47
|
+
import { IconBig as ye } from "./components/IconBig/IconBig.js";
|
|
48
|
+
import { Indicator as be } from "./components/Indicator/Indicator.js";
|
|
49
|
+
import { default as ke } from "./components/InfoPanel/InfoPanel.js";
|
|
50
|
+
import { default as Fe } from "./components/Input/Input.js";
|
|
51
|
+
import { default as ve } from "./components/Input/RichInput.js";
|
|
52
|
+
import { Interactive as Ue } from "./components/Interactive/Interactive.js";
|
|
53
|
+
import { Island as we, IslandCorner as ze } from "./components/Island/Island.js";
|
|
54
|
+
import { default as Ve } from "./components/Box/Box.js";
|
|
55
|
+
import { stringPropFormater as Ye } from "./components/RSC/Box/Box.js";
|
|
56
|
+
import { Center as Ke } from "./components/Layout/Center/Center.js";
|
|
57
|
+
import { default as We } from "./components/Flex/Flex.js";
|
|
58
|
+
import { FlexAlignItemsEnum as Je, FlexDirectionEnum as Qe, FlexJustifyContentEnum as Ze, FlexWrapEnum as qe } from "./components/RSC/Flex/Flex.types.js";
|
|
59
|
+
import { FlexRestricter as or } from "./components/RSC/Flex/FlexRestricter.js";
|
|
60
|
+
import { Pad as rr } from "./components/Layout/Pad/Pad.js";
|
|
61
|
+
import { Page as ar } from "./components/Layout/Page/Page.js";
|
|
62
|
+
import { R as mr } from "./Rail-CHFAf3wJ.js";
|
|
63
|
+
import { Scrollable as xr } from "./components/Scrollable/Scrollable.js";
|
|
64
|
+
import { VirtualScrollable as lr } from "./components/Scrollable/VirtualScrollable.js";
|
|
65
|
+
import { Loaf as sr } from "./components/Loaf/Loaf.js";
|
|
66
|
+
import { Modal as dr } from "./components/Modal/Modal.js";
|
|
67
|
+
import { NavList as Tr } from "./components/NavList/NavList.js";
|
|
68
|
+
import { OVERLAY_OUTLET_ID as Cr, Overlay as Er } from "./components/Overlay/Overlay.js";
|
|
69
|
+
import { default as Lr } from "./components/Pagination/Pagination.js";
|
|
70
|
+
import { Popover as Rr } from "./components/Popover/Popover.js";
|
|
71
|
+
import { PremiumBadge as Dr } from "./components/PremiumBadge/PremiumBadge.js";
|
|
72
|
+
import { Prose as Pr } from "./components/Prose/Prose.js";
|
|
73
|
+
import { Radio as Ar } from "./components/Radio/Radio.js";
|
|
74
|
+
import { Select as _r } from "./components/Select/Select.js";
|
|
75
|
+
import { DropdownSelect as Or } from "./components/DropdownSelect/DropdownSelect.js";
|
|
76
|
+
import { default as hr } from "./components/DropdownMenu/DropdownMenu.js";
|
|
77
|
+
import { Separator as Mr } from "./components/Separator/Separator.js";
|
|
78
|
+
import { Shroud as zr } from "./components/Shroud/Shroud.js";
|
|
79
|
+
import { Slider as Vr } from "./components/Slider/Slider.js";
|
|
80
|
+
import { Spacer as Yr } from "./components/Spacer/Spacer.js";
|
|
81
|
+
import { Style as Kr, useContextualStyle as Xr } from "./components/Style/Style.js";
|
|
82
|
+
import { default as jr } from "./components/Switch/Switch.js";
|
|
83
|
+
import { ToggleGroup as Qr } from "./components/ToggleGroup/ToggleGroup.js";
|
|
84
|
+
import { Tabular as qr } from "./components/Tabular/Tabular.js";
|
|
85
|
+
import { DataTable as ot, DataTableHeaderItem as et, DataTableRow as rt } from "./components/DataTable/DataTable.js";
|
|
86
86
|
import { Table as at } from "./components/Table/index.js";
|
|
87
87
|
import { default as mt } from "./components/TableResponsiveText/TableResponsiveText.js";
|
|
88
|
-
import { DEFAULT_TEXT_COLOR as xt, TEXT_OPACITY_MAP as nt, Text as lt, TextBlock as ut, getTextOpacity as st,
|
|
89
|
-
import { default as
|
|
90
|
-
import { Textarea as
|
|
91
|
-
import { TITLE_OUTLET_ID as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { OnScreenSensor as
|
|
88
|
+
import { DEFAULT_TEXT_COLOR as xt, TEXT_OPACITY_MAP as nt, Text as lt, TextBlock as ut, getTextOpacity as st, lineHeightResponsiveValueFormatter as it, textSizeResponsiveValueFormatter as dt } from "./components/Text/Text.js";
|
|
89
|
+
import { default as Tt } from "./components/Label/Label.js";
|
|
90
|
+
import { Textarea as Ct } from "./components/Textarea/Textarea.js";
|
|
91
|
+
import { TITLE_OUTLET_ID as gt, Title as Lt, titleGetCoords as Bt, titleGetCssStyle as Rt } from "./components/Title/Title.js";
|
|
92
|
+
import { default as Dt } from "./components/InputDropzone/InputDropzone.js";
|
|
93
|
+
import { default as Pt } from "./components/InputDropzone/ItemPreview.js";
|
|
94
|
+
import { default as At } from "./components/Skeleton/Skeleton.js";
|
|
95
|
+
import { OnScreenSensor as _t } from "./components/OnScreenSensor.js";
|
|
96
96
|
import { Symbols as Ot } from "./components/Symbols.js";
|
|
97
|
-
import { default as
|
|
97
|
+
import { default as ht } from "./components/Table/TableIconButton.js";
|
|
98
98
|
export {
|
|
99
99
|
yo as Accordion,
|
|
100
100
|
Po as AccordionContent,
|
|
101
101
|
bo as AccordionHeader,
|
|
102
102
|
Ao as AccordionItem,
|
|
103
103
|
ko as AccordionTrigger,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
oe as Avatar,
|
|
105
|
+
re as BACKDROP_OUTLET_ID,
|
|
106
|
+
te as BackdropPortal,
|
|
107
|
+
fe as Badge,
|
|
108
108
|
so as BorderRadiusEnum,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
Ve as Box,
|
|
110
|
+
Xo as BurgerMenu,
|
|
111
|
+
Ho as BurgerMenuButton,
|
|
112
112
|
Uo as Button,
|
|
113
113
|
No as ButtonBar,
|
|
114
114
|
Mo as ButtonContent,
|
|
115
115
|
qo as ButtonLink,
|
|
116
116
|
B as CLIPBOARD_TITLE_APPEARANCE,
|
|
117
117
|
A as CURRENCY_MAP,
|
|
118
|
-
|
|
118
|
+
Ke as Center,
|
|
119
119
|
vo as Checkbox,
|
|
120
|
-
|
|
120
|
+
Fo as ClipboardButton,
|
|
121
121
|
io as ColorEnum,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
pe as ControlBox,
|
|
123
|
+
ne as CountryFlag,
|
|
124
124
|
xt as DEFAULT_TEXT_COLOR,
|
|
125
125
|
ot as DataTable,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
et as DataTableHeaderItem,
|
|
127
|
+
rt as DataTableRow,
|
|
128
|
+
ue as Decorate,
|
|
129
|
+
ie as Dot,
|
|
130
|
+
hr as DropdownMenu,
|
|
131
|
+
Or as DropdownSelect,
|
|
132
|
+
Pt as DropzoneItemPreview,
|
|
133
|
+
ce as FLYOUT_OUTLET_ID,
|
|
134
134
|
k as FREE_PRICE_TEXT,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
We as Flex,
|
|
136
|
+
Je as FlexAlignItemsEnum,
|
|
137
|
+
Qe as FlexDirectionEnum,
|
|
138
|
+
Ze as FlexJustifyContentEnum,
|
|
139
|
+
or as FlexRestricter,
|
|
140
|
+
qe as FlexWrapEnum,
|
|
141
|
+
Te as Flyout,
|
|
142
|
+
Se as Icon,
|
|
143
|
+
ye as IconBig,
|
|
144
144
|
So as IconButton,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
145
|
+
ge as Icons,
|
|
146
|
+
Be as IconsBig,
|
|
147
|
+
be as Indicator,
|
|
148
|
+
ke as InfoPanel,
|
|
149
|
+
Fe as Input,
|
|
150
|
+
Dt as InputDropzone,
|
|
151
|
+
Ue as Interactive,
|
|
152
|
+
we as Island,
|
|
153
|
+
ze as IslandCorner,
|
|
154
|
+
Tt as Label,
|
|
155
155
|
jo as Link,
|
|
156
|
-
|
|
156
|
+
Go as LinkButton,
|
|
157
157
|
z as Linkify,
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
sr as Loaf,
|
|
159
|
+
Ce as Logos,
|
|
160
160
|
co as MediaQueryEnum,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
dr as Modal,
|
|
162
|
+
Tr as NavList,
|
|
163
|
+
Cr as OVERLAY_OUTLET_ID,
|
|
164
164
|
To as OffsetEnum,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
165
|
+
_t as OnScreenSensor,
|
|
166
|
+
Er as Overlay,
|
|
167
|
+
rr as Pad,
|
|
168
|
+
ar as Page,
|
|
169
|
+
Lr as Pagination,
|
|
170
|
+
Rr as Popover,
|
|
171
|
+
Dr as PremiumBadge,
|
|
172
|
+
Pr as Prose,
|
|
173
|
+
Ar as Radio,
|
|
174
|
+
mr as Rail,
|
|
175
|
+
ve as RichInput,
|
|
176
|
+
xr as Scrollable,
|
|
177
|
+
_r as Select,
|
|
178
|
+
Mr as Separator,
|
|
179
|
+
zr as Shroud,
|
|
180
|
+
At as Skeleton,
|
|
181
|
+
Vr as Slider,
|
|
182
|
+
Yr as Spacer,
|
|
183
|
+
Kr as Style,
|
|
184
|
+
jr as Switch,
|
|
185
185
|
Ot as Symbols,
|
|
186
186
|
nt as TEXT_OPACITY_MAP,
|
|
187
|
-
|
|
187
|
+
gt as TITLE_OUTLET_ID,
|
|
188
188
|
at as Table,
|
|
189
|
-
|
|
189
|
+
ht as TableIconButton,
|
|
190
190
|
mt as TableResponsiveText,
|
|
191
|
-
|
|
191
|
+
qr as Tabular,
|
|
192
192
|
lt as Text,
|
|
193
193
|
ut as TextBlock,
|
|
194
194
|
Io as TextSizeEnum,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
Ct as Textarea,
|
|
196
|
+
Lt as Title,
|
|
197
|
+
Qr as ToggleGroup,
|
|
198
|
+
lr as VirtualScrollable,
|
|
199
199
|
Co as ZIndexEnum,
|
|
200
200
|
j as clamp,
|
|
201
201
|
J as clamp01,
|
|
202
202
|
a as clsx,
|
|
203
203
|
fo as debounce,
|
|
204
204
|
N as defaultLinkReplacer,
|
|
205
|
-
|
|
205
|
+
V as defaultLinkReplacerx,
|
|
206
206
|
_ as formatCurrency,
|
|
207
207
|
D as formatDate,
|
|
208
208
|
y as formatLocaleDate,
|
|
@@ -213,34 +213,35 @@ export {
|
|
|
213
213
|
Qo as getLinkStyles,
|
|
214
214
|
st as getTextOpacity,
|
|
215
215
|
m as getValue,
|
|
216
|
-
|
|
216
|
+
O as identity,
|
|
217
217
|
v as invoke,
|
|
218
|
-
|
|
218
|
+
G as isExternalUrl,
|
|
219
219
|
q as isFalseString,
|
|
220
220
|
go as isInEnum,
|
|
221
221
|
$ as isTrueString,
|
|
222
222
|
Bo as joaat32,
|
|
223
|
+
it as lineHeightResponsiveValueFormatter,
|
|
223
224
|
Y as linkify,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
H as linkifyx,
|
|
226
|
+
K as matchLinkNodes,
|
|
227
|
+
X as matchLinks,
|
|
228
|
+
r as mergeRefs,
|
|
228
229
|
Q as minmax,
|
|
229
230
|
h as noop,
|
|
230
231
|
oo as normalizeSlashes,
|
|
231
|
-
|
|
232
|
+
eo as replaceRange,
|
|
232
233
|
U as returnFalse,
|
|
233
234
|
M as returnTrue,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
ro as splitByIndices,
|
|
236
|
+
Ye as stringPropFormater,
|
|
237
|
+
dt as textSizeResponsiveValueFormatter,
|
|
237
238
|
mo as throttle,
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
Bt as titleGetCoords,
|
|
240
|
+
Rt as titleGetCssStyle,
|
|
240
241
|
lo as ui,
|
|
241
242
|
to as unicodeCharAt,
|
|
242
243
|
R as useClipboardComponent,
|
|
243
|
-
|
|
244
|
+
Xr as useContextualStyle,
|
|
244
245
|
s as useDynamicRef,
|
|
245
246
|
d as useGlobalKeyboardEvent,
|
|
246
247
|
l as useInstance,
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
@use 'sass:map';
|
|
4
4
|
@use 'sass:color';
|
|
5
5
|
|
|
6
|
-
@function
|
|
7
|
-
@return color.channel($color,
|
|
6
|
+
@function getred($color) {
|
|
7
|
+
@return color.channel($color, 'red');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@function getgreen($color) {
|
|
11
|
+
@return color.channel($color, 'green');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@function getblue($color) {
|
|
15
|
+
@return color.channel($color, 'blue');
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
@function get-luminance($color) {
|
|
11
19
|
$colors: (
|
|
12
|
-
'red':
|
|
13
|
-
'green':
|
|
14
|
-
'blue':
|
|
20
|
+
'red': getred($color),
|
|
21
|
+
'green': getgreen($color),
|
|
22
|
+
'blue': getblue($color),
|
|
15
23
|
);
|
|
16
24
|
|
|
17
25
|
@each $name, $value in $colors {
|
|
@@ -39,12 +47,12 @@
|
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
@function interpolate($c1, $c2, $f) {
|
|
42
|
-
$c1r:
|
|
43
|
-
$c1g:
|
|
44
|
-
$c1b:
|
|
45
|
-
$c2r:
|
|
46
|
-
$c2g:
|
|
47
|
-
$c2b:
|
|
50
|
+
$c1r: getred($c1);
|
|
51
|
+
$c1g: getgreen($c1);
|
|
52
|
+
$c1b: getblue($c1);
|
|
53
|
+
$c2r: getred($c2);
|
|
54
|
+
$c2g: getgreen($c2);
|
|
55
|
+
$c2b: getblue($c2);
|
|
48
56
|
|
|
49
57
|
@return rgb($c1r + $f * ($c2r - $c1r), $c1g + $f * ($c2g - $c1g), $c1b + $f * ($c2b - $c1b));
|
|
50
58
|
}
|
|
@@ -63,7 +71,8 @@
|
|
|
63
71
|
$mid: interpolate($low, $high, 0.5);
|
|
64
72
|
$lm: get-luminance($mid);
|
|
65
73
|
|
|
66
|
-
|
|
74
|
+
/* stylelint-disable-next-line scss/operator-no-unspaced */
|
|
75
|
+
@while math.abs($lum - $lm) >= 1e-7 and $itersLeft > 0 {
|
|
67
76
|
$itersLeft: $itersLeft - 1;
|
|
68
77
|
$mid: interpolate($low, $high, 0.5);
|
|
69
78
|
$lm: get-luminance($mid);
|
|
@@ -79,7 +88,7 @@
|
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
@function color-triplet($color) {
|
|
82
|
-
@return #{
|
|
91
|
+
@return #{getred($color)}, #{getgreen($color)}, #{getblue($color)};
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
// LAB <-> RGB
|
|
@@ -88,9 +97,9 @@ $_16OVER116: math.div(16, 116);
|
|
|
88
97
|
$_1OVER2P4: math.div(1, 2.4);
|
|
89
98
|
|
|
90
99
|
@function rgb2lab($color) {
|
|
91
|
-
$r: math.div(
|
|
92
|
-
$g: math.div(
|
|
93
|
-
$b: math.div(
|
|
100
|
+
$r: math.div(getred($color), 255);
|
|
101
|
+
$g: math.div(getgreen($color), 255);
|
|
102
|
+
$b: math.div(getblue($color), 255);
|
|
94
103
|
|
|
95
104
|
@if $r > 0.04045 {
|
|
96
105
|
$r: math.pow(math.div($r + 0.055, 1.055), 2.4);
|
|
@@ -111,7 +120,8 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
111
120
|
}
|
|
112
121
|
|
|
113
122
|
$x: math.div($r * 0.4124 + $g * 0.3576 + $b * 0.1805, 0.95047);
|
|
114
|
-
|
|
123
|
+
/* stylelint-disable-next-line prettier/prettier */
|
|
124
|
+
$y: math.div($r * 0.2126 + $g * 0.7152 + $b * 0.0722, 1.00000);
|
|
115
125
|
$z: math.div($r * 0.0193 + $g * 0.1192 + $b * 0.9505, 1.08883);
|
|
116
126
|
|
|
117
127
|
@if $x > 0.008856 {
|
|
@@ -132,9 +142,9 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
132
142
|
$z: (7.787 * $z) + $_16OVER116;
|
|
133
143
|
}
|
|
134
144
|
|
|
135
|
-
$
|
|
145
|
+
$l: (116 * $y) - 16;
|
|
136
146
|
$a: 500 * ($x - $y);
|
|
137
|
-
$
|
|
147
|
+
$b: 200 * ($y - $z);
|
|
138
148
|
|
|
139
149
|
@return ('L': $l, 'a': $a, 'b': $b);
|
|
140
150
|
}
|
|
@@ -166,7 +176,8 @@ $_1OVER2P4: math.div(1, 2.4);
|
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
$x: $x * 0.95047;
|
|
169
|
-
|
|
179
|
+
/* stylelint-disable-next-line prettier/prettier */
|
|
180
|
+
$y: $y * 1.00000;
|
|
170
181
|
$z: $z * 1.08883;
|
|
171
182
|
$r: $x * 3.2406 + $y * -1.5372 + $z * -0.4986;
|
|
172
183
|
$g: $x * -0.9689 + $y * 1.8758 + $z * 0.0415;
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
@use 'sass:meta';
|
|
6
6
|
@use 'colors';
|
|
7
7
|
|
|
8
|
+
@function negative($cssValue) {
|
|
9
|
+
@return calc(-1 * #{$cssValue});
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
@mixin def($var, $value) {
|
|
9
13
|
--#{$var}: #{$value};
|
|
10
14
|
}
|
|
@@ -41,18 +45,42 @@
|
|
|
41
45
|
@return var(--font-size-#{$size});
|
|
42
46
|
}
|
|
43
47
|
|
|
48
|
+
@mixin font-size($size: 'normal') {
|
|
49
|
+
font-size: var(--font-size-#{$size});
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
@function font-weight($weight: 'normal') {
|
|
45
53
|
@return var(--font-weight-#{$weight});
|
|
46
54
|
}
|
|
47
55
|
|
|
48
|
-
@
|
|
49
|
-
|
|
56
|
+
@mixin font-weight($weight: 'normal') {
|
|
57
|
+
font-weight: var(--font-weight-#{$weight});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin font-family($family: 'primary') {
|
|
61
|
+
font-family: var(--font-family-#{$family});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin font-color($colorToken) {
|
|
65
|
+
color: color-token($colorToken);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@mixin letter-spacing($size: 'normal') {
|
|
69
|
+
letter-spacing: var(--letter-spacing-#{$size});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@mixin line-height($size: 'normal') {
|
|
73
|
+
line-height: var(--line-height-#{$size});
|
|
50
74
|
}
|
|
51
75
|
|
|
52
76
|
@function border-radius($size: 'normal') {
|
|
53
77
|
@return var(--border-radius-#{$size});
|
|
54
78
|
}
|
|
55
79
|
|
|
80
|
+
@mixin border-radius($size: 'normal') {
|
|
81
|
+
border-radius: var(--border-radius-#{$size});
|
|
82
|
+
}
|
|
83
|
+
|
|
56
84
|
@function viewport-width($multiplier: 1) {
|
|
57
85
|
@return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
|
|
58
86
|
}
|
|
@@ -170,34 +198,6 @@ $cfxuiColorAlpha: (
|
|
|
170
198
|
@return var(--color-#{$name});
|
|
171
199
|
}
|
|
172
200
|
|
|
173
|
-
@mixin border-radius($size: 'normal') {
|
|
174
|
-
border-radius: var(--border-radius-#{$size});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@mixin font-size($size: 'normal') {
|
|
178
|
-
font-size: var(--font-size-#{$size});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
@mixin font-family($family: 'primary') {
|
|
182
|
-
font-family: var(--font-family-#{$family});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
@mixin font-weight($weight: 'normal') {
|
|
186
|
-
font-weight: var(--font-weight-#{$weight});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
@mixin font-color($colorToken) {
|
|
190
|
-
color: color-token($colorToken);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
@mixin letter-spacing($size: 'normal') {
|
|
194
|
-
letter-spacing: var(--letter-spacing-#{$size});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@mixin line-height($size: 'normal') {
|
|
198
|
-
line-height: var(--line-height-#{$size});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
201
|
@mixin animated($props: 'all', $subClass: '&') {
|
|
202
202
|
@if meta.type-of($props) == 'list' {
|
|
203
203
|
$transition: ();
|