@box-kite/react 0.0.1 → 1.0.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 (188) hide show
  1. package/.claude/rules/box-kite-rules.md +43 -0
  2. package/.claude/skills/box-kite/SKILL.md +431 -0
  3. package/BOX_AI_CONTEXT.md +1833 -0
  4. package/BOX_KITE_AI_CONTEXT.md +1833 -0
  5. package/LICENSE +21 -0
  6. package/README.md +710 -7
  7. package/a11y.cjs +1 -0
  8. package/a11y.d.ts +15 -0
  9. package/a11y.mjs +3 -0
  10. package/behavior.cjs +1 -0
  11. package/behavior.mjs +295 -0
  12. package/box.cjs +1 -0
  13. package/box.d.ts +46 -0
  14. package/box.mjs +23 -0
  15. package/client.cjs +1 -0
  16. package/client.mjs +163 -0
  17. package/components/baseSvg.cjs +1 -0
  18. package/components/baseSvg.d.ts +5 -0
  19. package/components/baseSvg.mjs +21 -0
  20. package/components/button.cjs +1 -0
  21. package/components/button.d.ts +16 -0
  22. package/components/button.mjs +19 -0
  23. package/components/chart.cjs +1 -0
  24. package/components/chart.d.ts +82 -0
  25. package/components/chart.mjs +261 -0
  26. package/components/checkbox.cjs +1 -0
  27. package/components/checkbox.d.ts +28 -0
  28. package/components/checkbox.mjs +38 -0
  29. package/components/dataGrid/components/dataGridBody.d.ts +7 -0
  30. package/components/dataGrid/components/dataGridBottomBar.d.ts +6 -0
  31. package/components/dataGrid/components/dataGridCell.d.ts +15 -0
  32. package/components/dataGrid/components/dataGridCellRowDetail.d.ts +6 -0
  33. package/components/dataGrid/components/dataGridCellRowSelection.d.ts +6 -0
  34. package/components/dataGrid/components/dataGridCellText.d.ts +6 -0
  35. package/components/dataGrid/components/dataGridColumnFilter.d.ts +9 -0
  36. package/components/dataGrid/components/dataGridColumnGroups.d.ts +7 -0
  37. package/components/dataGrid/components/dataGridContent.d.ts +6 -0
  38. package/components/dataGrid/components/dataGridDetailRow.d.ts +8 -0
  39. package/components/dataGrid/components/dataGridEmptyColumns.d.ts +6 -0
  40. package/components/dataGrid/components/dataGridFilterCell.d.ts +11 -0
  41. package/components/dataGrid/components/dataGridFilterRow.d.ts +6 -0
  42. package/components/dataGrid/components/dataGridGlobalFilter.d.ts +6 -0
  43. package/components/dataGrid/components/dataGridGroupRow.d.ts +8 -0
  44. package/components/dataGrid/components/dataGridHeader.d.ts +6 -0
  45. package/components/dataGrid/components/dataGridHeaderCell.d.ts +9 -0
  46. package/components/dataGrid/components/dataGridHeaderCellContextMenu.d.ts +11 -0
  47. package/components/dataGrid/components/dataGridHeaderCellResizer.d.ts +14 -0
  48. package/components/dataGrid/components/dataGridLoader.d.ts +11 -0
  49. package/components/dataGrid/components/dataGridPagination.d.ts +6 -0
  50. package/components/dataGrid/components/dataGridRow.d.ts +8 -0
  51. package/components/dataGrid/components/dataGridTopBar.d.ts +6 -0
  52. package/components/dataGrid/components/dataGridTopBarContextMenu.d.ts +6 -0
  53. package/components/dataGrid/contracts/dataGridContract.d.ts +213 -0
  54. package/components/dataGrid/gridNavigationContext.d.ts +24 -0
  55. package/components/dataGrid/models/cellModel.d.ts +18 -0
  56. package/components/dataGrid/models/columnModel.d.ts +150 -0
  57. package/components/dataGrid/models/columnVisibilityModel.d.ts +24 -0
  58. package/components/dataGrid/models/detailRowModel.d.ts +22 -0
  59. package/components/dataGrid/models/filterModel.d.ts +22 -0
  60. package/components/dataGrid/models/gridModel.d.ts +206 -0
  61. package/components/dataGrid/models/groupRowCellModel.d.ts +26 -0
  62. package/components/dataGrid/models/groupRowModel.d.ts +48 -0
  63. package/components/dataGrid/models/headerCellModel.d.ts +83 -0
  64. package/components/dataGrid/models/paginationModel.d.ts +32 -0
  65. package/components/dataGrid/models/rowModel.d.ts +34 -0
  66. package/components/dataGrid/models/viewportModel.d.ts +44 -0
  67. package/components/dataGrid/useGrid.d.ts +8 -0
  68. package/components/dataGrid/useGridNavigation.d.ts +21 -0
  69. package/components/dataGrid.cjs +1 -0
  70. package/components/dataGrid.d.ts +2 -0
  71. package/components/dataGrid.mjs +3178 -0
  72. package/components/dropdown/dropdownContext.d.ts +44 -0
  73. package/components/dropdown/dropdownItems.d.ts +22 -0
  74. package/components/dropdown/dropdownRowRenderer.d.ts +8 -0
  75. package/components/dropdown/dropdownSearch.d.ts +21 -0
  76. package/components/dropdown/utils.d.ts +1 -0
  77. package/components/dropdown.cjs +1 -0
  78. package/components/dropdown.d.ts +47 -0
  79. package/components/dropdown.mjs +479 -0
  80. package/components/flex.cjs +1 -0
  81. package/components/flex.d.ts +6 -0
  82. package/components/flex.mjs +16 -0
  83. package/components/form.cjs +1 -0
  84. package/components/form.d.ts +10 -0
  85. package/components/form.mjs +58 -0
  86. package/components/grid.cjs +1 -0
  87. package/components/grid.d.ts +6 -0
  88. package/components/grid.mjs +16 -0
  89. package/components/icon.cjs +1 -0
  90. package/components/icon.d.ts +36 -0
  91. package/components/icon.mjs +41 -0
  92. package/components/overlay.cjs +1 -0
  93. package/components/overlay.d.ts +43 -0
  94. package/components/overlay.mjs +82 -0
  95. package/components/presence.cjs +1 -0
  96. package/components/presence.d.ts +30 -0
  97. package/components/presence.mjs +11 -0
  98. package/components/radioButton.cjs +1 -0
  99. package/components/radioButton.d.ts +24 -0
  100. package/components/radioButton.mjs +32 -0
  101. package/components/radioGroup.cjs +1 -0
  102. package/components/radioGroup.d.ts +38 -0
  103. package/components/radioGroup.mjs +79 -0
  104. package/components/select.cjs +1 -0
  105. package/components/select.d.ts +42 -0
  106. package/components/select.mjs +36 -0
  107. package/components/semantics.cjs +1 -0
  108. package/components/semantics.d.ts +34 -0
  109. package/components/semantics.mjs +17 -0
  110. package/components/svg.cjs +1 -0
  111. package/components/svg.d.ts +63 -0
  112. package/components/svg.mjs +141 -0
  113. package/components/switch.cjs +1 -0
  114. package/components/switch.d.ts +20 -0
  115. package/components/switch.mjs +25 -0
  116. package/components/textarea.cjs +1 -0
  117. package/components/textarea.d.ts +27 -0
  118. package/components/textarea.mjs +33 -0
  119. package/components/textbox.cjs +1 -0
  120. package/components/textbox.d.ts +26 -0
  121. package/components/textbox.mjs +33 -0
  122. package/components/tooltip.cjs +1 -0
  123. package/components/tooltip.d.ts +63 -0
  124. package/components/tooltip.mjs +108 -0
  125. package/components/visuallyHidden.cjs +1 -0
  126. package/components/visuallyHidden.d.ts +6 -0
  127. package/components/visuallyHidden.mjs +23 -0
  128. package/effects.cjs +1 -0
  129. package/effects.mjs +6 -0
  130. package/forms.cjs +1 -0
  131. package/forms.mjs +21 -0
  132. package/icons/dotsIcon.d.ts +2 -0
  133. package/icons/expandIcon.d.ts +2 -0
  134. package/icons/groupingIcon.d.ts +2 -0
  135. package/icons/pinIcon.d.ts +2 -0
  136. package/icons/searchIcon.d.ts +2 -0
  137. package/icons/sortIcon.d.ts +2 -0
  138. package/motion.cjs +1 -0
  139. package/motion.mjs +66 -0
  140. package/package.json +203 -7
  141. package/platform.cjs +1 -0
  142. package/platform.mjs +32 -0
  143. package/react/a11y/callbacks.d.ts +12 -0
  144. package/react/a11y/useControllableState.d.ts +25 -0
  145. package/react/a11y/useDismiss.d.ts +25 -0
  146. package/react/a11y/useFocusReturn.d.ts +18 -0
  147. package/react/a11y/useIdentifier.d.ts +17 -0
  148. package/react/a11y/useRovingFocus.d.ts +84 -0
  149. package/react/animation/usePresence.d.ts +32 -0
  150. package/react/boxClassNames.d.ts +25 -0
  151. package/react/boxProps.d.ts +49 -0
  152. package/react/boxTagProps.d.ts +7 -0
  153. package/react/clientRuntime.d.ts +11 -0
  154. package/react/effects.d.ts +10 -0
  155. package/react/forms/labelledControl.d.ts +17 -0
  156. package/react/forms/placeholderProp.d.ts +13 -0
  157. package/react/hooks/usePortalContainer.d.ts +1 -0
  158. package/react/hooks/useVirtualization.d.ts +43 -0
  159. package/react/hooks/useVisibility.d.ts +9 -0
  160. package/react/reactTypes.d.ts +10 -0
  161. package/react/resolveStyles.d.ts +18 -0
  162. package/react/styleElements.d.ts +3 -0
  163. package/react/svg/attributesInProps.d.ts +4 -0
  164. package/react/svg/svgNaming.d.ts +15 -0
  165. package/react/theme/theme.d.ts +26 -0
  166. package/react/theme/themeContext.d.ts +7 -0
  167. package/react/useStyles.d.ts +22 -0
  168. package/react-shared.cjs +1 -0
  169. package/react-shared.mjs +105 -0
  170. package/rolldown-runtime.cjs +1 -0
  171. package/rsc.cjs +1 -0
  172. package/rsc.d.ts +27 -0
  173. package/rsc.mjs +18 -0
  174. package/ssg.cjs +1 -0
  175. package/ssg.d.ts +24 -0
  176. package/ssg.mjs +25 -0
  177. package/utils/animation/animationUtils.d.ts +29 -0
  178. package/utils/array/arrayUtils.d.ts +15 -0
  179. package/utils/box/boxUtils.d.ts +5 -0
  180. package/utils/chart/chartUtils.d.ts +98 -0
  181. package/utils/dom/domUtils.d.ts +26 -0
  182. package/utils/environment/environmentUtils.d.ts +18 -0
  183. package/utils/fn/fnUtils.d.ts +4 -0
  184. package/utils/form/formUtils.d.ts +8 -0
  185. package/utils/memo.d.ts +10 -0
  186. package/utils/object/objectUtils.d.ts +13 -0
  187. package/utils/string/fuzzySearch.d.ts +27 -0
  188. package/utils/string/stringUtils.d.ts +4 -0
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from '../box';
2
+ import { OmitTagProps } from '../react/boxProps';
3
+ type BoxTagProps = Required<BoxProps<'form'>>['props'];
4
+ type FormTagProps = OmitTagProps<BoxTagProps, 'onSubmit' | 'ref'>;
5
+ interface Props<T> extends Omit<BoxProps<'form'>, 'props' | 'tag'> {
6
+ props?: FormTagProps;
7
+ onSubmit: (obj: T, e: React.ChangeEvent<HTMLFormElement>) => void;
8
+ }
9
+ export default function Form<T>(props: Props<T>): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import e from "../box.mjs";
3
+ import { useCallback as t, useRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/utils/form/formUtils.ts
6
+ var i;
7
+ (function(e) {
8
+ function t(e) {
9
+ let t = Array.from(e.elements).reduce((e, t) => {
10
+ let n = t.name;
11
+ return n ? (e[n] || (e[n] = []), e[n].push(t), e) : e;
12
+ }, {});
13
+ return Object.entries(t).reduce((e, [t, r]) => {
14
+ if (r.length === 1) {
15
+ let i = r[0];
16
+ n(e, t, i.type === "checkbox" || i.type === "radio" ? i.checked : i.value);
17
+ } else n(e, t, r.reduce((e, t) => (t.type === "checkbox" || t.type === "radio" ? t.checked && e.push(t.value) : e.push(t.value), e), []));
18
+ return e;
19
+ }, {});
20
+ }
21
+ e.getFormEntries = t;
22
+ function n(e, t, n) {
23
+ if (t.includes(".")) {
24
+ let r = t.split("."), i = e;
25
+ r.forEach((e, t) => {
26
+ if (r.length > t + 1) {
27
+ let t = e.match(/^(.+)\[(\d)\]$/);
28
+ if (t) {
29
+ let [, e, n] = t;
30
+ i[e] = i[e] || [], i[e][n] = i[e][n] || {}, i = i[e][n];
31
+ } else i[e] = i[e] || {}, i = i[e];
32
+ } else i[e] = n;
33
+ });
34
+ } else e[t] = n;
35
+ }
36
+ })(i ||= {});
37
+ var a = i;
38
+ //#endregion
39
+ //#region src/components/form.tsx
40
+ function o(i) {
41
+ let { onSubmit: o, props: s } = i, c = n(null), l = t((e) => {
42
+ e.preventDefault();
43
+ let t = a.getFormEntries(c.current);
44
+ o(t, e);
45
+ }, [o]), u = {
46
+ ...s,
47
+ onSubmit: l,
48
+ ref: c
49
+ };
50
+ return /* @__PURE__ */ r(e, {
51
+ tag: "form",
52
+ ...i,
53
+ props: u
54
+ });
55
+ }
56
+ o.displayName = "Form";
57
+ //#endregion
58
+ export { o as default };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../rolldown-runtime.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("@box-kite/react");r=e.t(r,1);function i(e,t){let{inline:i,...a}=e;return(0,n.jsx)(r.default,{ref:t,display:i?`inline-grid`:`grid`,...a})}var a=(0,t.forwardRef)(i);a.displayName=`Grid`,exports.default=a;
@@ -0,0 +1,6 @@
1
+ import { RefAttributes } from 'react';
2
+ import { BoxProps } from '../box';
3
+ import { ExtractElementFromTag } from '../react/reactTypes';
4
+ import { ComponentsAndVariants } from '@box-kite/core/types';
5
+ declare const _default: <TTag extends keyof React.JSX.IntrinsicElements = "div", TKey extends keyof ComponentsAndVariants = never>(props: BoxProps<TTag, TKey> & RefAttributes<ExtractElementFromTag<TTag>>) => React.ReactNode;
6
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { forwardRef as e } from "react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import n from "@box-kite/react";
4
+ //#region src/components/grid.tsx
5
+ function r(e, r) {
6
+ let { inline: i, ...a } = e;
7
+ return /* @__PURE__ */ t(n, {
8
+ ref: r,
9
+ display: i ? "inline-grid" : "grid",
10
+ ...a
11
+ });
12
+ }
13
+ var i = e(r);
14
+ i.displayName = "Grid";
15
+ //#endregion
16
+ export { i as default };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../react-shared.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("@box-kite/react");var i=6;function a(a,o){let{children:s,label:c,size:l,props:u,style:d,...f}=a,p=l===void 0?void 0:{width:l,height:l},{className:m,styles:h}=(0,r.useClassNames)({width:i,height:i,...f,...p},{svg:!0});if(!(0,t.isValidElement)(s))throw Error(`[box-kite] <Icon> takes exactly one element — the icon to style. For SVG of your own, use <Svg> from components/svg.`);let g=e.i(s.type),_=s.props,v=(g?_.props:s.props)??{},y=g&&_.label!==void 0?{...v,"aria-label":_.label}:v,b={...u,...e.r(c,{...y,...u})},x={...g?{props:{...v,...b}}:b,...d?{style:d}:void 0,ref:o,className:s.props.className?`${s.props.className} ${m}`:m};return(0,n.jsxs)(n.Fragment,{children:[h,(0,t.cloneElement)(s,x)]})}var o=(0,t.forwardRef)(a);o.displayName=`Icon`,exports.default=o;
@@ -0,0 +1,36 @@
1
+ import { BoxClassNameProps } from '../box';
2
+ import { TagPropsType } from '../react/boxProps';
3
+ import { BoxStyleProps } from '@box-kite/core/types';
4
+ /**
5
+ * Box props for an icon this library did not draw. An icon set is somebody else's component, and the only
6
+ * styling channel it offers is the `className` it spreads onto its `<svg>`; `Icon` fills that channel
7
+ * with a class the engine generated, so an icon takes the props everything else here takes:
8
+ *
9
+ * ```tsx
10
+ * <Icon size={5} color="amber-400" hover={{ color: 'amber-300' }} label="Sunny"><Sun /></Icon>
11
+ * ```
12
+ *
13
+ * **Nothing is passed down as a prop.** The size is in the class, where a CSS declaration outranks the
14
+ * `width`/`height` attributes a set writes for itself — which is why one component fits every set
15
+ * without knowing any of their prop names, and why `strokeWidth` can differ on hover. The child must
16
+ * spread its props onto an `<svg>`. **For SVG you draw yourself, `Svg` and the `components/svg` elements
17
+ * are Boxes already** and need no adapter.
18
+ */
19
+ export interface IconProps extends BoxClassNameProps {
20
+ /** The icon: exactly one element, whose `<svg>` these props are styling. */
21
+ children: React.ReactElement;
22
+ /**
23
+ * Width and height at once, on the ÷4 scale: `size={6}` is the 24px an icon set defaults to, and is the
24
+ * default here too. It wins over `width`/`height`. Careful when porting — a set's own `size` is in pixels.
25
+ */
26
+ size?: BoxStyleProps['width'] & BoxStyleProps['height'];
27
+ /** Names the icon — `role="img"` and this text. Without one the icon is `aria-hidden`. */
28
+ label?: string;
29
+ /** Attributes forwarded to the icon's element, over anything the icon writes for itself. */
30
+ props?: TagPropsType<'svg'>;
31
+ /** CSSProperties */
32
+ style?: React.CSSProperties;
33
+ }
34
+ /** Box props on an icon somebody else renders — see `IconProps`. */
35
+ declare const Icon: import('react').ForwardRefExoticComponent<IconProps & import('react').RefAttributes<SVGSVGElement>>;
36
+ export default Icon;
@@ -0,0 +1,41 @@
1
+ import { i as e, r as t } from "../react-shared.mjs";
2
+ import { cloneElement as n, forwardRef as r, isValidElement as i } from "react";
3
+ import { Fragment as a, jsxs as o } from "react/jsx-runtime";
4
+ import { useClassNames as s } from "@box-kite/react";
5
+ //#region src/components/icon.tsx
6
+ var c = 6;
7
+ function l(r, l) {
8
+ let { children: u, label: d, size: f, props: p, style: m, ...h } = r, g = f === void 0 ? void 0 : {
9
+ width: f,
10
+ height: f
11
+ }, { className: _, styles: v } = s({
12
+ width: c,
13
+ height: c,
14
+ ...h,
15
+ ...g
16
+ }, { svg: !0 });
17
+ if (!i(u)) throw Error("[box-kite] <Icon> takes exactly one element — the icon to style. For SVG of your own, use <Svg> from components/svg.");
18
+ let y = e(u.type), b = u.props, x = (y ? b.props : u.props) ?? {}, S = y && b.label !== void 0 ? {
19
+ ...x,
20
+ "aria-label": b.label
21
+ } : x, C = {
22
+ ...p,
23
+ ...t(d, {
24
+ ...S,
25
+ ...p
26
+ })
27
+ }, w = {
28
+ ...y ? { props: {
29
+ ...x,
30
+ ...C
31
+ } } : C,
32
+ ...m ? { style: m } : void 0,
33
+ ref: l,
34
+ className: u.props.className ? `${u.props.className} ${_}` : _
35
+ };
36
+ return /* @__PURE__ */ o(a, { children: [v, n(u, w)] });
37
+ }
38
+ var u = r(l);
39
+ u.displayName = "Icon";
40
+ //#endregion
41
+ export { u as default };
@@ -0,0 +1 @@
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../platform.cjs"),t=require("../client.cjs"),n=require("../box.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("react-dom");var o=2;function s(s,c){let{onPositionChange:l,adjustTranslateX:u=`0px`,adjustTranslateY:d=`0px`,anchor:f,anchorSide:p=`top`,contentRef:m,matchWidth:h=!0,...g}=s,_=(0,r.useRef)(null),[v,y]=(0,r.useState)(),b=t.t(),x=(0,r.useCallback)((e,t)=>{let n=n=>{n.target.contains(e)&&t(e)},r=new AbortController;return document.addEventListener(`scroll`,n,{signal:r.signal,capture:!0}),()=>r.abort()},[]),S=(0,r.useCallback)((e,t)=>{let n=n=>{t(e)},r=new AbortController;return window.addEventListener(`resize`,n,{signal:r.signal,capture:!0}),()=>r.abort()},[]),C=(0,r.useCallback)(t=>{let n=t.getBoundingClientRect(),r=p===`bottom`?n.bottom:n.top,i=Math.round((r+window.scrollY)*o)/o,a=Math.round((n.left+window.scrollX)*o)/o,s=window.scrollX,c=window.scrollY,u=e.o(t);(v?.top!==i||v?.left!==a||v?.windowScrollX!==s||v?.windowScrollY!==c||v?.rtl!==u)&&(l?.({top:i,left:a,windowScrollX:s,windowScrollY:c}),y({top:i,left:a,width:n.width>0?n.width:void 0,windowScrollX:s,windowScrollY:c,rtl:u}))},[p,v,l]);return(0,r.useLayoutEffect)(()=>{let t=e.i(f)??_.current;if(t){C(t);let e=x(t,C),n=S(t,C);return()=>{e(),n()}}},[f,C,x,S]),(0,i.jsxs)(i.Fragment,{children:[!f&&(0,i.jsx)(n.default,{ref:_}),v&&b&&(0,a.createPortal)((0,i.jsx)(n.default,{ref:c,position:`absolute`,top:0,left:0,transition:`none`,props:{dir:v.rtl?`rtl`:`ltr`},style:{transform:`translate3d(calc(${v.left}px + ${u}),calc(${v.top}px + ${d}), 0)`,willChange:`transform`,width:h?v.width:void 0},children:(0,i.jsx)(n.default,{ref:m,...g})}),b)]})}var c=(0,r.forwardRef)(s);c.displayName=`Overlay`,exports.default=c;
@@ -0,0 +1,43 @@
1
+ import { Ref, RefAttributes } from 'react';
2
+ import { BoxProps } from '../box';
3
+ import { ExtractElementFromTag } from '../react/reactTypes';
4
+ import { ComponentsAndVariants } from '@box-kite/core/types';
5
+ import { ElementLike } from '../utils/dom/domUtils';
6
+ /**
7
+ * A floating layer, rendered into the portal container at the place it is declared: it measures where it
8
+ * sits, then renders its children into `#box-kite-portal` translated to that spot, so they escape
9
+ * `overflow: hidden` and every clipped ancestor. It owns no open state, no ARIA and no dismissal — a
10
+ * layer is not a pattern, and `Tooltip`, `Dropdown` and the DataGrid menu each need a different one.
11
+ * (This was called `Tooltip` until A3, which is the one thing it is not.)
12
+ */
13
+ interface OverlayProps {
14
+ onPositionChange?(position: {
15
+ top: number;
16
+ left: number;
17
+ windowScrollX: number;
18
+ windowScrollY: number;
19
+ }): void;
20
+ adjustTranslateX?: string;
21
+ adjustTranslateY?: string;
22
+ /**
23
+ * Measure this element instead of the layer's own placeholder — right when the layer belongs to an element
24
+ * next to it rather than to the spot it was declared in. The placeholder is a real box: inside a flex row
25
+ * it becomes a flex item, so opening the layer shifts everything after it by one `gap`.
26
+ */
27
+ anchor?: ElementLike;
28
+ /** Which edge of the anchor the layer starts from. Default `'top'`. */
29
+ anchorSide?: 'top' | 'bottom';
30
+ /**
31
+ * The content Box, which is the one that animates. `ref` is the positioning wrapper, whose transform
32
+ * follows the anchor and which therefore transitions nothing on purpose — so a `<Presence>` measuring
33
+ * an exit has to reach past it.
34
+ */
35
+ contentRef?: Ref<HTMLDivElement>;
36
+ /**
37
+ * Whether the layer takes the measured width of the anchor. Default true, so a dropdown popup
38
+ * lines up with its trigger; a tooltip sizes to its own content and turns it off.
39
+ */
40
+ matchWidth?: boolean;
41
+ }
42
+ declare const _default: <TTag extends keyof React.JSX.IntrinsicElements = "div", TKey extends keyof ComponentsAndVariants = never>(props: BoxProps<TTag, TKey> & RefAttributes<ExtractElementFromTag<TTag>> & OverlayProps) => React.ReactNode;
43
+ export default _default;
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { i as e, o as t } from "../platform.mjs";
3
+ import { t as n } from "../client.mjs";
4
+ import r from "../box.mjs";
5
+ import { forwardRef as i, useCallback as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
6
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { createPortal as f } from "react-dom";
8
+ //#region src/components/overlay.tsx
9
+ var p = 2;
10
+ function m(i, m) {
11
+ let { onPositionChange: h, adjustTranslateX: g = "0px", adjustTranslateY: _ = "0px", anchor: v, anchorSide: y = "top", contentRef: b, matchWidth: x = !0, ...S } = i, C = s(null), [w, T] = c(), E = n(), D = a((e, t) => {
12
+ let n = (n) => {
13
+ n.target.contains(e) && t(e);
14
+ }, r = new AbortController();
15
+ return document.addEventListener("scroll", n, {
16
+ signal: r.signal,
17
+ capture: !0
18
+ }), () => r.abort();
19
+ }, []), O = a((e, t) => {
20
+ let n = (n) => {
21
+ t(e);
22
+ }, r = new AbortController();
23
+ return window.addEventListener("resize", n, {
24
+ signal: r.signal,
25
+ capture: !0
26
+ }), () => r.abort();
27
+ }, []), k = a((e) => {
28
+ let n = e.getBoundingClientRect(), r = y === "bottom" ? n.bottom : n.top, i = Math.round((r + window.scrollY) * p) / p, a = Math.round((n.left + window.scrollX) * p) / p, o = window.scrollX, s = window.scrollY, c = t(e);
29
+ (w?.top !== i || w?.left !== a || w?.windowScrollX !== o || w?.windowScrollY !== s || w?.rtl !== c) && (h?.({
30
+ top: i,
31
+ left: a,
32
+ windowScrollX: o,
33
+ windowScrollY: s
34
+ }), T({
35
+ top: i,
36
+ left: a,
37
+ width: n.width > 0 ? n.width : void 0,
38
+ windowScrollX: o,
39
+ windowScrollY: s,
40
+ rtl: c
41
+ }));
42
+ }, [
43
+ y,
44
+ w,
45
+ h
46
+ ]);
47
+ return o(() => {
48
+ let t = e(v) ?? C.current;
49
+ if (t) {
50
+ k(t);
51
+ let e = D(t, k), n = O(t, k);
52
+ return () => {
53
+ e(), n();
54
+ };
55
+ }
56
+ }, [
57
+ v,
58
+ k,
59
+ D,
60
+ O
61
+ ]), /* @__PURE__ */ d(l, { children: [!v && /* @__PURE__ */ u(r, { ref: C }), w && E && f(/* @__PURE__ */ u(r, {
62
+ ref: m,
63
+ position: "absolute",
64
+ top: 0,
65
+ left: 0,
66
+ transition: "none",
67
+ props: { dir: w.rtl ? "rtl" : "ltr" },
68
+ style: {
69
+ transform: `translate3d(calc(${w.left}px + ${g}),calc(${w.top}px + ${_}), 0)`,
70
+ willChange: "transform",
71
+ width: x ? w.width : void 0
72
+ },
73
+ children: /* @__PURE__ */ u(r, {
74
+ ref: b,
75
+ ...S
76
+ })
77
+ }), E)] });
78
+ }
79
+ var h = i(m);
80
+ h.displayName = "Overlay";
81
+ //#endregion
82
+ export { h as default };
@@ -0,0 +1 @@
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../motion.cjs");let t=require("react/jsx-runtime");function n(n){let r=e.t({present:n.present});return(0,t.jsx)(t.Fragment,{children:r.mounted?n.children(r):null})}n.displayName=`Presence`,exports.default=n;
@@ -0,0 +1,30 @@
1
+ import { Presence as PresenceHandle } from '../react/animation/usePresence';
2
+ interface Props {
3
+ /** Whether the child should be there. The exit starts the moment this goes false. */
4
+ present: boolean;
5
+ /** The subtree, told which way it is going. */
6
+ children: (presence: PresenceHandle) => React.ReactNode;
7
+ }
8
+ /**
9
+ * The exit half of the animation story: it keeps rendering its child with `present: false` until the
10
+ * child's own CSS says its transition is over, and only then lets React remove it. `startingStyle` is the
11
+ * entrance and needs no JavaScript at all — this is the ~1 KB the other direction costs, because React
12
+ * unmounts synchronously and there is nothing left to transition.
13
+ *
14
+ * ```tsx
15
+ * <Presence present={open}>
16
+ * {({ present, ref, props }) => (
17
+ * <Box ref={ref} props={props} opacity={present ? 1 : 0} startingStyle={{ opacity: 0 }} transitionDuration={200} />
18
+ * )}
19
+ * </Presence>
20
+ * ```
21
+ *
22
+ * A render prop rather than a cloned child, for the same reason `Tooltip`'s trigger is one: the child has
23
+ * to be told which way it is going, and cloning would have to guess where a `data-state` belongs — a Box
24
+ * takes DOM attributes in a `props` bag, a plain element takes them on top. The `ref` is not decoration
25
+ * either: whichever element it lands on is the one whose computed style the wait is measured from, so it
26
+ * belongs on the element that carries the transition.
27
+ */
28
+ declare function Presence(props: Props): import("react").JSX.Element;
29
+ export default Presence;
30
+ export type { Presence as PresenceHandle, PresenceState } from '../react/animation/usePresence';
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { t as e } from "../motion.mjs";
3
+ import { Fragment as t, jsx as n } from "react/jsx-runtime";
4
+ //#region src/components/presence.tsx
5
+ function r(r) {
6
+ let i = e({ present: r.present });
7
+ return /* @__PURE__ */ n(t, { children: i.mounted ? r.children(i) : null });
8
+ }
9
+ r.displayName = "Presence";
10
+ //#endregion
11
+ export { r as default };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../rolldown-runtime.cjs"),t=require("../react-shared.cjs"),n=require("../forms.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("@box-kite/react");a=e.t(a,1);var o=[`name`,`onInput`,`onChange`,`value`,`autoFocus`,`readOnly`,`defaultChecked`];function s(e,r){let{label:s,labelProps:c,...l}=e,u=t.t.buildProps(l,o,{type:`radio`});return(0,i.jsx)(n.n,{label:s,labelProps:c,children:(0,i.jsx)(a.default,{ref:r,tag:`input`,component:`radioButton`,...u})})}var c=(0,r.forwardRef)(s);c.displayName=`RadioButton`,exports.default=c;
@@ -0,0 +1,24 @@
1
+ import { RefAttributes } from 'react';
2
+ import { BoxProps, BoxTagProps } from '../box';
3
+ import { OmitTagProps } from '../react/boxProps';
4
+ import { ComponentsAndVariants } from '@box-kite/core/types';
5
+ declare const tagProps: readonly ["name", "onInput", "onChange", "value", "autoFocus", "readOnly", "defaultChecked"];
6
+ type TagPropsType = (typeof tagProps)[number];
7
+ type RadioButtonProps<TKey extends keyof ComponentsAndVariants> = Omit<BoxProps<'input', TKey>, 'tag' | 'props'>;
8
+ type RadioButtonTagProps = OmitTagProps<BoxTagProps<'input'>, TagPropsType | 'type'>;
9
+ interface Props<TKey extends keyof ComponentsAndVariants> extends RadioButtonProps<TKey> {
10
+ name?: string;
11
+ props?: RadioButtonTagProps;
12
+ onInput?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ value?: string | number;
15
+ autoFocus?: boolean;
16
+ readOnly?: boolean;
17
+ defaultChecked?: boolean;
18
+ /** The text beside the radio, rendered inside a `<label>` that wraps the input. */
19
+ label?: React.ReactNode;
20
+ /** Styles for the wrapping `<label>`: the row's layout, not the radio's own appearance. */
21
+ labelProps?: BoxProps<'label'>;
22
+ }
23
+ declare const _default: <TKey extends keyof ComponentsAndVariants = "radioButton">(props: Props<TKey> & RefAttributes<HTMLInputElement>) => React.ReactNode;
24
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { t as e } from "../react-shared.mjs";
2
+ import { n as t } from "../forms.mjs";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import i from "@box-kite/react";
6
+ //#region src/components/radioButton.tsx
7
+ var a = [
8
+ "name",
9
+ "onInput",
10
+ "onChange",
11
+ "value",
12
+ "autoFocus",
13
+ "readOnly",
14
+ "defaultChecked"
15
+ ];
16
+ function o(n, o) {
17
+ let { label: s, labelProps: c, ...l } = n, u = e.buildProps(l, a, { type: "radio" });
18
+ return /* @__PURE__ */ r(t, {
19
+ label: s,
20
+ labelProps: c,
21
+ children: /* @__PURE__ */ r(i, {
22
+ ref: o,
23
+ tag: "input",
24
+ component: "radioButton",
25
+ ...u
26
+ })
27
+ });
28
+ }
29
+ var s = n(o);
30
+ s.displayName = "RadioButton";
31
+ //#endregion
32
+ export { s as default };
@@ -0,0 +1 @@
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../behavior.cjs"),t=require("./flex.cjs"),n=require("./semantics.cjs"),r=require("./radioButton.cjs");let i=require("react"),a=require("react/jsx-runtime");var o=(0,i.createContext)(null);function s(e){return[...e?.querySelectorAll(`input[type="radio"]`)??[]].filter(e=>!e.disabled)}function c(e){return e===`ArrowDown`||e===`ArrowRight`?1:e===`ArrowUp`||e===`ArrowLeft`?-1:0}function l(r){let{label:l,name:u,value:d,defaultValue:f,onChange:p,orientation:m=`vertical`,children:h,props:g,..._}=r,v=e.n(`radiogroup`),y=(0,i.useRef)(null),b=(0,i.useRef)(`click`),[x,S]=e.a({value:d,defaultValue:f,onChange:p}),C=e.o(e=>{let t=c(e.key);if(t===0||e.defaultPrevented)return;let n=s(y.current),r=n.indexOf(document.activeElement);if(r===-1)return;e.preventDefault();let i=n[(r+t+n.length)%n.length];i!==n[r]&&(b.current=`keyboard`,i.focus(),i.click(),b.current=`click`)}),w=`${v}-label`,T=l!=null,E=(0,i.useMemo)(()=>({name:u??v,value:x,select:(e,t)=>S(e,{reason:b.current,event:t})}),[v,u,x,S]);return(0,a.jsx)(o.Provider,{value:E,children:(0,a.jsxs)(t.default,{ref:y,d:m===`horizontal`?`row`:`column`,gap:2,..._,props:{role:`radiogroup`,"aria-labelledby":T?w:void 0,...g,onKeyDown:C},children:[T&&(0,a.jsx)(n.Span,{id:w,children:l}),h]})})}function u(t){let n=(0,i.useContext)(o),{value:s,...c}=t,l=e.o(e=>n?.select(s,e));return n?(0,a.jsx)(r.default,{name:n.name,value:s,checked:n.value===s,onChange:l,...c}):(0,a.jsx)(r.default,{value:s,...c})}u.displayName=`RadioGroup.Item`;var d=l;d.Item=u,d.displayName=`RadioGroup`,exports.default=d;
@@ -0,0 +1,38 @@
1
+ import { Ref, RefAttributes } from 'react';
2
+ import { BoxProps, BoxTagProps } from '../box';
3
+ import { ChangeHandler } from '../react/a11y/useControllableState';
4
+ import { ComponentsAndVariants } from '@box-kite/core/types';
5
+ /** Why the selection changed — `onChange` gets this alongside the event that did it. */
6
+ export type RadioGroupReason = 'click' | 'keyboard';
7
+ type RadioGroupBoxProps<TKey extends keyof ComponentsAndVariants> = Omit<BoxProps<'div', TKey>, 'tag' | 'onChange' | 'children'>;
8
+ interface Props<TKey extends keyof ComponentsAndVariants> extends RadioGroupBoxProps<TKey> {
9
+ /** The group's name, rendered above it and used as the group's accessible name. */
10
+ label?: React.ReactNode;
11
+ /** The `name` every radio in the group submits under. Generated when left out. */
12
+ name?: string;
13
+ /** Controlled selection. Leave it out and the group owns it. */
14
+ value?: string;
15
+ defaultValue?: string;
16
+ onChange?: ChangeHandler<string | undefined, RadioGroupReason>;
17
+ /** Which way the radios stack. Both arrow pairs navigate either way, as APG specifies. */
18
+ orientation?: 'vertical' | 'horizontal';
19
+ children?: React.ReactNode;
20
+ }
21
+ interface ItemProps extends Omit<BoxProps<'input', 'radioButton'>, 'tag' | 'props' | 'onChange' | 'checked'> {
22
+ /** What this radio submits, and what the group reports when it is chosen. */
23
+ value: string;
24
+ /** Only for an item rendered outside a group — inside one, the group supplies the name. */
25
+ name?: string;
26
+ /** The text beside the radio, rendered inside a label that wraps the input. */
27
+ label?: React.ReactNode;
28
+ labelProps?: BoxProps<'label'>;
29
+ props?: BoxTagProps<'input'>;
30
+ ref?: Ref<HTMLInputElement>;
31
+ }
32
+ interface RadioGroupType {
33
+ <TKey extends keyof ComponentsAndVariants = never>(props: Props<TKey>): React.ReactNode;
34
+ Item: (props: ItemProps & RefAttributes<HTMLInputElement>) => React.ReactNode;
35
+ displayName?: string;
36
+ }
37
+ declare const RadioGroup: RadioGroupType;
38
+ export default RadioGroup;
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { a as e, n as t, o as n } from "../behavior.mjs";
3
+ import r from "./flex.mjs";
4
+ import { Span as i } from "./semantics.mjs";
5
+ import a from "./radioButton.mjs";
6
+ import { createContext as o, useContext as s, useMemo as c, useRef as l } from "react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ //#region src/components/radioGroup.tsx
9
+ var f = o(null);
10
+ function p(e) {
11
+ return [...e?.querySelectorAll("input[type=\"radio\"]") ?? []].filter((e) => !e.disabled);
12
+ }
13
+ function m(e) {
14
+ return e === "ArrowDown" || e === "ArrowRight" ? 1 : e === "ArrowUp" || e === "ArrowLeft" ? -1 : 0;
15
+ }
16
+ function h(a) {
17
+ let { label: o, name: s, value: h, defaultValue: g, onChange: _, orientation: v = "vertical", children: y, props: b, ...x } = a, S = t("radiogroup"), C = l(null), w = l("click"), [T, E] = e({
18
+ value: h,
19
+ defaultValue: g,
20
+ onChange: _
21
+ }), D = n((e) => {
22
+ let t = m(e.key);
23
+ if (t === 0 || e.defaultPrevented) return;
24
+ let n = p(C.current), r = n.indexOf(document.activeElement);
25
+ if (r === -1) return;
26
+ e.preventDefault();
27
+ let i = n[(r + t + n.length) % n.length];
28
+ i !== n[r] && (w.current = "keyboard", i.focus(), i.click(), w.current = "click");
29
+ }), O = `${S}-label`, k = o != null, A = c(() => ({
30
+ name: s ?? S,
31
+ value: T,
32
+ select: (e, t) => E(e, {
33
+ reason: w.current,
34
+ event: t
35
+ })
36
+ }), [
37
+ S,
38
+ s,
39
+ T,
40
+ E
41
+ ]);
42
+ return /* @__PURE__ */ u(f.Provider, {
43
+ value: A,
44
+ children: /* @__PURE__ */ d(r, {
45
+ ref: C,
46
+ d: v === "horizontal" ? "row" : "column",
47
+ gap: 2,
48
+ ...x,
49
+ props: {
50
+ role: "radiogroup",
51
+ "aria-labelledby": k ? O : void 0,
52
+ ...b,
53
+ onKeyDown: D
54
+ },
55
+ children: [k && /* @__PURE__ */ u(i, {
56
+ id: O,
57
+ children: o
58
+ }), y]
59
+ })
60
+ });
61
+ }
62
+ function g(e) {
63
+ let t = s(f), { value: r, ...i } = e, o = n((e) => t?.select(r, e));
64
+ return t ? /* @__PURE__ */ u(a, {
65
+ name: t.name,
66
+ value: r,
67
+ checked: t.value === r,
68
+ onChange: o,
69
+ ...i
70
+ }) : /* @__PURE__ */ u(a, {
71
+ value: r,
72
+ ...i
73
+ });
74
+ }
75
+ g.displayName = "RadioGroup.Item";
76
+ var _ = h;
77
+ _.Item = g, _.displayName = "RadioGroup";
78
+ //#endregion
79
+ export { _ as default };
@@ -0,0 +1 @@
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./dropdown.cjs");let t=require("react"),n=require("react/jsx-runtime");function r(r,i){let{data:a,def:o,...s}=r,{valueKey:c,displayKey:l,display:u,selectedDisplay:d,placeholder:f,selectAllText:p,emptyText:m}=o,h=(0,t.useMemo)(()=>{let e=new Map;for(let t of a)e.set(t[c],t);return e},[a,c]);return(0,n.jsxs)(e.default,{ref:i,...s,children:[f&&(0,n.jsx)(e.default.Unselect,{children:f}),p&&(0,n.jsx)(e.default.SelectAll,{children:p}),m&&(0,n.jsx)(e.default.EmptyItem,{children:m}),d&&(0,n.jsx)(e.default.Display,{children:(e,t)=>{let n=e.map(e=>h.get(e)).filter(Boolean);return d(n,t)}}),a.map(t=>{let r=t[c];return(0,n.jsx)(e.default.Item,{value:r,children:u?u(t):String(t[l??c])},r)})]})}var i=(0,t.forwardRef)(r);i.displayName=`Select`,exports.default=i;
@@ -0,0 +1,42 @@
1
+ import { RefAttributes } from 'react';
2
+ import { BoxProps } from '../box';
3
+ import { BoxStyleProps, ComponentsAndVariants } from '@box-kite/core/types';
4
+ interface SelectDef<TRow> {
5
+ /** Key of TRow to use as the option value */
6
+ valueKey: keyof TRow & (string | number);
7
+ /** Key of TRow to display as option text (defaults to valueKey) */
8
+ displayKey?: keyof TRow;
9
+ /** Custom render function for each option */
10
+ display?: (row: TRow) => React.ReactNode;
11
+ /** Custom render function for the selected value display */
12
+ selectedDisplay?: (selectedRows: TRow[], isOpen: boolean) => React.ReactNode;
13
+ /** Placeholder text when nothing is selected */
14
+ placeholder?: string;
15
+ /** Text for "Select all" option in multiple mode */
16
+ selectAllText?: string;
17
+ /** Text shown when search yields no results */
18
+ emptyText?: string;
19
+ }
20
+ interface Props<TRow, TVal extends TRow[keyof TRow], TKey extends keyof ComponentsAndVariants = 'dropdown'> extends Omit<BoxProps<'button', TKey>, 'ref' | 'tag'> {
21
+ data: TRow[];
22
+ def: SelectDef<TRow>;
23
+ name?: string;
24
+ defaultValue?: TVal | TVal[];
25
+ value?: TVal | TVal[];
26
+ multiple?: boolean;
27
+ isSearchable?: boolean;
28
+ searchPlaceholder?: string;
29
+ hideIcon?: boolean;
30
+ showCheckbox?: boolean;
31
+ /** The select's name, rendered above it — see `label` on `Dropdown`. A combobox needs one. */
32
+ label?: React.ReactNode;
33
+ labelProps?: BoxProps<'div'>;
34
+ itemsProps?: BoxStyleProps;
35
+ iconProps?: BoxStyleProps;
36
+ onChange?: (value: TVal | undefined, values: TVal[]) => void;
37
+ }
38
+ interface SelectType {
39
+ <TRow, TVal extends TRow[keyof TRow] = TRow[keyof TRow]>(props: Props<TRow, TVal> & RefAttributes<HTMLInputElement>): React.ReactNode;
40
+ }
41
+ declare const Select: SelectType;
42
+ export default Select;
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import e from "./dropdown.mjs";
3
+ import { forwardRef as t, useMemo as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/components/select.tsx
6
+ function a(t, a) {
7
+ let { data: o, def: s, ...c } = t, { valueKey: l, displayKey: u, display: d, selectedDisplay: f, placeholder: p, selectAllText: m, emptyText: h } = s, g = n(() => {
8
+ let e = /* @__PURE__ */ new Map();
9
+ for (let t of o) e.set(t[l], t);
10
+ return e;
11
+ }, [o, l]);
12
+ return /* @__PURE__ */ i(e, {
13
+ ref: a,
14
+ ...c,
15
+ children: [
16
+ p && /* @__PURE__ */ r(e.Unselect, { children: p }),
17
+ m && /* @__PURE__ */ r(e.SelectAll, { children: m }),
18
+ h && /* @__PURE__ */ r(e.EmptyItem, { children: h }),
19
+ f && /* @__PURE__ */ r(e.Display, { children: (e, t) => {
20
+ let n = e.map((e) => g.get(e)).filter(Boolean);
21
+ return f(n, t);
22
+ } }),
23
+ o.map((t) => {
24
+ let n = t[l];
25
+ return /* @__PURE__ */ r(e.Item, {
26
+ value: n,
27
+ children: d ? d(t) : String(t[u ?? l])
28
+ }, n);
29
+ })
30
+ ]
31
+ });
32
+ }
33
+ var o = t(a);
34
+ o.displayName = "Select";
35
+ //#endregion
36
+ export { o as default };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime.cjs"),t=require("../react-shared.cjs");let n=require("react"),r=require("react/jsx-runtime"),i=require("@box-kite/react");i=e.t(i,1);function a(e){let a=(0,n.forwardRef)((t,n)=>(0,r.jsx)(i.default,{tag:e,ref:n,component:e,...t}));return a.displayName=t.n.capitalize(e),a}var o=a(`label`),s=a(`span`),c=a(`article`),l=a(`aside`),u=a(`details`),d=a(`figcaption`),f=a(`figure`),p=a(`footer`),m=a(`header`),h=a(`main`),g=a(`mark`),_=a(`nav`),v=a(`menu`),y=a(`section`),b=a(`summary`),x=a(`time`),S=a(`p`),C=a(`ul`),w=a(`ol`),T=a(`li`),E=a(`h1`),D=a(`h2`),O=a(`h3`),k=a(`h4`),A=a(`h5`),j=a(`h6`),M=a(`a`),N=a(`img`);exports.Article=c,exports.Aside=l,exports.Details=u,exports.Figcaption=d,exports.Figure=f,exports.Footer=p,exports.H1=E,exports.H2=D,exports.H3=O,exports.H4=k,exports.H5=A,exports.H6=j,exports.Header=m,exports.Img=N,exports.Label=o,exports.Li=T,exports.Link=M,exports.Main=h,exports.Mark=g,exports.Menu=v,exports.Nav=_,exports.Ol=w,exports.P=S,exports.Section=y,exports.Span=s,exports.Summary=b,exports.Time=x,exports.Ul=C;