neatkit 0.10.0 → 0.12.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 (105) hide show
  1. package/dist/Boundary.cjs +1 -1
  2. package/dist/Boundary.js +191 -120
  3. package/dist/{Button-CVe9T_Zw.cjs → Button-6oWs-pyF.cjs} +1 -1
  4. package/dist/{Button-D6rXvcqq.js → Button-B0E-M8mp.js} +1 -1
  5. package/dist/Button.cjs +1 -1
  6. package/dist/Button.js +1 -1
  7. package/dist/Card.cjs +1 -1
  8. package/dist/Card.js +75 -2
  9. package/dist/Checkbox.cjs +1 -1
  10. package/dist/Checkbox.js +2 -2
  11. package/dist/Code-f0GWveGp.cjs +4 -0
  12. package/dist/{Code-Bp2X1k-g.js → Code-pROJjsiG.js} +57 -58
  13. package/dist/Code.cjs +1 -1
  14. package/dist/Code.js +1 -1
  15. package/dist/Field.cjs +1 -1
  16. package/dist/Field.js +57 -62
  17. package/dist/Icon-BFaHVAoQ.cjs +1 -0
  18. package/dist/{Icon-CxK1wlGk.js → Icon-Cj1s40xn.js} +308 -96
  19. package/dist/Icon.cjs +1 -1
  20. package/dist/Icon.js +1 -1
  21. package/dist/Input.cjs +1 -1
  22. package/dist/Input.js +2 -2
  23. package/dist/Markdown.cjs +1 -1
  24. package/dist/Markdown.js +76 -75
  25. package/dist/Modal.cjs +1 -1
  26. package/dist/Modal.js +4 -4
  27. package/dist/PinInput.cjs +1 -1
  28. package/dist/PinInput.js +228 -192
  29. package/dist/Popover.cjs +1 -1
  30. package/dist/Popover.js +117 -119
  31. package/dist/Radio.cjs +1 -1
  32. package/dist/Radio.js +1 -1
  33. package/dist/Select.cjs +1 -1
  34. package/dist/Select.js +12 -11
  35. package/dist/Sidebar.cjs +1 -1
  36. package/dist/Sidebar.js +441 -309
  37. package/dist/Switch.cjs +1 -1
  38. package/dist/Switch.js +1 -1
  39. package/dist/{Table-DutHfiXR.js → Table-B2G8CHJ9.js} +111 -108
  40. package/dist/Table-Z8Q6XRkc.cjs +1 -0
  41. package/dist/Table.cjs +1 -1
  42. package/dist/Table.js +1 -1
  43. package/dist/TextArea.cjs +1 -1
  44. package/dist/TextArea.js +1 -1
  45. package/dist/Tooltip-CpyROf6x.js +225 -0
  46. package/dist/Tooltip-DDPh_YFO.cjs +1 -0
  47. package/dist/Tooltip.cjs +1 -1
  48. package/dist/Tooltip.js +1 -1
  49. package/dist/aria-Bv-xVREf.js +17 -0
  50. package/dist/aria-DM-xYEHQ.cjs +1 -0
  51. package/dist/components/Boundary/hooks/useDocumentBackground.d.ts +28 -0
  52. package/dist/components/Card/Card.d.ts +22 -23
  53. package/dist/components/Card/components/CardBody.d.ts +24 -0
  54. package/dist/components/Card/components/CardFooter.d.ts +24 -0
  55. package/dist/components/Card/components/CardHeader.d.ts +24 -0
  56. package/dist/components/Card/index.d.ts +1 -1
  57. package/dist/components/Code/Code.d.ts +9 -7
  58. package/dist/components/Code/index.d.ts +1 -1
  59. package/dist/components/Icon/icons/AppleIcon.d.ts +11 -0
  60. package/dist/components/Icon/icons/BingIcon.d.ts +11 -0
  61. package/dist/components/Icon/icons/ChainIcon.d.ts +11 -0
  62. package/dist/components/Icon/icons/FacebookIcon.d.ts +11 -0
  63. package/dist/components/Icon/icons/GoogleIcon.d.ts +11 -0
  64. package/dist/components/Icon/icons/InstagramIcon.d.ts +11 -0
  65. package/dist/components/Icon/icons/MicrosoftIcon.d.ts +11 -0
  66. package/dist/components/Icon/icons/TwitterIcon.d.ts +11 -0
  67. package/dist/components/Icon/utils/registry.d.ts +8 -0
  68. package/dist/components/PinInput/PinInput.d.ts +1 -1
  69. package/dist/components/PinInput/hooks/usePinInput.d.ts +1 -1
  70. package/dist/components/Radio/Radio.d.ts +1 -1
  71. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  72. package/dist/components/Sidebar/components/SidebarFallbackTrigger.d.ts +32 -0
  73. package/dist/components/Sidebar/components/SidebarFooter.d.ts +5 -0
  74. package/dist/components/Sidebar/components/SidebarPanel.d.ts +1 -1
  75. package/dist/components/Sidebar/components/SidebarTrigger.d.ts +4 -0
  76. package/dist/components/Sidebar/hooks/useContentBelow.d.ts +23 -0
  77. package/dist/components/Sidebar/utils/children.d.ts +16 -0
  78. package/dist/components/Table/Table.d.ts +8 -2
  79. package/dist/components/Table/index.d.ts +1 -1
  80. package/dist/effects-D98vUn6N.cjs +1 -0
  81. package/dist/effects-DGbA6Q2O.js +18 -0
  82. package/dist/style.css +1 -1
  83. package/dist/useFloatingPosition-DQgw-w_Z.cjs +1 -0
  84. package/dist/useFloatingPosition-MGoyautY.js +57 -0
  85. package/dist/{useFocusTrap-C0IcCdNf.js → useFocusTrap-BxPazAL6.js} +1 -1
  86. package/dist/{useFocusTrap-gAK_402D.cjs → useFocusTrap-CrMcAu8s.cjs} +1 -1
  87. package/dist/{usePresence-CqegYqy4.js → usePresence-BTRY1_l-.js} +47 -56
  88. package/dist/usePresence-Dm0mls5p.cjs +1 -0
  89. package/dist/utils/aria.d.ts +4 -5
  90. package/dist/utils/trigger.d.ts +46 -0
  91. package/package.json +1 -1
  92. package/dist/Card-CPq6dsut.js +0 -34
  93. package/dist/Card-CQ-8_1tO.cjs +0 -1
  94. package/dist/Code-B7s_rN0G.cjs +0 -4
  95. package/dist/Icon-BIBzgznI.cjs +0 -1
  96. package/dist/Table-BqWBgMTU.cjs +0 -1
  97. package/dist/Tooltip-CCuE-hfp.cjs +0 -1
  98. package/dist/Tooltip-CeyRKNv4.js +0 -231
  99. package/dist/aria-Bntn6ad_.cjs +0 -1
  100. package/dist/aria-CeA9QfD1.js +0 -15
  101. package/dist/effects-D5CWf-Pl.js +0 -8
  102. package/dist/effects-D85L_7zM.cjs +0 -1
  103. package/dist/useFloatingPosition-Dq8xpr3E.js +0 -27
  104. package/dist/useFloatingPosition-g5kXywoB.cjs +0 -1
  105. package/dist/usePresence-B5RYv4e1.cjs +0 -1
