@cronocode/react-box 3.0.15 → 3.0.17

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.
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),n=require("react"),h=require("../box.cjs"),L=require("./textbox.cjs"),G=require("./flex.cjs"),Q=require("../core.cjs"),X=require("./baseSvg.cjs"),Z=require("./tooltip.cjs"),K=require("./button.cjs");function ee(i,m){const{name:p,defaultValue:g,value:y,multiple:u,isSearchable:w,searchPlaceholder:B,children:D,hideIcon:H,onChange:s,...Y}=i,[J,j]=n.useState(Array.isArray(g)?g:g?[g]:[]),c="value"in i?Array.isArray(y)?y:y?[y]:[]:J,[I,U]=n.useState(""),[a,T,b]=Q.useVisibility(),N=n.useRef(null),V=n.useRef(null),[_,F]=n.useState(0),A=n.useMemo(()=>_>window.innerHeight/2,[_]),W=n.useMemo(()=>{var e;return A?((e=b.current)==null?void 0:e.getBoundingClientRect().height)??0:0},[A,b]),l=n.useMemo(()=>(Array.isArray(D)?D:[D]).flatMap(e=>e),[D]),O=n.useMemo(()=>l.filter(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownItem"}),[l]),f=n.useMemo(()=>O.filter(e=>w&&I?R(e).toLowerCase().includes(I.toLowerCase()):!0),[w,I,l]),x=n.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownUnselect"}),[l]),C=n.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownSelectAll"}),[l]),k=n.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownEmptyItem"}),[l]),M=n.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownDisplay"}),[l]),$=n.useMemo(()=>{if(M)return typeof M.props.children=="function"?M.props.children(c,a):M.props.children;const e=f.filter(o=>c.includes(o.props.value));if(u&&e.length>1)return e.map(o=>R(o)).join(", ");const t=e.at(0);return(t==null?void 0:t.props.children)??(t==null?void 0:t.props.value)??(u?null:x==null?void 0:x.props.children)},[u,f,c,x,a]),P=n.useCallback((e,...t)=>{if(t.length===0)j([]),s==null||s(void 0,[]);else if(u&&t.length>1){const o=t.map(d=>d.props.value);j(o),s==null||s(void 0,o)}else if(t.length===1){const o=t[0];if(u){const d=c.filter(q=>q!==o.props.value);d.length===c.length&&d.push(o.props.value),j(d),s==null||s(o.props.value,d)}else j([o.props.value]),s==null||s(o.props.value,[o.props.value])}u?(e.stopPropagation(),setTimeout(()=>{var o;return(o=N.current)==null?void 0:o.focus()},0)):(T(!1),setTimeout(()=>{var o;return(o=b.current)==null?void 0:o.focus()},0))},[u,c,j]);n.useEffect(()=>{a?setTimeout(()=>{var e,t,o;(e=N.current)==null||e.focus(),(o=(t=V.current)==null?void 0:t.querySelector('[aria-selected="true"]'))==null||o.scrollIntoView({block:"nearest"})},0):U("")},[a]);const E=C&&u&&f.length>c.length,z=x&&f.length>0&&!E;return r.jsxs(h,{width:"fit-content",children:[c.map(e=>r.jsx(L,{ref:m,name:p,type:"hidden",value:JSON.stringify(e)??""},JSON.stringify(e))),r.jsxs(K,{ref:b,type:"button",component:"dropdown",onClick:()=>T(e=>!e),props:{tabIndex:0},...Y,children:[w&&r.jsx(L,{display:a&&w?"block":"none",clean:!0,flex1:!0,width:1,minHeight:5,placeholder:B,value:I,onChange:e=>U(e.target.value),ref:N,props:{onClick:e=>{a&&w&&e.stopPropagation()}}}),r.jsx(G,{component:"dropdown.display",display:a&&w?"none":"flex",children:$??r.jsx(r.Fragment,{children:" "})}),!H&&r.jsx(h,{children:r.jsx(X,{viewBox:"0 0 10 6",width:"0.6rem",rotate:a?180:0,children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 4 4 4-4"})})})]}),a&&r.jsx(Z,{ref:V,top:A?void 0:0,bottom:A?2:void 0,style:{transform:`translateY(-${W}px)`},onPositionChange:e=>F(e.top-window.scrollY),children:(f.length>0||k)&&r.jsxs(h,{component:"dropdown.items",children:[z&&r.jsx(h,{component:"dropdown.unselect",selected:c.length===0,...x.props,props:{onClick:e=>P(e)}}),E&&r.jsx(h,{component:"dropdown.selectAll",...C.props,props:{onClick:e=>P(e,...O)}}),f.map(e=>{const{value:t,onClick:o,...d}=e.props;return r.jsx(h,{component:"dropdown.item",variant:u?"multiple":void 0,selected:c.includes(t),...d,props:{onClick:q=>{o==null||o(q),P(q,e)}}},t)}),f.length===0&&k&&r.jsx(h,{component:"dropdown.emptyItem",...k.props})]})})]})}function S(i){const m=p=>null;return m.displayName=i,m}const v=n.forwardRef(ee);v.Item=S("DropdownItem");v.Unselect=S("DropdownUnselect");v.SelectAll=S("DropdownSelectAll");v.EmptyItem=S("DropdownEmptyItem");v.Display=S("DropdownDisplay");function R(i){var m;if(i==null)return"";if(typeof i=="object"){const p=(m=i.props)==null?void 0:m.children;return p==null?"":typeof p=="object"?(Array.isArray(p)?p:[p]).map(y=>R(y)).join(""):p.toString()}return i.toString()}module.exports=v;
1
+ "use strict";const n=require("react/jsx-runtime"),r=require("react"),y=require("../box.cjs"),L=require("./textbox.cjs"),Q=require("./flex.cjs"),X=require("../core.cjs"),Z=require("./baseSvg.cjs"),K=require("./tooltip.cjs"),ee=require("./button.cjs");function te(p,m){const{name:i,defaultValue:g,value:w,multiple:u,isSearchable:x,searchPlaceholder:B,children:D,hideIcon:H,onChange:s,props:Y,...J}=p,[F,j]=r.useState(Array.isArray(g)?g:g?[g]:[]),c="value"in p?Array.isArray(w)?w:w?[w]:[]:F,[I,T]=r.useState(""),[a,V,b]=X.useVisibility(),N=r.useRef(null),_=r.useRef(null),[O,W]=r.useState(0),A=r.useMemo(()=>O>window.innerHeight/2,[O]),$=r.useMemo(()=>{var e;return A?((e=b.current)==null?void 0:e.getBoundingClientRect().height)??0:0},[A,b]),l=r.useMemo(()=>(Array.isArray(D)?D:[D]).flatMap(e=>e),[D]),C=r.useMemo(()=>l.filter(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownItem"}),[l]),f=r.useMemo(()=>C.filter(e=>x&&I?U(e).toLowerCase().includes(I.toLowerCase()):!0),[x,I,l]),h=r.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownUnselect"}),[l]),P=r.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownSelectAll"}),[l]),k=r.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownEmptyItem"}),[l]),M=r.useMemo(()=>l.find(e=>{var t;return((t=e.type)==null?void 0:t.displayName)==="DropdownDisplay"}),[l]),z=r.useMemo(()=>{if(M)return typeof M.props.children=="function"?M.props.children(c,a):M.props.children;const e=f.filter(o=>c.includes(o.props.value));if(u&&e.length>1)return e.map(o=>U(o)).join(", ");const t=e.at(0);return(t==null?void 0:t.props.children)??(t==null?void 0:t.props.value)??(u?null:h==null?void 0:h.props.children)},[u,f,c,h,a]),R=r.useCallback((e,...t)=>{if(t.length===0)j([]),s==null||s(void 0,[]);else if(u&&t.length>1){const o=t.map(d=>d.props.value);j(o),s==null||s(void 0,o)}else if(t.length===1){const o=t[0];if(u){const d=c.filter(q=>q!==o.props.value);d.length===c.length&&d.push(o.props.value),j(d),s==null||s(o.props.value,d)}else j([o.props.value]),s==null||s(o.props.value,[o.props.value])}u?(e.stopPropagation(),setTimeout(()=>{var o;return(o=N.current)==null?void 0:o.focus()},0)):(V(!1),setTimeout(()=>{var o;return(o=b.current)==null?void 0:o.focus()},0))},[u,c,j]);r.useEffect(()=>{a?setTimeout(()=>{var e,t,o;(e=N.current)==null||e.focus(),(o=(t=_.current)==null?void 0:t.querySelector('[aria-selected="true"]'))==null||o.scrollIntoView({block:"nearest"})},0):T("")},[a]);const E=P&&u&&f.length>c.length,G=h&&f.length>0&&!E;return n.jsxs(y,{width:"fit-content",children:[c.map(e=>n.jsx(L,{ref:m,name:i,type:"hidden",value:JSON.stringify(e)??""},JSON.stringify(e))),n.jsxs(ee,{ref:b,type:"button",component:"dropdown",onClick:()=>V(e=>!e),props:{tabIndex:0,...Y},...J,children:[x&&n.jsx(L,{display:a&&x?"block":"none",clean:!0,flex1:!0,width:1,minHeight:5,placeholder:B,value:I,onChange:e=>T(e.target.value),ref:N,props:{onClick:e=>{a&&x&&e.stopPropagation()}}}),n.jsx(Q,{component:"dropdown.display",display:a&&x?"none":"flex",children:z??n.jsx(n.Fragment,{children:" "})}),!H&&n.jsx(y,{children:n.jsx(Z,{viewBox:"0 0 10 6",width:"0.6rem",rotate:a?180:0,children:n.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 4 4 4-4"})})})]}),a&&n.jsx(K,{ref:_,top:A?void 0:0,bottom:A?2:void 0,style:{transform:`translateY(-${$}px)`},onPositionChange:e=>W(e.top-window.scrollY),children:(f.length>0||k)&&n.jsxs(y,{component:"dropdown.items",children:[G&&n.jsx(y,{component:"dropdown.unselect",selected:c.length===0,...h.props,props:{...h.props.props,onClick:e=>R(e)}}),E&&n.jsx(y,{component:"dropdown.selectAll",...P.props,props:{...P.props.props,onClick:e=>R(e,...C)}}),f.map(e=>{const{value:t,onClick:o,...d}=e.props;return n.jsx(y,{component:"dropdown.item",variant:u?"multiple":void 0,selected:c.includes(t),...d,props:{...d.props,onClick:q=>{o==null||o(q),R(q,e)}}},t)}),f.length===0&&k&&n.jsx(y,{component:"dropdown.emptyItem",...k.props})]})})]})}function S(p){const m=i=>null;return m.displayName=p,m}const v=r.forwardRef(te);v.Item=S("DropdownItem");v.Unselect=S("DropdownUnselect");v.SelectAll=S("DropdownSelectAll");v.EmptyItem=S("DropdownEmptyItem");v.Display=S("DropdownDisplay");function U(p){var m;if(p==null)return"";if(typeof p=="object"){const i=(m=p.props)==null?void 0:m.children;return i==null?"":typeof i=="object"?(Array.isArray(i)?i:[i]).map(w=>U(w)).join(""):i.toString()}return p.toString()}module.exports=v;
@@ -1,6 +1,6 @@
1
- import { Ref } from 'react';
1
+ import { RefAttributes } from 'react';
2
2
  import { BoxProps } from '../box';
3
- interface Props<TVal> extends BoxProps<'button'> {
3
+ interface Props<TVal> extends Omit<BoxProps<'button'>, 'ref'> {
4
4
  name?: string;
5
5
  defaultValue?: TVal | TVal[];
6
6
  value?: TVal | TVal[];
@@ -18,7 +18,7 @@ interface DropdownDisplayProps<TVal> extends Omit<BoxProps, 'children'> {
18
18
  children: ((selectedValues: TVal[], isOpen: boolean) => React.ReactNode) | React.ReactNode;
19
19
  }
20
20
  interface DropdownType {
21
- <TVal>(props: Props<TVal>, ref: Ref<HTMLInputElement>): React.ReactNode;
21
+ <TVal>(props: Props<TVal> & RefAttributes<HTMLInputElement>): React.ReactNode;
22
22
  Item: <TVal>(props: DropdownItemProps<TVal>) => React.ReactNode;
23
23
  Unselect: (props: BoxProps) => React.ReactNode;
24
24
  SelectAll: (props: BoxProps) => React.ReactNode;
@@ -1,43 +1,55 @@
1
- import { jsxs as B, jsx as n, Fragment as Z } from "react/jsx-runtime";
2
- import { forwardRef as K, useState as V, useRef as J, useMemo as c, useCallback as ee, useEffect as te } from "react";
3
- import h from "../box.mjs";
1
+ import { jsxs as V, jsx as n, Fragment as K } from "react/jsx-runtime";
2
+ import { forwardRef as ee, useState as O, useRef as J, useMemo as c, useCallback as te, useEffect as oe } from "react";
3
+ import y from "../box.mjs";
4
4
  import M from "./textbox.mjs";
5
- import oe from "./flex.mjs";
6
- import { b as re } from "../core.mjs";
7
- import ne from "./baseSvg.mjs";
5
+ import re from "./flex.mjs";
6
+ import { b as ne } from "../core.mjs";
7
+ import se from "./baseSvg.mjs";
8
8
  import le from "./tooltip.mjs";
9
- import se from "./button.mjs";
10
- function pe(s, m) {
11
- const { name: p, defaultValue: g, value: y, multiple: a, isSearchable: w, searchPlaceholder: q, children: S, hideIcon: W, onChange: r, ..._ } = s, [$, x] = V(Array.isArray(g) ? g : g ? [g] : []), i = "value" in s ? Array.isArray(y) ? y : y ? [y] : [] : $, [A, R] = V(""), [d, C, b] = re(), T = J(null), E = J(null), [L, z] = V(0), N = c(() => L > window.innerHeight / 2, [L]), G = c(() => {
9
+ import pe from "./button.mjs";
10
+ function ie(l, m) {
11
+ const {
12
+ name: p,
13
+ defaultValue: g,
14
+ value: w,
15
+ multiple: a,
16
+ isSearchable: v,
17
+ searchPlaceholder: q,
18
+ children: S,
19
+ hideIcon: W,
20
+ onChange: r,
21
+ props: _,
22
+ ...$
23
+ } = l, [z, x] = O(Array.isArray(g) ? g : g ? [g] : []), i = "value" in l ? Array.isArray(w) ? w : w ? [w] : [] : z, [A, C] = O(""), [d, E, b] = ne(), T = J(null), L = J(null), [H, G] = O(0), N = c(() => H > window.innerHeight / 2, [H]), Q = c(() => {
12
24
  var e;
13
25
  return N ? ((e = b.current) == null ? void 0 : e.getBoundingClientRect().height) ?? 0 : 0;
14
- }, [N, b]), l = c(
26
+ }, [N, b]), s = c(
15
27
  () => (Array.isArray(S) ? S : [S]).flatMap((e) => e),
16
28
  [S]
17
- ), H = c(() => l.filter((e) => {
29
+ ), Y = c(() => s.filter((e) => {
18
30
  var t;
19
31
  return ((t = e.type) == null ? void 0 : t.displayName) === "DropdownItem";
20
- }), [l]), f = c(() => H.filter((e) => w && A ? O(e).toLowerCase().includes(A.toLowerCase()) : !0), [w, A, l]), v = c(() => l.find((e) => {
32
+ }), [s]), f = c(() => Y.filter((e) => v && A ? R(e).toLowerCase().includes(A.toLowerCase()) : !0), [v, A, s]), h = c(() => s.find((e) => {
21
33
  var t;
22
34
  return ((t = e.type) == null ? void 0 : t.displayName) === "DropdownUnselect";
23
- }), [l]), Y = c(() => l.find((e) => {
35
+ }), [s]), j = c(() => s.find((e) => {
24
36
  var t;
25
37
  return ((t = e.type) == null ? void 0 : t.displayName) === "DropdownSelectAll";
26
- }), [l]), j = c(() => l.find((e) => {
38
+ }), [s]), U = c(() => s.find((e) => {
27
39
  var t;
28
40
  return ((t = e.type) == null ? void 0 : t.displayName) === "DropdownEmptyItem";
29
- }), [l]), k = c(() => l.find((e) => {
41
+ }), [s]), P = c(() => s.find((e) => {
30
42
  var t;
31
43
  return ((t = e.type) == null ? void 0 : t.displayName) === "DropdownDisplay";
32
- }), [l]), Q = c(() => {
33
- if (k)
34
- return typeof k.props.children == "function" ? k.props.children(i, d) : k.props.children;
44
+ }), [s]), X = c(() => {
45
+ if (P)
46
+ return typeof P.props.children == "function" ? P.props.children(i, d) : P.props.children;
35
47
  const e = f.filter((o) => i.includes(o.props.value));
36
48
  if (a && e.length > 1)
37
- return e.map((o) => O(o)).join(", ");
49
+ return e.map((o) => R(o)).join(", ");
38
50
  const t = e.at(0);
39
- return (t == null ? void 0 : t.props.children) ?? (t == null ? void 0 : t.props.value) ?? (a ? null : v == null ? void 0 : v.props.children);
40
- }, [a, f, i, v, d]), U = ee(
51
+ return (t == null ? void 0 : t.props.children) ?? (t == null ? void 0 : t.props.value) ?? (a ? null : h == null ? void 0 : h.props.children);
52
+ }, [a, f, i, h, d]), B = te(
41
53
  (e, ...t) => {
42
54
  if (t.length === 0)
43
55
  x([]), r == null || r(void 0, []);
@@ -47,7 +59,7 @@ function pe(s, m) {
47
59
  } else if (t.length === 1) {
48
60
  const o = t[0];
49
61
  if (a) {
50
- const u = i.filter((P) => P !== o.props.value);
62
+ const u = i.filter((k) => k !== o.props.value);
51
63
  u.length === i.length && u.push(o.props.value), x(u), r == null || r(o.props.value, u);
52
64
  } else
53
65
  x([o.props.value]), r == null || r(o.props.value, [o.props.value]);
@@ -55,117 +67,125 @@ function pe(s, m) {
55
67
  a ? (e.stopPropagation(), setTimeout(() => {
56
68
  var o;
57
69
  return (o = T.current) == null ? void 0 : o.focus();
58
- }, 0)) : (C(!1), setTimeout(() => {
70
+ }, 0)) : (E(!1), setTimeout(() => {
59
71
  var o;
60
72
  return (o = b.current) == null ? void 0 : o.focus();
61
73
  }, 0));
62
74
  },
63
75
  [a, i, x]
64
76
  );
65
- te(() => {
77
+ oe(() => {
66
78
  d ? setTimeout(() => {
67
79
  var e, t, o;
68
- (e = T.current) == null || e.focus(), (o = (t = E.current) == null ? void 0 : t.querySelector('[aria-selected="true"]')) == null || o.scrollIntoView({ block: "nearest" });
69
- }, 0) : R("");
80
+ (e = T.current) == null || e.focus(), (o = (t = L.current) == null ? void 0 : t.querySelector('[aria-selected="true"]')) == null || o.scrollIntoView({ block: "nearest" });
81
+ }, 0) : C("");
70
82
  }, [d]);
71
- const F = Y && a && f.length > i.length, X = v && f.length > 0 && !F;
72
- return /* @__PURE__ */ B(h, { width: "fit-content", children: [
83
+ const F = j && a && f.length > i.length, Z = h && f.length > 0 && !F;
84
+ return /* @__PURE__ */ V(y, { width: "fit-content", children: [
73
85
  i.map((e) => /* @__PURE__ */ n(M, { ref: m, name: p, type: "hidden", value: JSON.stringify(e) ?? "" }, JSON.stringify(e))),
74
- /* @__PURE__ */ B(
75
- se,
86
+ /* @__PURE__ */ V(
87
+ pe,
76
88
  {
77
89
  ref: b,
78
90
  type: "button",
79
91
  component: "dropdown",
80
- onClick: () => C((e) => !e),
81
- props: { tabIndex: 0 },
82
- ..._,
92
+ onClick: () => E((e) => !e),
93
+ props: { tabIndex: 0, ..._ },
94
+ ...$,
83
95
  children: [
84
- w && /* @__PURE__ */ n(
96
+ v && /* @__PURE__ */ n(
85
97
  M,
86
98
  {
87
- display: d && w ? "block" : "none",
99
+ display: d && v ? "block" : "none",
88
100
  clean: !0,
89
101
  flex1: !0,
90
102
  width: 1,
91
103
  minHeight: 5,
92
104
  placeholder: q,
93
105
  value: A,
94
- onChange: (e) => R(e.target.value),
106
+ onChange: (e) => C(e.target.value),
95
107
  ref: T,
96
108
  props: {
97
109
  onClick: (e) => {
98
- d && w && e.stopPropagation();
110
+ d && v && e.stopPropagation();
99
111
  }
100
112
  }
101
113
  }
102
114
  ),
103
- /* @__PURE__ */ n(oe, { component: "dropdown.display", display: d && w ? "none" : "flex", children: Q ?? /* @__PURE__ */ n(Z, { children: " " }) }),
104
- !W && /* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(ne, { viewBox: "0 0 10 6", width: "0.6rem", rotate: d ? 180 : 0, children: /* @__PURE__ */ n("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m1 1 4 4 4-4" }) }) })
115
+ /* @__PURE__ */ n(re, { component: "dropdown.display", display: d && v ? "none" : "flex", children: X ?? /* @__PURE__ */ n(K, { children: " " }) }),
116
+ !W && /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(se, { viewBox: "0 0 10 6", width: "0.6rem", rotate: d ? 180 : 0, children: /* @__PURE__ */ n("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m1 1 4 4 4-4" }) }) })
105
117
  ]
106
118
  }
107
119
  ),
108
120
  d && /* @__PURE__ */ n(
109
121
  le,
110
122
  {
111
- ref: E,
123
+ ref: L,
112
124
  top: N ? void 0 : 0,
113
125
  bottom: N ? 2 : void 0,
114
- style: { transform: `translateY(-${G}px)` },
115
- onPositionChange: (e) => z(e.top - window.scrollY),
116
- children: (f.length > 0 || j) && /* @__PURE__ */ B(h, { component: "dropdown.items", children: [
117
- X && /* @__PURE__ */ n(
118
- h,
126
+ style: { transform: `translateY(-${Q}px)` },
127
+ onPositionChange: (e) => G(e.top - window.scrollY),
128
+ children: (f.length > 0 || U) && /* @__PURE__ */ V(y, { component: "dropdown.items", children: [
129
+ Z && /* @__PURE__ */ n(
130
+ y,
119
131
  {
120
132
  component: "dropdown.unselect",
121
133
  selected: i.length === 0,
122
- ...v.props,
123
- props: { onClick: (e) => U(e) }
134
+ ...h.props,
135
+ props: { ...h.props.props, onClick: (e) => B(e) }
136
+ }
137
+ ),
138
+ F && /* @__PURE__ */ n(
139
+ y,
140
+ {
141
+ component: "dropdown.selectAll",
142
+ ...j.props,
143
+ props: { ...j.props.props, onClick: (e) => B(e, ...Y) }
124
144
  }
125
145
  ),
126
- F && /* @__PURE__ */ n(h, { component: "dropdown.selectAll", ...Y.props, props: { onClick: (e) => U(e, ...H) } }),
127
146
  f.map((e) => {
128
147
  const { value: t, onClick: o, ...u } = e.props;
129
148
  return /* @__PURE__ */ n(
130
- h,
149
+ y,
131
150
  {
132
151
  component: "dropdown.item",
133
152
  variant: a ? "multiple" : void 0,
134
153
  selected: i.includes(t),
135
154
  ...u,
136
155
  props: {
137
- onClick: (P) => {
138
- o == null || o(P), U(P, e);
156
+ ...u.props,
157
+ onClick: (k) => {
158
+ o == null || o(k), B(k, e);
139
159
  }
140
160
  }
141
161
  },
142
162
  t
143
163
  );
144
164
  }),
145
- f.length === 0 && j && /* @__PURE__ */ n(h, { component: "dropdown.emptyItem", ...j.props })
165
+ f.length === 0 && U && /* @__PURE__ */ n(y, { component: "dropdown.emptyItem", ...U.props })
146
166
  ] })
147
167
  }
148
168
  )
149
169
  ] });
150
170
  }
151
- function D(s) {
171
+ function D(l) {
152
172
  const m = (p) => null;
153
- return m.displayName = s, m;
173
+ return m.displayName = l, m;
154
174
  }
155
- const I = K(pe);
175
+ const I = ee(ie);
156
176
  I.Item = D("DropdownItem");
157
177
  I.Unselect = D("DropdownUnselect");
158
178
  I.SelectAll = D("DropdownSelectAll");
159
179
  I.EmptyItem = D("DropdownEmptyItem");
160
180
  I.Display = D("DropdownDisplay");
161
- function O(s) {
181
+ function R(l) {
162
182
  var m;
163
- if (s == null) return "";
164
- if (typeof s == "object") {
165
- const p = (m = s.props) == null ? void 0 : m.children;
166
- return p == null ? "" : typeof p == "object" ? (Array.isArray(p) ? p : [p]).map((y) => O(y)).join("") : p.toString();
183
+ if (l == null) return "";
184
+ if (typeof l == "object") {
185
+ const p = (m = l.props) == null ? void 0 : m.children;
186
+ return p == null ? "" : typeof p == "object" ? (Array.isArray(p) ? p : [p]).map((w) => R(w)).join("") : p.toString();
167
187
  }
168
- return s.toString();
188
+ return l.toString();
169
189
  }
170
190
  export {
171
191
  I as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),s=require("react"),a=require("../box.cjs");function n(t,e){return s.forwardRef((o,i)=>c.jsx(a,{tag:t,ref:i,component:t,...e,...o}))}const r=n("label"),u=n("span",{inline:!0}),m=n("article"),l=n("aside"),H=n("details"),S=n("figcaption"),f=n("figure"),g=n("footer"),d=n("header"),p=n("main"),h=n("mark"),M=n("nav"),b=n("menu"),z=n("section"),F=n("summary"),k=n("time"),y=n("p"),v=n("h1",{fontSize:14*2.5}),A=n("h2",{fontSize:14*2}),L=n("h3",{fontSize:14*1.75}),j=n("h4",{fontSize:14*1.5}),q=n("h5",{fontSize:14*1.25}),x=n("h6",{fontSize:14*1}),P=n("a"),R=n("img");exports.Article=m;exports.Aside=l;exports.Details=H;exports.Figcaption=S;exports.Figure=f;exports.Footer=g;exports.H1=v;exports.H2=A;exports.H3=L;exports.H4=j;exports.H5=q;exports.H6=x;exports.Header=d;exports.Img=R;exports.Label=r;exports.Link=P;exports.Main=p;exports.Mark=h;exports.Menu=b;exports.Nav=M;exports.P=y;exports.Section=z;exports.Span=u;exports.Summary=F;exports.Time=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),s=require("react"),i=require("../box.cjs");function t(n){return s.forwardRef((e,o)=>c.jsx(i,{tag:n,ref:o,component:n,...e}))}const a=t("label"),r=t("span"),m=t("article"),u=t("aside"),H=t("details"),l=t("figcaption"),g=t("figure"),d=t("footer"),p=t("header"),S=t("main"),f=t("mark"),h=t("nav"),M=t("menu"),b=t("section"),F=t("summary"),k=t("time"),y=t("p"),v=t("h1"),A=t("h2"),L=t("h3"),j=t("h4"),q=t("h5"),x=t("h6"),P=t("a"),R=t("img");exports.Article=m;exports.Aside=u;exports.Details=H;exports.Figcaption=l;exports.Figure=g;exports.Footer=d;exports.H1=v;exports.H2=A;exports.H3=L;exports.H4=j;exports.H5=q;exports.H6=x;exports.Header=p;exports.Img=R;exports.Label=a;exports.Link=P;exports.Main=S;exports.Mark=f;exports.Menu=M;exports.Nav=h;exports.P=y;exports.Section=b;exports.Span=r;exports.Summary=F;exports.Time=k;
@@ -3,29 +3,29 @@ import { BoxProps } from '../box';
3
3
  import { ExtractElementFromTag } from '../core/coreTypes';
4
4
  import { ComponentsAndVariants } from '../types';
5
5
  type SemanticComponentType<TTag extends keyof React.JSX.IntrinsicElements, TKey extends keyof ComponentsAndVariants = never> = (props: Omit<BoxProps<TTag, TKey>, 'tag'> & RefAttributes<ExtractElementFromTag<TTag>>) => React.ReactNode;
6
- export declare const Label: SemanticComponentType<"label", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
7
- export declare const Span: SemanticComponentType<"span", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
8
- export declare const Article: SemanticComponentType<"article", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
9
- export declare const Aside: SemanticComponentType<"aside", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
10
- export declare const Details: SemanticComponentType<"details", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
11
- export declare const Figcaption: SemanticComponentType<"figcaption", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
12
- export declare const Figure: SemanticComponentType<"figure", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
13
- export declare const Footer: SemanticComponentType<"footer", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
14
- export declare const Header: SemanticComponentType<"header", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
15
- export declare const Main: SemanticComponentType<"main", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
16
- export declare const Mark: SemanticComponentType<"mark", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
17
- export declare const Nav: SemanticComponentType<"nav", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
18
- export declare const Menu: SemanticComponentType<"menu", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
19
- export declare const Section: SemanticComponentType<"section", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
20
- export declare const Summary: SemanticComponentType<"summary", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
21
- export declare const Time: SemanticComponentType<"time", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
22
- export declare const P: SemanticComponentType<"p", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
23
- export declare const H1: SemanticComponentType<"h1", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
24
- export declare const H2: SemanticComponentType<"h2", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
25
- export declare const H3: SemanticComponentType<"h3", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
26
- export declare const H4: SemanticComponentType<"h4", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
27
- export declare const H5: SemanticComponentType<"h5", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
28
- export declare const H6: SemanticComponentType<"h6", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
29
- export declare const Link: SemanticComponentType<"a", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
30
- export declare const Img: SemanticComponentType<"img", "button" | "label" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell">;
6
+ export declare const Label: SemanticComponentType<"label", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
7
+ export declare const Span: SemanticComponentType<"span", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
8
+ export declare const Article: SemanticComponentType<"article", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
9
+ export declare const Aside: SemanticComponentType<"aside", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
10
+ export declare const Details: SemanticComponentType<"details", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
11
+ export declare const Figcaption: SemanticComponentType<"figcaption", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
12
+ export declare const Figure: SemanticComponentType<"figure", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
13
+ export declare const Footer: SemanticComponentType<"footer", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
14
+ export declare const Header: SemanticComponentType<"header", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
15
+ export declare const Main: SemanticComponentType<"main", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
16
+ export declare const Mark: SemanticComponentType<"mark", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
17
+ export declare const Nav: SemanticComponentType<"nav", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
18
+ export declare const Menu: SemanticComponentType<"menu", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
19
+ export declare const Section: SemanticComponentType<"section", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
20
+ export declare const Summary: SemanticComponentType<"summary", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
21
+ export declare const Time: SemanticComponentType<"time", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
22
+ export declare const P: SemanticComponentType<"p", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
23
+ export declare const H1: SemanticComponentType<"h1", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
24
+ export declare const H2: SemanticComponentType<"h2", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
25
+ export declare const H3: SemanticComponentType<"h3", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
26
+ export declare const H4: SemanticComponentType<"h4", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
27
+ export declare const H5: SemanticComponentType<"h5", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
28
+ export declare const H6: SemanticComponentType<"h6", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
29
+ export declare const Link: SemanticComponentType<"a", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
30
+ export declare const Img: SemanticComponentType<"img", "button" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "span" | "textarea" | "checkbox" | "textbox" | "radioButton" | "dropdown" | "datagrid" | "dropdown.display" | "dropdown.items" | "dropdown.item" | "dropdown.unselect" | "dropdown.selectAll" | "dropdown.emptyItem" | "datagrid.header" | "datagrid.header.cell" | "datagrid.cell" | "datagrid.columnGroups" | "datagrid.columnGroups.item" | "datagrid.columnGroups.item.icon">;
31
31
  export {};
@@ -1,14 +1,14 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as i } from "react";
3
- import r from "../box.mjs";
4
- function n(o, t) {
5
- return i((c, e) => /* @__PURE__ */ s(r, { tag: o, ref: e, component: o, ...t, ...c }));
2
+ import { forwardRef as e } from "react";
3
+ import i from "../box.mjs";
4
+ function o(t) {
5
+ return e((n, c) => /* @__PURE__ */ s(i, { tag: t, ref: c, component: t, ...n }));
6
6
  }
7
- const p = n("label"), u = n("span", { inline: !0 }), S = n("article"), l = n("aside"), h = n("details"), H = n("figcaption"), d = n("figure"), g = n("footer"), z = n("header"), k = n("main"), x = n("mark"), F = n("nav"), M = n("menu"), b = n("section"), v = n("summary"), y = n("time"), A = n("p"), L = n("h1", { fontSize: 14 * 2.5 }), j = n("h2", { fontSize: 14 * 2 }), w = n("h3", { fontSize: 14 * 1.75 }), B = n("h4", { fontSize: 14 * 1.5 }), D = n("h5", { fontSize: 14 * 1.25 }), I = n("h6", { fontSize: 14 * 1 }), P = n("a"), R = n("img");
7
+ const p = o("label"), f = o("span"), u = o("article"), h = o("aside"), l = o("details"), H = o("figcaption"), d = o("figure"), g = o("footer"), k = o("header"), x = o("main"), F = o("mark"), M = o("nav"), S = o("menu"), b = o("section"), v = o("summary"), y = o("time"), A = o("p"), L = o("h1"), j = o("h2"), w = o("h3"), B = o("h4"), D = o("h5"), I = o("h6"), P = o("a"), R = o("img");
8
8
  export {
9
- S as Article,
10
- l as Aside,
11
- h as Details,
9
+ u as Article,
10
+ h as Aside,
11
+ l as Details,
12
12
  H as Figcaption,
13
13
  d as Figure,
14
14
  g as Footer,
@@ -18,17 +18,17 @@ export {
18
18
  B as H4,
19
19
  D as H5,
20
20
  I as H6,
21
- z as Header,
21
+ k as Header,
22
22
  R as Img,
23
23
  p as Label,
24
24
  P as Link,
25
- k as Main,
26
- x as Mark,
27
- M as Menu,
28
- F as Nav,
25
+ x as Main,
26
+ F as Mark,
27
+ S as Menu,
28
+ M as Nav,
29
29
  A as P,
30
30
  b as Section,
31
- u as Span,
31
+ f as Span,
32
32
  v as Summary,
33
33
  y as Time
34
34
  };
@@ -7,6 +7,41 @@ export interface BoxComponent {
7
7
  }
8
8
  export type Components = Record<string, BoxComponent>;
9
9
  declare const boxComponents: {
10
+ h1: {
11
+ styles: {
12
+ fontSize: number;
13
+ };
14
+ };
15
+ h2: {
16
+ styles: {
17
+ fontSize: number;
18
+ };
19
+ };
20
+ h3: {
21
+ styles: {
22
+ fontSize: number;
23
+ };
24
+ };
25
+ h4: {
26
+ styles: {
27
+ fontSize: number;
28
+ };
29
+ };
30
+ h5: {
31
+ styles: {
32
+ fontSize: number;
33
+ };
34
+ };
35
+ h6: {
36
+ styles: {
37
+ fontSize: number;
38
+ };
39
+ };
40
+ span: {
41
+ styles: {
42
+ inline: true;
43
+ };
44
+ };
10
45
  button: {
11
46
  styles: {
12
47
  display: "inline-flex";
@@ -30,10 +65,6 @@ declare const boxComponents: {
30
65
  borderColor: "gray-300";
31
66
  };
32
67
  };
33
- variants: {
34
- test: {};
35
- test2: {};
36
- };
37
68
  };
38
69
  textbox: {
39
70
  styles: {
@@ -307,6 +338,42 @@ declare const boxComponents: {
307
338
  borderRadius: number;
308
339
  };
309
340
  children: {
341
+ columnGroups: {
342
+ styles: {
343
+ p: number;
344
+ bb: number;
345
+ borderColor: "gray-400";
346
+ color: "gray-400";
347
+ gap: number;
348
+ ai: "center";
349
+ height: number;
350
+ };
351
+ children: {
352
+ item: {
353
+ styles: {
354
+ gap: number;
355
+ ai: "center";
356
+ b: number;
357
+ borderColor: "gray-400";
358
+ bgColor: "gray-100";
359
+ borderRadius: number;
360
+ py: number;
361
+ pl: number;
362
+ pr: number;
363
+ color: "violet-950";
364
+ };
365
+ children: {
366
+ icon: {
367
+ styles: {
368
+ width: number;
369
+ color: "gray-400";
370
+ cursor: "pointer";
371
+ };
372
+ };
373
+ };
374
+ };
375
+ };
376
+ };
310
377
  header: {
311
378
  styles: {
312
379
  position: "sticky";