neatkit 0.7.0 → 0.9.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 (179) hide show
  1. package/dist/Avatar-Belo7qAY.cjs +1 -0
  2. package/dist/Avatar-DjDCFqNG.js +55 -0
  3. package/dist/Avatar.cjs +1 -1
  4. package/dist/Avatar.js +2 -52
  5. package/dist/Boundary.cjs +1 -0
  6. package/dist/Boundary.js +176 -0
  7. package/dist/Button-BV5OUXpc.js +101 -0
  8. package/dist/Button-DU4j_IED.cjs +1 -0
  9. package/dist/Button.cjs +1 -1
  10. package/dist/Button.js +1 -1
  11. package/dist/Checkbox.cjs +1 -1
  12. package/dist/Checkbox.js +213 -2
  13. package/dist/Code-B7s_rN0G.cjs +4 -0
  14. package/dist/Code-Bp2X1k-g.js +224 -0
  15. package/dist/Code.cjs +1 -1
  16. package/dist/Code.js +1 -1
  17. package/dist/Divider-C7XGlr26.cjs +1 -0
  18. package/dist/{Divider-BE15WVDI.js → Divider-DZgpYpr-.js} +1 -1
  19. package/dist/Divider.cjs +1 -1
  20. package/dist/Divider.js +1 -1
  21. package/dist/Icon-BIBzgznI.cjs +1 -0
  22. package/dist/{Icon-uQmpr5P2.js → Icon-CxK1wlGk.js} +194 -181
  23. package/dist/Icon.cjs +1 -1
  24. package/dist/Icon.js +2 -35
  25. package/dist/Input.cjs +1 -1
  26. package/dist/Input.js +70 -79
  27. package/dist/Markdown.cjs +1 -31
  28. package/dist/Markdown.js +469 -18066
  29. package/dist/Modal.cjs +1 -1
  30. package/dist/Modal.js +100 -122
  31. package/dist/PinInput.cjs +1 -1
  32. package/dist/PinInput.js +1 -1
  33. package/dist/Popover.cjs +1 -1
  34. package/dist/Popover.js +171 -165
  35. package/dist/Radio.cjs +1 -1
  36. package/dist/Radio.js +86 -41
  37. package/dist/Select.cjs +1 -1
  38. package/dist/Select.js +326 -315
  39. package/dist/Sidebar.cjs +1 -0
  40. package/dist/Sidebar.js +490 -0
  41. package/dist/Skeleton.cjs +1 -1
  42. package/dist/Skeleton.js +20 -16
  43. package/dist/Switch.cjs +1 -1
  44. package/dist/Switch.js +1 -1
  45. package/dist/Table-CADupJEU.js +423 -0
  46. package/dist/Table-qetwZpTC.cjs +1 -0
  47. package/dist/Table.cjs +1 -1
  48. package/dist/Table.js +1 -1
  49. package/dist/TextArea.cjs +1 -1
  50. package/dist/TextArea.js +1 -1
  51. package/dist/Tooltip-B2d5ss7S.cjs +1 -0
  52. package/dist/Tooltip-BK64rkxV.js +231 -0
  53. package/dist/Tooltip.cjs +1 -1
  54. package/dist/Tooltip.js +2 -3
  55. package/dist/albert-sans-cb3e34c4.woff2 +0 -0
  56. package/dist/aria-Bntn6ad_.cjs +1 -0
  57. package/dist/aria-CeA9QfD1.js +15 -0
  58. package/dist/components/Boundary/Boundary.d.ts +65 -0
  59. package/dist/components/Boundary/contexts/BoundaryContext.d.ts +28 -0
  60. package/dist/components/Boundary/hooks/useBoundary.d.ts +19 -0
  61. package/dist/components/Boundary/hooks/useBoundaryWidth.d.ts +23 -0
  62. package/dist/components/Boundary/index.d.ts +2 -0
  63. package/dist/components/Boundary/utils/width.d.ts +11 -0
  64. package/dist/components/Checkbox/Checkbox.d.ts +9 -1
  65. package/dist/components/{CheckboxGroup → Checkbox/components}/CheckboxGroup.d.ts +2 -2
  66. package/dist/components/Checkbox/index.d.ts +1 -0
  67. package/dist/components/Checkbox/utils/checkbox-option.d.ts +17 -0
  68. package/dist/components/Icon/Icon.d.ts +1 -0
  69. package/dist/components/Icon/icons/GearIcon.d.ts +11 -0
  70. package/dist/components/Icon/icons/ImageIcon.d.ts +11 -0
  71. package/dist/components/Icon/index.d.ts +0 -33
  72. package/dist/components/Icon/utils/registry.d.ts +2 -0
  73. package/dist/components/Input/Input.d.ts +1 -9
  74. package/dist/components/Modal/Modal.d.ts +0 -4
  75. package/dist/components/PinInput/PinInput.d.ts +1 -1
  76. package/dist/components/Popover/Popover.d.ts +2 -6
  77. package/dist/components/Portal/Portal.d.ts +11 -8
  78. package/dist/components/Portal/hooks/useDismissableLayer.d.ts +2 -0
  79. package/dist/components/Portal/hooks/useFloatingPosition.d.ts +4 -3
  80. package/dist/components/Portal/hooks/useFocusTrap.d.ts +2 -0
  81. package/dist/components/Portal/hooks/useScrollLock.d.ts +9 -3
  82. package/dist/components/Portal/utils/boundary-focus.d.ts +23 -0
  83. package/dist/components/Portal/utils/floating-position.d.ts +43 -9
  84. package/dist/components/Portal/utils/overlay-stack.d.ts +22 -10
  85. package/dist/components/Portal/utils/scroll-container.d.ts +13 -0
  86. package/dist/components/Radio/Radio.d.ts +9 -1
  87. package/dist/components/{RadioGroup → Radio/components}/RadioGroup.d.ts +9 -2
  88. package/dist/components/Radio/index.d.ts +1 -0
  89. package/dist/components/Select/Select.d.ts +0 -2
  90. package/dist/components/Select/utils/listbox-position.d.ts +28 -0
  91. package/dist/components/Sidebar/Sidebar.d.ts +113 -0
  92. package/dist/components/Sidebar/components/SidebarFooter.d.ts +24 -0
  93. package/dist/components/Sidebar/components/SidebarGroup.d.ts +31 -0
  94. package/dist/components/Sidebar/components/SidebarHeader.d.ts +29 -0
  95. package/dist/components/Sidebar/components/SidebarItem.d.ts +46 -0
  96. package/dist/components/Sidebar/components/SidebarOverlay.d.ts +38 -0
  97. package/dist/components/Sidebar/components/SidebarPanel.d.ts +47 -0
  98. package/dist/components/Sidebar/components/SidebarTrigger.d.ts +47 -0
  99. package/dist/components/Sidebar/components/SidebarUser.d.ts +59 -0
  100. package/dist/components/Sidebar/hooks/usePresentation.d.ts +14 -0
  101. package/dist/components/Sidebar/hooks/useSidebar.d.ts +9 -0
  102. package/dist/components/Sidebar/index.d.ts +2 -0
  103. package/dist/components/Sidebar/utils/presentation.d.ts +12 -0
  104. package/dist/components/Sidebar/utils/state.d.ts +62 -0
  105. package/dist/components/Skeleton/Skeleton.d.ts +21 -5
  106. package/dist/components/Table/Table.d.ts +21 -249
  107. package/dist/components/Table/components/TableAction.d.ts +18 -0
  108. package/dist/components/Table/components/TableActionCell.d.ts +15 -0
  109. package/dist/components/Table/components/TableActionHeaderCell.d.ts +13 -0
  110. package/dist/components/Table/components/TableBody.d.ts +27 -0
  111. package/dist/components/Table/components/TableCell.d.ts +42 -0
  112. package/dist/components/Table/components/TableFoot.d.ts +19 -0
  113. package/dist/components/Table/components/TableHead.d.ts +19 -0
  114. package/dist/components/Table/components/TableHeaderCell.d.ts +23 -0
  115. package/dist/components/Table/components/TableRow.d.ts +67 -0
  116. package/dist/components/Table/contexts/TableContext.d.ts +4 -0
  117. package/dist/components/Table/hooks/useHorizontalOverflow.d.ts +25 -0
  118. package/dist/components/Table/index.d.ts +1 -1
  119. package/dist/components/Table/utils/cell.d.ts +25 -0
  120. package/dist/components/Table/utils/children.d.ts +18 -0
  121. package/dist/components/Table/utils/trigger.d.ts +54 -0
  122. package/dist/components/Tooltip/Tooltip.d.ts +10 -4
  123. package/dist/components/Tooltip/TooltipProvider.d.ts +1 -1
  124. package/dist/components/Tooltip/index.d.ts +0 -1
  125. package/dist/effects-D5CWf-Pl.js +8 -0
  126. package/dist/effects-D85L_7zM.cjs +1 -0
  127. package/dist/floating-position-DIjh2wnP.cjs +1 -0
  128. package/dist/floating-position-DvR6e334.js +50 -0
  129. package/dist/style.css +1 -1
  130. package/dist/tokens.d.ts +1 -0
  131. package/dist/useFloatingPosition-B3ZC-v3v.js +43 -0
  132. package/dist/useFloatingPosition-GzkP9dCc.cjs +1 -0
  133. package/dist/useFocusTrap-BrFZdMqQ.cjs +1 -0
  134. package/dist/useFocusTrap-DhVnlboe.js +136 -0
  135. package/dist/usePresence-B5RYv4e1.cjs +1 -0
  136. package/dist/usePresence-CqegYqy4.js +221 -0
  137. package/dist/useScrollLock-Drd7OZRC.js +62 -0
  138. package/dist/useScrollLock-Dy8MZaSn.cjs +1 -0
  139. package/dist/utils/aria.d.ts +9 -0
  140. package/dist/utils/effects.d.ts +12 -0
  141. package/package.json +12 -16
  142. package/dist/Button-BAsLfA0D.js +0 -99
  143. package/dist/Button-D7JUO6Fs.cjs +0 -1
  144. package/dist/Checkbox-BvXM9VyY.js +0 -68
  145. package/dist/Checkbox-VQifZrZZ.cjs +0 -1
  146. package/dist/CheckboxGroup.cjs +0 -1
  147. package/dist/CheckboxGroup.js +0 -144
  148. package/dist/Code-BP2ZCmUf.js +0 -7446
  149. package/dist/Code-eispVOW3.cjs +0 -6
  150. package/dist/Content.cjs +0 -1
  151. package/dist/Content.js +0 -144
  152. package/dist/Divider-CJYbFcSX.cjs +0 -1
  153. package/dist/Icon-D8IZceys.cjs +0 -1
  154. package/dist/RadioGroup.cjs +0 -1
  155. package/dist/RadioGroup.js +0 -51
  156. package/dist/RadioGroupContext-BX9KnDek.cjs +0 -1
  157. package/dist/RadioGroupContext-DbKM4zPZ.js +0 -5
  158. package/dist/Table-83unQQOi.cjs +0 -1
  159. package/dist/Table-Cw8u-pEW.js +0 -403
  160. package/dist/Tooltip-BB82wNOE.cjs +0 -1
  161. package/dist/Tooltip-CqWK_GRD.js +0 -236
  162. package/dist/aria-DHnOMyYp.js +0 -10
  163. package/dist/aria-DKxpE8cA.cjs +0 -1
  164. package/dist/components/CheckboxGroup/index.d.ts +0 -2
  165. package/dist/components/Content/Content.d.ts +0 -60
  166. package/dist/components/Content/hooks/useContentLayout.d.ts +0 -18
  167. package/dist/components/Content/index.d.ts +0 -2
  168. package/dist/components/Content/utils/layout.d.ts +0 -11
  169. package/dist/components/RadioGroup/index.d.ts +0 -2
  170. package/dist/useFloatingPosition-CxzhAvy8.js +0 -73
  171. package/dist/useFloatingPosition-D1FqYy0l.cjs +0 -1
  172. package/dist/useFocusTrap--cgjy78G.cjs +0 -1
  173. package/dist/useFocusTrap-Da4nEash.js +0 -134
  174. package/dist/usePresence-DSPt6aKi.js +0 -210
  175. package/dist/usePresence-qe92UTvK.cjs +0 -1
  176. /package/dist/components/{CheckboxGroup → Checkbox}/contexts/CheckboxGroupContext.d.ts +0 -0
  177. /package/dist/components/{CheckboxGroup → Checkbox}/hooks/useCheckboxGroup.d.ts +0 -0
  178. /package/dist/components/{RadioGroup → Radio}/contexts/RadioGroupContext.d.ts +0 -0
  179. /package/dist/components/{RadioGroup → Radio}/hooks/useRadioGroup.d.ts +0 -0