@@ -0,0 +1,225 @@
1
+ "use client";
2
+ import { jsx as V, jsxs as q, Fragment as De } from "react/jsx-runtime";
3
+ import { useMemo as X, createContext as Ie, forwardRef as he, Fragment as ve, useId as Pe, useContext as Le, useRef as o, useState as N, useCallback as c, useEffect as G, cloneElement as J } from "react";
4
+ import { m as Fe } from "./aria-Bv-xVREf.js";
5
+ import { g as Oe, a as K } from "./reference-CXMr27nM.js";
6
+ import { u as _e, r as Me } from "./useFloatingPosition-MGoyautY.js";
7
+ import { u as xe } from "./effects-DGbA6Q2O.js";
8
+ import { b as We, c as ke, d as Be, P as Ne } from "./usePresence-BTRY1_l-.js";
9
+ import { i as Ve } from "./focus-restoration-BvNZzrQA.js";
10
+ import { S as Ae } from "./Surface-vEFsZC12.js";
11
+ const Ce = 500, Z = Ie(null);
12
+ function je(s) {
13
+ const { children: p, delay: u = Ce } = s, i = X(() => ({
14
+ delay: u
15
+ }), [u]);
16
+ return /* @__PURE__ */ V(Z.Provider, { value: i, children: p });
17
+ }
18
+ const ee = 500, Q = 100;
19
+ function ze(s, p, u, i) {
20
+ p.current = s, K(u, s), K(i, s);
21
+ }
22
+ function Se(s) {
23
+ return Number.isFinite(s) ? Math.max(0, s) : ee;
24
+ }
25
+ const Ye = he(function(p, u) {
26
+ const {
27
+ children: i,
28
+ className: re,
29
+ content: m,
30
+ contentClassName: ne,
31
+ contentStyle: A,
32
+ delay: te,
33
+ disabled: T = !1,
34
+ onOpenChange: R,
35
+ placement: C = "top",
36
+ style: oe
37
+ } = p;
38
+ if (m == null || typeof m == "boolean" || typeof m == "string" && !m.trim())
39
+ throw new Error("Tooltip content must not be empty");
40
+ if (i.type === ve)
41
+ throw new Error("Tooltip requires a single non-Fragment trigger");
42
+ const j = `${Pe()}-tooltip`, F = Le(Z), O = i.props, z = Oe(i), g = o(null), _ = o(null), S = o(T), M = o(!1), D = o(null), I = o(null), h = o(null), v = o(!1), w = o(!1), y = o(!1), l = o(!1), [P, se] = N(null), [ie, ce] = N(null), [L, ue] = N(!1);
43
+ S.current = T;
44
+ const x = Se(
45
+ te ?? (F == null ? void 0 : F.delay) ?? ee
46
+ ), b = We(L), Y = (P == null ? void 0 : P.ownerDocument) ?? (typeof document > "u" ? null : document), W = xe("Tooltip").boundaryElement, k = ke(b.present, W), a = _e(
47
+ b.present,
48
+ C,
49
+ P,
50
+ ie,
51
+ W
52
+ ), le = X(
53
+ () => [g, _],
54
+ []
55
+ ), ae = Fe(
56
+ O["aria-describedby"],
57
+ j
58
+ ), fe = L && b.present ? ae : O["aria-describedby"], $ = c(
59
+ (e) => {
60
+ ze(
61
+ e,
62
+ g,
63
+ z,
64
+ u
65
+ ), se(e);
66
+ },
67
+ [u, z]
68
+ ), de = c(
69
+ (e) => {
70
+ _.current = e, e || (l.current = !1), ce(e);
71
+ },
72
+ []
73
+ ), n = c(() => {
74
+ const e = D.current;
75
+ e && e.ownerWindow.clearTimeout(e.timerId), D.current = null;
76
+ }, []), t = c(() => {
77
+ const e = I.current;
78
+ e && e.ownerWindow.clearTimeout(e.timerId), I.current = null;
79
+ }, []), E = c(() => {
80
+ const e = h.current;
81
+ e && e.ownerWindow.clearTimeout(e.timerId), h.current = null;
82
+ }, []), r = c((e) => {
83
+ M.current !== e && (e || (l.current = !1), M.current = e, ue(e), R == null || R(e));
84
+ }, [R]), B = c((e) => {
85
+ var H, U;
86
+ if (t(), w.current || y.current || l.current)
87
+ return;
88
+ if (e === 0) {
89
+ r(!1);
90
+ return;
91
+ }
92
+ const f = ((H = g.current) == null ? void 0 : H.ownerDocument.defaultView) ?? ((U = _.current) == null ? void 0 : U.ownerDocument.defaultView);
93
+ if (!f) {
94
+ r(!1);
95
+ return;
96
+ }
97
+ const d = f.setTimeout(() => {
98
+ I.current = null, !w.current && !y.current && !l.current && r(!1);
99
+ }, e);
100
+ I.current = {
101
+ ownerWindow: f,
102
+ timerId: d
103
+ };
104
+ }, [t, r]), me = c(() => {
105
+ var d;
106
+ if (n(), t(), x === 0) {
107
+ r(!0);
108
+ return;
109
+ }
110
+ const e = (d = g.current) == null ? void 0 : d.ownerDocument.defaultView;
111
+ if (!e) return;
112
+ const f = e.setTimeout(() => {
113
+ D.current = null, S.current || r(!0);
114
+ }, x);
115
+ D.current = { ownerWindow: e, timerId: f };
116
+ }, [t, n, x, r]);
117
+ function pe(e) {
118
+ if (w.current = !0, t(), v.current || Ve(e.currentTarget)) {
119
+ n();
120
+ return;
121
+ }
122
+ n(), r(!0);
123
+ }
124
+ function Te(e) {
125
+ e.currentTarget.contains(e.relatedTarget) || (w.current = !1, n(), B(0));
126
+ }
127
+ function ge() {
128
+ y.current = !0, me();
129
+ }
130
+ function we() {
131
+ y.current = !1, n(), B(Q);
132
+ }
133
+ function ye() {
134
+ l.current = !0, t();
135
+ }
136
+ function be() {
137
+ l.current = !1, B(Q);
138
+ }
139
+ function Ee() {
140
+ var d;
141
+ n(), t(), r(!1);
142
+ const e = (d = g.current) == null ? void 0 : d.ownerDocument.defaultView;
143
+ if (!e) return;
144
+ v.current = !0, E();
145
+ const f = e.setTimeout(() => {
146
+ v.current = !1, h.current = null;
147
+ }, 0);
148
+ h.current = { ownerWindow: e, timerId: f };
149
+ }
150
+ if (Be({
151
+ boundary: W,
152
+ active: L,
153
+ boundaries: le,
154
+ dismissOnPointerDownOutside: !0,
155
+ layerId: k.id,
156
+ onEscapeDismiss: () => r(!1),
157
+ onPointerDownOutsideDismiss: () => r(!1),
158
+ ownerDocument: Y
159
+ }), G(() => {
160
+ T && (n(), t(), E(), v.current = !1, w.current = !1, y.current = !1, l.current = !1, M.current && r(!1));
161
+ }, [
162
+ t,
163
+ n,
164
+ E,
165
+ T,
166
+ r
167
+ ]), G(() => () => {
168
+ n(), t(), E();
169
+ }, [t, n, E]), T)
170
+ return J(
171
+ i,
172
+ { ref: $ }
173
+ );
174
+ const Re = J(
175
+ i,
176
+ Me(O, {
177
+ "aria-describedby": fe,
178
+ className: ["nk-tooltip__trigger", re].filter(Boolean).join(" "),
179
+ onBlur: Te,
180
+ onFocus: pe,
181
+ onMouseEnter: ge,
182
+ onMouseLeave: we,
183
+ onPointerDown: Ee,
184
+ ref: $,
185
+ style: oe
186
+ })
187
+ );
188
+ return /* @__PURE__ */ q(De, { children: [
189
+ Re,
190
+ b.present && Y ? /* @__PURE__ */ V(Ne, { children: /* @__PURE__ */ q(
191
+ Ae,
192
+ {
193
+ ref: de,
194
+ "aria-hidden": L ? void 0 : !0,
195
+ className: ["nk-tooltip", ne].filter(Boolean).join(" "),
196
+ "data-placement": (a == null ? void 0 : a.placement) ?? C,
197
+ "data-state": b.state === "closing" ? "closing" : "open",
198
+ id: j,
199
+ onMouseEnter: ye,
200
+ onMouseLeave: be,
201
+ role: "tooltip",
202
+ style: a ? {
203
+ ...A,
204
+ "--nk-tooltip-arrow-offset": `${a.arrowOffset}px`,
205
+ left: a.left,
206
+ top: a.top,
207
+ zIndex: k.zIndex
208
+ } : {
209
+ ...A,
210
+ visibility: "hidden",
211
+ zIndex: k.zIndex
212
+ },
213
+ children: [
214
+ /* @__PURE__ */ V("span", { "aria-hidden": "true", className: "nk-tooltip__arrow" }),
215
+ m
216
+ ]
217
+ }
218
+ ) }) : null
219
+ ] });
220
+ }), er = Object.assign(Ye, {
221
+ Provider: je
222
+ });
223
+ export {
224
+ er as T
225
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";const m=require("react/jsx-runtime"),n=require("react"),we=require("./aria-DM-xYEHQ.cjs"),W=require("./reference-C2guRuR0.cjs"),$=require("./useFloatingPosition-DQgw-w_Z.cjs"),be=require("./effects-D98vUn6N.cjs"),F=require("./usePresence-Dm0mls5p.cjs"),Ee=require("./focus-restoration-70WcQRr5.cjs"),ye=require("./Surface-BttJYSDt.cjs"),De=500,J=n.createContext(null);function Ie(s){const{children:p,delay:i=De}=s,c=n.useMemo(()=>({delay:i}),[i]);return m.jsx(J.Provider,{value:c,children:p})}const K=500,G=100;function he(s,p,i,c){p.current=s,W.assignElementReference(i,s),W.assignElementReference(c,s)}function ve(s){return Number.isFinite(s)?Math.max(0,s):K}const Pe=n.forwardRef(function(p,i){const{children:c,className:Q,content:d,contentClassName:X,contentStyle:B,delay:Z,disabled:T=!1,onOpenChange:y,placement:N="top",style:ee}=p;if(d==null||typeof d=="boolean"||typeof d=="string"&&!d.trim())throw new Error("Tooltip content must not be empty");if(c.type===n.Fragment)throw new Error("Tooltip requires a single non-Fragment trigger");const S=`${n.useId()}-tooltip`,k=n.useContext(J),O=c.props,V=W.getElementReference(c),g=n.useRef(null),C=n.useRef(null),A=n.useRef(T),_=n.useRef(!1),D=n.useRef(null),I=n.useRef(null),h=n.useRef(null),v=n.useRef(!1),R=n.useRef(!1),w=n.useRef(!1),u=n.useRef(!1),[P,ne]=n.useState(null),[re,te]=n.useState(null),[L,oe]=n.useState(!1);A.current=T;const x=ve(Z??(k==null?void 0:k.delay)??K),b=F.usePresence(L),z=(P==null?void 0:P.ownerDocument)??(typeof document>"u"?null:document),M=be.useBoundary("Tooltip").boundaryElement,q=F.useOverlayLayer(b.present,M),l=$.useFloatingPosition(b.present,N,P,re,M),se=n.useMemo(()=>[g,C],[]),ce=we.mergeIdentifiers(O["aria-describedby"],S),ie=L&&b.present?ce:O["aria-describedby"],Y=n.useCallback(e=>{he(e,g,V,i),ne(e)},[i,V]),ue=n.useCallback(e=>{C.current=e,e||(u.current=!1),te(e)},[]),t=n.useCallback(()=>{const e=D.current;e&&e.ownerWindow.clearTimeout(e.timerId),D.current=null},[]),o=n.useCallback(()=>{const e=I.current;e&&e.ownerWindow.clearTimeout(e.timerId),I.current=null},[]),E=n.useCallback(()=>{const e=h.current;e&&e.ownerWindow.clearTimeout(e.timerId),h.current=null},[]),r=n.useCallback(e=>{_.current!==e&&(e||(u.current=!1),_.current=e,oe(e),y==null||y(e))},[y]),j=n.useCallback(e=>{var H,U;if(o(),R.current||w.current||u.current)return;if(e===0){r(!1);return}const a=((H=g.current)==null?void 0:H.ownerDocument.defaultView)??((U=C.current)==null?void 0:U.ownerDocument.defaultView);if(!a){r(!1);return}const f=a.setTimeout(()=>{I.current=null,!R.current&&!w.current&&!u.current&&r(!1)},e);I.current={ownerWindow:a,timerId:f}},[o,r]),le=n.useCallback(()=>{var f;if(t(),o(),x===0){r(!0);return}const e=(f=g.current)==null?void 0:f.ownerDocument.defaultView;if(!e)return;const a=e.setTimeout(()=>{D.current=null,A.current||r(!0)},x);D.current={ownerWindow:e,timerId:a}},[o,t,x,r]);function ae(e){if(R.current=!0,o(),v.current||Ee.isElementFocusRestoration(e.currentTarget)){t();return}t(),r(!0)}function fe(e){e.currentTarget.contains(e.relatedTarget)||(R.current=!1,t(),j(0))}function de(){w.current=!0,le()}function me(){w.current=!1,t(),j(G)}function pe(){u.current=!0,o()}function Te(){u.current=!1,j(G)}function ge(){var f;t(),o(),r(!1);const e=(f=g.current)==null?void 0:f.ownerDocument.defaultView;if(!e)return;v.current=!0,E();const a=e.setTimeout(()=>{v.current=!1,h.current=null},0);h.current={ownerWindow:e,timerId:a}}if(F.useDismissableLayer({boundary:M,active:L,boundaries:se,dismissOnPointerDownOutside:!0,layerId:q.id,onEscapeDismiss:()=>r(!1),onPointerDownOutsideDismiss:()=>r(!1),ownerDocument:z}),n.useEffect(()=>{T&&(t(),o(),E(),v.current=!1,R.current=!1,w.current=!1,u.current=!1,_.current&&r(!1))},[o,t,E,T,r]),n.useEffect(()=>()=>{t(),o(),E()},[o,t,E]),T)return n.cloneElement(c,{ref:Y});const Re=n.cloneElement(c,$.resolveTriggerOverrides(O,{"aria-describedby":ie,className:["nk-tooltip__trigger",Q].filter(Boolean).join(" "),onBlur:fe,onFocus:ae,onMouseEnter:de,onMouseLeave:me,onPointerDown:ge,ref:Y,style:ee}));return m.jsxs(m.Fragment,{children:[Re,b.present&&z?m.jsx(F.Portal,{children:m.jsxs(ye.Surface,{ref:ue,"aria-hidden":L?void 0:!0,className:["nk-tooltip",X].filter(Boolean).join(" "),"data-placement":(l==null?void 0:l.placement)??N,"data-state":b.state==="closing"?"closing":"open",id:S,onMouseEnter:pe,onMouseLeave:Te,role:"tooltip",style:l?{...B,"--nk-tooltip-arrow-offset":`${l.arrowOffset}px`,left:l.left,top:l.top,zIndex:q.zIndex}:{...B,visibility:"hidden",zIndex:q.zIndex},children:[m.jsx("span",{"aria-hidden":"true",className:"nk-tooltip__arrow"}),d]})}):null]})}),Le=Object.assign(Pe,{Provider:Ie});exports.Tooltip2=Le;
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-CCuE-hfp.cjs");exports.default=e.Tooltip2;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Tooltip-DDPh_YFO.cjs");exports.default=e.Tooltip2;
package/dist/Tooltip.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { T as a } from "./Tooltip-CeyRKNv4.js";
2
+ import { T as a } from "./Tooltip-CpyROf6x.js";
3
3
  export {
4
4
  a as default
5
5
  };
