@gardenfi/garden-book 0.2.31 → 0.3.0-beta.2

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 (147) hide show
  1. package/dist/BulletList/BulletList.d.ts +21 -0
  2. package/dist/BulletList/index.d.ts +2 -0
  3. package/dist/BulletList/index.js +31 -0
  4. package/dist/CardList/CardList.d.ts +32 -0
  5. package/dist/CardList/index.d.ts +2 -0
  6. package/dist/CardList/index.js +141 -0
  7. package/dist/Checkbox/Checkbox.js +7 -0
  8. package/dist/Checkbox/RadixCheckbox.d.ts +3 -0
  9. package/dist/Checkbox/RadixCheckbox.js +27 -0
  10. package/dist/Checkbox/index.d.ts +1 -0
  11. package/dist/Checkbox/index.js +4 -5
  12. package/dist/DashboardLayout/DashboardLayout.d.ts +23 -0
  13. package/dist/DashboardLayout/DashboardNavbar.d.ts +11 -0
  14. package/dist/DashboardLayout/DashboardNavbar.js +32 -0
  15. package/dist/DashboardLayout/DashboardSidebar.d.ts +30 -0
  16. package/dist/DashboardLayout/DashboardSidebar.js +139 -0
  17. package/dist/DashboardLayout/MobileMenu.d.ts +11 -0
  18. package/dist/DashboardLayout/MobileMenu.js +126 -0
  19. package/dist/DashboardLayout/PageHeader.d.ts +13 -0
  20. package/dist/DashboardLayout/PageHeader.js +47 -0
  21. package/dist/DashboardLayout/index.d.ts +10 -0
  22. package/dist/DashboardLayout/index.js +93 -0
  23. package/dist/DataTable/DataTable.d.ts +50 -0
  24. package/dist/DataTable/Table.d.ts +7 -0
  25. package/dist/DataTable/Table.js +57 -0
  26. package/dist/DataTable/index.d.ts +2 -0
  27. package/dist/DataTable/index.js +269 -0
  28. package/dist/DataTable/useAnimatedTable.d.ts +8 -0
  29. package/dist/DataTable/useAnimatedTable.js +44 -0
  30. package/dist/DirectionalIconHover/DirectionalIconHover.d.ts +12 -0
  31. package/dist/DirectionalIconHover/index.d.ts +2 -0
  32. package/dist/DirectionalIconHover/index.js +72 -0
  33. package/dist/EmptyState/EmptyState.d.ts +20 -0
  34. package/dist/EmptyState/index.d.ts +2 -0
  35. package/dist/EmptyState/index.js +35 -0
  36. package/dist/ErrorState/ErrorState.d.ts +17 -0
  37. package/dist/ErrorState/errorMessages.d.ts +2 -0
  38. package/dist/ErrorState/errorMessages.js +13 -0
  39. package/dist/ErrorState/index.d.ts +2 -0
  40. package/dist/ErrorState/index.js +37 -0
  41. package/dist/Field/Field.d.ts +14 -0
  42. package/dist/Field/index.d.ts +2 -0
  43. package/dist/Field/index.js +14 -0
  44. package/dist/HamburgerIcon/HamburgerIcon.d.ts +5 -0
  45. package/dist/HamburgerIcon/index.d.ts +2 -0
  46. package/dist/HamburgerIcon/index.js +47 -0
  47. package/dist/InfoTooltip/InfoTooltip.d.ts +22 -0
  48. package/dist/InfoTooltip/index.d.ts +2 -0
  49. package/dist/InfoTooltip/index.js +81 -0
  50. package/dist/Input/Input.d.ts +19 -0
  51. package/dist/Input/index.d.ts +2 -0
  52. package/dist/Input/index.js +113 -0
  53. package/dist/Logo/index.d.ts +0 -1
  54. package/dist/Logo/index.js +8 -10
  55. package/dist/OTPInput/OTPInput.d.ts +11 -0
  56. package/dist/OTPInput/index.d.ts +2 -0
  57. package/dist/OTPInput/index.js +88 -0
  58. package/dist/Pagination/Pagination.d.ts +16 -0
  59. package/dist/Pagination/index.d.ts +2 -0
  60. package/dist/Pagination/index.js +111 -0
  61. package/dist/Portal/Portal.d.ts +8 -0
  62. package/dist/Portal/index.d.ts +2 -0
  63. package/dist/Portal/index.js +11 -0
  64. package/dist/ResponsiveModal/ResponsiveModal.d.ts +14 -0
  65. package/dist/ResponsiveModal/index.d.ts +2 -0
  66. package/dist/ResponsiveModal/index.js +62 -0
  67. package/dist/SelectDropdown/SelectDropdown.d.ts +41 -0
  68. package/dist/SelectDropdown/index.d.ts +2 -0
  69. package/dist/SelectDropdown/index.js +195 -0
  70. package/dist/Skeleton/Skeleton.d.ts +3 -0
  71. package/dist/Skeleton/index.d.ts +2 -0
  72. package/dist/Skeleton/index.js +12 -0
  73. package/dist/StatCard/StatCard.d.ts +20 -0
  74. package/dist/StatCard/index.d.ts +2 -0
  75. package/dist/StatCard/index.js +42 -0
  76. package/dist/StateContainer/StateContainer.d.ts +8 -0
  77. package/dist/StateContainer/index.d.ts +2 -0
  78. package/dist/StateContainer/index.js +15 -0
  79. package/dist/StatusChip/StatusChip.d.ts +11 -0
  80. package/dist/StatusChip/index.d.ts +2 -0
  81. package/dist/StatusChip/index.js +33 -0
  82. package/dist/Switch/Switch.d.ts +3 -0
  83. package/dist/Switch/index.d.ts +1 -0
  84. package/dist/Switch/index.js +31 -0
  85. package/dist/Toast/Toast.d.ts +15 -0
  86. package/dist/Toast/Toast.js +93 -0
  87. package/dist/Toast/Toaster.d.ts +5 -0
  88. package/dist/Toast/Toaster.js +30 -0
  89. package/dist/Toast/index.d.ts +5 -0
  90. package/dist/Toast/index.js +16 -0
  91. package/dist/Toast/useToast.d.ts +46 -0
  92. package/dist/Toast/useToast.js +76 -0
  93. package/dist/ToggleGroup/ToggleGroup.d.ts +15 -0
  94. package/dist/ToggleGroup/index.d.ts +2 -0
  95. package/dist/ToggleGroup/index.js +57 -0
  96. package/dist/Typography/Typography.d.ts +2 -2
  97. package/dist/Viewport/Viewport.d.ts +11 -0
  98. package/dist/Viewport/index.d.ts +2 -0
  99. package/dist/Viewport/index.js +7 -0
  100. package/dist/index.d.ts +24 -0
  101. package/dist/index.js +386 -314
  102. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +532 -0
  103. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
  104. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +232 -0
  105. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  106. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
  107. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  108. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +251 -0
  109. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  110. package/dist/node_modules/@radix-ui/{react-slot → react-collection/node_modules/@radix-ui/react-slot}/dist/index.js +1 -1
  111. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +1 -1
  112. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
  113. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  114. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +29 -26
  115. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +208 -0
  116. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +624 -0
  117. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
  118. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +221 -0
  119. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
  120. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
  121. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
  122. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +132 -0
  123. package/dist/node_modules/@radix-ui/react-toast/dist/index.js +446 -0
  124. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +330 -0
  125. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +11 -0
  126. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
  127. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  128. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +32 -0
  129. package/dist/node_modules/lucide-react/dist/esm/Icon.js +40 -0
  130. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +23 -0
  131. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
  132. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down.js +14 -0
  133. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js +16 -0
  134. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up.js +14 -0
  135. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +11 -0
  136. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +13 -0
  137. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +11 -0
  138. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +15 -0
  139. package/dist/node_modules/lucide-react/dist/esm/icons/eye-off.js +28 -0
  140. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +20 -0
  141. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +15 -0
  142. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +14 -0
  143. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +11 -0
  144. package/dist/style.css +1 -1
  145. package/package.json +12 -3
  146. package/dist/Logo/Code4renaLogo.d.ts +0 -5
  147. package/dist/Logo/Code4renaLogo.js +0 -45
