@radui/ui 0.5.0 → 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.
- package/README.md +2 -0
- package/dist/components/Accordion.d.ts +20 -34
- package/dist/components/Accordion.js +1 -1
- package/dist/components/AlertDialog.d.ts +46 -1
- package/dist/components/AlertDialog.js +1 -1
- package/dist/components/AspectRatio.d.ts +2 -2
- package/dist/components/AspectRatio.js +1 -1
- package/dist/components/Avatar.d.ts +4 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/AvatarGroup.d.ts +9 -1
- package/dist/components/AvatarGroup.js +1 -1
- package/dist/components/AvatarPrimitiveFallback-C1siRii4.js +1 -0
- package/dist/components/Badge.d.ts +3 -3
- package/dist/components/Badge.js +1 -1
- package/dist/components/BlockQuote.js +1 -1
- package/dist/components/Breadcrumb.d.ts +70 -0
- package/dist/components/Breadcrumb.js +1 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/Callout.d.ts +4 -1
- package/dist/components/Callout.js +1 -1
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/Card.js +1 -1
- package/dist/components/Checkbox.d.ts +29 -3
- package/dist/components/Checkbox.js +8 -1
- package/dist/components/CheckboxCards.d.ts +31 -4
- package/dist/components/CheckboxCards.js +1 -1
- package/dist/components/CheckboxGroup.d.ts +29 -2
- package/dist/components/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxGroupPrimitive-DfHQYkep.js +1 -0
- package/dist/components/Code.js +1 -1
- package/dist/components/Collapsible.d.ts +10 -1
- package/dist/components/Collapsible.js +1 -1
- package/dist/components/Combobox.d.ts +1 -1
- package/dist/components/Combobox.js +1 -1
- package/dist/components/ComboboxPrimitive-DQcJ8pzQ.js +1 -0
- package/dist/components/Command.d.ts +7 -1
- package/dist/components/Command.js +1 -1
- package/dist/components/ContextMenu.d.ts +23 -23
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/DataList.d.ts +10 -4
- package/dist/components/DataList.js +1 -1
- package/dist/components/Dialog.d.ts +7 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/Disclosure.d.ts +17 -7
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/Drawer.d.ts +95 -17
- package/dist/components/Drawer.js +1 -1
- package/dist/components/DropdownMenu.d.ts +23 -23
- package/dist/components/DropdownMenu.js +1 -1
- package/dist/components/Em.js +1 -1
- package/dist/components/Fieldset.d.ts +43 -0
- package/dist/components/Fieldset.js +1 -0
- package/dist/components/Heading.js +1 -1
- package/dist/components/HoverCard.d.ts +3 -1
- package/dist/components/HoverCard.js +1 -1
- package/dist/components/Kbd.js +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/LiveRegion.d.ts +73 -0
- package/dist/components/LiveRegion.js +1 -0
- package/dist/components/MenuPrimitive-D9VMz2TZ.js +1 -0
- package/dist/components/Menubar.d.ts +119 -29
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Minimap.d.ts +16 -12
- package/dist/components/Minimap.js +1 -1
- package/dist/components/NavigationMenu.d.ts +11 -3
- package/dist/components/NavigationMenu.js +1 -1
- package/dist/components/NumberField.d.ts +23 -2
- package/dist/components/NumberField.js +1 -1
- package/dist/components/Popover.d.ts +83 -0
- package/dist/components/Popover.js +1 -0
- package/dist/components/Progress.d.ts +5 -4
- package/dist/components/Progress.js +1 -1
- package/dist/components/Quote.js +1 -1
- package/dist/components/Radio.js +1 -1
- package/dist/components/RadioCards.d.ts +1 -1
- package/dist/components/RadioCards.js +1 -1
- package/dist/components/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/RadioGroupPrimitive-D1PP4y2M.js +1 -0
- package/dist/components/ScrollArea.d.ts +8 -4
- package/dist/components/ScrollArea.js +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Separator.js +1 -1
- package/dist/components/Skeleton.d.ts +12 -6
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Slider.d.ts +2 -2
- package/dist/components/Slider.js +1 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Splitter.d.ts +7 -1
- package/dist/components/Splitter.js +1 -1
- package/dist/components/Steps.d.ts +25 -10
- package/dist/components/Steps.js +1 -1
- package/dist/components/Strong.js +1 -1
- package/dist/components/Switch.d.ts +23 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/TabNav.d.ts +34 -9
- package/dist/components/TabNav.js +1 -1
- package/dist/components/Table.d.ts +66 -19
- package/dist/components/Table.js +1 -1
- package/dist/components/Tabs.d.ts +3 -1
- package/dist/components/Tabs.js +1 -1
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/Text.js +1 -1
- package/dist/components/TextArea.d.ts +4 -4
- package/dist/components/TextArea.js +1 -1
- package/dist/components/TextField.d.ts +1 -1
- package/dist/components/TextField.js +1 -1
- package/dist/components/Toast.d.ts +325 -0
- package/dist/components/Toast.js +1 -0
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +1 -1
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +1 -1
- package/dist/components/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar.js +1 -1
- package/dist/components/Tooltip.d.ts +12 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Tree.d.ts +2 -1
- package/dist/components/Tree.js +1 -1
- package/dist/components/VisuallyHidden.js +1 -1
- package/dist/components/{check-DujVUWP-.js → check-ctUdF4Q3.js} +4 -4
- package/dist/components/documentOverlayOpen-coyGmcyL.js +1 -0
- package/dist/components/{floating-ui.react-Byzse64h.js → floating-ui.react-2kiGB4sW.js} +1 -1
- package/dist/components/index-C7dBo_Ry.js +1 -0
- package/dist/components/index-CBcSLg6O.js +1 -0
- package/dist/components/index-CbNq68zs.js +1 -0
- package/dist/components/index-D8I-rMwz.js +1 -0
- package/dist/components/index-DMX7gpdp.js +1 -0
- package/dist/components/index-FITGoHty.js +1 -0
- package/dist/components/index-XF8itt-H.js +1 -0
- package/dist/components/index-nYRBURkR.js +1 -0
- package/dist/components/index-xlB--dex.js +1 -0
- package/dist/components/keyboard-BKF7hXqL.js +1 -0
- package/dist/components/mergeProps-0RucjqeH.js +1 -0
- package/dist/components/useComponentClass-C0isGl1z.js +1 -0
- package/dist/themes/baremetal.css +1 -0
- package/dist/themes/default.css +1 -0
- package/dist/themes/tailwind-presets/default.css +396 -0
- package/package.json +65 -23
- package/dist/components/AvatarPrimitiveFallback-BOYawMc9.js +0 -1
- package/dist/components/CheckboxGroupPrimitive-Cd8ra39e.js +0 -1
- package/dist/components/ComboboxPrimitive-BhHSrtiY.js +0 -1
- package/dist/components/MenuPrimitive-wJbEC-gM.js +0 -1
- package/dist/components/RadioGroupPrimitive-CcvI-_wm.js +0 -1
- package/dist/components/clsx-BaVHROc5.js +0 -1
- package/dist/components/index-BbEsAodL.js +0 -1
- package/dist/components/index-DOVR6Rd5.js +0 -1
- package/dist/components/index-DU_6Msfu.js +0 -1
- package/dist/components/index-Db-tduwt.js +0 -1
- package/dist/components/index-Ir5FYyWW.js +0 -1
- package/dist/components/index-gM8bbyw1.js +0 -1
- package/dist/components/index-m6qHOeQ9.js +0 -1
- package/dist/components/mergeProps-B9ocQsG4.js +0 -1
- package/dist/components/useComponentClass-QwNivz0h.js +0 -1
- package/dist/themes/tailwind-presets/default.js +0 -1
|
@@ -9,6 +9,10 @@ interface SplitterRootProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
9
9
|
minSizes?: number[];
|
|
10
10
|
maxSizes?: number[];
|
|
11
11
|
onSizesChange?: (sizes: number[]) => void;
|
|
12
|
+
/** Disables resizing by pointer and keyboard for every handle. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Reading direction. In RTL, horizontal arrow keys and drags are mirrored. Inherited from the DOM when omitted. */
|
|
15
|
+
dir?: 'ltr' | 'rtl';
|
|
12
16
|
}
|
|
13
17
|
declare const SplitterRoot: React.ForwardRefExoticComponent<SplitterRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
18
|
|
|
@@ -22,6 +26,8 @@ declare const SplitterPanel: React.ForwardRefExoticComponent<SplitterPanelProps
|
|
|
22
26
|
|
|
23
27
|
interface SplitterHandleProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
24
28
|
index: number;
|
|
29
|
+
/** Disables resizing with this handle (Root `disabled` disables all handles). */
|
|
30
|
+
disabled?: boolean;
|
|
25
31
|
customRootClass?: string;
|
|
26
32
|
}
|
|
27
33
|
declare const SplitterHandle: React.ForwardRefExoticComponent<SplitterHandleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -53,5 +59,5 @@ type SplitterComponent = React.ForwardRefExoticComponent<SplitterProps & React.R
|
|
|
53
59
|
};
|
|
54
60
|
declare const Splitter: SplitterComponent;
|
|
55
61
|
|
|
56
|
-
export { Splitter as default };
|
|
62
|
+
export { SplitterHandle as Handle, SplitterPanel as Panel, SplitterRoot as Root, Splitter as default };
|
|
57
63
|
export type { SplitterHandleProps, SplitterPanelProps, SplitterProps, SplitterRootProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as n,useRef as r,useState as
|
|
1
|
+
'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as n,useRef as r,useState as o,useCallback as i,useMemo as a,useEffect as l}from"react";import{u as s,c as u}from"./useComponentClass-C0isGl1z.js";import{K as c}from"./keyboard-BKF7hXqL.js";import"./ThemeContext-Sm-iNANd.js";const d=n(null),m=()=>{const e=t.useContext(d);if(!e)throw new Error("Splitter components must be used within a Splitter.Root");return e},f=e=>Math.round(10*e)/10,v=t.forwardRef((({orientation:n="horizontal",children:m,className:v,customRootClass:h="",defaultSizes:p=[50,50],minSizes:S=[0,0],maxSizes:x=[100,100],onSizesChange:g,disabled:y=!1,dir:z,style:w,...P},R)=>{const b=t.useId(),E=s(h,"Splitter"),D=r(null),[C,I]=o(p),[H,N]=o(!1),[M,L]=o(null),[T,A]=o({}),[k,O]=o({}),W=r(null),j=i((e=>{D.current=e,"function"==typeof R?R(e):R&&(R.current=e)}),[R]),K=a((()=>{const e=[...S||[]],t=[...x||[]];return Object.entries(T).forEach((([n,r])=>{const o=Number(n);void 0!==r.minSize&&(e[o]=Math.max(e[o]??0,r.minSize)),void 0!==r.maxSize&&(t[o]=Math.min(t[o]??100,r.maxSize))})),{minSizes:e,maxSizes:t}}),[S,x,T]),$=i((e=>k[e]??`${b}-panel-${e}`),[k,b]),_=i(((e,t)=>(O((n=>n[e]===t?n:{...n,[e]:t})),()=>{O((n=>{if(n[e]!==t)return n;const r={...n};return delete r[e],r}))})),[]),F=i(((e,t,n)=>(A((r=>{const o=r[e];if(o?.minSize===t&&o?.maxSize===n)return r;const i={...r};return void 0===t&&void 0===n?delete i[e]:i[e]={minSize:t,maxSize:n},i})),()=>{A((t=>{if(!(e in t))return t;const n={...t};return delete n[e],n}))})),[]),B=r(null);l((()=>()=>{W.current?.(),B.current&&(clearTimeout(B.current),B.current=null)}),[]);const G=r(C),V=r(K);G.current=C,V.current=K;const X="horizontal"===n,Y=i((()=>{if(z)return"rtl"===z;const e=D.current;return!(!e||"undefined"==typeof window||"function"!=typeof window.getComputedStyle)&&"rtl"===window.getComputedStyle(e).direction}),[z]),q=i(((e,t=G.current)=>{const n=e,r=e+1,{minSizes:o,maxSizes:i}=V.current,a=(t[n]||0)+(t[r]||0),l=o[n]??0,s=i[n]??100,u=o[r]??0,c=i[r]??100;return{leftPanelIndex:n,rightPanelIndex:r,min:Math.max(l,a-c),max:Math.min(s,a-u),totalAdjacentSize:a}}),[]),U=i(((e,t,n=G.current)=>{const r=[...n],{leftPanelIndex:o,rightPanelIndex:i,min:a,max:l,totalAdjacentSize:s}=q(e,r),u=((e,t,n)=>Math.max(t,Math.min(n,e)))(t,a,l);return r[o]=u,r[i]=s-u,r}),[q]),J=i((e=>{const t=G.current,{leftPanelIndex:n,min:r,max:o}=q(e,t);return{"aria-valuemin":f(r),"aria-valuemax":f(o),"aria-valuenow":f(t[n]||0)}}),[q]),Q=i(((e,t=!1)=>{I(e),B.current&&clearTimeout(B.current),g&&(t?g(e):B.current=setTimeout((()=>{g(e)}),16))}),[g]),Z=i(((e,t)=>{if(y)return;if("button"in t&&0!==t.button)return;t.preventDefault();const n=t.currentTarget;n&&"function"==typeof n.focus&&document.activeElement!==n&&n.focus({preventScroll:!0}),W.current?.();const r=e=>{if("touches"in e){const t=e.touches[0]??e.changedTouches?.[0];return t?X?t.clientX:t.clientY:null}return X?e.clientX:e.clientY},o=r(t);if(null===o)return;const i=[...G.current],a=i.length,l=X&&Y()?-1:1,s=n?X?n.offsetWidth:n.offsetHeight:0;N(!0),L(e);let u=null,c=o,d=i;const m=()=>{u=null;const t=(t=>{const n=D.current;if(!n)return d;const r=(X?n.clientWidth:n.clientHeight)-s*Math.max(0,a-1);return r<=0?d:U(e,(i[e]||0)+(t-o)*l/r*100,i)})(c);t.some(((e,t)=>e!==d[t]))&&(d=t,G.current=t,I(t))},f=e=>{const t=r(e);null!==t&&(e.cancelable&&"touches"in e&&e.preventDefault(),c=t,null===u&&(u=requestAnimationFrame(m)))},v=()=>{null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",h),document.removeEventListener("touchcancel",h),W.current=null};function h(){const e=null!==u;v(),e&&m(),N(!1),L(null);d.some(((e,t)=>e!==i[t]))&&g&&(B.current&&(clearTimeout(B.current),B.current=null),g(d))}W.current=v,document.addEventListener("mousemove",f),document.addEventListener("mouseup",h),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("touchend",h),document.addEventListener("touchcancel",h)}),[y,X,Y,g,U]),ee=i(((e,t)=>{if(y)return;const n=t.shiftKey?10:1,r=G.current;let o=0;if(X){const e=Y()?-n:n;t.key===c.ARROW_LEFT&&(o=-e),t.key===c.ARROW_RIGHT&&(o=e)}else t.key===c.ARROW_UP&&(o=-n),t.key===c.ARROW_DOWN&&(o=n);if(0===o){if(t.key===c.HOME||t.key===c.END){t.preventDefault();const{min:n,max:o}=q(e,r);Q(U(e,t.key===c.HOME?n:o),!0)}}else{t.preventDefault();const n=r[e]||0;Q(U(e,n+o),!0)}}),[y,q,X,Y,U,Q]),te={orientation:n,sizes:C,setSizes:Q,getHandleValueAttributes:J,startDrag:Z,handleKeyDown:ee,isDragging:H,activeHandleIndex:M,rootClass:E,registerPanelConstraints:F,registerPanelId:_,getPanelId:$,disabled:y};return e(d.Provider,{value:te,children:e("div",{...P,ref:j,className:u(E,v),dir:z,"data-orientation":n,"data-disabled":y?"":void 0,style:{display:"flex",flexDirection:X?"row":"column",width:"100%",height:"100%",...w},children:m})})}));v.displayName="SplitterRoot";const h=t.forwardRef((({index:n,children:r,className:o,style:i,minSize:a,maxSize:l,customRootClass:s,id:c,...d},f)=>{const{sizes:v,orientation:h,rootClass:p,registerPanelConstraints:S,registerPanelId:x,getPanelId:g}=m(),y=c??g?.(n);t.useEffect((()=>{if(c&&x)return x(n,c)}),[c,n,x]),t.useEffect((()=>{if(S&&(void 0!==a||void 0!==l))return S(n,a,l)}),[n,a,l,S]);const z={flexBasis:`${v[n]??0}%`,flexGrow:0,flexShrink:1,overflow:"auto",minWidth:"horizontal"===h?0:void 0,minHeight:"vertical"===h?0:void 0,...i};return e("div",{...d,ref:f,id:y,className:u(p&&`${p}-panel`,o),"data-orientation":h,style:z,children:r})}));h.displayName="SplitterPanel";const p=t.forwardRef((({index:t,className:n,"aria-label":r,style:o,customRootClass:i,disabled:a,onMouseDown:l,onTouchStart:s,onKeyDown:c,...d},f)=>{const{startDrag:v,orientation:h,isDragging:p,activeHandleIndex:S,handleKeyDown:x,getHandleValueAttributes:g,rootClass:y,getPanelId:z,disabled:w}=m(),P=Boolean(a||w),R=p&&S===t,b=g(t);return e("div",{...d,ref:f,className:u(y&&`${y}-handle`,{active:R},n),role:"separator","aria-orientation":h,"aria-label":r||`${h} resize handle`,...b,"data-orientation":h,"data-dragging":R?"":void 0,"data-disabled":P?"":void 0,"aria-disabled":!!P||void 0,"aria-controls":z?.(t),tabIndex:P?-1:0,onMouseDown:e=>{l?.(e),e.defaultPrevented||P||v(t,e)},onTouchStart:e=>{s?.(e),e.defaultPrevented||P||v(t,e)},onKeyDown:e=>{c?.(e),e.defaultPrevented||P||x(t,e)},style:o})}));p.displayName="SplitterHandle";const S=t.forwardRef(((t,n)=>(console.warn("Direct usage of Splitter is not supported. Please use Splitter.Root, Splitter.Panel, etc. instead."),e("div",{ref:n,...t}))));S.displayName="Splitter",S.Root=v,S.Panel=h,S.Handle=p;export{p as Handle,h as Panel,v as Root,S as default};
|
|
@@ -1,37 +1,52 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
|
|
4
3
|
type StepsRootProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
4
|
customRootClass?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Layout direction. Defaults to `vertical`, which is how Steps has always rendered;
|
|
7
|
+
* `horizontal` lays steps out in a row with horizontal connector lines.
|
|
8
|
+
*/
|
|
6
9
|
orientation?: 'horizontal' | 'vertical';
|
|
7
10
|
value?: number;
|
|
8
11
|
defaultValue?: number;
|
|
9
12
|
onValueChange?: (value: number) => void;
|
|
10
13
|
};
|
|
11
|
-
declare const StepsRoot:
|
|
14
|
+
declare const StepsRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
customRootClass?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Layout direction. Defaults to `vertical`, which is how Steps has always rendered;
|
|
18
|
+
* `horizontal` lays steps out in a row with horizontal connector lines.
|
|
19
|
+
*/
|
|
20
|
+
orientation?: "horizontal" | "vertical";
|
|
21
|
+
value?: number;
|
|
22
|
+
defaultValue?: number;
|
|
23
|
+
onValueChange?: (value: number) => void;
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
25
|
|
|
13
26
|
type StepItemProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
14
27
|
value?: string | number | null;
|
|
15
28
|
};
|
|
16
|
-
declare const StepItem:
|
|
29
|
+
declare const StepItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
30
|
+
value?: string | number | null;
|
|
31
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
32
|
|
|
18
33
|
type StepTrackProps = React.HTMLAttributes<HTMLDivElement>;
|
|
19
|
-
declare const StepTrack:
|
|
34
|
+
declare const StepTrack: React.ForwardRefExoticComponent<StepTrackProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
35
|
|
|
21
36
|
type StepBubbleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
22
|
-
declare const StepBubble:
|
|
37
|
+
declare const StepBubble: React.ForwardRefExoticComponent<StepBubbleProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
38
|
|
|
24
39
|
type StepLineProps = React.HTMLAttributes<HTMLDivElement>;
|
|
25
|
-
declare const StepLine:
|
|
40
|
+
declare const StepLine: React.ForwardRefExoticComponent<StepLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
41
|
|
|
27
42
|
type StepContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
28
|
-
declare const StepContent:
|
|
43
|
+
declare const StepContent: React.ForwardRefExoticComponent<StepContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
44
|
|
|
30
45
|
type StepTitleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
31
|
-
declare const StepTitle:
|
|
46
|
+
declare const StepTitle: React.ForwardRefExoticComponent<StepTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
47
|
|
|
33
48
|
type StepDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
|
|
34
|
-
declare const StepDescription:
|
|
49
|
+
declare const StepDescription: React.ForwardRefExoticComponent<StepDescriptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
50
|
|
|
36
51
|
declare const StepsComponent: () => null;
|
|
37
52
|
type StepsComponentType = typeof StepsComponent & {
|
|
@@ -46,5 +61,5 @@ type StepsComponentType = typeof StepsComponent & {
|
|
|
46
61
|
};
|
|
47
62
|
declare const Steps: StepsComponentType;
|
|
48
63
|
|
|
49
|
-
export { Steps as default };
|
|
64
|
+
export { StepBubble as Bubble, StepContent as Content, StepDescription as Description, StepItem as Item, StepLine as Line, StepsRoot as Root, StepTitle as Title, StepTrack as Track, Steps as default };
|
|
50
65
|
export type { StepBubbleProps, StepContentProps, StepDescriptionProps, StepItemProps, StepLineProps, StepTitleProps, StepTrackProps, StepsRootProps };
|
package/dist/components/Steps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as e}from"react/jsx-runtime";import{
|
|
1
|
+
'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as s,useContext as r}from"react";import{u as a,c as n}from"./useComponentClass-C0isGl1z.js";import{P as o}from"./index-XF8itt-H.js";import{u as i}from"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";const l=s(null),c=()=>{const e=r(l);if(!e)throw new Error("useStepsContext must be used within a StepsContext.Provider");return e},u=t.forwardRef((({children:s,className:r,customRootClass:c,orientation:u="vertical",value:d,defaultValue:m,onValueChange:f,...p},N)=>{const[C,h]=i(d,m??0,f),S=a(c,"Steps"),[v,b]=t.useState([]),w=t.useCallback((e=>(b((t=>t.includes(e)?t:[...t,e].sort(((e,t)=>{const s=e.compareDocumentPosition(t);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})))),()=>{b((t=>t.includes(e)?t.filter((t=>t!==e)):t))})),[]),R=t.useMemo((()=>({currentStep:C,setCurrentStep:h,rootClass:S,orientation:u,registerItem:w,itemElements:v})),[C,h,S,u,w,v]);return e(l.Provider,{value:R,children:e(o.div,{ref:N,className:n(S,r,S&&`${S}-${u}`),"data-orientation":u,...p,children:s})})}));u.displayName="Steps.Root";const d="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,m=t.forwardRef((({children:s,value:r,className:a="",...o},i)=>{const{rootClass:l,currentStep:u,registerItem:m,itemElements:f}=c(),[p,N]=t.useState(null),C=t.useCallback((e=>{N(e),"function"==typeof i?i(e):i&&(i.current=e)}),[i]);d((()=>{if(p&&m)return m(p)}),[p,m]);const h=p&&f?f.indexOf(p):-1,S=null!=r,v=S?(e=>{if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:null}return null})(r):h>=0?h:null,b=null!==v&&u===v,w=null!==v&&u>v?"completed":b?"active":"inactive";return e("div",{ref:C,className:n(l&&`${l}-item`,a),"data-state":w,"data-value":S?r:v??void 0,"aria-current":b?"step":void 0,...o,children:s})}));m.displayName="Steps.Item";const f=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-track`,s),...r,children:t})}));f.displayName="Steps.Track";const p=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-bubble`,s),...r,children:t})}));p.displayName="Steps.Bubble";const N=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-line`,s),...r,children:t})}));N.displayName="Steps.Line";const C=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-content`,s),...r,children:t})}));C.displayName="Steps.Content";const h=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-title`,s),...r,children:t})}));h.displayName="Steps.Title";const S=t.forwardRef((({children:t,className:s="",...r},a)=>{const{rootClass:o}=c();return e("div",{ref:a,className:n(o&&`${o}-description`,s),...r,children:t})}));S.displayName="Steps.Description";const v=Object.assign((()=>(console.warn("Direct usage of Steps is not supported. Please use Steps.Root, Steps.Item, etc. instead."),null)),{Root:u,Item:m,Track:f,Bubble:p,Line:N,Content:C,Title:h,Description:S});export{p as Bubble,C as Content,S as Description,m as Item,N as Line,u as Root,h as Title,f as Track,v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{
|
|
1
|
+
'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{u as o,c as t}from"./useComponentClass-C0isGl1z.js";import"./ThemeContext-Sm-iNANd.js";const e="Strong",a=s.forwardRef((({children:s,className:a,customRootClass:m,...n},c)=>{const i=o(m,e);return r("strong",{ref:c,className:t(i,a),...n,children:s})}));a.displayName=e;export{a as default};
|
|
@@ -18,12 +18,34 @@ type SwitchRootProps = ComponentPropsWithoutRef<typeof ButtonPrimitive> & {
|
|
|
18
18
|
value?: string;
|
|
19
19
|
asChild?: boolean;
|
|
20
20
|
};
|
|
21
|
+
declare const SwitchRoot: React__default.ForwardRefExoticComponent<Omit<{
|
|
22
|
+
label?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
onChange?: any;
|
|
27
|
+
} & Omit<React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React__default.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
28
|
+
children: React__default.ReactNode;
|
|
29
|
+
customRootClass?: string;
|
|
30
|
+
color?: string;
|
|
31
|
+
variant?: string;
|
|
32
|
+
size?: string;
|
|
33
|
+
defaultChecked?: boolean;
|
|
34
|
+
checked?: boolean;
|
|
35
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
value?: string;
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
21
42
|
|
|
22
43
|
type SwitchThumbProps = ComponentPropsWithoutRef<typeof Primitive.span> & {
|
|
23
44
|
asChild?: boolean;
|
|
24
45
|
className?: string;
|
|
25
46
|
children?: React__default.ReactNode;
|
|
26
47
|
};
|
|
48
|
+
declare const SwitchThumb: React__default.ForwardRefExoticComponent<SwitchThumbProps & React__default.RefAttributes<HTMLElement>>;
|
|
27
49
|
|
|
28
50
|
declare const Switch: {
|
|
29
51
|
(): null;
|
|
@@ -54,5 +76,5 @@ declare namespace SwitchProps {
|
|
|
54
76
|
type Root = SwitchRootProps;
|
|
55
77
|
}
|
|
56
78
|
|
|
57
|
-
export { SwitchProps, Switch as default };
|
|
79
|
+
export { SwitchRoot as Root, SwitchProps, SwitchThumb as Thumb, Switch as default };
|
|
58
80
|
export type { SwitchRootProps, SwitchThumbProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as
|
|
1
|
+
'use client';import{jsxs as e,jsx as s}from"react/jsx-runtime";import t,{createContext as a,forwardRef as o,useContext as r}from"react";import{B as i}from"./index-FITGoHty.js";import{u as c,c as d}from"./useComponentClass-C0isGl1z.js";import{c as n,a as l,b as h}from"./index-eAZUMNef.js";import{u as m}from"./index-wRElCyvx.js";import{c as u}from"./index-CXzybYmm.js";import{m as p}from"./mergeRefs-B8eZ_q-T.js";import{P as f}from"./index-XF8itt-H.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";const C=a({checked:!1,setChecked:()=>{},rootClass:"",disabled:!1}),b="Switch",k=o((({children:a,customRootClass:o,color:r="",variant:f,size:k,defaultChecked:v=!1,checked:j,onCheckedChange:w,disabled:x=!1,required:g=!1,name:R,value:N,asChild:y=!1,className:S,onClick:T,...E},P)=>{const[q,B]=m(j,v,w),z=c(o,b),L=n("switch",{variant:f,size:k}),D=h(r),I=l(L,D),$=t.useRef(null),A=t.useRef(v),F=Boolean(R)||g;t.useEffect((()=>{const e=$.current?.closest("form");if(!e||!F)return;const s=()=>B(Boolean(A.current));return e.addEventListener("reset",s),()=>e.removeEventListener("reset",s)}),[F,B]);const G={checked:q,setChecked:B,rootClass:z,disabled:x},H={...I,"data-slot":"switch-root","data-state":q?"checked":"unchecked","data-disabled":x?"":void 0,role:"switch","aria-checked":q,"aria-required":g,disabled:x,...E};return R&&(H.name=R),N&&(H.value=N),e(C.Provider,{value:G,children:[s(i,{ref:p(P,$),asChild:y,...H,className:d(z,S),onClick:u(T,(()=>{x||B(!q)})),children:a}),F&&s("input",{type:"checkbox","aria-hidden":"true",tabIndex:-1,name:R,value:N??"on",checked:q,required:g,disabled:x,onChange:()=>{},style:{position:"absolute",width:1,height:1,margin:0,opacity:0,pointerEvents:"none"}})]})}));k.displayName=b;const v=o((({asChild:e=!1,className:t,children:a,...o},i)=>{const{checked:c,rootClass:n,disabled:l}=r(C),h={"data-slot":"switch-thumb"};return h["data-state"]=c?"checked":"unchecked",l&&(h["data-disabled"]=""),s(f.span,{ref:i,className:d(n&&`${n}-indicator`,t),asChild:e,...h,...o,children:a})}));v.displayName="SwitchThumb";const j=()=>(console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null);j.Root=k,j.Thumb=v;export{k as Root,v as Thumb,j as default};
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
|
-
type
|
|
4
|
+
type TabNavLinkProps = React__default.ComponentPropsWithoutRef<'a'> & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
value?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Marks this link as the current page. Overrides the value-based selection from `TabNav.Root`,
|
|
10
|
+
* which is useful when the active link is derived from the router.
|
|
11
|
+
*/
|
|
12
|
+
active?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const TabNavLink: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
value?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Marks this link as the current page. Overrides the value-based selection from `TabNav.Root`,
|
|
20
|
+
* which is useful when the active link is derived from the router.
|
|
21
|
+
*/
|
|
22
|
+
active?: boolean;
|
|
23
|
+
} & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
|
|
25
|
+
type TabNavRootProps = React__default.ComponentPropsWithoutRef<'nav'> & {
|
|
5
26
|
loop?: boolean;
|
|
6
27
|
orientation?: 'horizontal' | 'vertical';
|
|
7
28
|
customRootClass?: string;
|
|
@@ -10,16 +31,19 @@ type TabNavRootProps = React__default.ComponentPropsWithoutRef<'div'> & {
|
|
|
10
31
|
defaultValue?: string;
|
|
11
32
|
onValueChange?: (value: string) => void;
|
|
12
33
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
34
|
+
declare const TabNavRoot: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
35
|
+
loop?: boolean;
|
|
36
|
+
orientation?: "horizontal" | "vertical";
|
|
37
|
+
customRootClass?: string;
|
|
38
|
+
color?: string;
|
|
17
39
|
value?: string;
|
|
18
|
-
|
|
40
|
+
defaultValue?: string;
|
|
41
|
+
onValueChange?: (value: string) => void;
|
|
42
|
+
} & React__default.RefAttributes<HTMLElement>>;
|
|
19
43
|
|
|
20
44
|
declare const TabNav: {
|
|
21
45
|
(): null;
|
|
22
|
-
Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<
|
|
46
|
+
Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
23
47
|
loop?: boolean;
|
|
24
48
|
orientation?: "horizontal" | "vertical";
|
|
25
49
|
customRootClass?: string;
|
|
@@ -27,13 +51,14 @@ declare const TabNav: {
|
|
|
27
51
|
value?: string;
|
|
28
52
|
defaultValue?: string;
|
|
29
53
|
onValueChange?: (value: string) => void;
|
|
30
|
-
} & React.RefAttributes<
|
|
54
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
31
55
|
Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
32
56
|
disabled?: boolean;
|
|
33
57
|
asChild?: boolean;
|
|
34
58
|
value?: string;
|
|
59
|
+
active?: boolean;
|
|
35
60
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
36
61
|
};
|
|
37
62
|
|
|
38
|
-
export { TabNav as default };
|
|
63
|
+
export { TabNavLink as Link, TabNavRoot as Root, TabNav as default };
|
|
39
64
|
export type { TabNavLinkProps, TabNavRootProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as a}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as
|
|
1
|
+
'use client';import{jsx as a}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as t,useId as s,useEffect as r,useRef as i}from"react";import{c as n,u as l}from"./useComponentClass-C0isGl1z.js";import{a as d,R as c}from"./index-C7dBo_Ry.js";import{P as m}from"./index-XF8itt-H.js";import{u}from"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./index-FITGoHty.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-0RucjqeH.js";const v=e({rootClass:"",tabValue:"",handleTabChange:()=>{}}),p=o((({value:e,className:o="",href:i="#",children:l,disabled:u,asChild:p,active:h,id:b,onClick:f,...C},N)=>{const{rootClass:j,tabValue:T,handleTabChange:k}=t(v),{setFocusedItemId:g}=t(d);p&&(u=!1);const R=s(),x=b??R,P=h??(void 0!==e&&e===T);r((()=>{P&&!u&&g(x)}),[P,u,x]);return a(c.Item,{domId:x,children:a(m.a,{ref:N,id:x,className:n(j&&`${j}-link`,o),asChild:p,onClick:a=>{u?a.preventDefault():(f?.(a),a.defaultPrevented||void 0===e||k(e))},"aria-disabled":u,"aria-current":P?"page":void 0,"data-state":P?"active":"inactive","data-disabled":u?"":void 0,"data-slot":"tab-nav-link",disabled:u,...u?{}:{href:i},...C,children:l})})}));p.displayName="TabNavLink";const h=o((({className:e,loop:o=!0,orientation:t="horizontal",children:s,color:d,customRootClass:m="",defaultValue:p="",onValueChange:h=()=>{},value:b,...f},C)=>{const N=l(m,"TabNav"),[j,T]=u(b,p||"",h),k=a=>{a!==j&&T(a)},g=i(!0);r((()=>{g.current?g.current=!1:void 0===b&&p&&k(p)}),[p,b]);const R={rootClass:N,tabValue:j,handleTabChange:k};return a(v.Provider,{value:R,children:a(c.Root,{loop:o,orientation:t,children:a(c.Group,{asChild:!0,children:a("nav",{ref:C,className:n(N,e),"data-orientation":t,"data-slot":"tab-nav-root",role:void 0,...f,children:s})})})})}));h.displayName="TabNavRoot";const b=()=>(console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null);b.Root=h,b.Link=p;export{p as Link,h as Root,b as default};
|
|
@@ -1,39 +1,86 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React$1, { CSSProperties } from 'react';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ColumnWidths = Record<number, number>;
|
|
4
|
+
type TableResizeHandleVisibility = 'hover' | 'always';
|
|
5
|
+
interface TableContextValue {
|
|
6
|
+
rootClass: string;
|
|
7
|
+
resizable: boolean;
|
|
8
|
+
resizeHandleVisibility: TableResizeHandleVisibility;
|
|
9
|
+
columnCount: number;
|
|
10
|
+
minColumnWidth: number;
|
|
11
|
+
registerColumnIndex: (columnIndex: number) => void;
|
|
12
|
+
columnWidths: ColumnWidths;
|
|
13
|
+
getColumnStyle: (columnIndex: number) => CSSProperties | undefined;
|
|
14
|
+
startColumnResize: (columnIndex: number, headerElement: HTMLElement, event: React.MouseEvent | React.TouchEvent) => void;
|
|
15
|
+
handleColumnResizeKeyDown: (columnIndex: number, headerElement: HTMLElement, event: React.KeyboardEvent) => void;
|
|
16
|
+
isResizing: boolean;
|
|
17
|
+
activeColumnIndex: number | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type TableRootProps = React$1.ComponentPropsWithoutRef<'div'> & {
|
|
4
21
|
customRootClass?: string;
|
|
22
|
+
resizable?: boolean;
|
|
23
|
+
defaultColumnWidths?: number[] | ColumnWidths;
|
|
24
|
+
columnWidths?: number[] | ColumnWidths;
|
|
25
|
+
onColumnWidthsChange?: (widths: ColumnWidths) => void;
|
|
26
|
+
minColumnWidth?: number;
|
|
27
|
+
resizeHandleVisibility?: TableResizeHandleVisibility;
|
|
5
28
|
};
|
|
6
|
-
|
|
29
|
+
|
|
30
|
+
declare const useTable: () => TableContextValue;
|
|
31
|
+
declare const TableRoot: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
32
|
customRootClass?: string;
|
|
8
|
-
|
|
33
|
+
resizable?: boolean;
|
|
34
|
+
defaultColumnWidths?: number[] | ColumnWidths;
|
|
35
|
+
columnWidths?: number[] | ColumnWidths;
|
|
36
|
+
onColumnWidthsChange?: (widths: ColumnWidths) => void;
|
|
37
|
+
minColumnWidth?: number;
|
|
38
|
+
resizeHandleVisibility?: TableResizeHandleVisibility;
|
|
39
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
9
40
|
|
|
10
|
-
type TableHeadProps = React.ComponentPropsWithoutRef<'thead'>;
|
|
11
|
-
declare const TableHead: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
41
|
+
type TableHeadProps = React$1.ComponentPropsWithoutRef<'thead'>;
|
|
42
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
12
43
|
|
|
13
|
-
type TableBodyProps = React.ComponentPropsWithoutRef<'tbody'>;
|
|
14
|
-
declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
44
|
+
type TableBodyProps = React$1.ComponentPropsWithoutRef<'tbody'>;
|
|
45
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
15
46
|
|
|
16
|
-
type TableRowProps = React.ComponentPropsWithoutRef<'tr'>;
|
|
17
|
-
declare const TableRow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
|
|
47
|
+
type TableRowProps = React$1.ComponentPropsWithoutRef<'tr'>;
|
|
48
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
18
49
|
|
|
19
|
-
type TableColumnCellHeaderProps = React.ComponentPropsWithoutRef<'th'
|
|
20
|
-
|
|
50
|
+
type TableColumnCellHeaderProps = React$1.ComponentPropsWithoutRef<'th'> & {
|
|
51
|
+
columnIndex?: number;
|
|
52
|
+
};
|
|
53
|
+
declare const TableColumnCellHeader: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & {
|
|
54
|
+
columnIndex?: number;
|
|
55
|
+
} & React$1.RefAttributes<HTMLTableHeaderCellElement>>;
|
|
21
56
|
|
|
22
|
-
type
|
|
23
|
-
|
|
57
|
+
type TableColumnResizeHandleProps = React$1.ComponentPropsWithoutRef<'div'> & {
|
|
58
|
+
'aria-label'?: string;
|
|
59
|
+
};
|
|
60
|
+
declare const TableColumnResizeHandle: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
61
|
+
'aria-label'?: string;
|
|
62
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
|
|
64
|
+
type TableCellProps = React$1.ComponentPropsWithoutRef<'td'> & {
|
|
65
|
+
columnIndex?: number;
|
|
66
|
+
};
|
|
67
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & {
|
|
68
|
+
columnIndex?: number;
|
|
69
|
+
} & React$1.RefAttributes<HTMLTableDataCellElement>>;
|
|
24
70
|
|
|
25
|
-
type TableProps = React.HTMLAttributes<HTMLTableElement> & {
|
|
26
|
-
children?: React.ReactNode;
|
|
71
|
+
type TableProps = React$1.HTMLAttributes<HTMLTableElement> & {
|
|
72
|
+
children?: React$1.ReactNode;
|
|
27
73
|
};
|
|
28
|
-
interface TableComponent extends React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>> {
|
|
74
|
+
interface TableComponent extends React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>> {
|
|
29
75
|
Root: typeof TableRoot;
|
|
30
76
|
Body: typeof TableBody;
|
|
31
77
|
Head: typeof TableHead;
|
|
32
78
|
Row: typeof TableRow;
|
|
33
79
|
Cell: typeof TableCell;
|
|
34
80
|
ColumnCellHeader: typeof TableColumnCellHeader;
|
|
81
|
+
ColumnResizeHandle: typeof TableColumnResizeHandle;
|
|
35
82
|
}
|
|
36
83
|
declare const Table: TableComponent;
|
|
37
84
|
|
|
38
|
-
export { Table as default };
|
|
39
|
-
export type { TableBodyProps, TableCellProps, TableColumnCellHeaderProps, TableHeadProps, TableProps, TableRootProps, TableRowProps };
|
|
85
|
+
export { TableBody as Body, TableCell as Cell, TableColumnCellHeader as ColumnCellHeader, TableColumnResizeHandle as ColumnResizeHandle, TableHead as Head, TableRoot as Root, TableRow as Row, Table as default, useTable };
|
|
86
|
+
export type { TableBodyProps, TableCellProps, TableColumnCellHeaderProps, TableColumnResizeHandleProps, TableHeadProps, TableProps, TableResizeHandleVisibility, TableRootProps, TableRowProps };
|
package/dist/components/Table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import e from"react";import{jsx as
|
|
1
|
+
'use client';import e,{createContext as n,useRef as t,useState as r,useCallback as o,useEffect as l,useLayoutEffect as a,useMemo as s}from"react";import{jsx as i,jsxs as c}from"react/jsx-runtime";import{u,c as d}from"./useComponentClass-C0isGl1z.js";import{K as m}from"./keyboard-BKF7hXqL.js";import"./ThemeContext-Sm-iNANd.js";const h=n(null),f="Table",v=()=>{const n=e.useContext(h);if(!n)throw new Error("Table components must be used within a Table.Root");return n};function b(e){return e?Array.isArray(e)?Object.fromEntries(e.map(((e,n)=>[n,e]))):e:{}}const C=e.forwardRef((({children:e,className:n="",customRootClass:v="",resizable:C=!1,defaultColumnWidths:y,columnWidths:R,onColumnWidthsChange:p,minColumnWidth:z=48,resizeHandleVisibility:w="hover",...x},E)=>{const N=u(v,f),T=t(null),[H,g]=r((()=>b(y))),[L,M]=r(0),[W,I]=r(!1),[j,$]=r(null),A=t({}),D=t(0),O=t(!1),X=t(null),k=o((()=>{const e=X.current;e&&(document.removeEventListener("mousemove",e.handleMove),document.removeEventListener("mouseup",e.handleEnd),document.removeEventListener("touchmove",e.handleMove),document.removeEventListener("touchend",e.handleEnd),document.removeEventListener("touchcancel",e.handleEnd),X.current=null)}),[]);l((()=>()=>{k()}),[k]);const K=void 0!==R,S=K?b(R):H;A.current=S,D.current=L;const B=o((e=>{K||g(e),p?.(e)}),[K,p]),P=o((e=>{M((n=>Math.max(n,e+1)))}),[]),V=o((e=>{if(!C)return;const n=S[e];return void 0!==n?{width:n}:void 0}),[S,C]);a((()=>{if(!C||K||!T.current||0===L||O.current)return;const e=T.current.offsetWidth;if(e<=0)return;const n=Object.keys(A.current).length>0?function(e,n,t){const r=Array.from({length:n},((n,t)=>e[t]??0)),o=r.reduce(((e,n)=>e+n),0);if(o<=0||t<=0)return e;const l=t/o;return Object.fromEntries(r.map(((e,n)=>[n,Math.max(1,Math.round(e*l))])))}(A.current,L,e):function(e,n){const t=Math.max(1,Math.floor(n/e));return Object.fromEntries(Array.from({length:e},((e,n)=>[n,t])))}(L,e);O.current=!0,B(n)}),[L,K,C,B]);const _=o(((e,n)=>{let t=e;for(let e=0;e<Math.abs(n);e+=1)if(t=n<0?t.previousElementSibling:t.nextElementSibling,!t)return null;return t}),[]),F=o(((e,n)=>A.current[e]??n?.offsetWidth??z),[z]),G=o(((e,n,t,r)=>{const o=e+1;if(o>=D.current)return;const l=r-z,a=t-z,s=Math.max(-a,Math.min(l,n)),i=t+s,c=r-s;B({...A.current,[e]:i,[o]:c})}),[z,B]),q=o(((e,n,t)=>{if(!C||e>=D.current-1)return;t.preventDefault();const r="clientX"in t?t.clientX:t.touches[0].clientX,o=_(n,1),l=F(e,n),a=F(e+1,o);I(!0),$(e),k();const s=n=>{const t="clientX"in n?n.clientX:n.touches[0].clientX;G(e,t-r,l,a)},i=()=>{I(!1),$(null),k()};X.current={handleMove:s,handleEnd:i},document.addEventListener("mousemove",s),document.addEventListener("mouseup",i),document.addEventListener("touchmove",s),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i)}),[G,k,F,_,C]),J=o(((e,n,t)=>{if(!C||e>=D.current-1)return;const r=t.shiftKey?20:5;let o=0;if(t.key===m.ARROW_LEFT?o=-r:t.key===m.ARROW_RIGHT&&(o=r),0===o)return;t.preventDefault();const l=_(n,1);G(e,o,F(e,n),F(e+1,l))}),[G,F,_,C]),Q=s((()=>({rootClass:N,resizable:C,resizeHandleVisibility:w,columnCount:L,minColumnWidth:z,registerColumnIndex:P,columnWidths:S,getColumnStyle:V,startColumnResize:q,handleColumnResizeKeyDown:J,isResizing:W,activeColumnIndex:j})),[j,L,S,V,J,W,z,P,w,C,N,q]);return i(h.Provider,{value:Q,children:i("div",{ref:E,className:d(N&&`${N}-wrapper`,n),"data-resizable":C?"":void 0,"data-resizing":C&&W?"":void 0,"data-resize-handle-visibility":C?w:void 0,...x,children:c("table",{ref:T,className:d(N),"data-resizable":C?"":void 0,style:C?{tableLayout:"fixed",width:"100%"}:void 0,children:[C&&L>0&&i("colgroup",{children:Array.from({length:L},((e,n)=>i("col",{style:V(n)},n)))}),e]})})})}));C.displayName=f;const y=e.forwardRef((({children:n,className:t="header",...r},o)=>{const l=e.useContext(h)?.rootClass;return i("thead",{ref:o,className:d(l&&`${l}-head`,t),...r,children:n})}));y.displayName="TableHead";const R=e.forwardRef((({children:n,className:t="",...r},o)=>{const l=e.useContext(h)?.rootClass;return i("tbody",{ref:o,className:d(l&&`${l}-body`,t),...r,children:n})}));R.displayName="TableBody";const p=e.forwardRef((({children:n,className:t="row",...r},o)=>{const l=e.useContext(h)?.rootClass;return i("tr",{ref:o,className:d(l&&`${l}-row`,t),...r,children:n})}));p.displayName="TableRow";const z=n(null),w=e.forwardRef((({children:n,className:t="cell-header",columnIndex:r,style:o,...l},a)=>{const{resizable:s,registerColumnIndex:c,rootClass:u}=v(),m=s&&void 0!==r;e.useLayoutEffect((()=>{void 0!==r&&c(r)}),[r,c]);const h=i("th",{ref:a,className:d(u&&`${u}-cell-header`,t,m&&"resizable"),"data-resizable":m?"":void 0,style:o,...l,children:n});return void 0===r?h:i(z.Provider,{value:{columnIndex:r},children:h})}));w.displayName="TableColumnCellHeader";const x=e.forwardRef((({className:n,"aria-label":t,...r},o)=>{const{rootClass:l,resizable:a,resizeHandleVisibility:s,columnCount:c,minColumnWidth:u,columnWidths:m,startColumnResize:h,handleColumnResizeKeyDown:f,isResizing:b,activeColumnIndex:C}=v(),{columnIndex:y}=(()=>{const n=e.useContext(z);if(!n)throw new Error("Table.ColumnResizeHandle must be used within a Table.ColumnCellHeader with columnIndex");return n})(),R=e.useRef(null),p=b&&C===y,w=c>0&&y>=c-1,x=e.useCallback((e=>{R.current=e?.closest("th")??null,"function"==typeof o?o(e):o&&(o.current=e)}),[o]);if(!a||w)return null;const E=Math.round(m[y]??R.current?.offsetWidth??u);return i("div",{...r,ref:x,"data-slot":"table-column-resize-handle","data-resize-handle-visibility":s,"data-state":p?"active":void 0,className:d(l&&`${l}-column-resize-handle`,{active:p},n),role:"separator","aria-orientation":"vertical","aria-label":t||`Resize column ${y+1}`,"aria-valuemin":u,"aria-valuenow":E,tabIndex:0,onMouseDown:e=>{R.current&&h(y,R.current,e)},onTouchStart:e=>{R.current&&h(y,R.current,e)},onKeyDown:e=>{R.current&&f(y,R.current,e)}})}));x.displayName="TableColumnResizeHandle";const E=e.forwardRef((({children:e,className:n="cell",columnIndex:t,style:r,...o},l)=>{const{resizable:a,rootClass:s}=v(),c=a&&void 0!==t;return i("td",{ref:l,className:d(s&&`${s}-cell`,n,c&&"resizable"),"data-resizable":c?"":void 0,style:r,...o,children:e})}));E.displayName="TableCell";const N=e.forwardRef((function(e,n){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null}));N.displayName="Table",N.Root=C,N.Body=R,N.Head=y,N.Row=p,N.Cell=E,N.ColumnCellHeader=w,N.ColumnResizeHandle=x;export{R as Body,E as Cell,w as ColumnCellHeader,x as ColumnResizeHandle,y as Head,C as Root,p as Row,N as default,v as useTable};
|
|
@@ -37,6 +37,7 @@ type TabRootProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
37
37
|
onValueChange?: (value: string) => void;
|
|
38
38
|
orientation?: 'horizontal' | 'vertical';
|
|
39
39
|
dir?: 'ltr' | 'rtl';
|
|
40
|
+
loop?: boolean;
|
|
40
41
|
activationMode?: 'automatic' | 'manual';
|
|
41
42
|
asChild?: boolean;
|
|
42
43
|
};
|
|
@@ -48,6 +49,7 @@ declare const TabRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLPr
|
|
|
48
49
|
onValueChange?: (value: string) => void;
|
|
49
50
|
orientation?: "horizontal" | "vertical";
|
|
50
51
|
dir?: "ltr" | "rtl";
|
|
52
|
+
loop?: boolean;
|
|
51
53
|
activationMode?: "automatic" | "manual";
|
|
52
54
|
asChild?: boolean;
|
|
53
55
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -63,5 +65,5 @@ interface TabsComponent extends React.ForwardRefExoticComponent<TabsProps & Reac
|
|
|
63
65
|
}
|
|
64
66
|
declare const Tabs: TabsComponent;
|
|
65
67
|
|
|
66
|
-
export { Tabs as default };
|
|
68
|
+
export { TabContent as Content, TabList as List, TabRoot as Root, TabTrigger as Trigger, Tabs as default };
|
|
67
69
|
export type { TabContentProps, TabListProps, TabRootProps, TabTriggerProps, TabsProps };
|
package/dist/components/Tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import a,{createContext as t,useContext as e,
|
|
1
|
+
'use client';import a,{createContext as t,useContext as e,useEffect as o,useId as i,useState as r,useCallback as s,useRef as d}from"react";import{jsx as n}from"react/jsx-runtime";import{c as l,u as c}from"./useComponentClass-C0isGl1z.js";import{R as u,a as m}from"./index-C7dBo_Ry.js";import{P as b}from"./index-XF8itt-H.js";import{u as h}from"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./index-FITGoHty.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-0RucjqeH.js";const v=a=>a.replace(/\s+/g,"-"),f=(a,t)=>`${a}-trigger-${v(t)}`,g=(a,t)=>`${a}-content-${v(t)}`,p=t(null),C=a.forwardRef((({className:a="",children:t,asChild:o=!1,...i},r)=>{const s=e(p);if(!s)throw new Error("TabList must be used within a TabRoot");const{rootClass:d,orientation:c}=s;return n(u.Group,{children:n(b.div,{ref:r,role:"tablist","aria-orientation":c,className:l(d&&`${d}-list`,a),"data-slot":"tabs-list",asChild:o,...i,children:t})})}));C.displayName="TabList";const T=a.forwardRef((({value:a,children:t,className:i="",disabled:r,asChild:s=!1,id:d,onClick:c,onFocus:h,...v},C)=>{const T=e(p);if(!T)throw new Error("TabTrigger must be used within a TabRoot");const{tabValue:R,handleTabChange:w,rootClass:N,orientation:I,activationMode:j,baseId:x,registerTriggerId:y}=T,{setFocusedItemId:P}=e(m),$=void 0!==a&&a===R,L=d??(void 0!==a?f(x,a):void 0),V=void 0!==a?g(x,a):void 0;o((()=>{if(void 0!==a&&void 0!==d&&y)return y(a,d),()=>y(a,void 0)}),[a,d,y]),o((()=>{$&&!r&&L&&P(L)}),[$,r,L]);const M={};return M["data-state"]=$?"active":"inactive",M["data-orientation"]=I||"horizontal",r&&(M["data-disabled"]=""),n(u.Item,{domId:L,children:n(b.button,{ref:C,id:L,onClick:t=>{c?.(t),t.defaultPrevented||r||void 0===a||w(a)},onFocus:t=>{h?.(t),t.defaultPrevented||r||void 0===a||"manual"!==j&&w(a)},className:l(N&&`${N}-trigger`,$?"active":"",r?"disabled":"",i),role:"tab",type:"button","aria-selected":$,"aria-controls":$?V:void 0,"aria-disabled":r,disabled:r,"data-slot":"tabs-trigger",asChild:s,...M,...v,children:t})})}));T.displayName="TabTrigger";const R="TabContent",w=a.forwardRef((({className:a="",value:t,children:o,customRootClass:i,asChild:r=!1,forceMount:s=!1,...d},u)=>{const m=c(i,R),h=e(p);if(!h)throw new Error("TabContent must be used within a TabRoot");const{tabValue:v,orientation:C,baseId:T,customTriggerIds:w}=h,N=void 0!==t&&v===t;if(!(s||N))return null;const I={};return I["data-state"]=N?"active":"inactive",I["data-orientation"]=C||"horizontal",n(b.div,{ref:u,className:l(m,a),id:void 0!==t?g(T,t):void 0,role:"tabpanel","aria-labelledby":void 0!==t?w?.[t]??f(T,t):void 0,tabIndex:N?0:void 0,hidden:!N,"aria-hidden":!N,"data-slot":"tabs-content",asChild:r,...I,...d,children:o})}));w.displayName=R;const N="Tabs",I=a.forwardRef((({children:a,defaultValue:t="",onValueChange:e=()=>{},customRootClass:m="",value:v,className:f,color:g,orientation:C="horizontal",dir:T="ltr",loop:R=!0,activationMode:w="automatic",asChild:I=!1,...j},x)=>{const y=c(m,N),[P,$]=h(v,t||"",e),L=i(),[V,M]=r({}),k=s(((a,t)=>{M((e=>{if(e[a]===t)return e;const o={...e};return void 0===t?delete o[a]:o[a]=t,o}))}),[]),z=a=>{a!==P&&$(a)},E=d(!0);o((()=>{E.current?E.current=!1:void 0===v&&t&&z(t)}),[t,v]);const F={rootClass:y,baseId:L,tabValue:P,handleTabChange:z,orientation:C,activationMode:w,customTriggerIds:V,registerTriggerId:k},D={};return D["data-orientation"]=C,n(p.Provider,{value:F,children:n(u.Root,{orientation:C,loop:R,dir:T,asChild:!0,children:n(b.div,{ref:x,className:l(y,f),"data-color":g,"data-slot":"tabs-root",dir:T,asChild:I,...D,...j,children:a})})})}));I.displayName=N;const j=a.forwardRef(((a,t)=>(console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null)));j.displayName="Tabs",j.List=C,j.Content=w,j.Root=I,j.Trigger=T;export{w as Content,C as List,I as Root,T as Trigger,j as default};
|
|
@@ -5,13 +5,13 @@ type TextProps = {
|
|
|
5
5
|
customRootClass?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
as?: string;
|
|
8
|
-
} & ComponentPropsWithoutRef<'p'>;
|
|
8
|
+
} & ComponentPropsWithoutRef<'p'> & Pick<ComponentPropsWithoutRef<'label'>, 'htmlFor'>;
|
|
9
9
|
declare const Text: React.ForwardRefExoticComponent<{
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
customRootClass?: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
as?: string;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & Pick<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref">, "htmlFor"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
15
15
|
|
|
16
16
|
export { Text as default };
|
|
17
17
|
export type { TextProps };
|
package/dist/components/Text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import e,{forwardRef as s}from"react";import{u as a,c as t}from"./useComponentClass-C0isGl1z.js";import"./ThemeContext-Sm-iNANd.js";const o="Text",m=["div","span","p","label"],r=s((({children:s,customRootClass:r="",className:l="",as:c="p",...n},p)=>{const i=a(r,o);return m.includes(c)||(c="p"),e.createElement(c,{ref:p,className:t(i,l),...n},s)}));r.displayName=o;export{r as default};
|
|
@@ -20,10 +20,10 @@ declare const TextAreaRoot: React.ForwardRefExoticComponent<Omit<React.DetailedH
|
|
|
20
20
|
type TextAreaInputProps = React.ComponentPropsWithoutRef<'textarea'>;
|
|
21
21
|
declare const TextAreaInput: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
22
22
|
|
|
23
|
-
type
|
|
24
|
-
|
|
23
|
+
type RootOnlyProps = Pick<TextAreaRootProps, 'customRootClass' | 'variant' | 'size' | 'resize' | 'color' | 'radius' | 'className' | 'style'>;
|
|
24
|
+
type TextAreaProps = RootOnlyProps & Omit<TextAreaInputProps, 'className' | 'style' | 'color'> & {
|
|
25
|
+
/** @deprecated Use `readOnly`. */
|
|
25
26
|
readonly?: boolean;
|
|
26
|
-
disabled?: boolean;
|
|
27
27
|
};
|
|
28
28
|
type TextAreaComponent = React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<React.ElementRef<'div'>>> & {
|
|
29
29
|
Input: typeof TextAreaInput;
|
|
@@ -31,5 +31,5 @@ type TextAreaComponent = React.ForwardRefExoticComponent<TextAreaProps & React.R
|
|
|
31
31
|
};
|
|
32
32
|
declare const TextArea: TextAreaComponent;
|
|
33
33
|
|
|
34
|
-
export { TextArea as default };
|
|
34
|
+
export { TextAreaInput as Input, TextAreaRoot as Root, TextArea as default };
|
|
35
35
|
export type { TextAreaInputProps, TextAreaProps, TextAreaRootProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import{jsx as e
|
|
1
|
+
'use client';import{jsx as e}from"react/jsx-runtime";import a from"react";import{u as r,c as s}from"./useComponentClass-C0isGl1z.js";import{c as t,a as o,b as i}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const l="TextArea",d=a.forwardRef((({children:a,customRootClass:d="",className:c="",variant:n="",size:m="",resize:u="both",color:f="",radius:p="",...h},v)=>{const x=r(d,l),y=t("textarea",{variant:n,size:m,resize:u,radius:p}),z=i(f),R=o(y,z);return e("div",{ref:v,className:s(x,c),...h,...R,children:a})}));d.displayName=l;const c=a.forwardRef((({children:a,placeholder:r="",value:s,defaultValue:t,...o},i)=>e("textarea",{ref:i,placeholder:r,value:s,defaultValue:t??(void 0===s&&void 0===t&&"string"==typeof a?a:void 0),...o})));c.displayName="TextAreaInput";const n=a.forwardRef((({customRootClass:a="",className:r="",style:t,variant:o,size:i,resize:l,color:n,radius:m,readonly:u=!1,readOnly:f,disabled:p=!1,placeholder:h="",children:v,...x},y)=>{const z={},R={};return Object.entries(x).forEach((([e,a])=>{e.startsWith("data-")?z[e]=a:R[e]=a})),e(d,{ref:y,customRootClass:a,className:s(r),style:t,variant:o,size:i,resize:l,color:n,radius:m,"data-disabled":p?"":void 0,...z,children:e(c,{placeholder:h,disabled:p,readOnly:f??u,...R,children:v})})}));n.displayName="TextArea",n.Input=c,n.Root=d;export{c as Input,d as Root,n as default};
|
|
@@ -37,5 +37,5 @@ type TextFieldComponent = React.ForwardRefExoticComponent<TextFieldProps & React
|
|
|
37
37
|
};
|
|
38
38
|
declare const TextField: TextFieldComponent;
|
|
39
39
|
|
|
40
|
-
export { TextField as default };
|
|
40
|
+
export { TextFieldInput as Input, TextFieldReset as Reset, TextFieldRoot as Root, TextFieldSlot as Slot, TextField as default };
|
|
41
41
|
export type { TextFieldInputProps, TextFieldProps, TextFieldResetProps, TextFieldRootProps, TextFieldSlotProps };
|