@@ -0,0 +1,17 @@
1
+ function o(e) {
2
+ return e !== void 0 && e !== !1 && e !== "false";
3
+ }
4
+ function r(e, t) {
5
+ return e ? !0 : t;
6
+ }
7
+ function u(...e) {
8
+ const t = e.flatMap(
9
+ (n) => (n == null ? void 0 : n.split(/\s+/).filter(Boolean)) ?? []
10
+ ), s = [...new Set(t)];
11
+ return s.length > 0 ? s.join(" ") : void 0;
12
+ }
13
+ export {
14
+ o as h,
15
+ u as m,
16
+ r
17
+ };
@@ -0,0 +1 @@
1
+ "use strict";function r(e){return e!==void 0&&e!==!1&&e!=="false"}function o(e,t){return e?!0:t}function l(...e){const t=e.flatMap(n=>(n==null?void 0:n.split(/\s+/).filter(Boolean))??[]),s=[...new Set(t)];return s.length>0?s.join(" "):void 0}exports.hasInvalidState=r;exports.mergeIdentifiers=l;exports.resolveAriaInvalid=o;
@@ -0,0 +1,28 @@
1
+ import type { BoundaryWidthStore } from "../contexts/BoundaryContext";
2
+ /** A type representing what decides whether a Boundary paints a document. */
3
+ export type DocumentBackgroundOptions = {
4
+ /** Whether another Boundary encloses this one. */
5
+ nested: boolean;
6
+ /** The mounted Boundary root, once it has rendered. */
7
+ rootElement: HTMLElement | null;
8
+ /** The Boundary's width store, observed for resizes. */
9
+ width: BoundaryWidthStore;
10
+ };
11
+ /**
12
+ * Extends a Boundary's appearance across the whole document.
13
+ *
14
+ * A Boundary paints an element within the page rather than the page itself,
15
+ * so a viewer scrolling past the document's edge meets the browser's canvas
16
+ * instead, and a dark interface appears to sit on a white page.
17
+ *
18
+ * The page Boundary is recognized rather than configured: the one no other
19
+ * Boundary encloses, which also spans the viewport. Either test alone admits
20
+ * a Boundary that is not the page, so both must hold.
21
+ *
22
+ * @param options - The Boundary being resolved.
23
+ *
24
+ * @note A document adopts the appearance only once the Boundary has been
25
+ * measured, which a server render precedes entirely. A page needing the two to
26
+ * agree from its first paint declares the background in its own markup.
27
+ */
28
+ export declare function useDocumentBackground(options: DocumentBackgroundOptions): void;
@@ -1,40 +1,39 @@
1
1
  import { type HTMLAttributes, type ReactNode } from "react";
