@konstructio/ui 0.1.2-alpha.21 → 0.1.2-alpha.23

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 (104) hide show
  1. package/dist/{Modal-B8jrP02v.js → Modal-Dpk-1N9W.js} +2 -2
  2. package/dist/chevron-down-DgT-uSF9.js +5 -0
  3. package/dist/chevron-right-DYvXLeql.js +7 -0
  4. package/dist/components/Alert/Alert.js +2 -2
  5. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  6. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  7. package/dist/components/AlertDialog/components/index.js +1 -1
  8. package/dist/components/Badge/Badge.js +2 -8
  9. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  10. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  11. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  12. package/dist/components/Button/Button.js +1 -1
  13. package/dist/components/Checkbox/Checkbox.js +6 -7
  14. package/dist/components/Command/Command.js +2 -2
  15. package/dist/components/Command/components/Command.js +1 -1
  16. package/dist/components/Command/components/CommandEmpty.js +1 -1
  17. package/dist/components/Command/components/CommandGroup.js +1 -1
  18. package/dist/components/Command/components/CommandInput.js +2 -2
  19. package/dist/components/Command/components/CommandItem.js +1 -1
  20. package/dist/components/Command/components/CommandList.js +1 -1
  21. package/dist/components/Command/components/CommandSeparator.js +1 -1
  22. package/dist/components/Command/components/DialogContent.js +2 -2
  23. package/dist/components/Command/components/DialogOverlay.js +1 -1
  24. package/dist/components/Datepicker/DatePicker.js +1 -1
  25. package/dist/components/Dropdown/components/List/List.js +1 -1
  26. package/dist/components/Dropdown/components/Wrapper.js +1 -13
  27. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  28. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  29. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  30. package/dist/components/Input/Input.js +1 -1
  31. package/dist/components/Loading/Loading.js +1 -7
  32. package/dist/components/Modal/Modal.js +1 -1
  33. package/dist/components/Modal/components/Body/Body.js +1 -1
  34. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  35. package/dist/components/Modal/components/Header/Header.js +1 -1
  36. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  37. package/dist/components/Modal/components/index.js +1 -1
  38. package/dist/components/NumberInput/NumberInput.js +2 -2
  39. package/dist/components/PieChart/PieChart.js +0 -18
  40. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  41. package/dist/components/Range/Range.js +1 -1
  42. package/dist/components/Slider/Slider.js +1 -1
  43. package/dist/components/Switch/Switch.js +10 -11
  44. package/dist/components/Tabs/Tabs.js +1 -1
  45. package/dist/components/Tabs/components/Content.js +1 -1
  46. package/dist/components/Tabs/components/List.js +1 -1
  47. package/dist/components/Tabs/components/Trigger.js +1 -1
  48. package/dist/components/Tag/Tag.js +1 -1
  49. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
  50. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  51. package/dist/components/Toast/Toast.js +233 -210
  52. package/dist/components/Tooltip/Tooltip.js +1 -1
  53. package/dist/components/VirtualizedTable/VirtualizedTable.js +70 -72
  54. package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
  55. package/dist/components/VirtualizedTable/components/Body/Body.js +45 -23
  56. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
  57. package/dist/components/VirtualizedTable/components/Header/Header.js +40 -38
  58. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +25 -17
  59. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
  60. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +263 -236
  61. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  62. package/dist/components/VirtualizedTable/components/index.js +8 -6
  63. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  64. package/dist/components/VirtualizedTable/contexts/table.provider.js +43 -42
  65. package/dist/components/index.js +1 -1
  66. package/dist/contexts/theme.provider.js +0 -1
  67. package/dist/{createLucideIcon-DGhJ8Z4k.js → createLucideIcon-D4r5Phnh.js} +0 -24
  68. package/dist/{ellipsis-vertical-DpnVYRxI.js → ellipsis-vertical-BVPtjl5f.js} +1 -7
  69. package/dist/{index-N2OStZoU.js → index--V_ZsiQe.js} +0 -21
  70. package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
  71. package/dist/index-BtQfgaSF.js +60 -0
  72. package/dist/index-CIAmiWcw.js +200 -0
  73. package/dist/index-CSFe9uC5.js +14 -0
  74. package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
  75. package/dist/index-CigKKiZS.js +91 -0
  76. package/dist/index-DDByhzds.js +137 -0
  77. package/dist/{index-DQJhMz8c.js → index-DH2Fnov1.js} +11 -12
  78. package/dist/index-DLcqcWxM.js +29 -0
  79. package/dist/{index-CffpTFMi.js → index-Dbt2vBmS.js} +5 -6
  80. package/dist/{index-l3NwplN0.js → index-DpW9ExsS.js} +10 -11
  81. package/dist/index-DrWQH0QF.js +55 -0
  82. package/dist/{index-0XtjXVpJ.js → index-X4k_cU8k.js} +4 -4
  83. package/dist/index-kyuBfLcN.js +479 -0
  84. package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
  85. package/dist/{index-BAEWsOG1.js → index-ohdbKsws.js} +1 -1
  86. package/dist/index.d.ts +9 -0
  87. package/dist/index.js +1 -1
  88. package/dist/package.json +18 -18
  89. package/dist/styles.css +1 -1
  90. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  91. package/dist/utils/index.js +534 -501
  92. package/dist/{x-4F_5p77m.js → x-DPU9OdYH.js} +1 -1
  93. package/package.json +18 -18
  94. package/dist/chevron-down-J5nS1Tu0.js +0 -11
  95. package/dist/chevron-right-DeMVrnIg.js +0 -19
  96. package/dist/components/Skeleton/Skeleton.js +0 -42
  97. package/dist/index-BVRIAMfe.js +0 -36
  98. package/dist/index-BfXxHr_2.js +0 -125
  99. package/dist/index-Bn4c-gww.js +0 -131
  100. package/dist/index-Cvx4lqTq.js +0 -47
  101. package/dist/index-DQH6odE9.js +0 -82
  102. package/dist/index-DdXGVVBv.js +0 -15
  103. package/dist/index-amYX3uxF.js +0 -436
  104. package/dist/index-sp5ZfG6g.js +0 -31