@@ -0,0 +1,231 @@
1
+ "use client";
2
+ import { jsx as C, jsxs as q, Fragment as Ie } from "react/jsx-runtime";
3
+ import { useMemo as X, createContext as be, forwardRef as he, Fragment as Le, useId as ve, useContext as Fe, useRef as u, useState as A, useCallback as f, useEffect as G, cloneElement as J } from "react";
4
+ import { g as Oe, a as K } from "./reference-CXMr27nM.js";
5
+ import { c as Me, b as _e, d as Pe, e as xe, P as Ne } from "./usePresence-CqegYqy4.js";
6
+ import { u as We } from "./useFloatingPosition-B3ZC-v3v.js";
7
+ import { i as ke } from "./focus-restoration-BvNZzrQA.js";
8
+ import { S as Ve } from "./Surface-vEFsZC12.js";
9
+ const je = 500, Z = be(null);
10
+ function Ae(r) {
11
+ const { children: a, delay: s = je } = r, l = X(() => ({
12
+ delay: s
13
+ }), [s]);
14
+ return /* @__PURE__ */ C(Z.Provider, { value: l, children: a });
15
+ }
16
+ const ee = 500, Q = 100;
17
+ function Ce(r, a, s, l) {
18
+ a.current = r, K(s, r), K(l, r);
19
+ }
20
+ function ze(r) {
21
+ return Number.isFinite(r) ? Math.max(0, r) : ee;
22
+ }
23
+ function Be(r, a) {
24
+ const s = (r == null ? void 0 : r.split(/\s+/).filter(Boolean)) ?? [];
25
+ return s.includes(a) || s.push(a), s.join(" ");
26
+ }
27
+ const Se = he(function(a, s) {
28
+ const {
29
+ children: l,
30
+ className: ne,
31
+ content: p,
32
+ contentClassName: te,
33
+ contentStyle: z,
34
+ delay: re,
35
+ disabled: w = !1,
36
+ onOpenChange: h,
37
+ placement: B = "top",
38
+ style: oe
39
+ } = a;
40
+ if (p == null || typeof p == "boolean" || typeof p == "string" && !p.trim())
41
+ throw new Error("Tooltip content must not be empty");
42
+ if (l.type === Le)
43
+ throw new Error("Tooltip requires a single non-Fragment trigger");
44
+ const S = `${ve()}-tooltip`, P = Fe(Z), t = l.props, Y = Oe(l), E = u(null), x = u(null), $ = u(w), N = u(!1), L = u(null), v = u(null), F = u(null), O = u(!1), y = u(!1), D = u(!1), d = u(!1), [M, se] = A(null), [ce, ie] = A(null), [_, ue] = A(!1);
45
+ $.current = w;
46
+ const W = ze(
47
+ re ?? (P == null ? void 0 : P.delay) ?? ee
48
+ ), g = Me(_), H = (M == null ? void 0 : M.ownerDocument) ?? (typeof document > "u" ? null : document), k = _e("Tooltip").boundaryElement, V = Pe(g.present, k), m = We(
49
+ g.present,
50
+ B,
51
+ M,
52
+ ce,
53
+ k
54
+ ), le = X(
55
+ () => [E, x],
56
+ []
57
+ ), ae = Be(
58
+ t["aria-describedby"],
59
+ S
60
+ ), fe = _ && g.present ? ae : t["aria-describedby"], U = f(
61
+ (e) => {
62
+ Ce(
63
+ e,
64
+ E,
65
+ Y,
66
+ s
67
+ ), se(e);
68
+ },
69
+ [s, Y]
70
+ ), de = f(
71
+ (e) => {
72
+ x.current = e, e || (d.current = !1), ie(e);
73
+ },
74
+ []
75
+ ), c = f(() => {
76
+ const e = L.current;
77
+ e && e.ownerWindow.clearTimeout(e.timerId), L.current = null;
78
+ }, []), i = f(() => {
79
+ const e = v.current;
80
+ e && e.ownerWindow.clearTimeout(e.timerId), v.current = null;
81
+ }, []), R = f(() => {
82
+ const e = F.current;
83
+ e && e.ownerWindow.clearTimeout(e.timerId), F.current = null;
84
+ }, []), o = f((e) => {
85
+ N.current !== e && (e || (d.current = !1), N.current = e, ue(e), h == null || h(e));
86
+ }, [h]), j = f((e) => {
87
+ var I, b;
88
+ if (i(), y.current || D.current || d.current)
89
+ return;
90
+ if (e === 0) {
91
+ o(!1);
92
+ return;
93
+ }
94
+ const n = ((I = E.current) == null ? void 0 : I.ownerDocument.defaultView) ?? ((b = x.current) == null ? void 0 : b.ownerDocument.defaultView);
95
+ if (!n) {
96
+ o(!1);
97
+ return;
98
+ }
99
+ const T = n.setTimeout(() => {
100
+ v.current = null, !y.current && !D.current && !d.current && o(!1);
101
+ }, e);
102
+ v.current = {
103
+ ownerWindow: n,
104
+ timerId: T
105
+ };
106
+ }, [i, o]), me = f(() => {
107
+ var T;
108
+ if (c(), i(), W === 0) {
109
+ o(!0);
110
+ return;
111
+ }
112
+ const e = (T = E.current) == null ? void 0 : T.ownerDocument.defaultView;
113
+ if (!e) return;
114
+ const n = e.setTimeout(() => {
115
+ L.current = null, $.current || o(!0);
116
+ }, W);
117
+ L.current = { ownerWindow: e, timerId: n };
118
+ }, [i, c, W, o]);
119
+ function pe(e) {
120
+ var n;
121
+ if ((n = t.onFocus) == null || n.call(t, e), y.current = !0, i(), O.current || ke(e.currentTarget)) {
122
+ c();
123
+ return;
124
+ }
125
+ c(), o(!0);
126
+ }
127
+ function Te(e) {
128
+ var n;
129
+ (n = t.onBlur) == null || n.call(t, e), !e.currentTarget.contains(e.relatedTarget) && (y.current = !1, c(), j(0));
130
+ }
131
+ function we(e) {
132
+ var n;
133
+ (n = t.onMouseEnter) == null || n.call(t, e), D.current = !0, me();
134
+ }
135
+ function Ee(e) {
136
+ var n;
137
+ (n = t.onMouseLeave) == null || n.call(t, e), D.current = !1, c(), j(Q);
138
+ }
139
+ function ye() {
140
+ d.current = !0, i();
141
+ }
142
+ function De() {
143
+ d.current = !1, j(Q);
144
+ }
145
+ function ge(e) {
146
+ var I, b;
147
+ (I = t.onPointerDown) == null || I.call(t, e), c(), i(), o(!1);
148
+ const n = (b = E.current) == null ? void 0 : b.ownerDocument.defaultView;
149
+ if (!n) return;
150
+ O.current = !0, R();
151
+ const T = n.setTimeout(() => {
152
+ O.current = !1, F.current = null;
153
+ }, 0);
154
+ F.current = { ownerWindow: n, timerId: T };
155
+ }
156
+ if (xe({
157
+ boundary: k,
158
+ active: _,
159
+ boundaries: le,
160
+ dismissOnPointerDownOutside: !0,
161
+ layerId: V.id,
162
+ onEscapeDismiss: () => o(!1),
163
+ onPointerDownOutsideDismiss: () => o(!1),
164
+ ownerDocument: H
165
+ }), G(() => {
166
+ w && (c(), i(), R(), O.current = !1, y.current = !1, D.current = !1, d.current = !1, N.current && o(!1));
167
+ }, [
168
+ i,
169
+ c,
170
+ R,
171
+ w,
172
+ o
173
+ ]), G(() => () => {
174
+ c(), i(), R();
175
+ }, [i, c, R]), w)
176
+ return J(
177
+ l,
178
+ { ref: U }
179
+ );
180
+ const Re = J(
181
+ l,
182
+ {
183
+ "aria-describedby": fe,
184
+ className: [t.className, "nk-tooltip__trigger", ne].filter(Boolean).join(" "),
185
+ onBlur: Te,
186
+ onFocus: pe,
187
+ onMouseEnter: we,
188
+ onMouseLeave: Ee,
189
+ onPointerDown: ge,
190
+ ref: U,
191
+ style: { ...t.style, ...oe }
192
+ }
193
+ );
194
+ return /* @__PURE__ */ q(Ie, { children: [
195
+ Re,
196
+ g.present && H ? /* @__PURE__ */ C(Ne, { children: /* @__PURE__ */ q(
197
+ Ve,
198
+ {
199
+ ref: de,
200
+ "aria-hidden": _ ? void 0 : !0,
201
+ className: ["nk-tooltip", te].filter(Boolean).join(" "),
202
+ "data-placement": (m == null ? void 0 : m.placement) ?? B,
203
+ "data-state": g.state === "closing" ? "closing" : "open",
204
+ id: S,
205
+ onMouseEnter: ye,
206
+ onMouseLeave: De,
207
+ role: "tooltip",
208
+ style: m ? {
209
+ ...z,
210
+ "--nk-tooltip-arrow-offset": `${m.arrowOffset}px`,
211
+ left: m.left,
212
+ top: m.top,
213
+ zIndex: V.zIndex
214
+ } : {
215
+ ...z,
216
+ visibility: "hidden",
217
+ zIndex: V.zIndex
218
+ },
219
+ children: [
220
+ /* @__PURE__ */ C("span", { "aria-hidden": "true", className: "nk-tooltip__arrow" }),
221
+ p
222
+ ]
223
+ }
224
+ ) }) : null
225
+ ] });
226
+ }), Qe = Object.assign(Se, {
227
+ Provider: Ae
228
+ });
229
+ export {
230
+ Qe as T
231
+ };
package/dist/Tooltip.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Tooltip-BB82wNOE.cjs");exports.TooltipProvider=e.TooltipProvider;exports.default=e.Tooltip;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Tooltip-B2d5ss7S.cjs");exports.default=e.Tooltip2;
package/dist/Tooltip.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use client";
2
- import { T as a, a as r } from "./Tooltip-CqWK_GRD.js";
2
+ import { T as a } from "./Tooltip-BK64rkxV.js";
3
3
  export {
4
- a as TooltipProvider,
5
- r as default
4
+ a as default
6
5
  };