@@ -0,0 +1,136 @@
1
+ function u() {
2
+ return typeof window < "u";
3
+ }
4
+ function a(t) {
5
+ return m(t) ? (t.nodeName || "").toLowerCase() : "#document";
6
+ }
7
+ function i(t) {
8
+ var n;
9
+ return (t == null || (n = t.ownerDocument) == null ? void 0 : n.defaultView) || window;
10
+ }
11
+ function L(t) {
12
+ var n;
13
+ return (n = (m(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : n.documentElement;
14
+ }
15
+ function m(t) {
16
+ return u() ? t instanceof Node || t instanceof i(t).Node : !1;
17
+ }
18
+ function h(t) {
19
+ return u() ? t instanceof Element || t instanceof i(t).Element : !1;
20
+ }
21
+ function g(t) {
22
+ return u() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
23
+ }
24
+ function p(t) {
25
+ return !u() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
26
+ }
27
+ function y(t) {
28
+ const {
29
+ overflow: n,
30
+ overflowX: r,
31
+ overflowY: c,
32
+ display: e
33
+ } = b(t);
34
+ return /auto|scroll|overlay|hidden|clip/.test(n + c + r) && e !== "inline" && e !== "contents";
35
+ }
36
+ function _(t) {
37
+ return /^(table|td|th)$/.test(a(t));
38
+ }
39
+ function T(t) {
40
+ try {
41
+ if (t.matches(":popover-open"))
42
+ return !0;
43
+ } catch {
44
+ }
45
+ try {
46
+ return t.matches(":modal");
47
+ } catch {
48
+ return !1;
49
+ }
50
+ }
51
+ const v = /transform|translate|scale|rotate|perspective|filter/, C = /paint|layout|strict|content/, o = (t) => !!t && t !== "none";
52
+ let s;
53
+ function D(t) {
54
+ const n = h(t) ? b(t) : t;
55
+ return o(n.transform) || o(n.translate) || o(n.scale) || o(n.rotate) || o(n.perspective) || !R() && (o(n.backdropFilter) || o(n.filter)) || v.test(n.willChange || "") || C.test(n.contain || "");
56
+ }
57
+ function W(t) {
58
+ let n = f(t);
59
+ for (; g(n) && !N(n); ) {
60
+ if (D(n))
61
+ return n;
62
+ if (T(n))
63
+ return null;
64
+ n = f(n);
65
+ }
66
+ return null;
67
+ }
68
+ function R() {
69
+ return s == null && (s = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), s;
70
+ }
71
+ function N(t) {
72
+ return /^(html|body|#document)$/.test(a(t));
73
+ }
74
+ function b(t) {
75
+ return i(t).getComputedStyle(t);
76
+ }
77
+ function $(t) {
78
+ return h(t) ? {
79
+ scrollLeft: t.scrollLeft,
80
+ scrollTop: t.scrollTop
81
+ } : {
82
+ scrollLeft: t.scrollX,
83
+ scrollTop: t.scrollY
84
+ };
85
+ }
86
+ function f(t) {
87
+ if (a(t) === "html")
88
+ return t;
89
+ const n = (
90
+ // Step into the shadow DOM of the parent of a slotted node.
91
+ t.assignedSlot || // DOM Element detected.
92
+ t.parentNode || // ShadowRoot detected.
93
+ p(t) && t.host || // Fallback.
94
+ L(t)
95
+ );
96
+ return p(n) ? n.host : n;
97
+ }
98
+ function S(t) {
99
+ const n = f(t);
100
+ return N(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : g(n) && y(n) ? n : S(n);
101
+ }
102
+ function w(t, n, r) {
103
+ var c;
104
+ n === void 0 && (n = []), r === void 0 && (r = !0);
105
+ const e = S(t), E = e === ((c = t.ownerDocument) == null ? void 0 : c.body), l = i(e);
106
+ if (E) {
107
+ const d = k(l);
108
+ return n.concat(l, l.visualViewport || [], y(e) ? e : [], d && r ? w(d) : []);
109
+ } else
110
+ return n.concat(e, w(e, [], r));
111
+ }
112
+ function k(t) {
113
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
114
+ }
115
+ export {
116
+ b as getComputedStyle,
117
+ W as getContainingBlock,
118
+ L as getDocumentElement,
119
+ k as getFrameElement,
120
+ S as getNearestOverflowAncestor,
121
+ a as getNodeName,
122
+ $ as getNodeScroll,
123
+ w as getOverflowAncestors,
124
+ f as getParentNode,
125
+ i as getWindow,
126
+ D as isContainingBlock,
127
+ h as isElement,
128
+ g as isHTMLElement,
129
+ N as isLastTraversableNode,
130
+ m as isNode,
131
+ y as isOverflowElement,
132
+ p as isShadowRoot,
133
+ _ as isTableElement,
134
+ T as isTopLayer,
135
+ R as isWebKit
136
+ };
@@ -0,0 +1,128 @@
1
+ const S = ["top", "right", "bottom", "left"], m = Math.min, h = Math.max, w = Math.round, C = Math.floor, j = (t) => ({
2
+ x: t,
3
+ y: t
4
+ }), p = {
5
+ left: "right",
6
+ right: "left",
7
+ bottom: "top",
8
+ top: "bottom"
9
+ };
10
+ function L(t, n, e) {
11
+ return h(t, m(n, e));
12
+ }
13
+ function E(t, n) {
14
+ return typeof t == "function" ? t(n) : t;
15
+ }
16
+ function g(t) {
17
+ return t.split("-")[0];
18
+ }
19
+ function a(t) {
20
+ return t.split("-")[1];
21
+ }
22
+ function x(t) {
23
+ return t === "x" ? "y" : "x";
24
+ }
25
+ function b(t) {
26
+ return t === "y" ? "height" : "width";
27
+ }
28
+ function d(t) {
29
+ const n = t[0];
30
+ return n === "t" || n === "b" ? "y" : "x";
31
+ }
32
+ function A(t) {
33
+ return x(d(t));
34
+ }
35
+ function R(t, n, e) {
36
+ e === void 0 && (e = !1);
37
+ const r = a(t), i = A(t), o = b(i);
38
+ let c = i === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
39
+ return n.reference[o] > n.floating[o] && (c = f(c)), [c, f(c)];
40
+ }
41
+ function T(t) {
42
+ const n = f(t);
43
+ return [s(t), n, s(n)];
44
+ }
45
+ function s(t) {
46
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
47
+ }
48
+ const u = ["left", "right"], l = ["right", "left"], P = ["top", "bottom"], y = ["bottom", "top"];
49
+ function O(t, n, e) {
50
+ switch (t) {
51
+ case "top":
52
+ case "bottom":
53
+ return e ? n ? l : u : n ? u : l;
54
+ case "left":
55
+ case "right":
56
+ return n ? P : y;
57
+ default:
58
+ return [];
59
+ }
60
+ }
61
+ function k(t, n, e, r) {
62
+ const i = a(t);
63
+ let o = O(g(t), e === "start", r);
64
+ return i && (o = o.map((c) => c + "-" + i), n && (o = o.concat(o.map(s)))), o;
65
+ }
66
+ function f(t) {
67
+ const n = g(t);
68
+ return p[n] + t.slice(n.length);
69
+ }
70
+ function M(t) {
71
+ return {
72
+ top: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ left: 0,
76
+ ...t
77
+ };
78
+ }
79
+ function q(t) {
80
+ return typeof t != "number" ? M(t) : {
81
+ top: t,
82
+ right: t,
83
+ bottom: t,
84
+ left: t
85
+ };
86
+ }
87
+ function z(t) {
88
+ const {
89
+ x: n,
90
+ y: e,
91
+ width: r,
92
+ height: i
93
+ } = t;
94
+ return {
95
+ width: r,
96
+ height: i,
97
+ top: e,
98
+ left: n,
99
+ right: n + r,
100
+ bottom: e + i,
101
+ x: n,
102
+ y: e
103
+ };
104
+ }
105
+ export {
106
+ L as clamp,
107
+ j as createCoords,
108
+ E as evaluate,
109
+ M as expandPaddingObject,
110
+ C as floor,
111
+ a as getAlignment,
112
+ A as getAlignmentAxis,
113
+ R as getAlignmentSides,
114
+ b as getAxisLength,
115
+ T as getExpandedPlacements,
116
+ s as getOppositeAlignmentPlacement,
117
+ x as getOppositeAxis,
118
+ k as getOppositeAxisPlacements,
119
+ f as getOppositePlacement,
120
+ q as getPaddingObject,
121
+ g as getSide,
122
+ d as getSideAxis,
123
+ h as max,
124
+ m as min,
125
+ z as rectToClientRect,
126
+ w as round,
127
+ S as sides
128
+ };
@@ -0,0 +1,24 @@
1
+ import * as n from "react";
2
+ import { Primitive as p } from "../../react-primitive/dist/index.js";
3
+ import { jsx as o } from "react/jsx-runtime";
4
+ var v = "Arrow", e = n.forwardRef((r, i) => {
5
+ const { children: t, width: a = 10, height: s = 5, ...m } = r;
6
+ return /* @__PURE__ */ o(
7
+ p.svg,
8
+ {
9
+ ...m,
10
+ ref: i,
11
+ width: a,
12
+ height: s,
13
+ viewBox: "0 0 30 10",
14
+ preserveAspectRatio: "none",
15
+ children: r.asChild ? t : /* @__PURE__ */ o("polygon", { points: "0,0 30,0 15,10" })
16
+ }
17
+ );
18
+ });
19
+ e.displayName = v;
20
+ var h = e;
21
+ export {
22
+ e as Arrow,
23
+ h as Root
24
+ };
@@ -0,0 +1,251 @@
1
+ import * as s from "react";
2
+ import { useComposedRefs as B } from "../../react-compose-refs/dist/index.js";
3
+ import { createContextScope as L } from "../../react-context/dist/index.js";
4
+ import { composeEventHandlers as S } from "../../primitive/dist/index.js";
5
+ import { useControllableState as O } from "../../react-use-controllable-state/dist/index.js";
6
+ import { usePrevious as j } from "../../react-use-previous/dist/index.js";
7
+ import { useSize as H } from "../../react-use-size/dist/index.js";
8
+ import { Presence as z } from "../../react-presence/dist/index.js";
9
+ import { Primitive as P } from "../../react-primitive/dist/index.js";
10
+ import { jsx as b, jsxs as G, Fragment as K } from "react/jsx-runtime";
11
+ var g = "Checkbox", [U] = L(g), [X, E] = U(g);
12
+ function J(t) {
13
+ const {
14
+ __scopeCheckbox: a,
15
+ checked: c,
16
+ children: u,
17
+ defaultChecked: r,
18
+ disabled: e,
19
+ form: p,
20
+ name: f,
21
+ onCheckedChange: i,
22
+ required: m,
23
+ value: C = "on",
24
+ // @ts-expect-error
25
+ internal_do_not_use_render: d
26
+ } = t, [l, v] = O({
27
+ prop: c,
28
+ defaultProp: r ?? !1,
29
+ onChange: i,
30
+ caller: g
31
+ }), [k, x] = s.useState(null), [_, o] = s.useState(null), n = s.useRef(!1), I = k ? !!p || !!k.closest("form") : (
32
+ // We set this to true by default so that events bubble to forms without JS (SSR)
33
+ !0
34
+ ), R = {
35
+ checked: l,
36
+ disabled: e,
37
+ setChecked: v,
38
+ control: k,
39
+ setControl: x,
40
+ name: f,
41
+ form: p,
42
+ value: C,
43
+ hasConsumerStoppedPropagationRef: n,
44
+ required: m,
45
+ defaultChecked: h(r) ? !1 : r,
46
+ isFormControl: I,
47
+ bubbleInput: _,
48
+ setBubbleInput: o
49
+ };
50
+ return /* @__PURE__ */ b(
51
+ X,
52
+ {
53
+ scope: a,
54
+ ...R,
55
+ children: W(d) ? d(R) : u
56
+ }
57
+ );
58
+ }
59
+ var N = "CheckboxTrigger", w = s.forwardRef(
60
+ ({ __scopeCheckbox: t, onKeyDown: a, onClick: c, ...u }, r) => {
61
+ const {
62
+ control: e,
63
+ value: p,
64
+ disabled: f,
65
+ checked: i,
66
+ required: m,
67
+ setControl: C,
68
+ setChecked: d,
69
+ hasConsumerStoppedPropagationRef: l,
70
+ isFormControl: v,
71
+ bubbleInput: k
72
+ } = E(N, t), x = B(r, C), _ = s.useRef(i);
73
+ return s.useEffect(() => {
74
+ const o = e == null ? void 0 : e.form;
75
+ if (o) {
76
+ const n = () => d(_.current);
77
+ return o.addEventListener("reset", n), () => o.removeEventListener("reset", n);
78
+ }
79
+ }, [e, d]), /* @__PURE__ */ b(
80
+ P.button,
81
+ {
82
+ type: "button",
83
+ role: "checkbox",
84
+ "aria-checked": h(i) ? "mixed" : i,
85
+ "aria-required": m,
86
+ "data-state": A(i),
87
+ "data-disabled": f ? "" : void 0,
88
+ disabled: f,
89
+ value: p,
90
+ ...u,
91
+ ref: x,
92
+ onKeyDown: S(a, (o) => {
93
+ o.key === "Enter" && o.preventDefault();
94
+ }),
95
+ onClick: S(c, (o) => {
96
+ d((n) => h(n) ? !0 : !n), k && v && (l.current = o.isPropagationStopped(), l.current || o.stopPropagation());
97
+ })
98
+ }
99
+ );
100
+ }
101
+ );
102
+ w.displayName = N;
103
+ var Q = s.forwardRef(
104
+ (t, a) => {
105
+ const {
106
+ __scopeCheckbox: c,
107
+ name: u,
108
+ checked: r,
109
+ defaultChecked: e,
110
+ required: p,
111
+ disabled: f,
112
+ value: i,
113
+ onCheckedChange: m,
114
+ form: C,
115
+ ...d
116
+ } = t;
117
+ return /* @__PURE__ */ b(
118
+ J,
119
+ {
120
+ __scopeCheckbox: c,
121
+ checked: r,
122
+ defaultChecked: e,
123
+ disabled: f,
124
+ required: p,
125
+ onCheckedChange: m,
126
+ name: u,
127
+ form: C,
128
+ value: i,
129
+ internal_do_not_use_render: ({ isFormControl: l }) => /* @__PURE__ */ G(K, { children: [
130
+ /* @__PURE__ */ b(
131
+ w,
132
+ {
133
+ ...d,
134
+ ref: a,
135
+ __scopeCheckbox: c
136
+ }
137
+ ),
138
+ l && /* @__PURE__ */ b(
139
+ q,
140
+ {
141
+ __scopeCheckbox: c
142
+ }
143
+ )
144
+ ] })
145
+ }
146
+ );
147
+ }
148
+ );
149
+ Q.displayName = g;
150
+ var T = "CheckboxIndicator", V = s.forwardRef(
151
+ (t, a) => {
152
+ const { __scopeCheckbox: c, forceMount: u, ...r } = t, e = E(T, c);
153
+ return /* @__PURE__ */ b(
154
+ z,
155
+ {
156
+ present: u || h(e.checked) || e.checked === !0,
157
+ children: /* @__PURE__ */ b(
158
+ P.span,
159
+ {
160
+ "data-state": A(e.checked),
161
+ "data-disabled": e.disabled ? "" : void 0,
162
+ ...r,
163
+ ref: a,
164
+ style: { pointerEvents: "none", ...t.style }
165
+ }
166
+ )
167
+ }
168
+ );
169
+ }
170
+ );
171
+ V.displayName = T;
172
+ var M = "CheckboxBubbleInput", q = s.forwardRef(
173
+ ({ __scopeCheckbox: t, ...a }, c) => {
174
+ const {
175
+ control: u,
176
+ hasConsumerStoppedPropagationRef: r,
177
+ checked: e,
178
+ defaultChecked: p,
179
+ required: f,
180
+ disabled: i,
181
+ name: m,
182
+ value: C,
183
+ form: d,
184
+ bubbleInput: l,
185
+ setBubbleInput: v
186
+ } = E(M, t), k = B(c, v), x = j(e), _ = H(u);
187
+ s.useEffect(() => {
188
+ const n = l;
189
+ if (!n) return;
190
+ const I = window.HTMLInputElement.prototype, y = Object.getOwnPropertyDescriptor(
191
+ I,
192
+ "checked"
193
+ ).set, D = !r.current;
194
+ if (x !== e && y) {
195
+ const F = new Event("click", { bubbles: D });
196
+ n.indeterminate = h(e), y.call(n, h(e) ? !1 : e), n.dispatchEvent(F);
197
+ }
198
+ }, [l, x, e, r]);
199
+ const o = s.useRef(h(e) ? !1 : e);
200
+ return /* @__PURE__ */ b(
201
+ P.input,
202
+ {
203
+ type: "checkbox",
204
+ "aria-hidden": !0,
205
+ defaultChecked: p ?? o.current,
206
+ required: f,
207
+ disabled: i,
208
+ name: m,
209
+ value: C,
210
+ form: d,
211
+ ...a,
212
+ tabIndex: -1,
213
+ ref: k,
214
+ style: {
215
+ ...a.style,
216
+ ..._,
217
+ position: "absolute",
218
+ pointerEvents: "none",
219
+ opacity: 0,
220
+ margin: 0,
221
+ // We transform because the input is absolutely positioned but we have
222
+ // rendered it **after** the button. This pulls it back to sit on top
223
+ // of the button.
224
+ transform: "translateX(-100%)"
225
+ }
226
+ }
227
+ );
228
+ }
229
+ );
230
+ q.displayName = M;
231
+ function W(t) {
232
+ return typeof t == "function";
233
+ }
234
+ function h(t) {
235
+ return t === "indeterminate";
236
+ }
237
+ function A(t) {
238
+ return h(t) ? "indeterminate" : t ? "checked" : "unchecked";
239
+ }
240
+ export {
241
+ Q as Checkbox,
242
+ V as CheckboxIndicator,
243
+ V as Indicator,
244
+ Q as Root,
245
+ q as unstable_BubbleInput,
246
+ q as unstable_CheckboxBubbleInput,
247
+ J as unstable_CheckboxProvider,
248
+ w as unstable_CheckboxTrigger,
249
+ J as unstable_Provider,
250
+ w as unstable_Trigger
251
+ };
@@ -0,0 +1,48 @@
1
+ import r from "react";
2
+ import { createContextScope as y } from "../../react-context/dist/index.js";
3
+ import { useComposedRefs as M } from "../../react-compose-refs/dist/index.js";
4
+ import { createSlot as x } from "../node_modules/@radix-ui/react-slot/dist/index.js";
5
+ import { jsx as u } from "react/jsx-runtime";
6
+ function g(s) {
7
+ const m = s + "CollectionProvider", [A, N] = y(m), [_, f] = A(
8
+ m,
9
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
+ ), p = (c) => {
11
+ const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
12
+ return /* @__PURE__ */ u(_, { scope: e, itemMap: t, collectionRef: o, children: l });
13
+ };
14
+ p.displayName = m;
15
+ const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
16
+ (c, e) => {
17
+ const { scope: l, children: o } = c, t = f(a, l), n = M(e, t.collectionRef);
18
+ return /* @__PURE__ */ u(E, { ref: n, children: o });
19
+ }
20
+ );
21
+ C.displayName = a;
22
+ const d = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(d), I = r.forwardRef(
23
+ (c, e) => {
24
+ const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(d, l);
25
+ return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ u(T, { [R]: "", ref: S, children: o });
26
+ }
27
+ );
28
+ I.displayName = d;
29
+ function O(c) {
30
+ const e = f(s + "CollectionConsumer", c);
31
+ return r.useCallback(() => {
32
+ const o = e.collectionRef.current;
33
+ if (!o) return [];
34
+ const t = Array.from(o.querySelectorAll(`[${R}]`));
35
+ return Array.from(e.itemMap.values()).sort(
36
+ (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
37
+ );
38
+ }, [e.collectionRef, e.itemMap]);
39
+ }
40
+ return [
41
+ { Provider: p, Slot: C, ItemSlot: I },
42
+ O,
43
+ N
44
+ ];
45
+ }
46
+ export {
47
+ g as createCollection
48
+ };
@@ -1,5 +1,5 @@
1
1
  import * as l from "react";
2
- import { composeRefs as m } from "../../react-compose-refs/dist/index.js";
2
+ import { composeRefs as m } from "../../../../../react-compose-refs/dist/index.js";
3
3
  import { jsx as u } from "react/jsx-runtime";
4
4
  // @__NO_SIDE_EFFECTS__
5
5
  function b(e) {
@@ -12,7 +12,7 @@ import { Primitive as m } from "../../react-primitive/dist/index.js";
12
12
  import { useFocusGuards as K } from "../../react-focus-guards/dist/index.js";
13
13
  import { RemoveScroll as U } from "react-remove-scroll";
14
14
  import { hideOthers as Y } from "../../../aria-hidden/dist/es2015/index.js";
15
- import { createSlot as Z } from "../../react-slot/dist/index.js";
15
+ import { createSlot as Z } from "../node_modules/@radix-ui/react-slot/dist/index.js";
16
16
  import { jsx as i, jsxs as P, Fragment as O } from "react/jsx-runtime";
17
17
  var v = "Dialog", [I] = $(v), [z, u] = I(v), x = (e) => {
18
18
  const {
@@ -0,0 +1,50 @@
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "../../../../../react-compose-refs/dist/index.js";
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function b(e) {
6
+ const n = /* @__PURE__ */ y(e), o = l.forwardRef((t, r) => {
7
+ const { children: i, ...c } = t, s = l.Children.toArray(i), a = s.find(E);
8
+ if (a) {
9
+ const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
+ return /* @__PURE__ */ u(n, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
11
+ }
12
+ return /* @__PURE__ */ u(n, { ...c, ref: r, children: i });
13
+ });
14
+ return o.displayName = `${e}.Slot`, o;
15
+ }
16
+ // @__NO_SIDE_EFFECTS__
17
+ function y(e) {
18
+ const n = l.forwardRef((o, t) => {
19
+ const { children: r, ...i } = o;
20
+ if (l.isValidElement(r)) {
21
+ const c = S(r), s = C(i, r.props);
22
+ return r.type !== l.Fragment && (s.ref = t ? m(t, c) : c), l.cloneElement(r, s);
23
+ }
24
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
25
+ });
26
+ return n.displayName = `${e}.SlotClone`, n;
27
+ }
28
+ var g = Symbol("radix.slottable");
29
+ function E(e) {
30
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
31
+ }
32
+ function C(e, n) {
33
+ const o = { ...n };
34
+ for (const t in n) {
35
+ const r = e[t], i = n[t];
36
+ /^on[A-Z]/.test(t) ? r && i ? o[t] = (...s) => {
37
+ const a = i(...s);
38
+ return r(...s), a;
39
+ } : r && (o[t] = r) : t === "style" ? o[t] = { ...r, ...i } : t === "className" && (o[t] = [r, i].filter(Boolean).join(" "));
40
+ }
41
+ return { ...e, ...o };
42
+ }
43
+ function S(e) {
44
+ var t, r;
45
+ let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning;
46
+ return o ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
47
+ }
48
+ export {
49
+ b as createSlot
50
+ };
@@ -0,0 +1,10 @@
1
+ import * as t from "react";
2
+ import "react/jsx-runtime";
3
+ var r = t.createContext(void 0);
4
+ function n(o) {
5
+ const e = t.useContext(r);
6
+ return o || e || "ltr";
7
+ }
8
+ export {
9
+ n as useDirection
10
+ };