@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.
Files changed (176) hide show
  1. package/dist/Combination-CSgOhzm-.js +2198 -0
  2. package/dist/Combination-N-vN9BB-.js +823 -0
  3. package/dist/Table.module-DHI1mXN2.js +17 -0
  4. package/dist/assets/all_css.css +1 -0
  5. package/dist/assets/css/Checkbox.css +1 -1
  6. package/dist/assets/css/DataTable.css +1 -0
  7. package/dist/assets/css/Table.css +1 -1
  8. package/dist/assets/general/global.css +1 -1
  9. package/dist/cfxIcons-B9nzO6TW.js +98 -0
  10. package/dist/components/Accordion/Accordion.js +25 -26
  11. package/dist/components/Accordion/AccordionShowcase.js +1 -1
  12. package/dist/components/Avatar/Avatar.d.ts +2 -1
  13. package/dist/components/Avatar/Avatar.js +21 -20
  14. package/dist/components/Avatar/AvatarShowcase.js +1 -1
  15. package/dist/components/Badge/Badge.d.ts +2 -1
  16. package/dist/components/Badge/Badge.js +29 -29
  17. package/dist/components/Badge/BadgeShowcase.js +1 -1
  18. package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
  19. package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
  20. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
  21. package/dist/components/Button/Button.d.ts +5 -2
  22. package/dist/components/Button/Button.js +83 -81
  23. package/dist/components/Button/ButtonShowcase.js +2 -2
  24. package/dist/components/Button/LinkButton.d.ts +1 -1
  25. package/dist/components/Button/LinkButton.js +18 -17
  26. package/dist/components/Button/index.d.ts +1 -1
  27. package/dist/components/Button/index.js +7 -7
  28. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  29. package/dist/components/Checkbox/Checkbox.js +154 -242
  30. package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
  31. package/dist/components/ControlBox/ControlBox.d.ts +3 -2
  32. package/dist/components/ControlBox/ControlBox.js +13 -10
  33. package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
  34. package/dist/components/CountryFlag/CountryFlag.js +14 -11
  35. package/dist/components/DataTable/DataTable.d.ts +40 -0
  36. package/dist/components/DataTable/DataTable.js +163 -0
  37. package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
  38. package/dist/components/DataTable/DataTableShowcase.js +60 -0
  39. package/dist/components/DataTable/index.d.ts +2 -0
  40. package/dist/components/DataTable/index.js +6 -0
  41. package/dist/components/Decorate/Decorate.d.ts +3 -2
  42. package/dist/components/Decorate/Decorate.js +19 -15
  43. package/dist/components/Dot/Dot.d.ts +2 -1
  44. package/dist/components/Dot/Dot.js +15 -13
  45. package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
  46. package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
  47. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
  48. package/dist/components/Flyout/Flyout.d.ts +2 -1
  49. package/dist/components/Flyout/Flyout.js +22 -20
  50. package/dist/components/Icon/Icon.d.ts +2 -1
  51. package/dist/components/Icon/Icon.js +19 -17
  52. package/dist/components/IconBig/IconBig.d.ts +2 -1
  53. package/dist/components/IconBig/IconBig.js +16 -14
  54. package/dist/components/Icons/IconsShowcase.js +1 -1
  55. package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
  56. package/dist/components/Icons/cfx-icons/Radio.js +36 -0
  57. package/dist/components/Icons/cfx-icons/Square.js +15 -9
  58. package/dist/components/Icons/cfxIcons.d.ts +1 -0
  59. package/dist/components/Icons/cfxIcons.js +62 -60
  60. package/dist/components/Icons/index.js +1 -1
  61. package/dist/components/Indicator/Indicator.js +9 -10
  62. package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
  63. package/dist/components/Input/Input.d.ts +4 -1
  64. package/dist/components/Input/Input.js +101 -88
  65. package/dist/components/Input/InputShowcase.js +1 -1
  66. package/dist/components/Input/RichInput.d.ts +2 -1
  67. package/dist/components/Input/RichInput.js +37 -34
  68. package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
  69. package/dist/components/InputDropzone/InputDropzone.js +1723 -625
  70. package/dist/components/Interactive/Interactive.d.ts +2 -1
  71. package/dist/components/Interactive/Interactive.js +14 -12
  72. package/dist/components/Island/Island.d.ts +2 -1
  73. package/dist/components/Island/Island.js +24 -24
  74. package/dist/components/Layout/Box/Box.d.ts +8 -2
  75. package/dist/components/Layout/Box/Box.js +53 -51
  76. package/dist/components/Layout/Box/Box.types.d.ts +22 -0
  77. package/dist/components/Layout/Box/Box.types.js +4 -0
  78. package/dist/components/Layout/Box/index.d.ts +1 -1
  79. package/dist/components/Layout/Box/index.js +3 -3
  80. package/dist/components/Layout/Center/Center.d.ts +2 -1
  81. package/dist/components/Layout/Center/Center.js +19 -18
  82. package/dist/components/Layout/Flex/Flex.d.ts +6 -10
  83. package/dist/components/Layout/Flex/Flex.js +53 -64
  84. package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
  85. package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
  86. package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
  87. package/dist/components/Layout/Flex/index.d.ts +2 -2
  88. package/dist/components/Layout/Flex/index.js +8 -8
  89. package/dist/components/Layout/Page/Page.js +11 -12
  90. package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
  91. package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
  92. package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
  93. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
  94. package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
  95. package/dist/components/Link/LinkShowcase.js +1 -1
  96. package/dist/components/Loaf/Loaf.d.ts +2 -1
  97. package/dist/components/Loaf/Loaf.js +17 -16
  98. package/dist/components/Logos/LogosShowcase.js +1 -1
  99. package/dist/components/Modal/Modal.js +16 -17
  100. package/dist/components/Modal/ModalShowcase.js +14 -11
  101. package/dist/components/NavList/NavList.d.ts +2 -1
  102. package/dist/components/NavList/NavList.js +19 -18
  103. package/dist/components/OnScreenSensor.js +1 -1
  104. package/dist/components/Overlay/Overlay.d.ts +4 -2
  105. package/dist/components/Overlay/Overlay.js +31 -23
  106. package/dist/components/Popover/Popover.d.ts +3 -2
  107. package/dist/components/Popover/Popover.js +31 -30
  108. package/dist/components/Popover/PopoverShowcase.js +4 -4
  109. package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
  110. package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
  111. package/dist/components/Select/Select.d.ts +1 -1
  112. package/dist/components/Select/Select.js +666 -1617
  113. package/dist/components/Select/SelectShowcase.js +1 -1
  114. package/dist/components/Shroud/Shroud.d.ts +2 -1
  115. package/dist/components/Shroud/Shroud.js +16 -14
  116. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  117. package/dist/components/Skeleton/Skeleton.js +26 -27
  118. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  119. package/dist/components/Slider/Slider.d.ts +2 -1
  120. package/dist/components/Slider/Slider.js +326 -377
  121. package/dist/components/Slider/SliderShowcase.js +1 -1
  122. package/dist/components/Switch/Switch.js +109 -155
  123. package/dist/components/Table/TableBody.d.ts +8 -0
  124. package/dist/components/Table/TableBody.js +14 -0
  125. package/dist/components/Table/TableCell.d.ts +11 -0
  126. package/dist/components/Table/TableCell.js +54 -0
  127. package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
  128. package/dist/components/Table/TableCellCheckbox.js +20 -0
  129. package/dist/components/Table/TableHeader.d.ts +9 -0
  130. package/dist/components/Table/TableHeader.js +24 -0
  131. package/dist/components/Table/TableIconButton.d.ts +6 -0
  132. package/dist/components/Table/TableIconButton.js +16 -0
  133. package/dist/components/Table/TableRoot.d.ts +8 -0
  134. package/dist/components/Table/TableRoot.js +23 -0
  135. package/dist/components/Table/TableRow.d.ts +13 -0
  136. package/dist/components/Table/TableRow.js +46 -0
  137. package/dist/components/Table/TableShowcase.js +56 -57
  138. package/dist/components/Table/index.d.ts +20 -2
  139. package/dist/components/Table/index.js +17 -5
  140. package/dist/components/Tabular/TabularShowcase.js +1 -1
  141. package/dist/components/Text/Text.d.ts +6 -3
  142. package/dist/components/Text/Text.js +67 -63
  143. package/dist/components/Text/TextShowcase.js +40 -33
  144. package/dist/components/Title/Title.d.ts +3 -1
  145. package/dist/components/Title/TitleShowcase.js +1 -1
  146. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
  147. package/dist/index-BHuChyf5.js +238 -0
  148. package/dist/index-Cl_RnsqN.js +386 -0
  149. package/dist/index-DZEAOJqB.js +53 -0
  150. package/dist/index-HDl8nGsm.js +70 -0
  151. package/dist/main.d.ts +7 -5
  152. package/dist/main.js +181 -179
  153. package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
  154. package/dist/styles-scss/global.scss +1 -0
  155. package/dist/tslib.es6-CtHwNPxX.js +72 -0
  156. package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
  157. package/dist/utils/hooks/useOutlet.js +1 -1
  158. package/dist/utils/hooks/usePopoverController.d.ts +1 -1
  159. package/dist/utils/links.js +1 -1
  160. package/dist/utils/mergeRefs.d.ts +1 -1
  161. package/dist/utils/mergeRefs.js +1 -1
  162. package/dist/utils/ui/ui.d.ts +1 -0
  163. package/dist/utils/ui/ui.js +45 -36
  164. package/dist/utils/ui/ui.types.d.ts +4 -0
  165. package/package.json +6 -5
  166. package/dist/Combination-Cbiw1XRb.js +0 -792
  167. package/dist/cfxIcons-BNd1WgpX.js +0 -96
  168. package/dist/components/Table/Table.d.ts +0 -42
  169. package/dist/components/Table/Table.js +0 -170
  170. package/dist/index-2hJuj4UN.js +0 -19069
  171. package/dist/index-AweK2ufS.js +0 -171
  172. package/dist/index-BlbvKsmN.js +0 -82
  173. package/dist/index-ByaXH_ih.js +0 -10
  174. package/dist/index-Bz27DCHt.js +0 -1342
  175. package/dist/index-Cf5Yu9oD.js +0 -67
  176. package/dist/tslib.es6-CBKHJX9H.js +0 -151
