@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/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { mergeRefs as e } from "./utils/mergeRefs.js";
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 F, 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 G, isExternalUrl as V, linkify as Y, linkifyx as K, matchLinkNodes as X, matchLinks as H } from "./utils/links.js";
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 ro, splitByIndices as eo, unicodeCharAt as to } from "./utils/string.js";
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 Oo } from "./components/ClipboardButton/ClipboardButton.js";
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 Vo } from "./components/Button/LinkButton.js";
31
- import { BurgerMenuButton as Ko } from "./components/BurgerMenu/BurgerMenuButton.js";
32
- import { BurgerMenu as Ho } from "./components/BurgerMenu/BurgerMenu.js";
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 or } from "./components/Avatar/Avatar.js";
36
- import { BACKDROP_OUTLET_ID as er, default as tr } from "./components/BackdropPortal/BackdropPortal.js";
37
- import { Badge as fr } from "./components/Badge/Badge.js";
38
- import { default as pr } from "./components/ControlBox/ControlBox.js";
39
- import { default as nr } from "./components/CountryFlag/CountryFlag.js";
40
- import { default as ur } from "./components/Decorate/Decorate.js";
41
- import { Dot as ir } from "./components/Dot/Dot.js";
42
- import { FLYOUT_OUTLET_ID as cr, Flyout as Tr } from "./components/Flyout/Flyout.js";
43
- import { Logos as Cr } from "./components/Logos/index.js";
44
- import { I as gr } from "./cfxIcons-B9nzO6TW.js";
45
- import { I as Br } from "./cfxIconsBig-BLJjMT-Y.js";
46
- import { Icon as Sr } from "./components/Icon/Icon.js";
47
- import { IconBig as yr } from "./components/IconBig/IconBig.js";
48
- import { Indicator as br } from "./components/Indicator/Indicator.js";
49
- import { default as kr } from "./components/InfoPanel/InfoPanel.js";
50
- import { default as Or } from "./components/Input/Input.js";
51
- import { default as vr } from "./components/Input/RichInput.js";
52
- import { Interactive as Ur } from "./components/Interactive/Interactive.js";
53
- import { Island as wr, IslandCorner as zr } from "./components/Island/Island.js";
54
- import { default as Gr } from "./components/Box/Box.js";
55
- import { stringPropFormater as Yr } from "./components/RSC/Box/Box.js";
56
- import { Center as Xr } from "./components/Layout/Center/Center.js";
57
- import { default as Wr } from "./components/Flex/Flex.js";
58
- import { FlexAlignItemsEnum as Jr, FlexDirectionEnum as Qr, FlexJustifyContentEnum as Zr, FlexWrapEnum as qr } from "./components/RSC/Flex/Flex.types.js";
59
- import { FlexRestricter as oe } from "./components/RSC/Flex/FlexRestricter.js";
60
- import { Pad as ee } from "./components/Layout/Pad/Pad.js";
61
- import { Page as ae } from "./components/Layout/Page/Page.js";
62
- import { R as me } from "./Rail-CHFAf3wJ.js";
63
- import { Scrollable as xe } from "./components/Scrollable/Scrollable.js";
64
- import { VirtualScrollable as le } from "./components/Scrollable/VirtualScrollable.js";
65
- import { Loaf as se } from "./components/Loaf/Loaf.js";
66
- import { Modal as de } from "./components/Modal/Modal.js";
67
- import { NavList as Te } from "./components/NavList/NavList.js";
68
- import { OVERLAY_OUTLET_ID as Ce, Overlay as Ee } from "./components/Overlay/Overlay.js";
69
- import { default as Le } from "./components/Pagination/Pagination.js";
70
- import { Popover as Re } from "./components/Popover/Popover.js";
71
- import { PremiumBadge as De } from "./components/PremiumBadge/PremiumBadge.js";
72
- import { Prose as Pe } from "./components/Prose/Prose.js";
73
- import { Radio as Ae } from "./components/Radio/Radio.js";
74
- import { Select as _e } from "./components/Select/Select.js";
75
- import { DropdownSelect as Fe } from "./components/DropdownSelect/DropdownSelect.js";
76
- import { default as he } from "./components/DropdownMenu/DropdownMenu.js";
77
- import { Separator as Me } from "./components/Separator/Separator.js";
78
- import { Shroud as ze } from "./components/Shroud/Shroud.js";
79
- import { Slider as Ge } from "./components/Slider/Slider.js";
80
- import { Spacer as Ye } from "./components/Spacer/Spacer.js";
81
- import { Style as Xe, useContextualStyle as He } from "./components/Style/Style.js";
82
- import { default as je } from "./components/Switch/Switch.js";
83
- import { ToggleGroup as Qe } from "./components/ToggleGroup/ToggleGroup.js";
84
- import { Tabular as qe } from "./components/Tabular/Tabular.js";
85
- import { DataTable as ot, DataTableHeaderItem as rt, DataTableRow as et } from "./components/DataTable/DataTable.js";
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, textSizeResponsiveValueFormatter as it } from "./components/Text/Text.js";
89
- import { default as ct } from "./components/Label/Label.js";
90
- import { Textarea as It } from "./components/Textarea/Textarea.js";
91
- import { TITLE_OUTLET_ID as Et, Title as gt, titleGetCoords as Lt, titleGetCssStyle as Bt } from "./components/Title/Title.js";
92
- import { default as St } from "./components/InputDropzone/InputDropzone.js";
93
- import { default as yt } from "./components/InputDropzone/ItemPreview.js";
94
- import { default as bt } from "./components/Skeleton/Skeleton.js";
95
- import { OnScreenSensor as kt } from "./components/OnScreenSensor.js";
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 vt } from "./components/Table/TableIconButton.js";
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
- or as Avatar,
105
- er as BACKDROP_OUTLET_ID,
106
- tr as BackdropPortal,
107
- fr as Badge,
104
+ oe as Avatar,
105
+ re as BACKDROP_OUTLET_ID,
106
+ te as BackdropPortal,
107
+ fe as Badge,
108
108
  so as BorderRadiusEnum,