Binary file
@@ -0,0 +1 @@
1
+ "use strict";function r(e){return e!==void 0&&e!==!1&&e!=="false"}function s(e,t){return e?!0:t}function l(e,t){const n=(e==null?void 0:e.split(/\s+/).filter(Boolean))??[];return n.includes(t)||n.push(t),n.join(" ")}exports.hasInvalidState=r;exports.mergeIdentifiers=l;exports.resolveAriaInvalid=s;
@@ -0,0 +1,15 @@
1
+ function s(e) {
2
+ return e !== void 0 && e !== !1 && e !== "false";
3
+ }
4
+ function t(e, n) {
5
+ return e ? !0 : n;
6
+ }
7
+ function r(e, n) {
8
+ const o = (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [];
9
+ return o.includes(n) || o.push(n), o.join(" ");
10
+ }
11
+ export {
12
+ s as h,
13
+ r as m,
14
+ t as r
15
+ };
@@ -0,0 +1,65 @@
1
+ import { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type CSSProperties, type ElementType, type ReactElement } from "react";
2
+ import "./styles/boundary.css";
3
+ /** A type representing the themes supported by Boundary. */
4
+ export type BoundaryTheme = "auto" | "light" | "dark";
5
+ /** A type representing Boundary's visual background decoration. */
6
+ export type BoundaryDecoration = "grid" | "none";
7
+ /** A type representing Boundary's horizontal layout behavior. */
8
+ export type BoundaryWidthMode = "narrow" | "full";
9
+ /** A type representing Boundary's minimum-height behavior. */
10
+ export type BoundaryHeightMode = "content" | "available" | "viewport";
11
+ /** A type representing Boundary's spacing behavior on both axes. */
12
+ export type BoundarySpacing = "standard" | "none";
13
+ /** A type representing CSS custom properties accepted by Boundary styles. */
14
+ type BoundaryCustomProperties = {
15
+ [CustomProperty in `--${string}`]?: string | number;
16
+ };
17
+ /** A type representing native Boundary styles and CSS custom properties. */
18
+ type BoundaryStyle = CSSProperties & BoundaryCustomProperties;
19
+ /** A type representing the reference accepted by a polymorphic element. */
20
+ type BoundaryReference<Component extends ElementType> = ComponentPropsWithRef<Component>["ref"];
21
+ /** A type representing properties owned by the Boundary component. */
22
+ type BoundaryOwnProps = {
23
+ /** The color theme applied within Boundary. */
24
+ theme?: BoundaryTheme;
25
+ /** The accent color exposed to Boundary descendants. */
26
+ accent?: string;
27
+ /** The visual background treatment applied to Boundary. */
28
+ decoration?: BoundaryDecoration;
29
+ /** The horizontal layout applied to Boundary. */
30
+ width?: BoundaryWidthMode;
31
+ /** The minimum height applied to Boundary. */
32
+ height?: BoundaryHeightMode;
33
+ /** The spacing applied around content within Boundary. */
34
+ spacing?: BoundarySpacing;
35
+ };
36
+ /** A type representing properties for a polymorphic Boundary element. */
37
+ export type BoundaryProps<Component extends ElementType = "div"> = BoundaryOwnProps & {
38
+ as?: Component;
39
+ style?: BoundaryStyle;
40
+ } & Omit<ComponentPropsWithoutRef<Component>, keyof BoundaryOwnProps | "as" | "style">;
41
+ /**
42
+ * A type representing the public polymorphic Boundary component.
43
+ *
44
+ * @param props - The properties accepted by the selected element.
45
+ *
46
+ * @returns The rendered Boundary element.
47
+ */
48
+ type BoundaryComponent = <Component extends ElementType = "div">(props: BoundaryProps<Component> & {
49
+ ref?: BoundaryReference<Component>;
50
+ }) => ReactElement | null;
51
+ /**
52
+ * Renders a scoped Neatkit design-system boundary.
53
+ *
54
+ * Every Neatkit interface is wrapped in a Boundary. Portals, overlay
55
+ * stacking, dismissal precedence, and responsive measurement all resolve
56
+ * against the nearest boundary, so several independent boundaries may share
57
+ * one page. Where boundaries nest, descendants use the innermost one.
58
+ *
59
+ * @param props - The properties that configure Boundary and its root element.
60
+ * @param forwardedReference - The reference assigned to the root element.
61
+ *
62
+ * @returns The rendered Boundary element.
63
+ */
64
+ declare const Boundary: BoundaryComponent;
65
+ export default Boundary;
@@ -0,0 +1,28 @@
1
+ /** A type representing observable access to a boundary's measured width. */
2
+ export type BoundaryWidthStore = {
3
+ /**
4
+ * Reads the boundary's measured content-box width.
5
+ *
6
+ * @returns The width in CSS pixels, or undefined while unmeasured.
7
+ */
8
+ read: () => number | undefined;
9
+ /**
10
+ * Subscribes a listener to changes in the measured width.
11
+ *
12
+ * @param listener - The listener notified after every measurement.
13
+ *
14
+ * @returns The teardown removing the registered listener.
15
+ */
16
+ subscribe: (listener: () => void) => () => void;
17
+ };
18
+ /** A type representing the Neatkit boundary shared with its descendants. */
19
+ export type BoundaryContextValue = {
20
+ /** The Boundary root element descendants resolve against. */
21
+ boundaryElement: HTMLElement | null;
22
+ /** The element receiving overlays portalled inside the boundary. */
23
+ portalElement: HTMLElement | null;
24
+ /** Observable access to the boundary's measured content-box width. */
25
+ width: BoundaryWidthStore;
26
+ };
27
+ /** The internal React context published by each boundary. */
28
+ export declare const BoundaryContext: import("react").Context<BoundaryContextValue | undefined>;
@@ -0,0 +1,19 @@
1
+ import { type BoundaryContextValue } from "../contexts/BoundaryContext";
2
+ /**
3
+ * Returns the Neatkit boundary a component resolves against.
4
+ *
5
+ * Portals, overlay stacking, dismissal precedence, and responsive
6
+ * measurement all resolve against the nearest boundary, so a component
7
+ * requiring one cannot function without it. Naming the component requires
8
+ * the boundary, because the name exists only to report its absence; omitting
9
+ * the name returns whatever surrounds the caller, which suits a component
10
+ * that adapts to a boundary rather than depending on one.
11
+ *
12
+ * @param componentName - The component name reported when no boundary exists.
13
+ *
14
+ * @returns The nearest boundary, or undefined when none is required.
15
+ *
16
+ * @warning Throws when a named component is rendered outside a Boundary.
17
+ */
18
+ export declare function useBoundary(componentName: string): BoundaryContextValue;
19
+ export declare function useBoundary(): BoundaryContextValue | undefined;
@@ -0,0 +1,23 @@
1
+ import { type ForwardedRef, type RefCallback } from "react";
2
+ import type { BoundaryWidthStore } from "../contexts/BoundaryContext";
3
+ /** A type representing Boundary's measured layout state. */
4
+ type BoundaryWidthMeasurement = {
5
+ /** The enhanced inner width, or undefined while CSS controls sizing. */
6
+ contentWidth: number | undefined;
7
+ /** Observable access to the boundary's measured content-box width. */
8
+ width: BoundaryWidthStore;
9
+ /** The mounted Boundary root, or null before it mounts. */
10
+ rootElement: HTMLElement | null;
11
+ /** The callback ref assigned to the Boundary root. */
12
+ rootReference: RefCallback<HTMLElement>;
13
+ };
14
+ /**
15
+ * Measures a Boundary root and publishes its layout to descendants.
16
+ *
17
+ * @param forwardedReference - The public reference assigned to the root.
18
+ * @param snap - Whether cell-aligned inner-width sizing is enabled.
19
+ *
20
+ * @returns The merged root reference and the measured boundary layout.
21
+ */
22
+ export declare function useBoundaryWidth(forwardedReference: ForwardedRef<HTMLElement>, snap: boolean): BoundaryWidthMeasurement;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from "./Boundary";
2
+ export type { BoundaryHeightMode, BoundaryDecoration, BoundaryProps, BoundarySpacing, BoundaryTheme, BoundaryWidthMode, } from "./Boundary";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Calculates the enhanced inner width for a Boundary root.
3
+ *
4
+ * Provides a centered cell-aligned width for eligible container sizes.
5
+ *
6
+ * @param availableWidth - The Boundary root's available content-box width.
7
+ * @param cellSize - The resolved grid cell size in CSS pixels.
8
+ *
9
+ * @returns The cell-aligned width, or undefined when CSS controls sizing.
10
+ */
11
+ export declare function calculateBoundaryContentWidth(availableWidth: number, cellSize: number): number | undefined;
@@ -1,4 +1,5 @@
1
1
  import { type CSSProperties, type InputHTMLAttributes, type ReactNode } from "react";
2
+ import CheckboxGroup from "./components/CheckboxGroup";
2
3
  import "./styles/checkbox.css";
3
4
  /** A type representing properties for the Checkbox component. */
4
5
  export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "children" | "className" | "style" | "type"> & {
@@ -22,7 +23,7 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "childre
22
23
  *
23
24
  * @returns The rendered Checkbox control.
24
25
  */
25
- declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "children" | "type"> & {
26
+ declare const CheckboxRoot: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "children" | "type"> & {
26
27
  /** The optional clickable and accessible label for the Checkbox. */
27
28
  children?: ReactNode;
28
29
  /** The additional class name applied to the Checkbox label root. */
@@ -32,4 +33,11 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<InputHTML
32
33
  /** The inline styles applied to the Checkbox label root. */
33
34
  style?: CSSProperties;
34
35
  } & import("react").RefAttributes<HTMLInputElement>>;
36
+ /** A type representing the complete compound Checkbox component. */
37
+ type CheckboxComponent = typeof CheckboxRoot & {
38
+ /** A labelled set of related Checkbox options sharing one name. */
39
+ Group: typeof CheckboxGroup;
40
+ };
41
+ /** The compound Checkbox component and its grouping form. */
42
+ declare const Checkbox: CheckboxComponent;
35
43
  export default Checkbox;
@@ -1,8 +1,8 @@
1
1
  import { type ChangeEventHandler, type HTMLAttributes, type ReactNode } from "react";
2
- import "./styles/checkbox-group.css";
2
+ import "../styles/checkbox-group.css";
3
3
  /** A type representing the visual direction of Checkbox options. */
4
4
  export type CheckboxGroupOrientation = "horizontal" | "vertical";
5
- /** A type representing properties for the CheckboxGroup component. */
5
+ /** A type representing properties for the Checkbox.Group component. */
6
6
  export type CheckboxGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
7
7
  /**
8
8
  * The direct Checkbox options or fragments belonging to the group.
@@ -1,2 +1,3 @@
1
1
  export { default } from "./Checkbox";
2
2
  export type { CheckboxProps } from "./Checkbox";
3
+ export type { CheckboxGroupOrientation, CheckboxGroupProps, } from "./components/CheckboxGroup";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Marks a component as a valid option inside a Checkbox group.
3
+ *
4
+ * The marker lets the group validate its children without importing the
5
+ * option component, which would otherwise create a circular dependency.
6
+ *
7
+ * @param component - The component receiving the internal option marker.
8
+ */
9
+ export declare function markCheckboxOption<Component extends object>(component: Component): void;
10
+ /**
11
+ * Determines whether a rendered child is a valid Checkbox group option.
12
+ *
13
+ * @param componentType - The rendered child component type to inspect.
14
+ *
15
+ * @returns Whether the component declares the internal option marker.
16
+ */
17
+ export declare function isCheckboxOption(componentType: unknown): boolean;
@@ -1,5 +1,6 @@
1
1
  import { type SVGProps } from "react";
2
2
  import { type IconType } from "./utils/registry";
3
+ import "./styles/icon.css";
3
4
  /** A type representing properties for the Icon component. */
4
5
  export type IconProps = Omit<SVGProps<SVGSVGElement>, "children" | "color" | "height" | "width"> & {
5
6
  /** The icon graphic rendered by the component. */
@@ -0,0 +1,11 @@
1
+ import type { IconGraphicProps } from "./types";
2
+ /**
3
+ * Renders a gear icon.
4
+ *
5
+ * @param props - The SVG properties applied to the icon.
6
+ * @param forwardedReference - The reference assigned to the rendered SVG.
7
+ *
8
+ * @returns The rendered icon SVG.
9
+ */
10
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { IconGraphicProps } from "./types";
2
+ /**
3
+ * Renders an image icon.
4
+ *
5
+ * @param props - The SVG properties applied to the icon.
6
+ * @param forwardedReference - The reference assigned to the rendered SVG.
7
+ *
8
+ * @returns The rendered icon SVG.
9
+ */
10
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ export default _default;
@@ -1,36 +1,3 @@
1
1
  export { default } from "./Icon";
2
2
  export type { IconProps } from "./Icon";
3
3
  export type { IconType } from "./utils/registry";
4
- export { default as ChatIcon } from "./icons/ChatIcon";
5
- export { default as ProjectsIcon } from "./icons/ProjectsIcon";
6
- export { default as ArticlesIcon } from "./icons/ArticlesIcon";
7
- export { default as MailIcon } from "./icons/MailIcon";
8
- export { default as GithubIcon } from "./icons/GithubIcon";
9
- export { default as GlobeIcon } from "./icons/GlobeIcon";
10
- export { default as LinkedInIcon } from "./icons/LinkedInIcon";
11
- export { default as RedditIcon } from "./icons/RedditIcon";
12
- export { default as ExitIcon } from "./icons/ExitIcon";
13
- export { default as CameraIcon } from "./icons/CameraIcon";
14
- export { default as QRCodeIcon } from "./icons/QRCodeIcon";
15
- export { default as DownloadIcon } from "./icons/DownloadIcon";
16
- export { default as SaveIcon } from "./icons/SaveIcon";
17
- export { default as PencilIcon } from "./icons/PencilIcon";
18
- export { default as ArrowLeftIcon } from "./icons/ArrowLeftIcon";
19
- export { default as ArrowRightIcon } from "./icons/ArrowRightIcon";
20
- export { default as CrossIcon } from "./icons/CrossIcon";
21
- export { default as CheckmarkIcon } from "./icons/CheckmarkIcon";
22
- export { default as PlusIcon } from "./icons/PlusIcon";
23
- export { default as MinusIcon } from "./icons/MinusIcon";
24
- export { default as WindowIcon } from "./icons/WindowIcon";
25
- export { default as UserIcon } from "./icons/UserIcon";
26
- export { default as DuplicateIcon } from "./icons/DuplicateIcon";
27
- export { default as EyeIcon } from "./icons/EyeIcon";
28
- export { default as EyeOffIcon } from "./icons/EyeOffIcon";
29
- export { default as SignalIcon } from "./icons/SignalIcon";
30
- export { default as AudioIcon } from "./icons/AudioIcon";
31
- export { default as HardwareIcon } from "./icons/HardwareIcon";
32
- export { default as BurgerIcon } from "./icons/BurgerIcon";
33
- export { default as RepositoryIcon } from "./icons/RepositoryIcon";
34
- export { default as KeyIcon } from "./icons/KeyIcon";
35
- export { default as InfoIcon } from "./icons/InfoIcon";
36
- export { default as WarningIcon } from "./icons/WarningIcon";
@@ -38,8 +38,10 @@ export declare const iconGraphics: {
38
38
  readonly commit: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
39
39
  readonly folder: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
40
40
  readonly file: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
+ readonly image: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
42
  readonly tag: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
42
43
  readonly key: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
+ readonly gear: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
43
45
  readonly git: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
46
  readonly home: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
47
  readonly info: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type InputHTMLAttributes, type ReactNode } from "react";
1
+ import { type CSSProperties, type InputHTMLAttributes } from "react";
2
2
  import "./styles/input.css";
3
3
  /** A type representing the supported native single-line input types. */
4
4
  export type InputType = "email" | "number" | "password" | "search" | "tel" | "text" | "url";
@@ -10,12 +10,8 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "children"
10
10
  clearable?: boolean;
11
11
  /** Whether the Input exposes an invalid semantic and visual state. */
12
12
  invalid?: boolean;
13
- /** The content displayed before the editable value. */
14
- leading?: ReactNode;
15
13
  /** Whether the Input displays a loading indicator and blocks editing. */
16
14
  loading?: boolean;
17
- /** The content displayed after the editable value. */
18
- trailing?: ReactNode;
19
15
  /** The inline styles applied to the composite Input root. */
20
16
  style?: CSSProperties;
21
17
  /** The supported native behavior applied to the single-line control. */
@@ -36,12 +32,8 @@ declare const Input: import("react").ForwardRefExoticComponent<Omit<InputHTMLAtt
36
32
  clearable?: boolean;
37
33
  /** Whether the Input exposes an invalid semantic and visual state. */
38
34
  invalid?: boolean;
39
- /** The content displayed before the editable value. */
40
- leading?: ReactNode;
41
35
  /** Whether the Input displays a loading indicator and blocks editing. */
42
36
  loading?: boolean;
43
- /** The content displayed after the editable value. */
44
- trailing?: ReactNode;
45
37
  /** The inline styles applied to the composite Input root. */
46
38
  style?: CSSProperties;
47
39
  /** The supported native behavior applied to the single-line control. */
@@ -18,8 +18,6 @@ export type ModalProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "onCl
18
18
  onClose?: (reason: ModalCloseReason) => void;
19
19
  /** Whether the Modal is currently open. */
20
20
  open: boolean;
21
- /** The optional element receiving the Modal portal. */
22
- portalContainer?: Element | null;
23
21
  /** Whether focus returns to its prior owner when the Modal closes. */
24
22
  restoreFocus?: boolean;
25
23
  /** Whether keyboard and programmatic focus remain inside the Modal. */
@@ -50,8 +48,6 @@ declare const Modal: import("react").ForwardRefExoticComponent<Omit<HTMLAttribut
50
48
  onClose?: (reason: ModalCloseReason) => void;
51
49
  /** Whether the Modal is currently open. */
52
50
  open: boolean;
53
- /** The optional element receiving the Modal portal. */
54
- portalContainer?: Element | null;
55
51
  /** Whether focus returns to its prior owner when the Modal closes. */
56
52
  restoreFocus?: boolean;
57
53
  /** Whether keyboard and programmatic focus remain inside the Modal. */
@@ -47,7 +47,7 @@ export type PinInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "childre
47
47
  *
48
48
  * @returns The rendered PinInput control.
49
49
  */
50
- declare const PinInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "className" | "style" | "inputMode" | "children" | "onPaste" | "onChange" | "size" | "type" | "pattern" | "value" | "maxLength" | "minLength"> & {
50
+ declare const PinInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "className" | "style" | "inputMode" | "children" | "onPaste" | "onChange" | "size" | "pattern" | "type" | "value" | "maxLength" | "minLength"> & {
51
51
  /** The additional class name applied to the composite PinInput root. */
52
52
  className?: string;
53
53
  /** Whether entered characters are visually replaced with centered dots. */