@@ -1,62 +1,61 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import d from "react";
3
- import { Badge as l } from "../Badge/Badge.js";
4
- import { Flex as a } from "../Layout/Flex/Flex.js";
5
- import "../Interactive/Interactive.js";
6
- import { Scrollable as c } from "../Layout/Scrollable/Scrollable.js";
7
- import "../Layout/Scrollable/VirtualScrollable.js";
8
- import { Text as r } from "../Text/Text.js";
9
- import "../../utils/ui/ui.js";
10
- import { Table as o } from "./Table.js";
11
- const i = [
12
- [
13
- "Cell 1",
14
- "Cell 2",
15
- "Cell 3",
16
- new Date(2023, 0, 1).toLocaleDateString(),
17
- /* @__PURE__ */ e(l, { color: "error", children: "Error" }, "1")
18
- ],
19
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
20
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
21
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
22
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
23
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
24
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
25
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
26
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
27
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
28
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
29
- ["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
30
- ["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")]
31
- ], n = [
32
- { text: "Header 1" },
33
- { text: "Header 2" },
34
- { text: "Header 3" },
35
- { text: "Date" },
36
- { text: "Item" }
37
- ];
38
- function C() {
39
- return /* @__PURE__ */ t(a, { gap: "large", vertical: !0, children: [
40
- /* @__PURE__ */ t(a, { gap: "normal", vertical: !0, children: [
41
- /* @__PURE__ */ e(r, { children: "Table" }),
42
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(o, { headers: n, data: i }) })
43
- ] }),
44
- /* @__PURE__ */ t(a, { fullWidth: !0, vertical: !0, children: [
45
- /* @__PURE__ */ e(r, { children: "Table with scroll" }),
46
- /* @__PURE__ */ e(
47
- "div",
48
- {
49
- style: {
50
- height: "400px",
51
- overflow: "hidden"
52
- },
53
- children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { includeRadio: !0, headers: n, data: i }) })
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 f = d.memo(C);
58
+ const p = r.memo(a);
60
59
  export {
61
- f as default
60
+ p as default
62
61
  };
@@ -1,2 +1,20 @@
1
- export { Table, TableIconButton, TableHeaderItem, TableRow, } from './Table';
2
- export type { TableHeaderType, TableProps, TableRowType, TableDataContainerType, TableHeaderItemProps, TableRowProps, } from './Table';
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 { Table as o, TableHeaderItem as b, TableIconButton as l, TableRow as t } from "./Table.js";
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
- o as Table,
4
- b as TableHeaderItem,
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 { Flex as i } from "../Layout/Flex/Flex.js";
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 const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
10
- export declare const TextBlock: React.ForwardRefExoticComponent<TextProps & {
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
- } & React.RefAttributes<HTMLElement>>;
14
+ ref?: React.Ref<HTMLElement>;
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,17 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import l from "react";
3
- import { clsx as w } from "../../utils/clsx.js";
4
- import { getColor as A } from "../../utils/color.js";
5
- import { ui as t } from "../../utils/ui/ui.js";
6
- import { TextSizeEnum as _ } from "../../utils/ui/ui.types.js";
7
- const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "cfxui__Text__underlined__5860e", H = "cfxui__Text__strikethrough__e3ee3", N = "cfxui__Text__truncated__417f4", $ = "cfxui__Text__typographic__d8155", B = "cfxui__Text__block__cb1b6", n = {
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: F,
11
- strikethrough: H,
12
- truncated: N,
13
- typographic: $,
14
- block: B
15
- }, P = (e) => e in _ ? t.fontSize(e) : typeof e == "number" ? t.q(e) : e, q = (e) => e in _ ? t.lineHeight(e) : typeof e == "number" ? t.q(e) : e, D = {
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, o = 1) => {
29
- const r = typeof e == "string" && D[e];
30
- return typeof r == "string" || typeof r == "number" ? r : o;
31
- }, M = "primary", V = l.forwardRef(function(o, r) {
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: c,
34
- size: i = "normal",
35
- weight: u = "normal",
36
- letterSpacing: p = "normal",
37
- as: s = "span",
38
- centered: h = !1,
39
- truncated: m = !1,
40
- typographic: g = !1,
41
- uppercase: d = !1,
42
- userSelectable: x = !1,
43
- underlined: y = !1,
44
- strikethrough: T = !1,
45
- children: b,
46
- className: k,
47
- style: R
48
- } = o, S = s === "div", C = w(
49
- n.root,
50
- k,
51
- t.getResponsiveClassnames("font-size", i),
52
- t.getResponsiveClassnames("line-height", i),
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
- [n.block]: S,
55
- [n.centered]: h,
56
- [n.truncated]: m,
57
- [n.underlined]: y,
58
- [n.strikethrough]: T,
59
- [n.typographic]: g,
60
- [t.cls.userSelectableText]: x
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 = A({
63
- ...o,
64
- color: o.color || M,
65
- opacity: L(o.opacity)
66
- }), z = typeof c == "string" ? c : I[s] || "primary", a = {
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-${i})`,
70
- letterSpacing: `var(--letter-spacing-${p})`,
71
- fontWeight: `var(--font-weight-${u})`,
72
- ...t.getResponsiveStyles("font-size", i, P),
73
- ...t.getResponsiveStyles("line-height", i, q),
74
- ...R
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 d && (a.textTransform = "uppercase"), /* @__PURE__ */ f(s, { ref: r, dir: "auto", className: C, style: a, children: b });
77
- }), K = l.forwardRef(function(o, r) {
78
- return /* @__PURE__ */ f(V, { ref: r, ...o, as: "div" });
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
- K as TextBlock,
88
+ J as TextBlock,
85
89
  L as getTextOpacity,
86
- q as lineHeightResponsiveValueFormatter,
87
- P as textSizeResponsiveValueFormatter
90
+ B as lineHeightResponsiveValueFormatter,
91
+ q as textSizeResponsiveValueFormatter
88
92
  };
@@ -1,43 +1,50 @@
1
- import { jsx as o, jsxs as t, Fragment as e } from "react/jsx-runtime";
2
- import p from "react";
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 d } from "../Separator/Separator.js";
5
- const h = "cfxui__TextShowcase__root__a3632", _ = {
6
- root: h
7
- }, f = "The quick brown fox jumps over the lazy dog.", T = "How vexingly quick daft zebras jump.";
8
- function m() {
9
- return /* @__PURE__ */ t(e, { children: [
10
- f,
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 u(a) {
16
+ function g(p) {
16
17
  const {
17
- items: l
18
- } = a;
19
- return /* @__PURE__ */ o("div", { className: _.root, children: l.map((r) => /* @__PURE__ */ t(e, { children: [
20
- /* @__PURE__ */ t("div", { children: [
21
- /* @__PURE__ */ o(c, { ...r.textProps, children: r.title }),
22
- /* @__PURE__ */ o("br", {}),
23
- /* @__PURE__ */ t(c, { color: "secondary", children: [
24
- r.descriptions.map((n, s) => /* @__PURE__ */ t(e, { children: [
25
- n,
26
- s < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
27
- ] })),
28
- Object.entries(r.textProps).map(([n, s], i) => /* @__PURE__ */ t(e, { children: [
29
- r.descriptions.length > 0 && i === 0 && /* @__PURE__ */ o(d, { content: "props", offset: "large" }),
30
- n,
31
- ": ",
32
- s.toString(),
33
- i < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
34
- ] }))
35
- ] })
36
- ] }),
37
- /* @__PURE__ */ o(c, { ...r.textProps, children: /* @__PURE__ */ o(m, {}) })
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 w = p.memo(u);
47
+ const C = s.memo(g);
41
48
  export {
42
- w as default
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<any>) => React.ReactNode) | React.ReactElement;
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 { Flex as r } from "../Layout/Flex/Flex.js";
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 { Flex as r } from "../Layout/Flex/Flex.js";
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";