@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,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { Flex as a } from "../Layout/Flex/Flex.js";
3
+ import a from "../Layout/Flex/Flex.js";
4
4
  import { Text as t } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
6
  import { Slider as l } from "./Slider.js";
@@ -1,186 +1,140 @@
1
- import { jsx as l, jsxs as $ } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import g from "react";
4
- import { u as B, a as U } from "../../index-Cf5Yu9oD.js";
5
- import { u as j } from "../../index-BZPx6jYI.js";
6
- import { P } from "../../index-BlbvKsmN.js";
7
- import { clsx as k } from "../../utils/clsx.js";
8
- function I(t, o, { checkForDefaultPrevented: e = !0 } = {}) {
9
- return function(c) {
10
- if (t == null || t(c), e === !1 || !c.defaultPrevented)
11
- return o == null ? void 0 : o(c);
12
- };
13
- }
14
- function E(t, o) {
15
- typeof t == "function" ? t(o) : t != null && (t.current = o);
16
- }
17
- function O(...t) {
18
- return (o) => t.forEach((e) => E(e, o));
19
- }
20
- function q(...t) {
21
- return u.useCallback(O(...t), t);
22
- }
23
- function z(t, o = []) {
24
- let e = [];
25
- function r(h, n) {
26
- const s = u.createContext(n), i = e.length;
27
- e = [...e, n];
28
- function f(a) {
29
- const { scope: p, children: b, ...d } = a, S = (p == null ? void 0 : p[t][i]) || s, m = u.useMemo(() => d, Object.values(d));
30
- return /* @__PURE__ */ l(S.Provider, { value: m, children: b });
31
- }
32
- function w(a, p) {
33
- const b = (p == null ? void 0 : p[t][i]) || s, d = u.useContext(b);
34
- if (d) return d;
35
- if (n !== void 0) return n;
36
- throw new Error(`\`${a}\` must be used within \`${h}\``);
37
- }
38
- return f.displayName = h + "Provider", [f, w];
39
- }
40
- const c = () => {
41
- const h = e.map((n) => u.createContext(n));
42
- return function(s) {
43
- const i = (s == null ? void 0 : s[t]) || h;
44
- return u.useMemo(
45
- () => ({ [`__scope${t}`]: { ...s, [t]: i } }),
46
- [s, i]
47
- );
48
- };
49
- };
50
- return c.scopeName = t, [r, A(c, ...o)];
51
- }
52
- function A(...t) {
53
- const o = t[0];
54
- if (t.length === 1) return o;
55
- const e = () => {
56
- const r = t.map((c) => ({
57
- useScope: c(),
58
- scopeName: c.scopeName
59
- }));
60
- return function(h) {
61
- const n = r.reduce((s, { useScope: i, scopeName: f }) => {
62
- const a = i(h)[`__scope${f}`];
63
- return { ...s, ...a };
64
- }, {});
65
- return u.useMemo(() => ({ [`__scope${o.scopeName}`]: n }), [n]);
66
- };
67
- };
68
- return e.scopeName = o.scopeName, e;
69
- }
70
- var x = "Switch", [D, ct] = z(x), [F, L] = D(x), v = u.forwardRef(
71
- (t, o) => {
1
+ import { jsxs as I, jsx as i } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import M from "react";
4
+ import { u as k, d as H, c as j, P as x, e as A, f as q } from "../../index-BHuChyf5.js";
5
+ import { u as z } from "../../index-BZPx6jYI.js";
6
+ import { clsx as P } from "../../utils/clsx.js";
7
+ var m = "Switch", [L, et] = j(m), [O, $] = L(m), y = r.forwardRef(
8
+ (e, s) => {
72
9
  const {
73
- __scopeSwitch: e,
74
- name: r,
10
+ __scopeSwitch: t,
11
+ name: o,
75
12
  checked: c,
76
- defaultChecked: h,
77
- required: n,
78
- disabled: s,
79
- value: i = "on",
80
- onCheckedChange: f,
81
- ...w
82
- } = t, [a, p] = u.useState(null), b = q(o, (_) => p(_)), d = u.useRef(!1), S = a ? !!a.closest("form") : !0, [m = !1, N] = B({
13
+ defaultChecked: w,
14
+ required: u,
15
+ disabled: a,
16
+ value: h = "on",
17
+ onCheckedChange: _,
18
+ form: n,
19
+ ...S
20
+ } = e, [d, l] = r.useState(null), b = k(s, (f) => l(f)), v = r.useRef(!1), R = d ? n || !!d.closest("form") : !0, [p, B] = H({
83
21
  prop: c,
84
- defaultProp: h,
85
- onChange: f
22
+ defaultProp: w ?? !1,
23
+ onChange: _,
24
+ caller: m
86
25
  });
87
- return /* @__PURE__ */ $(F, { scope: e, checked: m, disabled: s, children: [
88
- /* @__PURE__ */ l(
89
- P.button,
26
+ return /* @__PURE__ */ I(O, { scope: t, checked: p, disabled: a, children: [
27
+ /* @__PURE__ */ i(
28
+ x.button,
90
29
  {
91
30
  type: "button",
92
31
  role: "switch",
93
- "aria-checked": m,
94
- "aria-required": n,
95
- "data-state": T(m),
96
- "data-disabled": s ? "" : void 0,
97
- disabled: s,
98
- value: i,
99
- ...w,
32
+ "aria-checked": p,
33
+ "aria-required": u,
34
+ "data-state": g(p),
35
+ "data-disabled": a ? "" : void 0,
36
+ disabled: a,
37
+ value: h,
38
+ ...S,
100
39
  ref: b,
101
- onClick: I(t.onClick, (_) => {
102
- N((M) => !M), S && (d.current = _.isPropagationStopped(), d.current || _.stopPropagation());
40
+ onClick: A(e.onClick, (f) => {
41
+ B((U) => !U), R && (v.current = f.isPropagationStopped(), v.current || f.stopPropagation());
103
42
  })
104
43
  }
105
44
  ),
106
- S && /* @__PURE__ */ l(
107
- W,
45
+ R && /* @__PURE__ */ i(
46
+ E,
108
47
  {
109
- control: a,
110
- bubbles: !d.current,
111
- name: r,
112
- value: i,
113
- checked: m,
114
- required: n,
115
- disabled: s,
48
+ control: d,
49
+ bubbles: !v.current,
50
+ name: o,
51
+ value: h,
52
+ checked: p,
53
+ required: u,
54
+ disabled: a,
55
+ form: n,
116
56
  style: { transform: "translateX(-100%)" }
117
57
  }
118
58
  )
119
59
  ] });
120
60
  }
121
61
  );
122
- v.displayName = x;
123
- var R = "SwitchThumb", y = u.forwardRef(
124
- (t, o) => {
125
- const { __scopeSwitch: e, ...r } = t, c = L(R, e);
126
- return /* @__PURE__ */ l(
127
- P.span,
62
+ y.displayName = m;
63
+ var T = "SwitchThumb", N = r.forwardRef(
64
+ (e, s) => {
65
+ const { __scopeSwitch: t, ...o } = e, c = $(T, t);
66
+ return /* @__PURE__ */ i(
67
+ x.span,
128
68
  {
129
- "data-state": T(c.checked),
69
+ "data-state": g(c.checked),
130
70
  "data-disabled": c.disabled ? "" : void 0,
131
- ...r,
132
- ref: o
71
+ ...o,
72
+ ref: s
133
73
  }
134
74
  );
135
75
  }
136
76
  );
137
- y.displayName = R;
138
- var W = (t) => {
139
- const { control: o, checked: e, bubbles: r = !0, ...c } = t, h = u.useRef(null), n = j(e), s = U(o);
140
- return u.useEffect(() => {
141
- const i = h.current, f = window.HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(f, "checked").set;
142
- if (n !== e && a) {
143
- const p = new Event("click", { bubbles: r });
144
- a.call(i, e), i.dispatchEvent(p);
145
- }
146
- }, [n, e, r]), /* @__PURE__ */ l(
147
- "input",
148
- {
149
- type: "checkbox",
150
- "aria-hidden": !0,
151
- defaultChecked: e,
152
- ...c,
153
- tabIndex: -1,
154
- ref: h,
155
- style: {
156
- ...t.style,
157
- ...s,
158
- position: "absolute",
159
- pointerEvents: "none",
160
- opacity: 0,
161
- margin: 0
77
+ N.displayName = T;
78
+ var D = "SwitchBubbleInput", E = r.forwardRef(
79
+ ({
80
+ __scopeSwitch: e,
81
+ control: s,
82
+ checked: t,
83
+ bubbles: o = !0,
84
+ ...c
85
+ }, w) => {
86
+ const u = r.useRef(null), a = k(u, w), h = z(t), _ = q(s);
87
+ return r.useEffect(() => {
88
+ const n = u.current;
89
+ if (!n) return;
90
+ const S = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(
91
+ S,
92
+ "checked"
93
+ ).set;
94
+ if (h !== t && l) {
95
+ const b = new Event("click", { bubbles: o });
96
+ l.call(n, t), n.dispatchEvent(b);
162
97
  }
163
- }
164
- );
165
- };
166
- function T(t) {
167
- return t ? "checked" : "unchecked";
98
+ }, [h, t, o]), /* @__PURE__ */ i(
99
+ "input",
100
+ {
101
+ type: "checkbox",
102
+ "aria-hidden": !0,
103
+ defaultChecked: t,
104
+ ...c,
105
+ tabIndex: -1,
106
+ ref: a,
107
+ style: {
108
+ ...c.style,
109
+ ..._,
110
+ position: "absolute",
111
+ pointerEvents: "none",
112
+ opacity: 0,
113
+ margin: 0
114
+ }
115
+ }
116
+ );
117
+ }
118
+ );
119
+ E.displayName = D;
120
+ function g(e) {
121
+ return e ? "checked" : "unchecked";
168
122
  }
169
- var X = v, G = y;
170
- const J = "cfxui__Switch__switchUnset__c8b03", K = "cfxui__Switch__switchRoot__f2911", Q = "cfxui__Switch__switchThumb__9cbf5", C = {
171
- switchUnset: J,
172
- switchRoot: K,
173
- switchThumb: Q
123
+ var F = y, W = N;
124
+ const X = "cfxui__Switch__switchUnset__c8b03", G = "cfxui__Switch__switchRoot__f2911", J = "cfxui__Switch__switchThumb__9cbf5", C = {
125
+ switchUnset: X,
126
+ switchRoot: G,
127
+ switchThumb: J
174
128
  };
175
- function V(t) {
129
+ function K(e) {
176
130
  const {
177
- classNameRoot: o,
178
- classNameThumb: e,
179
- ...r
180
- } = t;
181
- return /* @__PURE__ */ l(X, { ...r, className: k(C.switchRoot, C.switchUnset, o), children: /* @__PURE__ */ l(G, { className: k(C.switchThumb, e) }) });
131
+ classNameRoot: s,
132
+ classNameThumb: t,
133
+ ...o
134
+ } = e;
135
+ return /* @__PURE__ */ i(F, { ...o, className: P(C.switchRoot, C.switchUnset, s), children: /* @__PURE__ */ i(W, { className: P(C.switchThumb, t) }) });
182
136
  }
183
- const st = g.memo(V);
137
+ const ot = M.memo(K);
184
138
  export {
185
- st as default
139
+ ot as default
186
140
  };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface TableBodyProps extends React.PropsWithChildren {
4
+ className?: string;
5
+ ref?: React.Ref<HTMLTableSectionElement>;
6
+ }
7
+ declare function TableBody(props: TableBodyProps): import("react/jsx-runtime").JSX.Element;
8
+ export default TableBody;
@@ -0,0 +1,14 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { clsx as a } from "../../utils/clsx.js";
3
+ import { s as l } from "../../Table.module-DHI1mXN2.js";
4
+ function d(o) {
5
+ const {
6
+ className: s,
7
+ children: r,
8
+ ref: t
9
+ } = o;
10
+ return /* @__PURE__ */ e("tbody", { ref: t, className: a(l.tableBody, s), children: r });
11
+ }
12
+ export {
13
+ d as default
14
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { FlexProps } from '../Layout/Flex';
3
+
4
+ export interface TableCellProps extends React.PropsWithChildren, FlexProps {
5
+ onClick?: (event: React.MouseEvent<HTMLTableCellElement>) => void;
6
+ as?: 'td' | 'th';
7
+ className?: string;
8
+ ref?: React.Ref<HTMLTableCellElement>;
9
+ }
10
+ declare function TableCell(props: TableCellProps): import("react/jsx-runtime").JSX.Element;
11
+ export default TableCell;
@@ -0,0 +1,54 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { stringPropFormater as c } from "../Layout/Box/Box.js";
3
+ import h from "../Layout/Flex/Flex.js";
4
+ import { clsx as y } from "../../utils/clsx.js";
5
+ import { ui as t } from "../../utils/ui/ui.js";
6
+ import { s } from "../../Table.module-DHI1mXN2.js";
7
+ function R(p) {
8
+ const {
9
+ onClick: i,
10
+ className: m,
11
+ children: d,
12
+ ref: f,
13
+ width: o,
14
+ display: r,
15
+ as: l = "td",
16
+ ...e
17
+ } = p, n = l === "th";
18
+ return typeof e.px > "u" && (e.px = 4), typeof e.py > "u" && (e.py = l === "th" ? void 0 : 1.5), /* @__PURE__ */ a(
19
+ l,
20
+ {
21
+ ref: f,
22
+ tabIndex: -1,
23
+ role: n ? "columnheader" : "cell",
24
+ onClick: i,
25
+ className: y(
26
+ s.tableCell,
27
+ m,
28
+ t.getResponsiveClassnames("width", o),
29
+ t.getResponsiveClassnames("display", r),
30
+ {
31
+ [s.header]: n,
32
+ [s.interactive]: !!i
33
+ }
34
+ ),
35
+ style: {
36
+ ...t.getResponsiveStyles("width", o),
37
+ ...t.getResponsiveStyles("display", r, c)
38
+ },
39
+ children: /* @__PURE__ */ a(
40
+ h,
41
+ {
42
+ height: "100%",
43
+ alignItems: "center",
44
+ className: s.tableCellContent,
45
+ ...e,
46
+ children: d
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ R as default
54
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { TableCellProps } from './TableCell';
3
+
4
+ export interface TableCellCheckboxProps extends TableCellProps {
5
+ checked?: boolean;
6
+ isPlaceholder?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ declare function TableCellCheckbox(props: TableCellCheckboxProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof TableCellCheckbox>;
11
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import c from "../Checkbox/Checkbox.js";
4
+ import { clsx as i } from "../../utils/clsx.js";
5
+ import f from "./TableCell.js";
6
+ import { s as p } from "../../Table.module-DHI1mXN2.js";
7
+ function b(l) {
8
+ const {
9
+ checked: o = !1,
10
+ isPlaceholder: s,
11
+ disabled: r = !1,
12
+ className: a,
13
+ ...t
14
+ } = l;
15
+ return /* @__PURE__ */ e(f, { width: 2, px: 0, pl: 4, className: i(p.tableCellCheckbox, a), ...t, children: !s && /* @__PURE__ */ e(c, { disabled: r, size: "small", checked: o }) });
16
+ }
17
+ const u = m.memo(b);
18
+ export {
19
+ u as default
20
+ };
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface TableHeaderProps extends React.PropsWithChildren {
4
+ sticky?: boolean;
5
+ className?: string;
6
+ ref?: React.Ref<HTMLTableSectionElement>;
7
+ }
8
+ declare function TableHeader(props: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
9
+ export default TableHeader;
@@ -0,0 +1,24 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { clsx as c } from "../../utils/clsx.js";
3
+ import { s as e } from "../../Table.module-DHI1mXN2.js";
4
+ function d(s) {
5
+ const {
6
+ sticky: a = !1,
7
+ className: r,
8
+ children: t,
9
+ ref: l
10
+ } = s;
11
+ return /* @__PURE__ */ o(
12
+ "thead",
13
+ {
14
+ ref: l,
15
+ className: c(e.tableHeader, r, {
16
+ [e.sticky]: a
17
+ }),
18
+ children: t
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ d as default
24
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { IconButtonProps } from '../IconButton';
3
+
4
+ declare function TableIconButton(props: IconButtonProps): import("react/jsx-runtime").JSX.Element;
5
+ declare const _default: React.MemoExoticComponent<typeof TableIconButton>;
6
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import a from "react";
3
+ import e from "../IconButton/IconButton.js";
4
+ import { clsx as r } from "../../utils/clsx.js";
5
+ import { s as t } from "../../Table.module-DHI1mXN2.js";
6
+ function l(o) {
7
+ const {
8
+ className: n,
9
+ color: s = "inherit"
10
+ } = o, c = r(t.tableIcon, t.iconButton, n);
11
+ return /* @__PURE__ */ m(e, { ...o, className: c, color: s });
12
+ }
13
+ const I = a.memo(l);
14
+ export {
15
+ I as default
16
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface TableRootProps extends React.PropsWithChildren {
4
+ className?: string;
5
+ ref?: React.Ref<HTMLTableElement>;
6
+ }
7
+ declare function TableRoot(props: TableRootProps): import("react/jsx-runtime").JSX.Element;
8
+ export default TableRoot;
@@ -0,0 +1,23 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { clsx as s } from "../../utils/clsx.js";
3
+ import { s as l } from "../../Table.module-DHI1mXN2.js";
4
+ function f(r) {
5
+ const {
6
+ className: o,
7
+ children: e,
8
+ ref: t
9
+ } = r;
10
+ return /* @__PURE__ */ a(
11
+ "table",
12
+ {
13
+ "aria-readonly": "true",
14
+ role: "grid",
15
+ ref: t,
16
+ className: s(l.tableRoot, o),
17
+ children: e
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ f as default
23
+ };
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ColorType } from '../../utils/ui';
3
+
4
+ export interface TableRowProps extends React.PropsWithChildren {
5
+ size?: 'small' | 'normal' | 'large';
6
+ selected?: boolean;
7
+ color?: ColorType;
8
+ onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
9
+ className?: string;
10
+ ref?: React.Ref<HTMLTableRowElement>;
11
+ }
12
+ declare function TableRow(props: TableRowProps): import("react/jsx-runtime").JSX.Element;
13
+ export default TableRow;
@@ -0,0 +1,46 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { clsx as d } from "../../utils/clsx.js";
3
+ import { getColor as r } from "../../utils/color.js";
4
+ import { s as o } from "../../Table.module-DHI1mXN2.js";
5
+ function u(l) {
6
+ const {
7
+ size: s = "normal",
8
+ selected: a,
9
+ color: t,
10
+ onClick: c,
11
+ className: i,
12
+ children: n,
13
+ ref: m
14
+ } = l, b = t ? 0.2 : 0, e = t || "secondary";
15
+ return /* @__PURE__ */ p(
16
+ "tr",
17
+ {
18
+ tabIndex: -1,
19
+ role: "row",
20
+ ref: m,
21
+ onClick: c,
22
+ className: d(o.tableRow, o[s], i, {
23
+ [o.interactive]: !!c,
24
+ [o.selected]: !!a
25
+ }),
26
+ style: {
27
+ "--base-bg-color": r({
28
+ color: e,
29
+ opacity: b
30
+ }),
31
+ "--hover-bg-color": r({
32
+ color: e,
33
+ opacity: 0.3
34
+ }),
35
+ "--selected-bg-color": r({
36
+ color: e,
37
+ opacity: 0.4
38
+ })
39
+ },
40
+ children: n
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ u as default
46
+ };