109
- Gr as Box,
110
- Ho as BurgerMenu,
111
- Ko as BurgerMenuButton,
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
- Xr as Center,
118
+ Ke as Center,
119
119
  vo as Checkbox,
120
- Oo as ClipboardButton,
120
+ Fo as ClipboardButton,
121
121
  io as ColorEnum,
122
- pr as ControlBox,
123
- nr as CountryFlag,
122
+ pe as ControlBox,
123
+ ne as CountryFlag,
124
124
  xt as DEFAULT_TEXT_COLOR,
125
125
  ot as DataTable,
126
- rt as DataTableHeaderItem,
127
- et as DataTableRow,
128
- ur as Decorate,
129
- ir as Dot,
130
- he as DropdownMenu,
131
- Fe as DropdownSelect,
132
- yt as DropzoneItemPreview,
133
- cr as FLYOUT_OUTLET_ID,
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
- Wr as Flex,
136
- Jr as FlexAlignItemsEnum,
137
- Qr as FlexDirectionEnum,
138
- Zr as FlexJustifyContentEnum,
139
- oe as FlexRestricter,
140
- qr as FlexWrapEnum,
141
- Tr as Flyout,
142
- Sr as Icon,
143
- yr as IconBig,
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
- gr as Icons,
146
- Br as IconsBig,
147
- br as Indicator,
148
- kr as InfoPanel,
149
- Or as Input,
150
- St as InputDropzone,
151
- Ur as Interactive,
152
- wr as Island,
153
- zr as IslandCorner,
154
- ct as Label,
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
- Vo as LinkButton,
156
+ Go as LinkButton,
157
157
  z as Linkify,
158
- se as Loaf,
159
- Cr as Logos,
158
+ sr as Loaf,
159
+ Ce as Logos,
160
160
  co as MediaQueryEnum,
