@cfx-dev/ui-components 4.2.23 → 4.3.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/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +7 -5
- package/dist/main.js +181 -179
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,62 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import h from "../Button/Button.js";
|
|
4
|
+
import "../../utils/links.js";
|
|
5
|
+
import { Table as e } from "./index.js";
|
|
6
|
+
import C from "./TableIconButton.js";
|
|
7
|
+
function a() {
|
|
8
|
+
const [n, d] = r.useState(null), c = r.useCallback((t) => {
|
|
9
|
+
d((i) => i === t ? null : t);
|
|
10
|
+
}, []);
|
|
11
|
+
return /* @__PURE__ */ o(e.Root, { children: [
|
|
12
|
+
/* @__PURE__ */ l(e.Header, { sticky: !0, children: /* @__PURE__ */ o(e.Row, { children: [
|
|
13
|
+
/* @__PURE__ */ l(e.CellCheckbox, { as: "th", isPlaceholder: !0 }),
|
|
14
|
+
/* @__PURE__ */ o(e.Cell, { as: "th", width: "30%", gap: 1, onClick: () => console.log(">>> sort click"), children: [
|
|
15
|
+
"Header 1",
|
|
16
|
+
/* @__PURE__ */ l(C, { name: "Sort" })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ l(e.Cell, { as: "th", children: "Header 2" }),
|
|
19
|
+
/* @__PURE__ */ o(e.Cell, { as: "th", gap: 1, children: [
|
|
20
|
+
"Header 3",
|
|
21
|
+
/* @__PURE__ */ l(C, { name: "Sort", onClick: () => console.log(">>> sort click") })
|
|
22
|
+
] })
|
|
23
|
+
] }) }),
|
|
24
|
+
/* @__PURE__ */ o(e.Body, { children: [
|
|
25
|
+
/* @__PURE__ */ o(e.Row, { color: "red", children: [
|
|
26
|
+
/* @__PURE__ */ l(e.CellCheckbox, { checked: n === 1, disabled: !0 }),
|
|
27
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 1 Cell 1" }),
|
|
28
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 1 Cell 2" }),
|
|
29
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 1 Cell 3" })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ o(e.Row, { onClick: () => c(2), selected: n === 2, children: [
|
|
32
|
+
/* @__PURE__ */ l(e.CellCheckbox, { checked: n === 2 }),
|
|
33
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 2 Cell 1" }),
|
|
34
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 2 Cell 2" }),
|
|
35
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 2 Cell 3" })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ o(e.Row, { color: "yellow", onClick: () => c(3), selected: n === 3, children: [
|
|
38
|
+
/* @__PURE__ */ l(e.CellCheckbox, { checked: n === 3 }),
|
|
39
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 3 Cell 1" }),
|
|
40
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 3 Cell 2" }),
|
|
41
|
+
/* @__PURE__ */ l(e.Cell, { children: /* @__PURE__ */ l(h, { theme: "primary", text: "123", onClick: (t) => t.stopPropagation() }) })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ o(e.Row, { color: "green", onClick: () => c(4), selected: n === 4, children: [
|
|
44
|
+
/* @__PURE__ */ l(e.CellCheckbox, { checked: n === 4 }),
|
|
45
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 4 Cell 1" }),
|
|
46
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 4 Cell 2" }),
|
|
47
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 4 Cell 3" })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ o(e.Row, { children: [
|
|
50
|
+
/* @__PURE__ */ l(e.CellCheckbox, { checked: n === 5, disabled: !0 }),
|
|
51
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 5 Cell 1" }),
|
|
52
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 5 Cell 2" }),
|
|
53
|
+
/* @__PURE__ */ l(e.Cell, { children: "Content row 5 Cell 3" })
|
|
54
|
+
] })
|
|
56
55
|
] })
|
|
57
56
|
] });
|
|
58
57
|
}
|
|
59
|
-
const
|
|
58
|
+
const p = r.memo(a);
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
p as default
|
|
62
61
|
};
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { default as TableBody } from './TableBody';
|
|
2
|
+
import { default as TableCell } from './TableCell';
|
|
3
|
+
import { default as TableHeader } from './TableHeader';
|
|
4
|
+
import { default as TableRoot } from './TableRoot';
|
|
5
|
+
import { default as TableRow } from './TableRow';
|
|
6
|
+
|
|
7
|
+
export declare const Table: {
|
|
8
|
+
Root: typeof TableRoot;
|
|
9
|
+
Header: typeof TableHeader;
|
|
10
|
+
Body: typeof TableBody;
|
|
11
|
+
Row: typeof TableRow;
|
|
12
|
+
Cell: typeof TableCell;
|
|
13
|
+
CellCheckbox: import('react').MemoExoticComponent<(props: import('./TableCellCheckbox').TableCellCheckboxProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
};
|
|
15
|
+
export { default as TableIconButton } from './TableIconButton';
|
|
16
|
+
export type { TableRootProps } from './TableRoot';
|
|
17
|
+
export type { TableBodyProps } from './TableBody';
|
|
18
|
+
export type { TableHeaderProps } from './TableHeader';
|
|
19
|
+
export type { TableCellProps } from './TableCell';
|
|
20
|
+
export type { TableRowProps } from './TableRow';
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./TableBody.js";
|
|
2
|
+
import e from "./TableCell.js";
|
|
3
|
+
import l from "./TableCellCheckbox.js";
|
|
4
|
+
import r from "./TableHeader.js";
|
|
5
|
+
import t from "./TableRoot.js";
|
|
6
|
+
import m from "./TableRow.js";
|
|
7
|
+
import { default as x } from "./TableIconButton.js";
|
|
8
|
+
const C = {
|
|
9
|
+
Root: t,
|
|
10
|
+
Header: r,
|
|
11
|
+
Body: o,
|
|
12
|
+
Row: m,
|
|
13
|
+
Cell: e,
|
|
14
|
+
CellCheckbox: l
|
|
15
|
+
};
|
|
2
16
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
l as TableIconButton,
|
|
6
|
-
t as TableRow
|
|
17
|
+
C as Table,
|
|
18
|
+
x as TableIconButton
|
|
7
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import o from "react";
|
|
3
|
-
import
|
|
3
|
+
import i from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as l } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Tabular as m } from "./Tabular.js";
|
|
@@ -6,7 +6,10 @@ export declare const lineHeightResponsiveValueFormatter: (val: ResponsiveTextSiz
|
|
|
6
6
|
export declare const TEXT_OPACITY_MAP: Record<TextOpacity, number | string>;
|
|
7
7
|
export declare const getTextOpacity: (opacity?: TextOpacity, otherwise?: string | number) => string | number;
|
|
8
8
|
export declare const DEFAULT_TEXT_COLOR = "primary";
|
|
9
|
-
export declare
|
|
10
|
-
|
|
9
|
+
export declare function Text(props: TextProps & {
|
|
10
|
+
ref?: React.Ref<HTMLElement>;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function TextBlock(props: TextProps & {
|
|
11
13
|
asDiv?: undefined;
|
|
12
|
-
|
|
14
|
+
ref?: React.Ref<HTMLElement>;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
root: E,
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as A } from "../../utils/clsx.js";
|
|
3
|
+
import { getColor as E } from "../../utils/color.js";
|
|
4
|
+
import { ui as o } from "../../utils/ui/ui.js";
|
|
5
|
+
import { TextSizeEnum as a } from "../../utils/ui/ui.types.js";
|
|
6
|
+
const F = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", H = "cfxui__Text__underlined__5860e", N = "cfxui__Text__strikethrough__e3ee3", $ = "cfxui__Text__truncated__417f4", w = "cfxui__Text__typographic__d8155", P = "cfxui__Text__block__cb1b6", r = {
|
|
7
|
+
root: F,
|
|
9
8
|
centered: O,
|
|
10
|
-
underlined:
|
|
11
|
-
strikethrough:
|
|
12
|
-
truncated:
|
|
13
|
-
typographic:
|
|
14
|
-
block:
|
|
15
|
-
},
|
|
9
|
+
underlined: H,
|
|
10
|
+
strikethrough: N,
|
|
11
|
+
truncated: $,
|
|
12
|
+
typographic: w,
|
|
13
|
+
block: P
|
|
14
|
+
}, q = (e) => e in a ? o.fontSize(e) : typeof e == "number" ? o.q(e) : e, B = (e) => e in a ? o.lineHeight(e) : typeof e == "number" ? o.q(e) : e, D = {
|
|
16
15
|
0: 0,
|
|
17
16
|
25: "var(--text-opacity-25)",
|
|
18
17
|
50: "var(--text-opacity-50)",
|
|
@@ -25,64 +24,69 @@ const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "c
|
|
|
25
24
|
h4: "h4",
|
|
26
25
|
h5: "h5",
|
|
27
26
|
h6: "h6"
|
|
28
|
-
}, L = (e,
|
|
29
|
-
const
|
|
30
|
-
return typeof
|
|
31
|
-
}, M = "primary"
|
|
27
|
+
}, L = (e, n = 1) => {
|
|
28
|
+
const t = typeof e == "string" && D[e];
|
|
29
|
+
return typeof t == "string" || typeof t == "number" ? t : n;
|
|
30
|
+
}, M = "primary";
|
|
31
|
+
function V(e) {
|
|
32
32
|
const {
|
|
33
|
-
family:
|
|
34
|
-
size:
|
|
35
|
-
weight:
|
|
36
|
-
letterSpacing:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
33
|
+
family: n,
|
|
34
|
+
size: t = "normal",
|
|
35
|
+
weight: l = "normal",
|
|
36
|
+
letterSpacing: f = "normal",
|
|
37
|
+
color: _,
|
|
38
|
+
opacity: u,
|
|
39
|
+
as: i = "span",
|
|
40
|
+
centered: p = !1,
|
|
41
|
+
truncated: h = !1,
|
|
42
|
+
typographic: m = !1,
|
|
43
|
+
uppercase: g = !1,
|
|
44
|
+
userSelectable: y = !1,
|
|
45
|
+
underlined: d = !1,
|
|
46
|
+
strikethrough: x = !1,
|
|
47
|
+
children: T,
|
|
48
|
+
className: b,
|
|
49
|
+
style: k,
|
|
50
|
+
ref: S
|
|
51
|
+
} = e, C = i === "div", R = A(
|
|
52
|
+
r.root,
|
|
53
|
+
b,
|
|
54
|
+
o.getResponsiveClassnames("font-size", t),
|
|
55
|
+
o.getResponsiveClassnames("line-height", t),
|
|
53
56
|
{
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
57
|
+
[r.block]: C,
|
|
58
|
+
[r.centered]: p,
|
|
59
|
+
[r.truncated]: h,
|
|
60
|
+
[r.underlined]: d,
|
|
61
|
+
[r.strikethrough]: x,
|
|
62
|
+
[r.typographic]: m,
|
|
63
|
+
[o.cls.userSelectableText]: y
|
|
61
64
|
}
|
|
62
|
-
), v =
|
|
63
|
-
...
|
|
64
|
-
color:
|
|
65
|
-
opacity: L(
|
|
66
|
-
}), z = typeof
|
|
65
|
+
), v = E({
|
|
66
|
+
...e,
|
|
67
|
+
color: _ || M,
|
|
68
|
+
opacity: L(u)
|
|
69
|
+
}), z = typeof n == "string" ? n : I[i] || "primary", s = {
|
|
67
70
|
color: v,
|
|
68
71
|
fontFamily: `var(--font-family-${z})`,
|
|
69
|
-
lineHeight: `var(--line-height-${
|
|
70
|
-
letterSpacing: `var(--letter-spacing-${
|
|
71
|
-
fontWeight: `var(--font-weight-${
|
|
72
|
-
...
|
|
73
|
-
...
|
|
74
|
-
...
|
|
72
|
+
lineHeight: `var(--line-height-${t})`,
|
|
73
|
+
letterSpacing: `var(--letter-spacing-${f})`,
|
|
74
|
+
fontWeight: `var(--font-weight-${l})`,
|
|
75
|
+
...o.getResponsiveStyles("font-size", t, q),
|
|
76
|
+
...o.getResponsiveStyles("line-height", t, B),
|
|
77
|
+
...k
|
|
75
78
|
};
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
});
|
|
79
|
+
return g && (s.textTransform = "uppercase"), /* @__PURE__ */ c(i, { ref: S, dir: "auto", className: R, style: s, children: T });
|
|
80
|
+
}
|
|
81
|
+
function J(e) {
|
|
82
|
+
return /* @__PURE__ */ c(V, { ...e, as: "div" });
|
|
83
|
+
}
|
|
80
84
|
export {
|
|
81
85
|
M as DEFAULT_TEXT_COLOR,
|
|
82
86
|
D as TEXT_OPACITY_MAP,
|
|
83
87
|
V as Text,
|
|
84
|
-
|
|
88
|
+
J as TextBlock,
|
|
85
89
|
L as getTextOpacity,
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
B as lineHeightResponsiveValueFormatter,
|
|
91
|
+
q as textSizeResponsiveValueFormatter
|
|
88
92
|
};
|
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import { jsx as o, jsxs as t, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as t, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import m from "../Layout/Flex/Flex.js";
|
|
3
4
|
import { Text as c } from "./Text.js";
|
|
4
|
-
import { Separator as
|
|
5
|
-
const
|
|
6
|
-
root:
|
|
7
|
-
},
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */ t(
|
|
10
|
-
|
|
5
|
+
import { Separator as l } from "../Separator/Separator.js";
|
|
6
|
+
const _ = "cfxui__TextShowcase__root__a3632", f = {
|
|
7
|
+
root: _
|
|
8
|
+
}, u = "The quick brown fox jumps over the lazy dog.", T = "How vexingly quick daft zebras jump.";
|
|
9
|
+
function x() {
|
|
10
|
+
return /* @__PURE__ */ t(a, { children: [
|
|
11
|
+
u,
|
|
11
12
|
/* @__PURE__ */ o("br", {}),
|
|
12
13
|
T
|
|
13
14
|
] });
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function g(p) {
|
|
16
17
|
const {
|
|
17
|
-
items:
|
|
18
|
-
} =
|
|
19
|
-
return /* @__PURE__ */ o(
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
items: d
|
|
19
|
+
} = p;
|
|
20
|
+
return /* @__PURE__ */ o(m, { direction: "column", children: d.map((r, h) => /* @__PURE__ */ t(a, { children: [
|
|
21
|
+
h > 0 && /* @__PURE__ */ o(l, { mt: 6, mb: 6 }),
|
|
22
|
+
/* @__PURE__ */ t("div", { className: f.root, children: [
|
|
23
|
+
/* @__PURE__ */ t("div", { children: [
|
|
24
|
+
/* @__PURE__ */ o(c, { ...r.textProps, children: r.title }),
|
|
25
|
+
/* @__PURE__ */ o("br", {}),
|
|
26
|
+
/* @__PURE__ */ t(c, { color: "secondary", children: [
|
|
27
|
+
r.descriptions.map((e, n) => (
|
|
28
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
29
|
+
/* @__PURE__ */ t(s.Fragment, { children: [
|
|
30
|
+
e,
|
|
31
|
+
n < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
|
|
32
|
+
] }, `description_${n}`)
|
|
33
|
+
)),
|
|
34
|
+
Object.entries(r.textProps).map(([e, n], i) => /* @__PURE__ */ t(s.Fragment, { children: [
|
|
35
|
+
r.descriptions.length > 0 && i === 0 && /* @__PURE__ */ o(l, { content: "props", offset: "large" }),
|
|
36
|
+
e,
|
|
37
|
+
": ",
|
|
38
|
+
n.toString(),
|
|
39
|
+
i < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
|
|
40
|
+
] }, `prop_${e}`))
|
|
41
|
+
] })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ o(c, { ...r.textProps, children: /* @__PURE__ */ o(x, {}) })
|
|
44
|
+
] }, `prop_${r.title}`)
|
|
38
45
|
] })) });
|
|
39
46
|
}
|
|
40
|
-
const
|
|
47
|
+
const C = s.memo(g);
|
|
41
48
|
export {
|
|
42
|
-
|
|
49
|
+
C as default
|
|
43
50
|
};
|
|
@@ -4,7 +4,9 @@ export declare const TITLE_OUTLET_ID = "title-outlet";
|
|
|
4
4
|
export type TitleFixedOn = 'top' | 'top-left' | 'right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left';
|
|
5
5
|
export declare function titleGetCssStyle(fixed: boolean, delay: number, [x, y]: number[]): React.CSSProperties;
|
|
6
6
|
export declare function titleGetCoords(element: HTMLElement, fixedOn: TitleFixedOn): [number, number];
|
|
7
|
-
export type TitleChildren = ((ref: React.RefObject<
|
|
7
|
+
export type TitleChildren = ((ref: React.RefObject<unknown>) => React.ReactNode) | React.ReactElement<React.PropsWithChildren<{
|
|
8
|
+
ref: React.RefObject<unknown> | React.RefCallback<unknown>;
|
|
9
|
+
}>>;
|
|
8
10
|
export interface TitleProps {
|
|
9
11
|
children: TitleChildren;
|
|
10
12
|
title?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import
|
|
3
|
+
import r from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as o } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Title as l } from "./Title.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import u from "react";
|
|
3
|
-
import
|
|
3
|
+
import r from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as a } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import { ToggleGroup as i } from "./ToggleGroup.js";
|