@cfx-dev/ui-components 4.4.0 → 4.5.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/dist/assets/css/TextShowcase.css +1 -1
- package/dist/assets/general/global.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/_ui.scss +34 -32
- 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,
|
|
@@ -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: ();
|
|
@@ -366,12 +366,14 @@ $mediaMap: (
|
|
|
366
366
|
@if $size == 'initial' {
|
|
367
367
|
@content;
|
|
368
368
|
} @else {
|
|
369
|
-
|
|
369
|
+
$mediaSize: map.get($mediaMap, $size);
|
|
370
|
+
|
|
371
|
+
@media (width < $mediaSize) {
|
|
370
372
|
@content;
|
|
371
373
|
}
|
|
372
374
|
}
|
|
373
375
|
} @else {
|
|
374
|
-
@media (
|
|
376
|
+
@media (width < $fix) {
|
|
375
377
|
@content;
|
|
376
378
|
}
|
|
377
379
|
}
|
|
@@ -40,18 +40,58 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// font size is responsive, and one size in different media queries can have different values
|
|
43
44
|
@mixin text-tokens() {
|
|
44
|
-
@include ui.define-font-size('
|
|
45
|
-
@include ui.define-font-size('
|
|
46
|
-
@include ui.define-font-size('
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
@include ui.define-font-size('
|
|
50
|
-
@include ui.define-font-size('
|
|
51
|
-
@include ui.define-font-size('
|
|
52
|
-
@include ui.define-font-size('
|
|
53
|
-
@include ui.define-font-size('
|
|
54
|
-
|
|
45
|
+
@include ui.define-font-size('xxxsmall', ui.q(1.5), 1.5);
|
|
46
|
+
@include ui.define-font-size('xxsmall', ui.q(1.5), 1.5);
|
|
47
|
+
@include ui.define-font-size('xsmall', ui.q(1.75), 1.5);
|
|
48
|
+
@include ui.define-font-size('small', ui.q(2), 1.5);
|
|
49
|
+
@include ui.define-font-size('normal', ui.q(2), 1.5);
|
|
50
|
+
@include ui.define-font-size('medium', ui.q(2.5), 1.2);
|
|
51
|
+
@include ui.define-font-size('large', ui.q(3), 1.2);
|
|
52
|
+
@include ui.define-font-size('xlarge', ui.q(4), 1.2);
|
|
53
|
+
@include ui.define-font-size('xxlarge', ui.q(5), 1.2);
|
|
54
|
+
@include ui.define-font-size('xxxlarge', ui.q(7), 1.2);
|
|
55
|
+
|
|
56
|
+
@include ui.media-min('medium') {
|
|
57
|
+
@include ui.define-font-size('xxxsmall', ui.q(1.5), 1.5);
|
|
58
|
+
@include ui.define-font-size('xxsmall', ui.q(1.5), 1.5);
|
|
59
|
+
@include ui.define-font-size('xsmall', ui.q(1.75), 1.5);
|
|
60
|
+
@include ui.define-font-size('small', ui.q(2), 1.5);
|
|
61
|
+
@include ui.define-font-size('normal', ui.q(2), 1.5);
|
|
62
|
+
@include ui.define-font-size('medium', ui.q(2.5), 1.3);
|
|
63
|
+
@include ui.define-font-size('large', ui.q(3), 1.3);
|
|
64
|
+
@include ui.define-font-size('xlarge', ui.q(4), 1.3);
|
|
65
|
+
@include ui.define-font-size('xxlarge', ui.q(5), 1.3);
|
|
66
|
+
@include ui.define-font-size('xxxlarge', ui.q(7), 1.2);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include ui.media-min('large') {
|
|
70
|
+
@include ui.define-font-size('xxxsmall', ui.q(1.5), 1.5);
|
|
71
|
+
@include ui.define-font-size('xxsmall', ui.q(1.75), 1.5);
|
|
72
|
+
@include ui.define-font-size('xsmall', ui.q(2), 1.5);
|
|
73
|
+
@include ui.define-font-size('small', ui.q(2.25), 1.5);
|
|
74
|
+
@include ui.define-font-size('normal', ui.q(2.25), 1.5);
|
|
75
|
+
@include ui.define-font-size('medium', ui.q(2.5), 1.3);
|
|
76
|
+
@include ui.define-font-size('large', ui.q(3.75), 1.3);
|
|
77
|
+
@include ui.define-font-size('xlarge', ui.q(5), 1.3);
|
|
78
|
+
@include ui.define-font-size('xxlarge', ui.q(6.25), 1.3);
|
|
79
|
+
@include ui.define-font-size('xxxlarge', ui.q(7.5), 1.2);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@include ui.media-min('xlg') {
|
|
83
|
+
@include ui.define-font-size('xxxsmall', ui.q(1.5), 1.5);
|
|
84
|
+
@include ui.define-font-size('xxsmall', ui.q(1.75), 1.5);
|
|
85
|
+
@include ui.define-font-size('xsmall', ui.q(2), 1.5);
|
|
86
|
+
@include ui.define-font-size('small', ui.q(2.25), 1.5);
|
|
87
|
+
@include ui.define-font-size('normal', ui.q(2.25), 1.5);
|
|
88
|
+
@include ui.define-font-size('medium', ui.q(2.5), 1.3);
|
|
89
|
+
@include ui.define-font-size('large', ui.q(3.75), 1.3);
|
|
90
|
+
@include ui.define-font-size('xlarge', ui.q(5), 1.3);
|
|
91
|
+
@include ui.define-font-size('xxlarge', ui.q(6.25), 1.3);
|
|
92
|
+
@include ui.define-font-size('xxxlarge', ui.q(7.5), 1.2);
|
|
93
|
+
}
|
|
94
|
+
|
|
55
95
|
@include ui.def('font-weight-thin', 100);
|
|
56
96
|
@include ui.def('font-weight-small', 300);
|
|
57
97
|
@include ui.def('font-weight-normal', 400);
|
|
@@ -205,6 +245,8 @@
|
|
|
205
245
|
@include ui.define-color-token('button-hover-background', ui.color('primary', $alpha: 0.1));
|
|
206
246
|
@include ui.define-color-token('button-active-border', ui.color('primary', $alpha: 0.15));
|
|
207
247
|
@include ui.define-color-token('button-active-background', transparent);
|
|
248
|
+
|
|
249
|
+
// primary
|
|
208
250
|
@include ui.define-color-token('button-primary-text', ui.color('primary'));
|
|
209
251
|
@include ui.define-color-token('button-primary-border', ui.color('accent'));
|
|
210
252
|
@include ui.define-color-token('button-primary-background', ui.color('accent', $alpha: 0.4));
|
|
@@ -217,6 +259,8 @@
|
|
|
217
259
|
@include ui.define-color-token('button-primary-disabled-text', ui.color('accent', $alpha: 0.4));
|
|
218
260
|
@include ui.define-color-token('button-primary-disabled-border', ui.color('accent', $alpha: 0.4));
|
|
219
261
|
@include ui.define-color-token('button-primary-disabled-background', transparent);
|
|
262
|
+
|
|
263
|
+
// secondary
|
|
220
264
|
@include ui.define-color-token('button-secondary-text', ui.color('primary'));
|
|
221
265
|
@include ui.define-color-token('button-secondary-border', ui.color('primary'));
|
|
222
266
|
@include ui.define-color-token('button-secondary-background', ui.color('primary', 'pure', 0));
|
|
@@ -229,6 +273,8 @@
|
|
|
229
273
|
@include ui.define-color-token('button-secondary-disabled-text', ui.color('primary', $alpha: 0.4));
|
|
230
274
|
@include ui.define-color-token('button-secondary-disabled-border', ui.color('primary', $alpha: 0.4));
|
|
231
275
|
@include ui.define-color-token('button-secondary-disabled-background', transparent);
|
|
276
|
+
|
|
277
|
+
// onlight
|
|
232
278
|
@include ui.define-color-token('button-onlight-text', ui.color('primary'));
|
|
233
279
|
@include ui.define-color-token('button-onlight-border', ui.color('bg-dark'));
|
|
234
280
|
@include ui.define-color-token('button-onlight-background', ui.color('bg-dark'));
|
|
@@ -241,6 +287,8 @@
|
|
|
241
287
|
@include ui.define-color-token('button-onlight-disabled-text', ui.color('bg-dark', $alpha: 0.4));
|
|
242
288
|
@include ui.define-color-token('button-onlight-disabled-border', ui.color('bg-dark', $alpha: 0.4));
|
|
243
289
|
@include ui.define-color-token('button-onlight-disabled-background', transparent);
|
|
290
|
+
|
|
291
|
+
// linked
|
|
244
292
|
@include ui.define-color-token('button-linked-text', ui.color('tertiary'));
|
|
245
293
|
@include ui.define-color-token('button-linked-border', transparent);
|
|
246
294
|
@include ui.define-color-token('button-linked-background', transparent);
|
|
@@ -253,6 +301,8 @@
|
|
|
253
301
|
@include ui.define-color-token('button-linked-disabled-text', ui.color('primary', $alpha: 0.4));
|
|
254
302
|
@include ui.define-color-token('button-linked-disabled-border', transparent);
|
|
255
303
|
@include ui.define-color-token('button-linked-disabled-background', transparent);
|
|
304
|
+
|
|
305
|
+
// quicklink
|
|
256
306
|
@include ui.define-color-token('button-quicklink-text', ui.color('primary'));
|
|
257
307
|
@include ui.define-color-token('button-quicklink-border', transparent);
|
|
258
308
|
@include ui.define-color-token('button-quicklink-background', ui.color('bg-light'));
|
package/dist/utils/ui/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ui } from './ui';
|
|
2
2
|
export { OffsetEnum, MediaQueryEnum, BorderRadiusEnum, ZIndexEnum, ColorEnum, TextSizeEnum, } from './ui.types';
|
|
3
|
-
export type { OffsetType, MediaQueryType, ResponsiveOffsetType, ResponsiveValueType, MPProps, BorderRadiusType, ZIndexType, ColorType, TextSize, } from './ui.types';
|
|
3
|
+
export type { OffsetType, MediaQueryType, ResponsiveOffsetType, ResponsiveValueType, MPProps, BorderRadiusType, ZIndexType, ColorType, TextSize, OpacityRange, } from './ui.types';
|