161
- de as Modal,
162
- Te as NavList,
163
- Ce as OVERLAY_OUTLET_ID,
161
+ dr as Modal,
162
+ Tr as NavList,
163
+ Cr as OVERLAY_OUTLET_ID,
164
164
  To as OffsetEnum,
165
- kt as OnScreenSensor,
166
- Ee as Overlay,
167
- ee as Pad,
168
- ae as Page,
169
- Le as Pagination,
170
- Re as Popover,
171
- De as PremiumBadge,
172
- Pe as Prose,
173
- Ae as Radio,
174
- me as Rail,
175
- vr as RichInput,
176
- xe as Scrollable,
177
- _e as Select,
178
- Me as Separator,
179
- ze as Shroud,
180
- bt as Skeleton,
181
- Ge as Slider,
182
- Ye as Spacer,
183
- Xe as Style,
184
- je as Switch,
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
- Et as TITLE_OUTLET_ID,
187
+ gt as TITLE_OUTLET_ID,
188
188
  at as Table,
189
- vt as TableIconButton,
189
+ ht as TableIconButton,
190
190
  mt as TableResponsiveText,
191
- qe as Tabular,
191
+ qr as Tabular,
192
192
  lt as Text,
193
193
  ut as TextBlock,
194
194
  Io as TextSizeEnum,
195
- It as Textarea,
196
- gt as Title,
197
- Qe as ToggleGroup,
198
- le as VirtualScrollable,
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
- G as defaultLinkReplacerx,
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
- F as identity,
216
+ O as identity,
217
217
  v as invoke,
218
- V as isExternalUrl,
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
- K as linkifyx,
225
- X as matchLinkNodes,
226
- H as matchLinks,
227
- e as mergeRefs,
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
- ro as replaceRange,
232
+ eo as replaceRange,
232
233
  U as returnFalse,
233
234
  M as returnTrue,
234
- eo as splitByIndices,
235
- Yr as stringPropFormater,
236
- it as textSizeResponsiveValueFormatter,
235
+ ro as splitByIndices,
236
+ Ye as stringPropFormater,
237
+ dt as textSizeResponsiveValueFormatter,
237
238
  mo as throttle,
238
- Lt as titleGetCoords,
239
- Bt as titleGetCssStyle,
239
+ Bt as titleGetCoords,
240
+ Rt as titleGetCssStyle,
240
241
  lo as ui,
241
242
  to as unicodeCharAt,
242
243
  R as useClipboardComponent,
243
- He as useContextualStyle,
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
- @function negative($cssValue) {
49
- @return calc(-1 * #{$cssValue});
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
- @media (width >= calc(map.get($mediaMap, $size) - 1px)) {
369
+ $mediaSize: map.get($mediaMap, $size);
370
+
371
+ @media (width < $mediaSize) {
370
372
  @content;
371
373
  }
372
374
  }
373
375
  } @else {
374
- @media (min-width: $fix) {
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('xxsmall', ui.q(1.875), 1.5);
45
- @include ui.define-font-size('xsmall', ui.q(2.25), 1.5);
46
- @include ui.define-font-size('small', ui.q(2.5), 1.5);
47
-
48
- // normal is mirroring small, becouse it's the default size
49
- @include ui.define-font-size('normal', ui.q(2.5), 1.5);
50
- @include ui.define-font-size('medium', ui.q(3.125), 1.3);
51
- @include ui.define-font-size('large', ui.q(3.75), 1.3);
52
- @include ui.define-font-size('xlarge', ui.q(5), 1.3);
53
- @include ui.define-font-size('xxlarge', ui.q(6.25), 1.3);
54
- @include ui.define-font-size('xxxlarge', ui.q(8.75), 1.15);
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'));
@@ -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';
@@ -88,3 +88,4 @@ export interface MPProps {
88
88
  py?: ResponsiveOffsetType;
89
89
  px?: ResponsiveOffsetType;
90
90
  }
91
+ export type OpacityRange = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "4.4.0",
4
+ "version": "4.5.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",