@@ -1,5 +1,5 @@
1
1
  import l, { forwardRef as c } from "react";
2
- import { P as a } from "./index-N2OStZoU.js";
2
+ import { P as a } from "./index--V_ZsiQe.js";
3
3
  function f() {
4
4
  return f = Object.assign || function(e) {
5
5
  for (var o = 1; o < arguments.length; o++) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.2-alpha.21",
5
+ "version": "0.1.2-alpha.23",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
@@ -59,12 +59,12 @@
59
59
  "@radix-ui/react-checkbox": "^1.3.3",
60
60
  "@radix-ui/react-dialog": "^1.1.15",
61
61
  "@radix-ui/react-slider": "^1.3.6",
62
- "@radix-ui/react-slot": "^1.2.3",
62
+ "@radix-ui/react-slot": "^1.2.4",
63
63
  "@radix-ui/react-switch": "^1.2.6",
64
64
  "@radix-ui/react-tabs": "^1.1.13",
65
65
  "@radix-ui/react-toast": "^1.2.15",
66
66
  "@radix-ui/react-tooltip": "^1.2.8",
67
- "@radix-ui/react-visually-hidden": "^1.2.3",
67
+ "@radix-ui/react-visually-hidden": "^1.2.4",
68
68
  "@tanstack/react-table": "^8.21.3",
69
69
  "chart.js": "^4.5.1",
70
70
  "class-variance-authority": "^0.7.1",
@@ -72,13 +72,13 @@
72
72
  "cmdk": "^1.1.1",
73
73
  "countries-and-timezones": "^3.8.0",
74
74
  "js-cookie": "^3.0.5",
75
- "lucide-react": "^0.548.0",
75
+ "lucide-react": "^0.553.0",
76
76
  "react-chartjs-2": "^5.3.1",
77
77
  "react-day-picker": "^9.11.1",
78
78
  "react-feather": "^2.0.10",
79
79
  "react-focus-lock": "^2.13.6",
80
80
  "react-remove-scroll": "^2.7.1",
81
- "tailwind-merge": "^3.3.1"
81
+ "tailwind-merge": "^3.4.0"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@tanstack/react-query": "^5.90",
@@ -115,11 +115,11 @@
115
115
  "devDependencies": {
116
116
  "@faker-js/faker": "^10.1.0",
117
117
  "@rollup/plugin-alias": "^6.0.0",
118
- "@storybook/addon-docs": "^10.0.0",
119
- "@storybook/addon-links": "^10.0.0",
120
- "@storybook/react-vite": "^10.0.0",
121
- "@tailwindcss/vite": "^4.1.16",
122
- "@tanstack/react-query": "^5.90.5",
118
+ "@storybook/addon-docs": "^10.0.6",
119
+ "@storybook/addon-links": "^10.0.6",
120
+ "@storybook/react-vite": "^10.0.6",
121
+ "@tailwindcss/vite": "^4.1.17",
122
+ "@tanstack/react-query": "^5.90.7",
123
123
  "@testing-library/jest-dom": "^6.9.1",
124
124
  "@testing-library/react": "^16.3.0",
125
125
  "@testing-library/user-event": "^14.6.1",
@@ -128,12 +128,12 @@
128
128
  "@types/lodash": "^4.17.20",
129
129
  "@types/react": "^19.2.2",
130
130
  "@types/react-dom": "^19.2.2",
131
- "@typescript-eslint/eslint-plugin": "^8.46.2",
132
- "@typescript-eslint/parser": "^8.46.2",
131
+ "@typescript-eslint/eslint-plugin": "^8.46.4",
132
+ "@typescript-eslint/parser": "^8.46.4",
133
133
  "@vitejs/plugin-react": "^5.1.0",
134
134
  "@vitest/coverage-v8": "^3.2.4",
135
135
  "autoprefixer": "^10.4.21",
136
- "eslint": "^9.38.0",
136
+ "eslint": "^9.39.1",
137
137
  "eslint-plugin-react": "^7.37.5",
138
138
  "eslint-plugin-react-hooks": "^6.1.1",
139
139
  "eslint-plugin-react-refresh": "^0.4.23",
@@ -142,16 +142,16 @@
142
142
  "glob": "^11.0.3",
143
143
  "husky": "^9.1.7",
144
144
  "jest-axe": "^10.0.0",
145
- "jsdom": "^27.0.1",
145
+ "jsdom": "^27.1.0",
146
146
  "lodash": "^4.17.21",
147
147
  "postcss": "^8.5.6",
148
148
  "prettier": "^3.6.2",
149
- "rimraf": "^6.0.1",
150
- "storybook": "^10.0.0",
151
- "tailwindcss": "^4.1.16",
149
+ "rimraf": "^6.1.0",
150
+ "storybook": "^10.0.6",
151
+ "tailwindcss": "^4.1.17",
152
152
  "ts-node": "^10.9.2",
153
153
  "typescript": "^5.9.3",
154
- "vite": "^7.1.12",
154
+ "vite": "^7.2.2",
155
155
  "vite-plugin-dts": "^4.5.4",
156
156
  "vite-plugin-lib-inject-css": "^2.2.2",
157
157
  "vite-plugin-svgr": "^4.5.0",
@@ -1,11 +0,0 @@
1
- import { c as o } from "./createLucideIcon-DGhJ8Z4k.js";
2
- /**
3
- * @license lucide-react v0.548.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], e = o("chevron-down", n);
9
- export {
10
- e as C
11
- };
@@ -1,19 +0,0 @@
1
- import { c as o } from "./createLucideIcon-DGhJ8Z4k.js";
2
- /**
3
- * @license lucide-react v0.548.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], n = o("chevron-left", e);
9
- /**
10
- * @license lucide-react v0.548.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
15
- const t = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], h = o("chevron-right", t);
16
- export {
17
- n as C,
18
- h as a
19
- };
@@ -1,42 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Button as i } from "../Button/Button.js";
3
- import { E as l } from "../../ellipsis-vertical-DpnVYRxI.js";
4
- const m = ({ numberOfRows: r, table: a }) => Array.from({ length: r }).map((d, s) => /* @__PURE__ */ e(
5
- "tr",
6
- {
7
- className: "border border-x-transparent border-t-gray-200 border-b-transparent table w-full table-fixed",
8
- children: a.getAllColumns().map(
9
- (t) => t.id !== "actions" ? /* @__PURE__ */ e(
10
- "td",
11
- {
12
- className: "px-4 py-3 text-xs",
13
- style: { width: t.getSize() },
14
- children: /* @__PURE__ */ e("div", { className: "h-5 bg-gray-200 animate-pulse rounded" })
15
- },
16
- `skeleton-${t.id}`
17
- ) : /* @__PURE__ */ e(
18
- "td",
19
- {
20
- className: "px-4 py-3 text-xs",
21
- style: { width: t.getSize() },
22
- children: /* @__PURE__ */ e(
23
- i,
24
- {
25
- variant: "text",
26
- shape: "circle",
27
- size: "large",
28
- disabled: !0,
29
- "aria-hidden": "true",
30
- children: /* @__PURE__ */ e(l, { className: "w-5 h-5 text-slate-400" })
31
- }
32
- )
33
- },
34
- `skeleton-${t.id}`
35
- )
36
- )
37
- },
38
- `skeleton-row-${s}`
39
- ));
40
- export {
41
- m as Skeleton
42
- };
@@ -1,36 +0,0 @@
1
- import * as c from "react";
2
- import * as f from "react-dom";
3
- import { c as p } from "./index-DQH6odE9.js";
4
- import { jsx as l } from "react/jsx-runtime";
5
- var u = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "select",
20
- "span",
21
- "svg",
22
- "ul"
23
- ], h = u.reduce((t, i) => {
24
- const o = p(`Primitive.${i}`), r = c.forwardRef((e, s) => {
25
- const { asChild: a, ...m } = e, n = a ? o : i;
26
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...m, ref: s });
27
- });
28
- return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
- }, {});
30
- function w(t, i) {
31
- t && f.flushSync(() => t.dispatchEvent(i));
32
- }
33
- export {
34
- h as P,
35
- w as d
36
- };
@@ -1,125 +0,0 @@
1
- import * as c from "react";
2
- import { jsx as x } from "react/jsx-runtime";
3
- function R(e, s) {
4
- const t = c.createContext(s), i = (u) => {
5
- const { children: r, ...o } = u, l = c.useMemo(() => o, Object.values(o));
6
- return /* @__PURE__ */ x(t.Provider, { value: l, children: r });
7
- };
8
- i.displayName = e + "Provider";
9
- function n(u) {
10
- const r = c.useContext(t);
11
- if (r) return r;
12
- if (s !== void 0) return s;
13
- throw new Error(`\`${u}\` must be used within \`${e}\``);
14
- }
15
- return [i, n];
16
- }
17
- function g(e, s = []) {
18
- let t = [];
19
- function i(u, r) {
20
- const o = c.createContext(r), l = t.length;
21
- t = [...t, r];
22
- const d = (f) => {
23
- const { scope: m, children: p, ...v } = f, C = m?.[e]?.[l] || o, h = c.useMemo(() => v, Object.values(v));
24
- return /* @__PURE__ */ x(C.Provider, { value: h, children: p });
25
- };
26
- d.displayName = u + "Provider";
27
- function a(f, m) {
28
- const p = m?.[e]?.[l] || o, v = c.useContext(p);
29
- if (v) return v;
30
- if (r !== void 0) return r;
31
- throw new Error(`\`${f}\` must be used within \`${u}\``);
32
- }
33
- return [d, a];
34
- }
35
- const n = () => {
36
- const u = t.map((r) => c.createContext(r));
37
- return function(o) {
38
- const l = o?.[e] || u;
39
- return c.useMemo(
40
- () => ({ [`__scope${e}`]: { ...o, [e]: l } }),
41
- [o, l]
42
- );
43
- };
44
- };
45
- return n.scopeName = e, [i, S(n, ...s)];
46
- }
47
- function S(...e) {
48
- const s = e[0];
49
- if (e.length === 1) return s;
50
- const t = () => {
51
- const i = e.map((n) => ({
52
- useScope: n(),
53
- scopeName: n.scopeName
54
- }));
55
- return function(u) {
56
- const r = i.reduce((o, { useScope: l, scopeName: d }) => {
57
- const f = l(u)[`__scope${d}`];
58
- return { ...o, ...f };
59
- }, {});
60
- return c.useMemo(() => ({ [`__scope${s.scopeName}`]: r }), [r]);
61
- };
62
- };
63
- return t.scopeName = s.scopeName, t;
64
- }
65
- function _(e, s, { checkForDefaultPrevented: t = !0 } = {}) {
66
- return function(n) {
67
- if (e?.(n), t === !1 || !n.defaultPrevented)
68
- return s?.(n);
69
- };
70
- }
71
- var P = globalThis?.document ? c.useLayoutEffect : () => {
72
- }, b = c[" useInsertionEffect ".trim().toString()] || P;
73
- function y({
74
- prop: e,
75
- defaultProp: s,
76
- onChange: t = () => {
77
- },
78
- caller: i
79
- }) {
80
- const [n, u, r] = w({
81
- defaultProp: s,
82
- onChange: t
83
- }), o = e !== void 0, l = o ? e : n;
84
- {
85
- const a = c.useRef(e !== void 0);
86
- c.useEffect(() => {
87
- const f = a.current;
88
- f !== o && console.warn(
89
- `${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
90
- ), a.current = o;
91
- }, [o, i]);
92
- }
93
- const d = c.useCallback(
94
- (a) => {
95
- if (o) {
96
- const f = E(a) ? a(e) : a;
97
- f !== e && r.current?.(f);
98
- } else
99
- u(a);
100
- },
101
- [o, e, u, r]
102
- );
103
- return [l, d];
104
- }
105
- function w({
106
- defaultProp: e,
107
- onChange: s
108
- }) {
109
- const [t, i] = c.useState(e), n = c.useRef(t), u = c.useRef(s);
110
- return b(() => {
111
- u.current = s;
112
- }, [s]), c.useEffect(() => {
113
- n.current !== t && (u.current?.(t), n.current = t);
114
- }, [t, n]), [t, i, u];
115
- }
116
- function E(e) {
117
- return typeof e == "function";
118
- }
119
- export {
120
- y as a,
121
- _ as b,
122
- g as c,
123
- R as d,
124
- P as u
125
- };
@@ -1,131 +0,0 @@
1
- import { jsx as i, jsxs as O } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { c as w, b as M } from "./index-BfXxHr_2.js";
4
- import { u, b as x } from "./index-DQH6odE9.js";
5
- import { c as A, R as I, P as $, O as L, W as F, C as G, T as W, d as j, b as v, e as B } from "./index-amYX3uxF.js";
6
- import { Button as Y } from "./components/Button/Button.js";
7
- import { cn as k } from "./utils/index.js";
8
- var D = "AlertDialog", [q, le] = w(D, [
9
- A
10
- ]), s = A(), f = (e) => {
11
- const { __scopeAlertDialog: o, ...r } = e, a = s(o);
12
- return /* @__PURE__ */ i(I, { ...a, ...r, modal: !0 });
13
- };
14
- f.displayName = D;
15
- var H = "AlertDialogTrigger", m = l.forwardRef(
16
- (e, o) => {
17
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
18
- return /* @__PURE__ */ i(B, { ...t, ...a, ref: o });
19
- }
20
- );
21
- m.displayName = H;
22
- var V = "AlertDialogPortal", y = (e) => {
23
- const { __scopeAlertDialog: o, ...r } = e, a = s(o);
24
- return /* @__PURE__ */ i($, { ...a, ...r });
25
- };
26
- y.displayName = V;
27
- var z = "AlertDialogOverlay", _ = l.forwardRef(
28
- (e, o) => {
29
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
30
- return /* @__PURE__ */ i(L, { ...t, ...a, ref: o });
31
- }
32
- );
33
- _.displayName = z;
34
- var n = "AlertDialogContent", [J, K] = q(n), Q = x("AlertDialogContent"), N = l.forwardRef(
35
- (e, o) => {
36
- const { __scopeAlertDialog: r, children: a, ...t } = e, d = s(r), p = l.useRef(null), b = u(o, p), g = l.useRef(null);
37
- return /* @__PURE__ */ i(
38
- F,
39
- {
40
- contentName: n,
41
- titleName: h,
42
- docsSlug: "alert-dialog",
43
- children: /* @__PURE__ */ i(J, { scope: r, cancelRef: g, children: /* @__PURE__ */ O(
44
- G,
45
- {
46
- role: "alertdialog",
47
- ...d,
48
- ...t,
49
- ref: b,
50
- onOpenAutoFocus: M(t.onOpenAutoFocus, (c) => {
51
- c.preventDefault(), g.current?.focus({ preventScroll: !0 });
52
- }),
53
- onPointerDownOutside: (c) => c.preventDefault(),
54
- onInteractOutside: (c) => c.preventDefault(),
55
- children: [
56
- /* @__PURE__ */ i(Q, { children: a }),
57
- /* @__PURE__ */ i(X, { contentRef: p })
58
- ]
59
- }
60
- ) })
61
- }
62
- );
63
- }
64
- );
65
- N.displayName = n;
66
- var h = "AlertDialogTitle", C = l.forwardRef(
67
- (e, o) => {
68
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
69
- return /* @__PURE__ */ i(W, { ...t, ...a, ref: o });
70
- }
71
- );
72
- C.displayName = h;
73
- var R = "AlertDialogDescription", E = l.forwardRef((e, o) => {
74
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
75
- return /* @__PURE__ */ i(j, { ...t, ...a, ref: o });
76
- });
77
- E.displayName = R;
78
- var U = "AlertDialogAction", P = l.forwardRef(
79
- (e, o) => {
80
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
81
- return /* @__PURE__ */ i(v, { ...t, ...a, ref: o });
82
- }
83
- );
84
- P.displayName = U;
85
- var S = "AlertDialogCancel", T = l.forwardRef(
86
- (e, o) => {
87
- const { __scopeAlertDialog: r, ...a } = e, { cancelRef: t } = K(S, r), d = s(r), p = u(o, t);
88
- return /* @__PURE__ */ i(v, { ...d, ...a, ref: p });
89
- }
90
- );
91
- T.displayName = S;
92
- var X = ({ contentRef: e }) => {
93
- const o = `\`${n}\` requires a description for the component to be accessible for screen reader users.
94
-
95
- You can add a description to the \`${n}\` by passing a \`${R}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
96
-
97
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${n}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
98
-
99
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
100
- return l.useEffect(() => {
101
- document.getElementById(
102
- e.current?.getAttribute("aria-describedby")
103
- ) || console.warn(o);
104
- }, [o, e]), null;
105
- }, se = f, Z = m, ne = y, ce = _, pe = N, de = P, ge = T, ue = C, Ae = E;
106
- const ve = ({
107
- "data-theme": e,
108
- className: o,
109
- text: r,
110
- onOpen: a
111
- }) => /* @__PURE__ */ i(Z, { asChild: !0, children: /* @__PURE__ */ i(
112
- Y,
113
- {
114
- type: "button",
115
- "data-theme": e,
116
- className: k(o),
117
- onClick: a,
118
- children: r
119
- }
120
- ) });
121
- export {
122
- ve as A,
123
- pe as C,
124
- Ae as D,
125
- ce as O,
126
- ne as P,
127
- se as R,
128
- ue as T,
129
- ge as a,
130
- de as b
131
- };
@@ -1,47 +0,0 @@
1
- import r from "react";
2
- import { c as y } from "./index-BfXxHr_2.js";
3
- import { u as M, c as x } from "./index-DQH6odE9.js";
4
- import { jsx as d } from "react/jsx-runtime";
5
- function D(s) {
6
- const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
7
- f,
8
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
9
- ), p = (c) => {
10
- const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
11
- return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
12
- };
13
- p.displayName = f;
14
- const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
15
- (c, e) => {
16
- const { scope: l, children: o } = c, t = m(a, l), n = M(e, t.collectionRef);
17
- return /* @__PURE__ */ d(E, { ref: n, children: o });
18
- }
19
- );
20
- C.displayName = a;
21
- const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(u), I = r.forwardRef(
22
- (c, e) => {
23
- const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = m(u, l);
24
- return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
25
- }
26
- );
27
- I.displayName = u;
28
- function O(c) {
29
- const e = m(s + "CollectionConsumer", c);
30
- return r.useCallback(() => {
31
- const o = e.collectionRef.current;
32
- if (!o) return [];
33
- const t = Array.from(o.querySelectorAll(`[${R}]`));
34
- return Array.from(e.itemMap.values()).sort(
35
- (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
36
- );
37
- }, [e.collectionRef, e.itemMap]);
38
- }
39
- return [
40
- { Provider: p, Slot: C, ItemSlot: I },
41
- O,
42
- N
43
- ];
44
- }
45
- export {
46
- D as c
47
- };
@@ -1,82 +0,0 @@
1
- import * as i from "react";
2
- import { jsx as f, Fragment as g } from "react/jsx-runtime";
3
- function d(e, n) {
4
- if (typeof e == "function")
5
- return e(n);
6
- e != null && (e.current = n);
7
- }
8
- function m(...e) {
9
- return (n) => {
10
- let r = !1;
11
- const o = e.map((t) => {
12
- const l = d(t, n);
13
- return !r && typeof l == "function" && (r = !0), l;
14
- });
15
- if (r)
16
- return () => {
17
- for (let t = 0; t < o.length; t++) {
18
- const l = o[t];
19
- typeof l == "function" ? l() : d(e[t], null);
20
- }
21
- };
22
- };
23
- }
24
- function x(...e) {
25
- return i.useCallback(m(...e), e);
26
- }
27
- // @__NO_SIDE_EFFECTS__
28
- function C(e) {
29
- const n = /* @__PURE__ */ b(e), r = i.forwardRef((o, t) => {
30
- const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(E);
31
- if (c) {
32
- const u = c.props.children, S = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
33
- return /* @__PURE__ */ f(n, { ...a, ref: t, children: i.isValidElement(u) ? i.cloneElement(u, void 0, S) : null });
34
- }
35
- return /* @__PURE__ */ f(n, { ...a, ref: t, children: l });
36
- });
37
- return r.displayName = `${e}.Slot`, r;
38
- }
39
- var I = /* @__PURE__ */ C("Slot");
40
- // @__NO_SIDE_EFFECTS__
41
- function b(e) {
42
- const n = i.forwardRef((r, o) => {
43
- const { children: t, ...l } = r;
44
- if (i.isValidElement(t)) {
45
- const a = h(t), s = R(l, t.props);
46
- return t.type !== i.Fragment && (s.ref = o ? m(o, a) : a), i.cloneElement(t, s);
47
- }
48
- return i.Children.count(t) > 1 ? i.Children.only(null) : null;
49
- });
50
- return n.displayName = `${e}.SlotClone`, n;
51
- }
52
- var y = Symbol("radix.slottable");
53
- // @__NO_SIDE_EFFECTS__
54
- function V(e) {
55
- const n = ({ children: r }) => /* @__PURE__ */ f(g, { children: r });
56
- return n.displayName = `${e}.Slottable`, n.__radixId = y, n;
57
- }
58
- function E(e) {
59
- return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === y;
60
- }
61
- function R(e, n) {
62
- const r = { ...n };
63
- for (const o in n) {
64
- const t = e[o], l = n[o];
65
- /^on[A-Z]/.test(o) ? t && l ? r[o] = (...s) => {
66
- const c = l(...s);
67
- return t(...s), c;
68
- } : t && (r[o] = t) : o === "style" ? r[o] = { ...t, ...l } : o === "className" && (r[o] = [t, l].filter(Boolean).join(" "));
69
- }
70
- return { ...e, ...r };
71
- }
72
- function h(e) {
73
- let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
74
- return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
75
- }
76
- export {
77
- I as S,
78
- m as a,
79
- V as b,
80
- C as c,
81
- x as u
82
- };
@@ -1,15 +0,0 @@
1
- import * as o from "react";
2
- import n from "react-dom";
3
- import { P as f } from "./index-BVRIAMfe.js";
4
- import { u as c } from "./index-BfXxHr_2.js";
5
- import { jsx as l } from "react/jsx-runtime";
6
- var u = "Portal", p = o.forwardRef((r, a) => {
7
- const { container: e, ...s } = r, [i, m] = o.useState(!1);
8
- c(() => m(!0), []);
9
- const t = e || i && globalThis?.document?.body;
10
- return t ? n.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
11
- });
12
- p.displayName = u;
13
- export {
14
- p as P
15
- };