2
+ import CardBody from "./components/CardBody";
3
+ import CardFooter from "./components/CardFooter";
4
+ import CardHeader from "./components/CardHeader";
2
5
  import "./styles/card.css";
3
- /** A type representing the optional labels displayed in a Card header. */
4
- export type CardHeader = {
5
- /** The primary label displayed in the Card header. */
6
- title: string;
7
- /** The secondary label displayed after the primary label. */
8
- subtitle?: string;
9
- };
10
- /** A type representing the internal spacing applied by a Card. */
6
+ export type { CardBodyProps } from "./components/CardBody";
7
+ export type { CardFooterProps } from "./components/CardFooter";
8
+ export type { CardHeaderProps } from "./components/CardHeader";
9
+ /** A type representing the internal spacing applied to a Card region. */
11
10
  export type CardSpacing = "none" | "standard";
11
+ /** A type representing the complete compound Card component. */
12
+ type CardComponent = typeof CardRoot & {
13
+ /** The content region carrying optional internal spacing. */
14
+ Body: typeof CardBody;
15
+ /** The region separated from preceding Card content by a border. */
16
+ Footer: typeof CardFooter;
17
+ /** The region separated from following Card content by a border. */
18
+ Header: typeof CardHeader;
19
+ };
12
20
  /** A type representing properties for the Card component. */
