@cfx-dev/ui-components 4.3.3 → 4.3.5

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.
@@ -36,6 +36,7 @@
36
36
  @import "./css/Overlay.css";
37
37
  @import "./css/Pad.css";
38
38
  @import "./css/Page.css";
39
+ @import "./css/Pagination.css";
39
40
  @import "./css/Popover.css";
40
41
  @import "./css/PopoverShowcase.css";
41
42
  @import "./css/PremiumBadge.css";
@@ -52,6 +53,7 @@
52
53
  @import "./css/Spacer.css";
53
54
  @import "./css/Switch.css";
54
55
  @import "./css/Table.css";
56
+ @import "./css/TableResponsiveText.css";
55
57
  @import "./css/Tabular.css";
56
58
  @import "./css/Text.css";
57
59
  @import "./css/Textarea.css";
@@ -0,0 +1 @@
1
+ .cfxui__Pagination__root__c5025{list-style-type:none;display:flex;justify-content:flex-end;align-items:center;gap:var(--offset-small)}.cfxui__Pagination__button__87663{padding:0;min-width:calc(var(--quant) * 9.25);--color-button-secondary-text: rgba(var(--color-primary), .4);--color-button-secondary-border: rgba(var(--color-primary), .4)}.cfxui__Pagination__button__87663.cfxui__Pagination__current__2cd39{cursor:default;color:rgba(var(--color-bg),1);background-color:rgba(var(--color-primary),1)}.cfxui__Pagination__button__87663.cfxui__Pagination__buttonBack__cb0e5{margin-right:var(--offset-small)}.cfxui__Pagination__button__87663.cfxui__Pagination__buttonForward__4a51e{margin-left:var(--offset-small)}.cfxui__Pagination__ellipsis__9f336{display:flex;align-items:center;justify-content:center;gap:var(--offset-small);padding:0 var(--offset-small)}.cfxui__Pagination__ellipsis__9f336 .cfxui__Pagination__dot__70f66{width:calc(var(--quant) * .5);height:calc(var(--quant) * .5);border-radius:var(--border-radius-pill);background-color:rgba(var(--color-primary),.4)}
@@ -0,0 +1 @@
1
+ .cfxui__TableResponsiveText__root__0e257{position:relative;min-width:calc(var(--quant) * 15);z-index:-1}.cfxui__TableResponsiveText__root__0e257 .cfxui__TableResponsiveText__text__78e87{position:absolute;left:0;right:0;overflow:hidden}
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface PaginationProps {
4
+ currentPage: number;
5
+ totalPages: number;
6
+ onPageChange: (page: number) => void;
7
+ disabled?: boolean;
8
+ }
9
+ export interface PaginationItemProps {
10
+ page: number;
11
+ isCurrent: boolean;
12
+ disabled?: boolean;
13
+ onPageChange: (page: number) => void;
14
+ }
15
+ declare function Pagination(props: PaginationProps): import("react/jsx-runtime").JSX.Element;
16
+ declare const _default: React.MemoExoticComponent<typeof Pagination>;
17
+ export default _default;
@@ -0,0 +1,117 @@
1
+ import { jsxs as l, jsx as n, Fragment as g } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import d from "../Button/Button.js";
4
+ import { clsx as m } from "../../utils/clsx.js";
5
+ import "../../utils/links.js";
6
+ const p = "cfxui__Pagination__root__c5025", x = "cfxui__Pagination__button__87663", N = "cfxui__Pagination__current__2cd39", w = "cfxui__Pagination__buttonBack__cb0e5", B = "cfxui__Pagination__buttonForward__4a51e", F = "cfxui__Pagination__ellipsis__9f336", y = "cfxui__Pagination__dot__70f66", a = {
7
+ root: p,
8
+ button: x,
9
+ current: N,
10
+ buttonBack: w,
11
+ buttonForward: B,
12
+ ellipsis: F,
13
+ dot: y
14
+ };
15
+ function h() {
16
+ return /* @__PURE__ */ l("span", { className: a.ellipsis, children: [
17
+ /* @__PURE__ */ n("div", { className: a.dot }),
18
+ /* @__PURE__ */ n("div", { className: a.dot }),
19
+ /* @__PURE__ */ n("div", { className: a.dot })
20
+ ] });
21
+ }
22
+ function _(u) {
23
+ const {
24
+ page: t,
25
+ isCurrent: o,
26
+ disabled: e = !1,
27
+ onPageChange: i
28
+ } = u, r = c.useCallback(() => {
29
+ o || i(t);
30
+ }, [t, o, i]);
31
+ return /* @__PURE__ */ n(
32
+ d,
33
+ {
34
+ theme: o ? "default" : "secondary",
35
+ text: t.toString(),
36
+ disabled: e,
37
+ onClick: r,
38
+ className: m(a.button, {
39
+ [a.current]: o
40
+ })
41
+ }
42
+ );
43
+ }
44
+ function v(u) {
45
+ const {
46
+ currentPage: t,
47
+ totalPages: o,
48
+ onPageChange: e,
49
+ disabled: i = !1
50
+ } = u, r = Math.max(1, t - 2), f = Math.min(o, t + 2), b = c.useMemo(
51
+ () => Array.from({ length: f + 1 - r }, (s, k) => r + k),
52
+ [f, r]
53
+ ), P = c.useCallback(() => {
54
+ t !== 1 && e(t - 1);
55
+ }, [t, e]), C = c.useCallback(() => {
56
+ t !== o && e(t + 1);
57
+ }, [t, e, o]);
58
+ return /* @__PURE__ */ l("ul", { className: a.root, children: [
59
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
60
+ d,
61
+ {
62
+ theme: "secondary",
63
+ icon: "RightArrow",
64
+ disabled: i,
65
+ onClick: P,
66
+ className: m(a.button, a.buttonBack)
67
+ }
68
+ ) }),
69
+ t > 3 && /* @__PURE__ */ l(g, { children: [
70
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
71
+ _,
72
+ {
73
+ page: 1,
74
+ isCurrent: !1,
75
+ disabled: i,
76
+ onPageChange: e
77
+ }
78
+ ) }),
79
+ t > 4 && /* @__PURE__ */ n(h, {})
80
+ ] }),
81
+ b.map((s) => /* @__PURE__ */ n("li", { className: a.listItem, children: /* @__PURE__ */ n(
82
+ _,
83
+ {
84
+ page: s,
85
+ isCurrent: s === t,
86
+ disabled: i,
87
+ onPageChange: e
88
+ }
89
+ ) }, s)),
90
+ o - t > 2 && /* @__PURE__ */ l(g, { children: [
91
+ o - t > 3 && /* @__PURE__ */ n(h, {}),
92
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
93
+ _,
94
+ {
95
+ page: o,
96
+ isCurrent: !1,
97
+ disabled: i,
98
+ onPageChange: e
99
+ }
100
+ ) })
101
+ ] }),
102
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
103
+ d,
104
+ {
105
+ theme: "secondary",
106
+ icon: "LeftArrow",
107
+ disabled: i,
108
+ onClick: C,
109
+ className: m(a.button, a.buttonForward)
110
+ }
111
+ ) })
112
+ ] });
113
+ }
114
+ const D = c.memo(v);
115
+ export {
116
+ D as default
117
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Pagination } from './Pagination';
2
+ export type { PaginationProps, PaginationItemProps } from './Pagination';
@@ -0,0 +1,4 @@
1
+ import { default as t } from "./Pagination.js";
2
+ export {
3
+ t as Pagination
4
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { TextProps } from '../Text';
3
+
4
+ export interface TableResponsiveTextProps extends TextProps {
5
+ title?: string;
6
+ rootClassName?: string;
7
+ }
8
+ declare function TableResponsiveText(props: TableResponsiveTextProps): import("react/jsx-runtime").JSX.Element;
9
+ declare const _default: React.MemoExoticComponent<typeof TableResponsiveText>;
10
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import l from "../Flex/Flex.js";
4
+ import { clsx as m } from "../../utils/clsx.js";
5
+ import { Text as c } from "../Text/Text.js";
6
+ import "../../utils/ui/ui.js";
7
+ import { Title as a } from "../Title/Title.js";
8
+ const x = "cfxui__TableResponsiveText__root__0e257", _ = "cfxui__TableResponsiveText__text__78e87", o = {
9
+ root: x,
10
+ text: _
11
+ };
12
+ function f(e) {
13
+ const {
14
+ title: r,
15
+ children: s,
16
+ rootClassName: n
17
+ } = e;
18
+ return /* @__PURE__ */ t(a, { title: r ?? s, children: /* @__PURE__ */ t(l, { gap: "normal", centered: !0, className: m(o.root, n), children: /* @__PURE__ */ t(c, { truncated: !0, ...e, className: o.text }) }) });
19
+ }
20
+ const C = i.memo(f);
21
+ export {
22
+ C as default
23
+ };
@@ -0,0 +1,2 @@
1
+ export { default as TableResponsiveText } from './TableResponsiveText';
2
+ export type { TableResponsiveTextProps } from './TableResponsiveText';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./TableResponsiveText.js";
2
+ export {
3
+ o as TableResponsiveText
4
+ };
package/dist/main.d.ts CHANGED
@@ -4,6 +4,8 @@ export { getValue } from './utils/getValue';
4
4
  export type { ValueOrGetter } from './utils/getValue';
5
5
  export { useInstance, useDynamicRef, useGlobalKeyboardEvent, useKeyboardClose, useWindowResize, useOutlet, usePopoverController, useClipboardComponent, CLIPBOARD_TITLE_APPEARANCE, } from './utils/hooks';
6
6
  export type { OutletPosition, UseClipboardProps, } from './utils/hooks';
7
+ export { formatDate } from './utils/formatDate';
8
+ export { formatCurrency, FREE_PRICE_TEXT, CURRENCY_MAP, } from './utils/formatCurrency';
7
9
  export { noop, returnTrue, returnFalse, identity, invoke, } from './utils/functional';
8
10
  export { isExternalUrl, matchLinks, matchLinkNodes, defaultLinkReplacerx, defaultLinkReplacer, linkifyx, linkify, Linkify, } from './utils/links';
9
11
  export type { ILinkSubstitute, ILinkMatch, LinkifyProps, } from './utils/links';
@@ -84,6 +86,8 @@ export { NavList } from './components/NavList';
84
86
  export type { NavListProps, NavListItem } from './components/NavList';
85
87
  export { Overlay, OVERLAY_OUTLET_ID } from './components/Overlay';
86
88
  export type { OverlayProps, OverlayBackdropProps, OverlayContentProps, } from './components/Overlay';
89
+ export { Pagination } from './components/Pagination';
90
+ export type { PaginationProps, PaginationItemProps, } from './components/Pagination';
87
91
  export { Popover } from './components/Popover';
88
92
  export type { PopoverProps, PopoverPosition } from './components/Popover';
89
93
  export { PremiumBadge } from './components/PremiumBadge';
@@ -116,6 +120,8 @@ export { DataTable, DataTableHeaderItem, DataTableRow, } from './components/Data
116
120
  export type { DataTableHeaderType, DataTableProps, DataTableRowType, DataTableContainerType, DataTableHeaderItemProps, DataTableRowProps, } from './components/DataTable';
117
121
  export { Table, TableIconButton, } from './components/Table';
118
122
  export type { TableRootProps, TableBodyProps, TableHeaderProps, TableCellProps, TableRowProps, } from './components/Table';
123
+ export { TableResponsiveText } from './components/TableResponsiveText';
124
+ export type { TableResponsiveTextProps } from './components/TableResponsiveText';
119
125
  export { TextSizeEnum, Text, TextBlock, getTextOpacity, DEFAULT_TEXT_COLOR, TEXT_OPACITY_MAP, textSizeResponsiveValueFormatter, } from './components/Text';
120
126
  export type { TextSize, TextWeight, TextOpacity, TextAs, TextLetterSpacing, TextProps, TextColorProps, TextFamaly, } from './components/Text';
121
127
  export { Textarea } from './components/Textarea';
package/dist/main.js CHANGED
@@ -7,227 +7,237 @@ import { useDynamicRef as s } from "./utils/hooks/useDynamicRef.js";
7
7
  import { useGlobalKeyboardEvent as d } from "./utils/hooks/useGlobalKeyboardEvent.js";
8
8
  import { useKeyboardClose as T } from "./utils/hooks/useKeyboardClose.js";
9
9
  import { useWindowResize as C } from "./utils/hooks/useWindowResize.js";
10
- import { useOutlet as B } from "./utils/hooks/useOutlet.js";
11
- import { CLIPBOARD_TITLE_APPEARANCE as L, useClipboardComponent as S } from "./utils/hooks/useClipboardComponent.js";
12
- import { identity as R, invoke as k, noop as A, returnFalse as D, returnTrue as b } from "./utils/functional.js";
13
- import { Linkify as P, defaultLinkReplacer as F, defaultLinkReplacerx as _, isExternalUrl as v, linkify as h, linkifyx as U, matchLinkNodes as z, matchLinks as w } from "./utils/links.js";
14
- import { clamp as N, clamp01 as G, minmax as V } from "./utils/math.js";
15
- import { isFalseString as Y, isTrueString as H, normalizeSlashes as W, replaceRange as X, splitByIndices as J, unicodeCharAt as Q } from "./utils/string.js";
16
- import { debounce as j, throttle as q } from "./utils/execution.js";
17
- import { getColor as oo } from "./utils/color.js";
18
- import { ui as eo } from "./utils/ui/ui.js";
19
- import { BorderRadiusEnum as ao, ColorEnum as fo, MediaQueryEnum as mo, OffsetEnum as po, TextSizeEnum as xo, ZIndexEnum as no } from "./utils/ui/ui.types.js";
20
- import { isInEnum as uo } from "./utils/enum.js";
21
- import { default as io } from "./components/IconButton/IconButton.js";
22
- import { Accordion as To, AccordionContent as Io, AccordionHeader as Co, AccordionItem as go, AccordionTrigger as Bo } from "./components/Accordion/Accordion.js";
23
- import { default as Lo } from "./components/ClipboardButton/ClipboardButton.js";
24
- import { default as yo } from "./components/Checkbox/Checkbox.js";
25
- import { default as ko, ButtonContent as Ao, getButtonClassName as Do } from "./components/Button/Button.js";
26
- import { ButtonBar as Oo } from "./components/Button/ButtonBar.js";
27
- import { LinkButton as Fo } from "./components/Button/LinkButton.js";
28
- import { BurgerMenuButton as vo } from "./components/BurgerMenu/BurgerMenuButton.js";
29
- import { BurgerMenu as Uo } from "./components/BurgerMenu/BurgerMenu.js";
30
- import { default as wo, getLinkClassName as Mo, getLinkStyles as No } from "./components/Link/Link.js";
31
- import { default as Vo } from "./components/Link/ButtonLink.js";
32
- import { Avatar as Yo } from "./components/Avatar/Avatar.js";
33
- import { BACKDROP_OUTLET_ID as Wo, default as Xo } from "./components/BackdropPortal/BackdropPortal.js";
34
- import { Badge as Qo } from "./components/Badge/Badge.js";
35
- import { default as jo } from "./components/ControlBox/ControlBox.js";
36
- import { default as $o } from "./components/CountryFlag/CountryFlag.js";
37
- import { default as rr } from "./components/Decorate/Decorate.js";
38
- import { Dot as tr } from "./components/Dot/Dot.js";
39
- import { FLYOUT_OUTLET_ID as fr, Flyout as mr } from "./components/Flyout/Flyout.js";
40
- import { Logos as xr } from "./components/Logos/index.js";
41
- import { I as lr } from "./cfxIcons-B9nzO6TW.js";
42
- import { I as sr } from "./cfxIconsBig-BLJjMT-Y.js";
43
- import { Icon as dr } from "./components/Icon/Icon.js";
44
- import { IconBig as Tr } from "./components/IconBig/IconBig.js";
45
- import { Indicator as Cr } from "./components/Indicator/Indicator.js";
46
- import { default as Br } from "./components/InfoPanel/InfoPanel.js";
47
- import { default as Lr } from "./components/Input/Input.js";
48
- import { default as yr } from "./components/Input/RichInput.js";
49
- import { Interactive as kr } from "./components/Interactive/Interactive.js";
50
- import { Island as Dr, IslandCorner as br } from "./components/Island/Island.js";
51
- import { default as Pr } from "./components/Box/Box.js";
52
- import { stringPropFormater as _r } from "./components/RSC/Box/Box.js";
53
- import { Center as hr } from "./components/Layout/Center/Center.js";
54
- import { default as zr } from "./components/Flex/Flex.js";
55
- import { FlexAlignItemsEnum as Mr, FlexDirectionEnum as Nr, FlexJustifyContentEnum as Gr, FlexWrapEnum as Vr } from "./components/RSC/Flex/Flex.types.js";
56
- import { FlexRestricter as Yr } from "./components/RSC/Flex/FlexRestricter.js";
57
- import { Pad as Wr } from "./components/Layout/Pad/Pad.js";
58
- import { Page as Jr } from "./components/Layout/Page/Page.js";
59
- import { R as Zr } from "./Rail-CHFAf3wJ.js";
60
- import { Scrollable as qr } from "./components/Scrollable/Scrollable.js";
61
- import { VirtualScrollable as oe } from "./components/Scrollable/VirtualScrollable.js";
62
- import { Loaf as ee } from "./components/Loaf/Loaf.js";
63
- import { Modal as ae } from "./components/Modal/Modal.js";
64
- import { NavList as me } from "./components/NavList/NavList.js";
65
- import { OVERLAY_OUTLET_ID as xe, Overlay as ne } from "./components/Overlay/Overlay.js";
66
- import { Popover as ue } from "./components/Popover/Popover.js";
67
- import { PremiumBadge as ie } from "./components/PremiumBadge/PremiumBadge.js";
68
- import { Prose as ce } from "./components/Prose/Prose.js";
69
- import { Radio as Ie } from "./components/Radio/Radio.js";
70
- import { Select as ge } from "./components/Select/Select.js";
71
- import { DropdownSelect as Ee } from "./components/DropdownSelect/DropdownSelect.js";
72
- import { Separator as Se } from "./components/Separator/Separator.js";
73
- import { Shroud as Re } from "./components/Shroud/Shroud.js";
74
- import { Slider as Ae } from "./components/Slider/Slider.js";
75
- import { Spacer as be } from "./components/Spacer/Spacer.js";
76
- import { Style as Pe, useContextualStyle as Fe } from "./components/Style/Style.js";
77
- import { default as ve } from "./components/Switch/Switch.js";
78
- import { ToggleGroup as Ue } from "./components/ToggleGroup/ToggleGroup.js";
79
- import { Tabular as we } from "./components/Tabular/Tabular.js";
80
- import { DataTable as Ne, DataTableHeaderItem as Ge, DataTableRow as Ve } from "./components/DataTable/DataTable.js";
81
- import { Table as Ye } from "./components/Table/index.js";
82
- import { DEFAULT_TEXT_COLOR as We, TEXT_OPACITY_MAP as Xe, Text as Je, TextBlock as Qe, getTextOpacity as Ze, textSizeResponsiveValueFormatter as je } from "./components/Text/Text.js";
83
- import { Textarea as $e } from "./components/Textarea/Textarea.js";
84
- import { TITLE_OUTLET_ID as rt, Title as et, titleGetCoords as tt, titleGetCssStyle as at } from "./components/Title/Title.js";
85
- import { default as mt } from "./components/InputDropzone/InputDropzone.js";
86
- import { default as xt } from "./components/InputDropzone/ItemPreview.js";
87
- import { default as lt } from "./components/Skeleton/Skeleton.js";
88
- import { OnScreenSensor as st } from "./components/OnScreenSensor.js";
89
- import { Symbols as dt } from "./components/Symbols.js";
90
- import { default as Tt } from "./components/Table/TableIconButton.js";
10
+ import { useOutlet as g } from "./utils/hooks/useOutlet.js";
11
+ import { CLIPBOARD_TITLE_APPEARANCE as L, useClipboardComponent as R } from "./utils/hooks/useClipboardComponent.js";
12
+ import { formatDate as y } from "./utils/formatDate.js";
13
+ import { CURRENCY_MAP as A, FREE_PRICE_TEXT as D, formatCurrency as b } from "./utils/formatCurrency.js";
14
+ import { identity as _, invoke as O, noop as F, returnFalse as v, returnTrue as h } from "./utils/functional.js";
15
+ import { Linkify as z, defaultLinkReplacer as M, defaultLinkReplacerx as N, isExternalUrl as w, linkify as G, linkifyx as V, matchLinkNodes as Y, matchLinks as K } from "./utils/links.js";
16
+ import { clamp as H, clamp01 as W, minmax as J } from "./utils/math.js";
17
+ import { isFalseString as Z, isTrueString as j, normalizeSlashes as q, replaceRange as $, splitByIndices as oo, unicodeCharAt as ro } from "./utils/string.js";
18
+ import { debounce as to, throttle as ao } from "./utils/execution.js";
19
+ import { getColor as mo } from "./utils/color.js";
20
+ import { ui as xo } from "./utils/ui/ui.js";
21
+ import { BorderRadiusEnum as lo, ColorEnum as uo, MediaQueryEnum as so, OffsetEnum as io, TextSizeEnum as co, ZIndexEnum as To } from "./utils/ui/ui.types.js";
22
+ import { isInEnum as Co } from "./utils/enum.js";
23
+ import { default as go } from "./components/IconButton/IconButton.js";
24
+ import { Accordion as Lo, AccordionContent as Ro, AccordionHeader as So, AccordionItem as yo, AccordionTrigger as Po } from "./components/Accordion/Accordion.js";
25
+ import { default as Do } from "./components/ClipboardButton/ClipboardButton.js";
26
+ import { default as ko } from "./components/Checkbox/Checkbox.js";
27
+ import { default as Oo, ButtonContent as Fo, getButtonClassName as vo } from "./components/Button/Button.js";
28
+ import { ButtonBar as Uo } from "./components/Button/ButtonBar.js";
29
+ import { LinkButton as Mo } from "./components/Button/LinkButton.js";
30
+ import { BurgerMenuButton as wo } from "./components/BurgerMenu/BurgerMenuButton.js";
31
+ import { BurgerMenu as Vo } from "./components/BurgerMenu/BurgerMenu.js";
32
+ import { default as Ko, getLinkClassName as Xo, getLinkStyles as Ho } from "./components/Link/Link.js";
33
+ import { default as Jo } from "./components/Link/ButtonLink.js";
34
+ import { Avatar as Zo } from "./components/Avatar/Avatar.js";
35
+ import { BACKDROP_OUTLET_ID as qo, default as $o } from "./components/BackdropPortal/BackdropPortal.js";
36
+ import { Badge as rr } from "./components/Badge/Badge.js";
37
+ import { default as tr } from "./components/ControlBox/ControlBox.js";
38
+ import { default as fr } from "./components/CountryFlag/CountryFlag.js";
39
+ import { default as pr } from "./components/Decorate/Decorate.js";
40
+ import { Dot as nr } from "./components/Dot/Dot.js";
41
+ import { FLYOUT_OUTLET_ID as ur, Flyout as sr } from "./components/Flyout/Flyout.js";
42
+ import { Logos as dr } from "./components/Logos/index.js";
43
+ import { I as Tr } from "./cfxIcons-B9nzO6TW.js";
44
+ import { I as Cr } from "./cfxIconsBig-BLJjMT-Y.js";
45
+ import { Icon as gr } from "./components/Icon/Icon.js";
46
+ import { IconBig as Lr } from "./components/IconBig/IconBig.js";
47
+ import { Indicator as Sr } from "./components/Indicator/Indicator.js";
48
+ import { default as Pr } from "./components/InfoPanel/InfoPanel.js";
49
+ import { default as Dr } from "./components/Input/Input.js";
50
+ import { default as kr } from "./components/Input/RichInput.js";
51
+ import { Interactive as Or } from "./components/Interactive/Interactive.js";
52
+ import { Island as vr, IslandCorner as hr } from "./components/Island/Island.js";
53
+ import { default as zr } from "./components/Box/Box.js";
54
+ import { stringPropFormater as Nr } from "./components/RSC/Box/Box.js";
55
+ import { Center as Gr } from "./components/Layout/Center/Center.js";
56
+ import { default as Yr } from "./components/Flex/Flex.js";
57
+ import { FlexAlignItemsEnum as Xr, FlexDirectionEnum as Hr, FlexJustifyContentEnum as Wr, FlexWrapEnum as Jr } from "./components/RSC/Flex/Flex.types.js";
58
+ import { FlexRestricter as Zr } from "./components/RSC/Flex/FlexRestricter.js";
59
+ import { Pad as qr } from "./components/Layout/Pad/Pad.js";
60
+ import { Page as oe } from "./components/Layout/Page/Page.js";
61
+ import { R as ee } from "./Rail-CHFAf3wJ.js";
62
+ import { Scrollable as ae } from "./components/Scrollable/Scrollable.js";
63
+ import { VirtualScrollable as me } from "./components/Scrollable/VirtualScrollable.js";
64
+ import { Loaf as xe } from "./components/Loaf/Loaf.js";
65
+ import { Modal as le } from "./components/Modal/Modal.js";
66
+ import { NavList as se } from "./components/NavList/NavList.js";
67
+ import { OVERLAY_OUTLET_ID as de, Overlay as ce } from "./components/Overlay/Overlay.js";
68
+ import { default as Ie } from "./components/Pagination/Pagination.js";
69
+ import { Popover as Ee } from "./components/Popover/Popover.js";
70
+ import { PremiumBadge as Be } from "./components/PremiumBadge/PremiumBadge.js";
71
+ import { Prose as Re } from "./components/Prose/Prose.js";
72
+ import { Radio as ye } from "./components/Radio/Radio.js";
73
+ import { Select as Ae } from "./components/Select/Select.js";
74
+ import { DropdownSelect as be } from "./components/DropdownSelect/DropdownSelect.js";
75
+ import { Separator as _e } from "./components/Separator/Separator.js";
76
+ import { Shroud as Fe } from "./components/Shroud/Shroud.js";
77
+ import { Slider as he } from "./components/Slider/Slider.js";
78
+ import { Spacer as ze } from "./components/Spacer/Spacer.js";
79
+ import { Style as Ne, useContextualStyle as we } from "./components/Style/Style.js";
80
+ import { default as Ve } from "./components/Switch/Switch.js";
81
+ import { ToggleGroup as Ke } from "./components/ToggleGroup/ToggleGroup.js";
82
+ import { Tabular as He } from "./components/Tabular/Tabular.js";
83
+ import { DataTable as Je, DataTableHeaderItem as Qe, DataTableRow as Ze } from "./components/DataTable/DataTable.js";
84
+ import { Table as qe } from "./components/Table/index.js";
85
+ import { default as ot } from "./components/TableResponsiveText/TableResponsiveText.js";
86
+ import { DEFAULT_TEXT_COLOR as et, TEXT_OPACITY_MAP as tt, Text as at, TextBlock as ft, getTextOpacity as mt, textSizeResponsiveValueFormatter as pt } from "./components/Text/Text.js";
87
+ import { Textarea as nt } from "./components/Textarea/Textarea.js";
88
+ import { TITLE_OUTLET_ID as ut, Title as st, titleGetCoords as it, titleGetCssStyle as dt } from "./components/Title/Title.js";
89
+ import { default as Tt } from "./components/InputDropzone/InputDropzone.js";
90
+ import { default as Ct } from "./components/InputDropzone/ItemPreview.js";
91
+ import { default as gt } from "./components/Skeleton/Skeleton.js";
92
+ import { OnScreenSensor as Lt } from "./components/OnScreenSensor.js";
93
+ import { Symbols as St } from "./components/Symbols.js";
94
+ import { default as Pt } from "./components/Table/TableIconButton.js";
91
95
  export {
92
- To as Accordion,
93
- Io as AccordionContent,
94
- Co as AccordionHeader,
95
- go as AccordionItem,
96
- Bo as AccordionTrigger,
97
- Yo as Avatar,
98
- Wo as BACKDROP_OUTLET_ID,
99
- Xo as BackdropPortal,
100
- Qo as Badge,
101
- ao as BorderRadiusEnum,
102
- Pr as Box,
103
- Uo as BurgerMenu,
104
- vo as BurgerMenuButton,
105
- ko as Button,
106
- Oo as ButtonBar,
107
- Ao as ButtonContent,
108
- Vo as ButtonLink,
96
+ Lo as Accordion,
97
+ Ro as AccordionContent,
98
+ So as AccordionHeader,
99
+ yo as AccordionItem,
100
+ Po as AccordionTrigger,
101
+ Zo as Avatar,
102
+ qo as BACKDROP_OUTLET_ID,
103
+ $o as BackdropPortal,
104
+ rr as Badge,
105
+ lo as BorderRadiusEnum,
106
+ zr as Box,
107
+ Vo as BurgerMenu,
108
+ wo as BurgerMenuButton,
109
+ Oo as Button,
110
+ Uo as ButtonBar,
111
+ Fo as ButtonContent,
112
+ Jo as ButtonLink,
109
113
  L as CLIPBOARD_TITLE_APPEARANCE,
110
- hr as Center,
111
- yo as Checkbox,
112
- Lo as ClipboardButton,
113
- fo as ColorEnum,
114
- jo as ControlBox,
115
- $o as CountryFlag,
116
- We as DEFAULT_TEXT_COLOR,
117
- Ne as DataTable,
118
- Ge as DataTableHeaderItem,
119
- Ve as DataTableRow,
120
- rr as Decorate,
121
- tr as Dot,
122
- Ee as DropdownSelect,
123
- xt as DropzoneItemPreview,
124
- fr as FLYOUT_OUTLET_ID,
125
- zr as Flex,
126
- Mr as FlexAlignItemsEnum,
127
- Nr as FlexDirectionEnum,
128
- Gr as FlexJustifyContentEnum,
129
- Yr as FlexRestricter,
130
- Vr as FlexWrapEnum,
131
- mr as Flyout,
132
- dr as Icon,
133
- Tr as IconBig,
134
- io as IconButton,
135
- lr as Icons,
136
- sr as IconsBig,
137
- Cr as Indicator,
138
- Br as InfoPanel,
139
- Lr as Input,
140
- mt as InputDropzone,
141
- kr as Interactive,
142
- Dr as Island,
143
- br as IslandCorner,
144
- wo as Link,
145
- Fo as LinkButton,
146
- P as Linkify,
147
- ee as Loaf,
148
- xr as Logos,
149
- mo as MediaQueryEnum,
150
- ae as Modal,
151
- me as NavList,
152
- xe as OVERLAY_OUTLET_ID,
153
- po as OffsetEnum,
154
- st as OnScreenSensor,
155
- ne as Overlay,
156
- Wr as Pad,
157
- Jr as Page,
158
- ue as Popover,
159
- ie as PremiumBadge,
160
- ce as Prose,
161
- Ie as Radio,
162
- Zr as Rail,
163
- yr as RichInput,
164
- qr as Scrollable,
165
- ge as Select,
166
- Se as Separator,
167
- Re as Shroud,
168
- lt as Skeleton,
169
- Ae as Slider,
170
- be as Spacer,
171
- Pe as Style,
172
- ve as Switch,
173
- dt as Symbols,
174
- Xe as TEXT_OPACITY_MAP,
175
- rt as TITLE_OUTLET_ID,
176
- Ye as Table,
177
- Tt as TableIconButton,
178
- we as Tabular,
179
- Je as Text,
180
- Qe as TextBlock,
181
- xo as TextSizeEnum,
182
- $e as Textarea,
183
- et as Title,
184
- Ue as ToggleGroup,
185
- oe as VirtualScrollable,
186
- no as ZIndexEnum,
187
- N as clamp,
188
- G as clamp01,
114
+ A as CURRENCY_MAP,
115
+ Gr as Center,
116
+ ko as Checkbox,
117
+ Do as ClipboardButton,
118
+ uo as ColorEnum,
119
+ tr as ControlBox,
120
+ fr as CountryFlag,
121
+ et as DEFAULT_TEXT_COLOR,
122
+ Je as DataTable,
123
+ Qe as DataTableHeaderItem,
124
+ Ze as DataTableRow,
125
+ pr as Decorate,
126
+ nr as Dot,
127
+ be as DropdownSelect,
128
+ Ct as DropzoneItemPreview,
129
+ ur as FLYOUT_OUTLET_ID,
130
+ D as FREE_PRICE_TEXT,
131
+ Yr as Flex,
132
+ Xr as FlexAlignItemsEnum,
133
+ Hr as FlexDirectionEnum,
134
+ Wr as FlexJustifyContentEnum,
135
+ Zr as FlexRestricter,
136
+ Jr as FlexWrapEnum,
137
+ sr as Flyout,
138
+ gr as Icon,
139
+ Lr as IconBig,
140
+ go as IconButton,
141
+ Tr as Icons,
142
+ Cr as IconsBig,
143
+ Sr as Indicator,
144
+ Pr as InfoPanel,
145
+ Dr as Input,
146
+ Tt as InputDropzone,
147
+ Or as Interactive,
148
+ vr as Island,
149
+ hr as IslandCorner,
150
+ Ko as Link,
151
+ Mo as LinkButton,
152
+ z as Linkify,
153
+ xe as Loaf,
154
+ dr as Logos,
155
+ so as MediaQueryEnum,
156
+ le as Modal,
157
+ se as NavList,
158
+ de as OVERLAY_OUTLET_ID,
159
+ io as OffsetEnum,
160
+ Lt as OnScreenSensor,
161
+ ce as Overlay,
162
+ qr as Pad,
163
+ oe as Page,
164
+ Ie as Pagination,
165
+ Ee as Popover,
166
+ Be as PremiumBadge,
167
+ Re as Prose,
168
+ ye as Radio,
169
+ ee as Rail,
170
+ kr as RichInput,
171
+ ae as Scrollable,
172
+ Ae as Select,
173
+ _e as Separator,
174
+ Fe as Shroud,
175
+ gt as Skeleton,
176
+ he as Slider,
177
+ ze as Spacer,
178
+ Ne as Style,
179
+ Ve as Switch,
180
+ St as Symbols,
181
+ tt as TEXT_OPACITY_MAP,
182
+ ut as TITLE_OUTLET_ID,
183
+ qe as Table,
184
+ Pt as TableIconButton,
185
+ ot as TableResponsiveText,
186
+ He as Tabular,
187
+ at as Text,
188
+ ft as TextBlock,
189
+ co as TextSizeEnum,
190
+ nt as Textarea,
191
+ st as Title,
192
+ Ke as ToggleGroup,
193
+ me as VirtualScrollable,
194
+ To as ZIndexEnum,
195
+ H as clamp,
196
+ W as clamp01,
189
197
  a as clsx,
190
- j as debounce,
191
- F as defaultLinkReplacer,
192
- _ as defaultLinkReplacerx,
193
- Do as getButtonClassName,
194
- oo as getColor,
195
- Mo as getLinkClassName,
196
- No as getLinkStyles,
197
- Ze as getTextOpacity,
198
+ to as debounce,
199
+ M as defaultLinkReplacer,
200
+ N as defaultLinkReplacerx,
201
+ b as formatCurrency,
202
+ y as formatDate,
203
+ vo as getButtonClassName,
204
+ mo as getColor,
205
+ Xo as getLinkClassName,
206
+ Ho as getLinkStyles,
207
+ mt as getTextOpacity,
198
208
  m as getValue,
199
- R as identity,
200
- k as invoke,
201
- v as isExternalUrl,
202
- Y as isFalseString,
203
- uo as isInEnum,
204
- H as isTrueString,
205
- h as linkify,
206
- U as linkifyx,
207
- z as matchLinkNodes,
208
- w as matchLinks,
209
+ _ as identity,
210
+ O as invoke,
211
+ w as isExternalUrl,
212
+ Z as isFalseString,
213
+ Co as isInEnum,
214
+ j as isTrueString,
215
+ G as linkify,
216
+ V as linkifyx,
217
+ Y as matchLinkNodes,
218
+ K as matchLinks,
209
219
  e as mergeRefs,
210
- V as minmax,
211
- A as noop,
212
- W as normalizeSlashes,
213
- X as replaceRange,
214
- D as returnFalse,
215
- b as returnTrue,
216
- J as splitByIndices,
217
- _r as stringPropFormater,
218
- je as textSizeResponsiveValueFormatter,
219
- q as throttle,
220
- tt as titleGetCoords,
221
- at as titleGetCssStyle,
222
- eo as ui,
223
- Q as unicodeCharAt,
224
- S as useClipboardComponent,
225
- Fe as useContextualStyle,
220
+ J as minmax,
221
+ F as noop,
222
+ q as normalizeSlashes,
223
+ $ as replaceRange,
224
+ v as returnFalse,
225
+ h as returnTrue,
226
+ oo as splitByIndices,
227
+ Nr as stringPropFormater,
228
+ pt as textSizeResponsiveValueFormatter,
229
+ ao as throttle,
230
+ it as titleGetCoords,
231
+ dt as titleGetCssStyle,
232
+ xo as ui,
233
+ ro as unicodeCharAt,
234
+ R as useClipboardComponent,
235
+ we as useContextualStyle,
226
236
  s as useDynamicRef,
227
237
  d as useGlobalKeyboardEvent,
228
238
  l as useInstance,
229
239
  T as useKeyboardClose,
230
- B as useOutlet,
240
+ g as useOutlet,
231
241
  x as usePopoverController,
232
242
  C as useWindowResize
233
243
  };
@@ -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
+ };
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.3",
4
+ "version": "4.3.5",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",