13
21
  export type CardProps = HTMLAttributes<HTMLDivElement> & {
14
- /** The content displayed inside the Card. */
22
+ /** The regions composing the Card surface. */
15
23
  children: ReactNode;
16
- /** The optional fixed-format labels displayed above the Card content. */
17
- header?: CardHeader;
18
- /** The internal spacing applied to the Card content region. */
19
- spacing?: CardSpacing;
20
24
  };
21
25
  /**
22
26
  * Renders a bordered surface for grouping related content.
23
27
  *
24
- * A header moves spacing into a private content region beneath its labels.
25
- * Spacing can be removed for custom full-bleed layouts.
26
- *
27
- * @param props - The properties that configure the Card.
28
+ * @param props - The native properties that configure the Card surface.
28
29
  * @param forwardedReference - The reference assigned to the Card element.
29
30
  *
30
31
  * @returns The rendered Card surface.
31
32
  */
32
- declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
33
- /** The content displayed inside the Card. */
33
+ declare const CardRoot: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
34
+ /** The regions composing the Card surface. */
34
35
  children: ReactNode;
35
- /** The optional fixed-format labels displayed above the Card content. */
36
- header?: CardHeader;
37
- /** The internal spacing applied to the Card content region. */
38
- spacing?: CardSpacing;
39
36
  } & import("react").RefAttributes<HTMLDivElement>>;
37
+ /** The compound Card component and its structural regions. */
38
+ declare const Card: CardComponent;
40
39
  export default Card;
@@ -0,0 +1,24 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import type { CardSpacing } from "../Card";
3
+ /** A type representing properties for the Card.Body component. */
4
+ export type CardBodyProps = HTMLAttributes<HTMLDivElement> & {
5
+ /** The content rendered in the Card body. */
6
+ children?: ReactNode;
7
+ /** The internal spacing applied around the body content. */
8
+ spacing?: CardSpacing;
9
+ };
10
+ /**
11
+ * Renders the optionally spaced content region of a Card.
12
+ *
13
+ * @param props - The properties that configure the Card body.
14
+ * @param forwardedReference - The reference assigned to the body element.
15
+ *
16
+ * @returns The rendered Card body.
17
+ */
18
+ declare const CardBody: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
19
+ /** The content rendered in the Card body. */
20
+ children?: ReactNode;
21
+ /** The internal spacing applied around the body content. */
22
+ spacing?: CardSpacing;
23
+ } & import("react").RefAttributes<HTMLDivElement>>;
24
+ export default CardBody;
@@ -0,0 +1,24 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import type { CardSpacing } from "../Card";
3
+ /** A type representing properties for the Card.Footer component. */
4
+ export type CardFooterProps = HTMLAttributes<HTMLDivElement> & {
5
+ /** The content rendered after the Card body. */
6
+ children?: ReactNode;
7
+ /** The internal spacing applied around the footer content. */
8
+ spacing?: CardSpacing;
9
+ };
10
+ /**
11
+ * Renders a Card region separated from preceding content by a border.
12
+ *
13
+ * @param props - The native properties that configure the Card footer.
14
+ * @param forwardedReference - The reference assigned to the footer element.
15
+ *
16
+ * @returns The rendered Card footer.
17
+ */
18
+ declare const CardFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
19
+ /** The content rendered after the Card body. */
20
+ children?: ReactNode;
21
+ /** The internal spacing applied around the footer content. */
22
+ spacing?: CardSpacing;
23
+ } & import("react").RefAttributes<HTMLDivElement>>;
24
+ export default CardFooter;
@@ -0,0 +1,24 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import type { CardSpacing } from "../Card";
3
+ /** A type representing properties for the Card.Header component. */
4
+ export type CardHeaderProps = HTMLAttributes<HTMLDivElement> & {
5
+ /** The content rendered before the Card body. */
6
+ children?: ReactNode;
7
+ /** The internal spacing applied around the header content. */
8
+ spacing?: CardSpacing;
9
+ };
10
+ /**
11
+ * Renders a Card region separated from following content by a border.
12
+ *
13
+ * @param props - The native properties that configure the Card header.
14
+ * @param forwardedReference - The reference assigned to the header element.
15
+ *
16
+ * @returns The rendered Card header.
17
+ */
18
+ declare const CardHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
19
+ /** The content rendered before the Card body. */
20
+ children?: ReactNode;
21
+ /** The internal spacing applied around the header content. */
22
+ spacing?: CardSpacing;
23
+ } & import("react").RefAttributes<HTMLDivElement>>;
24
+ export default CardHeader;
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Card";
2
- export type { CardHeader, CardProps, CardSpacing, } from "./Card";
2
+ export type { CardBodyProps, CardFooterProps, CardHeaderProps, CardProps, CardSpacing, } from "./Card";
@@ -2,6 +2,8 @@ import { type HTMLAttributes } from "react";
2
2
  import "./styles/code.css";
3
3
  /** A syntax-highlighting language supported by Code. */
4
4
  export type CodeLanguage = "C" | "C++" | "CSS" | "Go" | "HTML" | "JSON" | "JavaScript" | "Markdown" | "Python" | "Ruby" | "Rust" | "SQL" | "Shell" | "TypeScript" | "YAML";
5
+ /** A type representing the outer frame applied around source code. */
6
+ export type CodeFrame = "none" | "outline";
5
7
  /** Properties owned by Code rather than its native container. */
6
8
  type CodeOwnProps = {
7
9
  /** Native properties applied to the rendered code element. */
@@ -10,7 +12,9 @@ type CodeOwnProps = {
10
12
  code: string;
11
13
  /** The additional class name applied to the horizontal scroll container. */
12
14
  containerClassName?: string;
13
- /** The language label and optional syntax grammar applied to the source. */
15
+ /** The outer border and corner treatment applied around the source. */
16
+ frame?: CodeFrame;
17
+ /** The optional syntax-highlighting grammar applied to the source. */
14
18
  language?: CodeLanguage;
15
19
  /**
16
20
  * The maximum line count rendered with individual wrappers and numbers.
@@ -25,13 +29,11 @@ type CodeOwnProps = {
25
29
  maxHighlightLength?: number | null;
26
30
  /** Native properties applied to the rendered preformatted element. */
27
31
  preProps?: Omit<HTMLAttributes<HTMLPreElement>, "children" | "dangerouslySetInnerHTML">;
28
- /** The optional source title displayed in the Card header. */
29
- title?: string;
30
32
  };
31
33
  /** A type representing properties for the Code component. */
32
- export type CodeProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "dangerouslySetInnerHTML" | "title"> & CodeOwnProps;
34
+ export type CodeProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "dangerouslySetInnerHTML"> & CodeOwnProps;
33
35
  /**
34
- * Renders highlighted, line-numbered source inside a Card.
36
+ * Renders highlighted, line-numbered source inside an optional frame.
35
37
  *
36
38
  * The horizontal scroll region becomes keyboard-focusable only when its
37
39
  * content overflows, while line numbers remain hidden from assistive
@@ -39,9 +41,9 @@ export type CodeProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "dange
39
41
  * wrappers are bounded while oversized source remains complete as plain text.
40
42
  *
41
43
  * @param props - The source, presentation, and native container properties.
42
- * @param forwardedReference - The reference assigned to the outer Card.
44
+ * @param forwardedReference - The reference assigned to the outer surface.
43
45
  *
44
46
  * @returns The rendered source-code surface.
45
47
  */
46
- declare const Code: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "children" | "dangerouslySetInnerHTML"> & CodeOwnProps & import("react").RefAttributes<HTMLDivElement>>;
48
+ declare const Code: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "dangerouslySetInnerHTML"> & CodeOwnProps & import("react").RefAttributes<HTMLDivElement>>;
47
49
  export default Code;
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Code";
2
- export type { CodeLanguage, CodeProps } from "./Code";
2
+ export type { CodeFrame, CodeLanguage, CodeProps } from "./Code";
@@ -0,0 +1,11 @@
1
+ import type { IconGraphicProps } from "./types";
2
+ /**
3
+ * Renders an Apple 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 a Bing 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 a chain 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 a Facebook 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 a Google 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 Instagram 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 a Microsoft 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 a Twitter 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;
@@ -6,6 +6,13 @@ export declare const iconGraphics: {
6
6
  readonly mail: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
7
  readonly github: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
8
  readonly globe: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
+ readonly google: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
+ readonly microsoft: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ readonly bing: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ readonly apple: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
+ readonly twitter: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ readonly facebook: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ readonly instagram: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
16
  readonly linkedin: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
17
  readonly reddit: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
18
  readonly exit: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
@@ -21,6 +28,7 @@ export declare const iconGraphics: {
21
28
  readonly plus: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
22
29
  readonly minus: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
30
  readonly window: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
+ readonly chain: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
24
32
  readonly user: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
33
  readonly duplicate: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
26
34
  readonly eye: import("react").ForwardRefExoticComponent<Omit<import("../icons/types").IconGraphicProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
@@ -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" | "pattern" | "type" | "value" | "maxLength" | "minLength"> & {
50
+ declare const PinInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "className" | "style" | "inputMode" | "children" | "onPaste" | "onChange" | "size" | "value" | "pattern" | "type" | "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. */
@@ -44,7 +44,7 @@ type UsePinInputResult = {
44
44
  /** Synchronizes visual and native selection state. */
45
45
  handleSelect: (event: SyntheticEvent<HTMLInputElement>) => void;
46
46
  /** Focuses the visual slot selected with a pointer. */
47
- handleSlotPointerDown: (event: PointerEvent<HTMLSpanElement>, index: number) => void;
47
+ handleSlotPointerDown: (event: PointerEvent<HTMLLabelElement>, index: number) => void;
48
48
  /** The stable callback assigning the native input reference. */
49
49
  inputCallbackReference: (element: HTMLInputElement | null) => void;
50
50
  /** The normalized supported character count. */