@radui/ui 0.0.47 → 0.1.1
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 +12 -4
- package/package.json +23 -121
- package/dist/components/Accordion.d.ts +0 -53
- package/dist/components/Accordion.js +0 -1
- package/dist/components/AlertDialog.d.ts +0 -62
- package/dist/components/AlertDialog.js +0 -1
- package/dist/components/AspectRatio.d.ts +0 -16
- package/dist/components/AspectRatio.js +0 -1
- package/dist/components/Avatar.d.ts +0 -39
- package/dist/components/Avatar.js +0 -1
- package/dist/components/AvatarGroup.d.ts +0 -41
- package/dist/components/AvatarGroup.js +0 -1
- package/dist/components/AvatarPrimitiveFallback-CSD78PQE.js +0 -1
- package/dist/components/Badge.d.ts +0 -15
- package/dist/components/Badge.js +0 -1
- package/dist/components/BlockQuote.d.ts +0 -18
- package/dist/components/BlockQuote.js +0 -1
- package/dist/components/Button.d.ts +0 -15
- package/dist/components/Button.js +0 -1
- package/dist/components/Callout.d.ts +0 -35
- package/dist/components/Callout.js +0 -1
- package/dist/components/Card.d.ts +0 -28
- package/dist/components/Card.js +0 -1
- package/dist/components/Checkbox.d.ts +0 -23
- package/dist/components/Checkbox.js +0 -1
- package/dist/components/CheckboxCards.d.ts +0 -37
- package/dist/components/CheckboxCards.js +0 -1
- package/dist/components/CheckboxGroup.d.ts +0 -38
- package/dist/components/CheckboxGroup.js +0 -1
- package/dist/components/CheckboxGroupPrimitive-PcT11bev.js +0 -1
- package/dist/components/Code.d.ts +0 -13
- package/dist/components/Code.js +0 -1
- package/dist/components/Collapsible.d.ts +0 -30
- package/dist/components/Collapsible.js +0 -1
- package/dist/components/ContextMenu.d.ts +0 -52
- package/dist/components/ContextMenu.js +0 -1
- package/dist/components/DataList.d.ts +0 -24
- package/dist/components/DataList.js +0 -1
- package/dist/components/Dialog.d.ts +0 -51
- package/dist/components/Dialog.js +0 -1
- package/dist/components/Disclosure.d.ts +0 -41
- package/dist/components/Disclosure.js +0 -1
- package/dist/components/DropdownMenu.d.ts +0 -52
- package/dist/components/DropdownMenu.js +0 -1
- package/dist/components/Em.d.ts +0 -15
- package/dist/components/Em.js +0 -1
- package/dist/components/Heading.d.ts +0 -293
- package/dist/components/Heading.js +0 -1
- package/dist/components/HoverCard.d.ts +0 -37
- package/dist/components/HoverCard.js +0 -1
- package/dist/components/Kbd.d.ts +0 -13
- package/dist/components/Kbd.js +0 -1
- package/dist/components/Link.d.ts +0 -17
- package/dist/components/Link.js +0 -1
- package/dist/components/MenuPrimitive-M690K2sI.js +0 -1
- package/dist/components/Menubar.d.ts +0 -60
- package/dist/components/Menubar.js +0 -1
- package/dist/components/NumberField.d.ts +0 -43
- package/dist/components/NumberField.js +0 -1
- package/dist/components/Progress.d.ts +0 -24
- package/dist/components/Progress.js +0 -1
- package/dist/components/Quote.d.ts +0 -15
- package/dist/components/Quote.js +0 -1
- package/dist/components/Radio.d.ts +0 -14
- package/dist/components/Radio.js +0 -1
- package/dist/components/RadioCards.d.ts +0 -41
- package/dist/components/RadioCards.js +0 -1
- package/dist/components/RadioGroup.d.ts +0 -54
- package/dist/components/RadioGroup.js +0 -1
- package/dist/components/RadioGroupPrimitive-CUgW2PyL.js +0 -1
- package/dist/components/ScrollArea.d.ts +0 -18
- package/dist/components/ScrollArea.js +0 -1
- package/dist/components/Select.d.ts +0 -37
- package/dist/components/Select.js +0 -1
- package/dist/components/Separator.d.ts +0 -18
- package/dist/components/Separator.js +0 -1
- package/dist/components/Skeleton.d.ts +0 -18
- package/dist/components/Skeleton.js +0 -1
- package/dist/components/Slider.d.ts +0 -29
- package/dist/components/Slider.js +0 -1
- package/dist/components/Strong.d.ts +0 -14
- package/dist/components/Strong.js +0 -1
- package/dist/components/Switch.d.ts +0 -35
- package/dist/components/Switch.js +0 -1
- package/dist/components/TabNav.d.ts +0 -31
- package/dist/components/TabNav.js +0 -1
- package/dist/components/Table.d.ts +0 -35
- package/dist/components/Table.js +0 -1
- package/dist/components/Tabs.d.ts +0 -64
- package/dist/components/Tabs.js +0 -1
- package/dist/components/Text.d.ts +0 -283
- package/dist/components/Text.js +0 -1
- package/dist/components/TextArea.d.ts +0 -24
- package/dist/components/TextArea.js +0 -1
- package/dist/components/Theme.d.ts +0 -13
- package/dist/components/Theme.js +0 -1
- package/dist/components/Toggle.d.ts +0 -45
- package/dist/components/Toggle.js +0 -1
- package/dist/components/ToggleGroup.d.ts +0 -42
- package/dist/components/ToggleGroup.js +0 -1
- package/dist/components/Tooltip.d.ts +0 -22
- package/dist/components/Tooltip.js +0 -1
- package/dist/components/Tree.d.ts +0 -20
- package/dist/components/Tree.js +0 -1
- package/dist/components/VisuallyHidden.d.ts +0 -16
- package/dist/components/VisuallyHidden.js +0 -1
- package/dist/components/clsx-BaVHROc5.js +0 -1
- package/dist/components/floating-ui.react-jh3caJnc.js +0 -5
- package/dist/components/index-8D8A0ALD.js +0 -1
- package/dist/components/index-BNg6qXF-.js +0 -1
- package/dist/components/index-BVxS3Ixi.js +0 -1
- package/dist/components/index-CaFVBHZz.js +0 -1
- package/dist/components/index-CyT0hgZn.js +0 -1
- package/dist/components/index-DAboJYKJ.js +0 -1
- package/dist/components/index-DIw4zyNG.js +0 -1
- package/dist/components/index-DpUtikes.js +0 -1
- package/dist/components/index-ZMIfeyHL.js +0 -1
- package/dist/components/index-fkj4Fdgt.js +0 -1
- package/dist/components/setupTests.d.ts +0 -3
- package/dist/components/tslib.es6-BtVxab8e.js +0 -1
- package/dist/themes/default.css +0 -1
- package/dist/themes/tailwind-presets/default.js +0 -1
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioGroupPrimitiveProps } from '~/core/primitives/RadioGroup/RadioGroupPrimitive';
|
|
3
|
-
|
|
4
|
-
type RadioCardsItemProps = {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
value: string;
|
|
8
|
-
} & RadioGroupPrimitiveProps.Item;
|
|
9
|
-
|
|
10
|
-
type RadioCardsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
declare const RadioCards: {
|
|
14
|
-
(): null;
|
|
15
|
-
Root: ({ children, className, customRootClass, variant, size, color, ...props }: {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
customRootClass?: string;
|
|
19
|
-
variant?: string;
|
|
20
|
-
size?: string;
|
|
21
|
-
color?: string;
|
|
22
|
-
} & {
|
|
23
|
-
className?: string;
|
|
24
|
-
customRootClass?: string;
|
|
25
|
-
value?: string;
|
|
26
|
-
defaultValue?: string;
|
|
27
|
-
onValueChange?: (value: string) => void;
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
required?: boolean;
|
|
30
|
-
name?: string;
|
|
31
|
-
orientation?: "horizontal" | "vertical" | "both";
|
|
32
|
-
loop?: boolean;
|
|
33
|
-
dir?: "ltr" | "rtl";
|
|
34
|
-
} & {
|
|
35
|
-
children?: React.ReactNode | undefined;
|
|
36
|
-
}) => React.JSX.Element;
|
|
37
|
-
Item: ({ children, className, value, ...props }: RadioCardsItemProps) => React.JSX.Element;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export { RadioCards as default };
|
|
41
|
-
export type { RadioCardsProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import s,{createContext as e,useContext as r}from"react";import{R as i}from"./RadioGroupPrimitive-CUgW2PyL.js";import{c as t}from"./clsx-BaVHROc5.js";import{c as d}from"./index-BVxS3Ixi.js";import{u as m,a as n,b as l}from"./index-DpUtikes.js";import"./index-DIw4zyNG.js";import"./index-BNg6qXF-.js";import"./index-8D8A0ALD.js";import"./index-fkj4Fdgt.js";var c=e({rootClass:""}),u=function(){return console.warn("Direct usage of RadioCards is not supported. Please use RadioCards.Root and RadioCards.Item instead."),null};u.Root=function(e){var r=e.children,u=e.className,v=void 0===u?"":u,p=e.customRootClass,f=void 0===p?"":p,R=e.variant,j=void 0===R?"":R,C=e.size,x=void 0===C?"":C,N=e.color,h=void 0===N?"":N,z=a(e,["children","className","customRootClass","variant","size","color"]),E=d(f,"RadioCards"),I=m("radio-cards",{variant:j,size:x}),P=n(h),b=l(I(),P());return s.createElement(c.Provider,{value:{rootClass:E}},s.createElement(i.Root,o({className:t(E,v)},b,z),r))},u.Item=function(e){var d=e.children,m=e.className,n=void 0===m?"":m,l=e.value,u=a(e,["children","className","value"]),v=r(c).rootClass;return s.createElement(i.Item,o({className:t("".concat(v,"-item"),n)},u,{value:l}),d)};export{u as default};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioGroupPrimitiveProps } from '~/core/primitives/RadioGroup/RadioGroupPrimitive';
|
|
3
|
-
|
|
4
|
-
type RadioGroupLabelProps = {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
asChild?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
type RadioGroupIndicatorProps = {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
} & RadioGroupPrimitiveProps.Indicator;
|
|
14
|
-
|
|
15
|
-
type RadioGroupItemProps = {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
value: string;
|
|
19
|
-
} & RadioGroupPrimitiveProps.Item;
|
|
20
|
-
|
|
21
|
-
type RadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
};
|
|
24
|
-
declare const RadioGroup: {
|
|
25
|
-
(): null;
|
|
26
|
-
Root: ({ children, className, customRootClass, variant, size, color, ...props }: {
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
className?: string;
|
|
29
|
-
customRootClass?: string;
|
|
30
|
-
variant?: string;
|
|
31
|
-
size?: string;
|
|
32
|
-
color?: string;
|
|
33
|
-
} & {
|
|
34
|
-
className?: string;
|
|
35
|
-
customRootClass?: string;
|
|
36
|
-
value?: string;
|
|
37
|
-
defaultValue?: string;
|
|
38
|
-
onValueChange?: (value: string) => void;
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
required?: boolean;
|
|
41
|
-
name?: string;
|
|
42
|
-
orientation?: "horizontal" | "vertical" | "both";
|
|
43
|
-
loop?: boolean;
|
|
44
|
-
dir?: "ltr" | "rtl";
|
|
45
|
-
} & {
|
|
46
|
-
children?: React.ReactNode | undefined;
|
|
47
|
-
}) => React.JSX.Element;
|
|
48
|
-
Item: ({ children, className, value, ...props }: RadioGroupItemProps) => React.JSX.Element;
|
|
49
|
-
Indicator: ({ className, children, ...props }: RadioGroupIndicatorProps) => React.JSX.Element;
|
|
50
|
-
Label: ({ className, asChild, children, ...props }: RadioGroupLabelProps) => React.JSX.Element;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export { RadioGroup as default };
|
|
54
|
-
export type { RadioGroupProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import e,{createContext as s,useContext as r}from"react";import{R as t}from"./RadioGroupPrimitive-CUgW2PyL.js";import{c as i}from"./clsx-BaVHROc5.js";import{c as l}from"./index-BVxS3Ixi.js";import{u as n,a as c,b as d}from"./index-DpUtikes.js";import{P as m}from"./index-DIw4zyNG.js";import"./index-BNg6qXF-.js";import"./index-8D8A0ALD.js";import"./index-fkj4Fdgt.js";var u=s({rootClass:""}),v=function(){return console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root and RadioGroup.Item instead."),null};v.Root=function(s){var r=s.children,m=s.className,v=void 0===m?"":m,p=s.customRootClass,f=void 0===p?"":p,C=s.variant,N=void 0===C?"":C,h=s.size,R=void 0===h?"":h,x=s.color,j=void 0===x?"":x,b=a(s,["children","className","customRootClass","variant","size","color"]),E=l(f,"RadioGroup"),G=n("radio-group",{variant:N,size:R}),I=c(j),P=d(G(),I());return e.createElement(u.Provider,{value:{rootClass:E}},e.createElement(t.Root,o({className:i("".concat(E,"-root"),v)},P(),b)," ",r," "))},v.Item=function(s){var l=s.children,n=s.className,c=void 0===n?"":n,d=s.value,m=a(s,["children","className","value"]),v=r(u).rootClass;return e.createElement(t.Item,o({className:i("".concat(v,"-item"),c),value:d},m),l)},v.Indicator=function(s){var r=s.className,l=void 0===r?"":r,n=s.children,c=a(s,["className","children"]),d=e.useContext(u).rootClass;return e.createElement(t.Indicator,o({className:i("".concat(d,"-indicator"),l)},c),n)},v.Label=function(s){var r=s.className,t=void 0===r?"":r,l=s.asChild,n=void 0!==l&&l,c=s.children,d=a(s,["className","asChild","children"]),v=e.useContext(u).rootClass;return e.createElement(m.label,o({},d,{className:i("".concat(v,"-label"),t),asChild:n})," ",c," ")};export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import r,{useContext as i}from"react";import{P as t}from"./index-DIw4zyNG.js";import{R as o}from"./index-BNg6qXF-.js";import{u as d}from"./index-fkj4Fdgt.js";import{B as l}from"./index-8D8A0ALD.js";var n=r.createContext(null),u=r.createContext({itemSelected:!1}),s=function(){return console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root, RadioGroup.Item, etc. instead."),null};s.Root=function(i){var l=i.value,u=i.defaultValue,s=void 0===u?"":u,c=i.onValueChange,m=i.children,v=i.disabled,p=void 0!==v&&v,h=i.required,f=void 0!==h&&h,b=i.name,C=void 0===b?"":b,R=i.orientation,E=void 0===R?"horizontal":R,x=i.loop,V=void 0!==x&&x,q=i.dir,g=void 0===q?"ltr":q,G=e(i,["value","defaultValue","onValueChange","children","disabled","required","name","orientation","loop","dir"]),N=d(l,s,c),j=N[0],I={selectedValue:j,setSelectedValue:N[1],groupDisabled:p};return r.createElement(t.div,a({},G,{"aria-required":f,role:"radiogroup","aria-disabled":p}),r.createElement(o.Root,{dir:g,orientation:E,loop:V},r.createElement(n.Provider,{value:I},r.createElement(o.Group,null,m))),r.createElement("input",{type:"radio",hidden:!0,name:C,value:j,disabled:p,required:f}))},s.Item=function(t){var d=t.value,s=t.children,c=t.disabled,m=t.required,v=void 0!==m&&m,p=t.className,h=void 0===p?"":p,f=t.asChild,b=void 0!==f&&f,C=e(t,["value","children","disabled","required","className","asChild"]),R=i(n);if(!R)throw new Error("RadioGroup.Item must be used within a RadioGroup.Root");var E=R.groupDisabled,x=R.selectedValue,V=R.setSelectedValue,q=d===x;return r.createElement(o.Item,null,r.createElement(l,a({role:"radio",type:"button",disabled:E||c,onClick:function(){return V(d)},onFocus:function(){return V(d)},"aria-disabled":E||c,"aria-checked":d===x,"data-checked":d===x,"aria-required":v,asChild:b,className:h},C),r.createElement(u.Provider,{value:{itemSelected:q}},s)))},s.Indicator=function(i){var o=i.children,d=i.className,l=i.asChild,n=void 0!==l&&l,s=e(i,["children","className","asChild"]);return r.useContext(u).itemSelected?r.createElement(t.span,a({className:d,asChild:n},s),o):null};export{s as R};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
declare const ScrollArea: {
|
|
4
|
-
(): null;
|
|
5
|
-
Root: ({ children, className, customRootClass, ...props }: {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
customRootClass?: string;
|
|
9
|
-
}) => react.JSX.Element;
|
|
10
|
-
Viewport: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
11
|
-
Scrollbar: ({ children, className, orientation, ...props }: react.HTMLAttributes<HTMLDivElement> & {
|
|
12
|
-
orientation?: "horizontal" | "vertical";
|
|
13
|
-
}) => react.JSX.Element;
|
|
14
|
-
Thumb: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
15
|
-
Corner: ({ children, ...props }: React.HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { ScrollArea as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as e,a as r}from"./tslib.es6-BtVxab8e.js";import n,{createContext as t,useRef as o,useEffect as c,useContext as l,useCallback as u}from"react";import{c as i}from"./clsx-BaVHROc5.js";import{c as a}from"./index-BVxS3Ixi.js";var s=t({rootClass:""}),d=function(){return console.warn("Direct usage of ScrollArea is not supported. Please use ScrollArea.Root and ScrollArea.Viewport instead."),null};d.Root=function(t){var l=t.children,u=t.className,d=void 0===u?"":u,v=t.customRootClass,m=void 0===v?"":v,f=e(t,["children","className","customRootClass"]),h=a(m,"ScrollArea"),p=o(null),E=o(null);c((function(){g()}),[p,E]),c((function(){var e=E.current;if(e){var r=function(){g()},n=new ResizeObserver((function(n){for(var t=0,o=n;t<o.length;t++){var c=o[t];(c.target===e||e.contains(c.target))&&r()}}));n.observe(e);var t=function(e){n.observe(e),Array.from(e.children).forEach((function(e){t(e)}))};Array.from(e.children).forEach((function(e){t(e)}));var o=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t(e)}))})),r()}));return o.observe(e,{childList:!0,subtree:!0}),window.addEventListener("resize",r),function(){n.disconnect(),o.disconnect(),window.removeEventListener("resize",r)}}}),[]);var g=function(){var e,r,n=(null===(e=null==E?void 0:E.current)||void 0===e?void 0:e.clientHeight)||0,t=n/(((null===(r=null==E?void 0:E.current)||void 0===r?void 0:r.scrollHeight)||0)/n);t<24&&(t=24),p.current&&(p.current.style.height="".concat(t,"px"))},b=function(e){if(E.current){var r=E.current.scrollTop,n=e-r,t=performance.now(),o=function(e){var c=e-t,l=Math.min(c/150,1),u=1-Math.pow(1-l,3),i=r+n*u;E.current&&(E.current.scrollTop=i),l<1&&requestAnimationFrame(o)};requestAnimationFrame(o)}};return n.createElement(s.Provider,{value:{rootClass:h,scrollXThumbRef:p,scrollAreaViewportRef:E,handleScroll:function(){var e,r,n,t,o=(null===(e=E.current)||void 0===e?void 0:e.clientHeight)||0,c=(null===(r=E.current)||void 0===r?void 0:r.scrollHeight)||0,l=((null===(n=E.current)||void 0===n?void 0:n.scrollTop)||0)/(c-o)*(o-((null===(t=p.current)||void 0===t?void 0:t.clientHeight)||0));p.current&&(p.current.style.top="".concat(l,"px"))},handleScrollbarClick:function(e){!function(e){var r,n,t,o=(null===(r=null==E?void 0:E.current)||void 0===r?void 0:r.clientHeight)||0,c=((null===(n=null==E?void 0:E.current)||void 0===n?void 0:n.scrollHeight)||0)/o;if(p.current){var l=p.current.getBoundingClientRect().top,u=l+p.current.clientHeight,i=(null===(t=p.current)||void 0===t?void 0:t.clientHeight)||0;if(e>l&&e<u)return;if(e<l){var a=E.current.scrollTop-i*c;b(a)}e>u&&(a=E.current.scrollTop+i*c,b(a))}}(e.clientY)}}},n.createElement("div",r({className:i(h,d)},f),l))},d.Viewport=function(t){var o=t.children,c=t.className,u=void 0===c?"":c,a=e(t,["children","className"]),d=l(s),v=d.rootClass,m=d.scrollAreaViewportRef,f=d.handleScroll;return n.createElement("div",r({ref:m,className:i(v+"-viewport",u),onScroll:f},a),o)},d.Scrollbar=function(t){var c=t.children,a=t.className,d=void 0===a?"":a,v=t.orientation,m=e(t,["children","className","orientation"]),f=l(s),h=f.rootClass,p=f.handleScrollbarClick,E=f.scrollXThumbRef,g=o(null),b=o(!1),w=o(0),T=u((function(e){if(!(null==E?void 0:E.current))return!1;var r=E.current.getBoundingClientRect(),n=r.top,t=r.bottom;return!(e>=n&&e<=t)}),[E]),N=u((function(e){p&&(e.preventDefault(),w.current=e.clientY,p({clientY:e.clientY}),setTimeout((function(){b.current&&(g.current=setInterval((function(){b.current&&T(w.current)?p({clientY:w.current}):L()}),50))}),300),b.current=!0)}),[p,T]),L=u((function(){b.current=!1,g.current&&(clearInterval(g.current),g.current=null)}),[]);return n.useEffect((function(){var e=function(){return L()},r=function(){return L()};return document.addEventListener("mouseup",e),document.addEventListener("mouseleave",r),function(){document.removeEventListener("mouseup",e),document.removeEventListener("mouseleave",r),L()}}),[L]),n.createElement("div",r({className:i(h+"-scrollbar",d),"data-orientation":v,onMouseDown:N,onMouseUp:L,onMouseLeave:L},m),c)},d.Thumb=function(t){var c=t.children,a=t.className,d=void 0===a?"":a,v=e(t,["children","className"]),m=l(s),f=m.rootClass,h=m.scrollXThumbRef,p=m.scrollAreaViewportRef,E=o(!1),g=o({y:0,scrollTop:0}),b=u((function(e){(null==p?void 0:p.current)&&(null==h?void 0:h.current)&&(e.preventDefault(),e.stopPropagation(),E.current=!0,g.current={y:e.clientY,scrollTop:p.current.scrollTop},document.body.style.userSelect="none")}),[p,h]),w=u((function(e){var r;if(E.current&&(null==p?void 0:p.current)&&(null==h?void 0:h.current)){e.preventDefault();var n=e.clientY-g.current.y,t=null===(r=h.current.parentElement)||void 0===r?void 0:r.getBoundingClientRect();if(t){var o=p.current.clientHeight,c=p.current.scrollHeight,l=h.current.clientHeight,u=n/(t.height-l),i=c-o,a=g.current.scrollTop+u*i,s=Math.max(0,Math.min(a,i));p.current.scrollTop=s}}}),[p,h]),T=u((function(){E.current=!1,document.body.style.cursor="",document.body.style.userSelect=""}),[]);return n.useEffect((function(){var e=function(e){return w(e)},r=function(){return T()};return E.current&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",r)),document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),T()}}),[w,T]),n.createElement("div",r({ref:h,className:i(f+"-thumb",d),onMouseDown:b},v),c)},d.Corner=function(t){var o=t.children,c=e(t,["children"]);return n.createElement("div",r({},c),o)};export{d as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
type SelectPortalProps = {
|
|
5
|
-
children: React__default.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
declare function SelectContent({ customRootClass, children, position, ...props }: any): React__default.JSX.Element;
|
|
9
|
-
|
|
10
|
-
declare function SelectItem({ customRootClass, children, value, disabled, ...props }: any): React__default.JSX.Element;
|
|
11
|
-
|
|
12
|
-
declare function SelectTrigger({ customRootClass, children, disabled, placeholder, ...props }: any): React__default.JSX.Element;
|
|
13
|
-
|
|
14
|
-
declare function SelectRoot({ customRootClass, children, defaultValue, value, onValueChange, shift, ...props }: any): React__default.JSX.Element;
|
|
15
|
-
|
|
16
|
-
declare function SelectIndicator(): React__default.JSX.Element;
|
|
17
|
-
|
|
18
|
-
type SelectGroupProps = {
|
|
19
|
-
children: React__default.ReactNode;
|
|
20
|
-
};
|
|
21
|
-
declare function SelectGroup({ children }: SelectGroupProps): React__default.JSX.Element;
|
|
22
|
-
|
|
23
|
-
declare function SelectSearch(): React__default.JSX.Element;
|
|
24
|
-
|
|
25
|
-
declare const Select: {
|
|
26
|
-
(): null;
|
|
27
|
-
Root: typeof SelectRoot;
|
|
28
|
-
Content: typeof SelectContent;
|
|
29
|
-
Item: typeof SelectItem;
|
|
30
|
-
Trigger: typeof SelectTrigger;
|
|
31
|
-
Portal: ({ children }: SelectPortalProps) => React.JSX.Element;
|
|
32
|
-
Group: typeof SelectGroup;
|
|
33
|
-
Indicator: typeof SelectIndicator;
|
|
34
|
-
Search: typeof SelectSearch;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { Select as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as e,a as t}from"./tslib.es6-BtVxab8e.js";import n,{createContext as a,useContext as r,useState as l,useEffect as o,useLayoutEffect as s}from"react";import{F as c}from"./index-DAboJYKJ.js";import{P as i}from"./index-DIw4zyNG.js";import{u}from"./index-fkj4Fdgt.js";import{c as d}from"./index-BVxS3Ixi.js";import"./floating-ui.react-jh3caJnc.js";import"react/jsx-runtime";import"react-dom";var f=a({});var m=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};m.Root=function(a){var r=a.children,d=a.className,m=a.value,v=a.name,p=a.defaultValue,h=void 0===p?"":p,g=a.onValueChange;a.onClickOutside;var R=a.placement,C=void 0===R?"bottom-start":R,b=a.offsetValue,E=a.shift,x=void 0===E||E,S=e(a,["children","className","value","name","defaultValue","onValueChange","onClickOutside","placement","offsetValue","shift"]),I=n.useState(!1),N=I[0],y=I[1],P=n.useState(b),w=P[0],k=P[1],V=u(m,h,g),L=V[0],F=V[1],O=n.useRef(null),j=n.useRef([]),D=n.useRef([]),T=n.useRef([]),A=n.useRef(!1),M=n.useRef(null),q=n.useRef(null),B=n.useState(null),G=B[0],H=B[1],K=n.useState(null),W=K[0],_=K[1],z=n.useState(!1),J=z[0],Q=z[1],U=function(e){var t=l(!1),n=t[0],a=t[1];return o((function(){if(e){for(var t=e;t;){if("FORM"===t.tagName)return void a(!0);t=t.parentElement}a(!1)}else a(!1)}),[e]),n}(M.current),X=c.useFloating({middleware:[c.offset(w)],open:N,onOpenChange:y,placement:C}),Y=X.refs,Z=X.floatingStyles,$=X.context,ee=c.useClick($),te=c.useDismiss($),ne=c.useRole($,{role:"listbox"}),ae=n.useCallback((function(e){if(_(e),y(!1),null!==e){var t=D.current[e];t&&F(t)}}),[]),re=c.useListNavigation($,{listRef:j,activeIndex:G,selectedIndex:W,onNavigate:H,virtual:J,virtualItemRef:q}),le=c.useTypeahead($,{listRef:D,activeIndex:G,selectedIndex:W,enabled:!J,onMatch:function(e){N?H(e):ae(e)},onTypingChange:function(e){A.current=e}}),oe=c.useInteractions([ee,te,ne,re,le]),se=oe.getReferenceProps,ce=oe.getFloatingProps,ie=oe.getItemProps;s((function(){if(x&&O&&Y.floating.current&&O.current){var e=Y.floating.current.getBoundingClientRect(),t=O.current.getBoundingClientRect(),n=e.top-t.bottom;k(n)}}),[O.current,x]);var ue={isOpen:N,setIsOpen:y,handleSelect:ae,floatingContext:$,refs:Y,getFloatingProps:ce,getReferenceProps:se,floatingStyles:Z,getItemProps:ie,activeIndex:G,selectedIndex:W,elementsRef:j,labelsRef:D,valuesRef:T,setActiveIndex:H,selectedLabel:L,isTypingRef:A,virtualItemRef:q,hasSearch:J,setHasSearch:Q,selectedItemRef:O};return n.createElement(f.Provider,{value:ue},n.createElement(i.div,t({},S,{className:d,ref:M}),r,U&&n.createElement("select",{name:v,value:L,hidden:!0,"aria-hidden":"true",tabIndex:-1},n.createElement("option",{value:L},L))))},m.Content=function(a){var l=a.children,o=a.className,s=e(a,["children","className"]),i=r(f),u=i.isOpen,d=i.elementsRef,m=i.labelsRef,v=i.floatingContext,p=i.refs,h=i.getFloatingProps,g=i.floatingStyles;return n.createElement(n.Fragment,null,u&&n.createElement(c.FocusManager,{context:v},n.createElement(c.FloatingList,{elementsRef:d,labelsRef:m},n.createElement("div",t({ref:p.setFloating,style:g,className:o},h(),s),l))))},m.Portal=function(e){var t=e.children,a=r(f).isOpen,s=l(!1),i=s[0],u=s[1],d=document.querySelector("#rad-ui-theme-container")||document.body;return o((function(){d&&u(!0)}),[d]),a&&i?n.createElement(c.Portal,{root:d},t):null},m.Item=function(a){var l,o=a.children,s=a.value;a.disabled;var u=a.className,d=e(a,["children","value","disabled","className"]),m=r(f);if(!m)return console.error("SelectPrimitiveItem must be used within a SelectPrimitive"),null;var v=m.handleSelect,p=m.isTypingRef,h=m.getItemProps,g=m.activeIndex,R=m.selectedIndex,C=m.virtualItemRef,b=m.selectedItemRef,E=m.hasSearch,x=n.useRef(null),S=c.useListItem({label:s}),I=S.ref,N=S.index,y=g===N,P=R===N,w=s||"select-item-".concat(N);return n.useEffect((function(){P&&!E&&(b.current=x.current)}),[P,E]),n.createElement(i.div,t({ref:c.useMergeRefs([I,x]),id:w,role:"option",className:u,"data-value":s,"data-active":E?(null===(l=C.current)||void 0===l?void 0:l.id)==w:y,"aria-selected":P,tabIndex:y?0:-1},h({onClick:function(){return v(N)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),v(N))," "!==e.key||p.current||(e.preventDefault(),v(N))}}),d),o)},m.Trigger=function(a){var l=a.children,o=a.className,s=e(a,["children","className"]),c=r(f),i=c.isOpen,u=c.setIsOpen,d=c.selectedLabel,m=c.refs,v=c.getReferenceProps;return n.createElement("button",t({type:"button",onClick:function(){return u(!i)},className:o,"aria-expanded":i,ref:m.setReference},v(),{role:"combobox"},s),d||l)},m.Group=function(e){var t=e.children,a=e.className;return n.createElement("div",{className:a},t)},m.Search=function(e){var a,l=e.className,o=n.useState(""),s=o[0],c=o[1],u=r(f),d=n.useRef(null);if(!u||!u.refs)return n.createElement(i.input,{type:"search",className:l,placeholder:"Search...",value:s,onChange:function(e){return c(e.target.value)}});var m=u.refs,v=u.handleSelect,p=u.labelsRef,h=u.valuesRef,g=u.activeIndex,R=u.elementsRef,C=u.virtualItemRef,b=u.getReferenceProps;u.isTypingRef;var E=u.setHasSearch,x=n.useRef([]);n.useEffect((function(){E(!0),u&&u.setActiveIndex(0)}),[E]),n.useEffect((function(){if(m.floating.current){var e=m.floating.current,t=Array.from(e.querySelectorAll('[role="option"]'));0===x.current.length&&(x.current=t.map((function(e){var t;return{element:e,label:e.getAttribute("data-label")||(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",value:e.getAttribute("data-value")||e.id||"",parent:e.parentElement}}))),x.current.forEach((function(e){var t=e.element;t.parentElement&&t.parentElement.removeChild(t)}));var n=[];x.current.forEach((function(e){var t=e.element,a=e.label,r=e.value,l=e.parent;a.toLowerCase().includes(s.toLowerCase())&&l&&(l.appendChild(t),n.push({element:t,label:a,value:r}))})),u.setActiveIndex(null),R.current=n.map((function(e){return e.element})),p.current=n.map((function(e){return e.label}))}}),[s,m.floating.current]);var S=b();return n.createElement(i.input,t({type:"search",className:l,placeholder:"Search...",ref:d,value:s,"aria-activedescendant":(null===(a=C.current)||void 0===a?void 0:a.id)||(null!==g&&h.current[g]?h.current[g]:void 0),onChange:function(e){return c(e.target.value)}},S,{onKeyDown:function(e){null!==g&&"Enter"===e.key&&(e.preventDefault(),v(g))}}))};var v=n.createContext({rootClass:""});var p=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};p.Root=function(a){var r=a.customRootClass,l=a.children,o=a.defaultValue,s=a.value,c=a.onValueChange,i=a.shift,u=e(a,["customRootClass","children","defaultValue","value","onValueChange","shift"]),f=d(r,"Select");return n.createElement(v.Provider,{value:{rootClass:f}},n.createElement(m.Root,t({className:"".concat(f,"-root"),defaultValue:o,value:s,onValueChange:c,shift:i},u),l))},p.Content=function(a){a.customRootClass;var l=a.children,o=a.position,s=void 0===o?"popper":o,c=e(a,["customRootClass","children","position"]),i=r(v).rootClass;return n.createElement(m.Content,t({className:"".concat(i,"-content"),position:s,"data-position":s},c),l)},p.Item=function(a){a.customRootClass;var l=a.children,o=a.value,s=a.disabled,c=e(a,["customRootClass","children","value","disabled"]),i=r(v).rootClass;return n.createElement(m.Item,t({className:"".concat(i,"-item"),value:o,disabled:s,"data-disabled":s?"":void 0,role:"option","aria-disabled":s?"true":void 0},c),n.createElement("span",{className:"".concat(i,"-text")},l))},p.Trigger=function(a){a.customRootClass;var l=a.children,o=a.disabled,s=a.placeholder,c=e(a,["customRootClass","children","disabled","placeholder"]),i=r(v).rootClass,u=n.useRef(null);return n.createElement(m.Trigger,t({className:"".concat(i,"-trigger"),"aria-disabled":o?"true":void 0,"data-placeholder":s?"":void 0,ref:u},c),l)},p.Portal=function(e){var t=e.children;return document.querySelector("#rad-ui-theme-container")||document.body,n.createElement(m.Portal,null,t)},p.Group=function(e){var t=e.children,a=r(v).rootClass;return n.createElement(m.Group,{className:"".concat(a,"-group")},t)},p.Indicator=function(){var e=r(v).rootClass;return n.createElement("div",{className:"".concat(e,"-item-indicator")},n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},p.Search=function(){var e=r(v).rootClass;return n.createElement(m.Search,{className:"".concat(e,"-search")})};export{p as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type SeparatorProps = {
|
|
4
|
-
orientation?: 'horizontal' | 'vertical';
|
|
5
|
-
className?: string;
|
|
6
|
-
customRootClass?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
decorative?: boolean;
|
|
10
|
-
props?: any;
|
|
11
|
-
} & React.ComponentProps<'div'>;
|
|
12
|
-
declare const Separator: {
|
|
13
|
-
({ orientation, className, customRootClass, color, asChild, decorative, ...props }: SeparatorProps): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { Separator as default };
|
|
18
|
-
export type { SeparatorProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as i}from"./clsx-BaVHROc5.js";import{P as e}from"./index-DIw4zyNG.js";var s="Separator",c=function(c){var l=c.orientation,d=void 0===l?"horizontal":l,m=c.className,n=c.customRootClass,v=c.color,p=void 0===v?"":v,f=c.asChild,u=void 0!==f&&f,h=c.decorative,C=void 0!==h&&h,j=a(c,["orientation","className","customRootClass","color","asChild","decorative"]),x=t(n,s),N="".concat(x,"vertical"===d?"-vertical":"-horizontal"),z={};return z["data-orientation"]=d,p&&(z["data-rad-ui-accent-color"]=p),C&&(z.role="separator",z["aria-hidden"]="true"),r.createElement(e.div,o({className:i(x,N,m),asChild:u},z,j))};c.displayName=s;export{c as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type SkeletonProps = {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
customRootClass?: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
height: string;
|
|
9
|
-
width: string;
|
|
10
|
-
radius?: string;
|
|
11
|
-
};
|
|
12
|
-
declare const Skeleton: {
|
|
13
|
-
({ loading, className, customRootClass, children, height, width, radius, ...props }: SkeletonProps): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { Skeleton as default };
|
|
18
|
-
export type { SkeletonProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as s,a as e}from"./tslib.es6-BtVxab8e.js";import t from"react";import{c as a}from"./index-BVxS3Ixi.js";import{c as i}from"./clsx-BaVHROc5.js";var o="Skeleton",r=function(r){var l,d=r.loading,m=void 0===d||d,n=r.className,c=void 0===n?"":n,h=r.customRootClass,u=void 0===h?"":h,f=r.children,v=r.height,p=r.width,g=r.radius,k=s(r,["loading","className","customRootClass","children","height","width","radius"]);if(!m)return f;var N=a(u,o);return t.createElement("div",e({className:i(N,c)},k,{style:(l={},l["--skeleton-height"]=v,l["--skeleton-width"]=p,l["--skeleton-radius"]=g,l)}))};r.displayName=o;export{r as default};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
declare const Slider: {
|
|
4
|
-
(): null;
|
|
5
|
-
Root: ({ children, className, customRootClass, defaultValue, min, max, step, disabled, readOnly, orientation, valueLabelDisplay }: {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
customRootClass?: string;
|
|
9
|
-
defaultValue?: number;
|
|
10
|
-
min?: number;
|
|
11
|
-
max?: number;
|
|
12
|
-
step?: number;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
readOnly?: boolean;
|
|
15
|
-
orientation?: "horizontal" | "vertical";
|
|
16
|
-
valueLabelDisplay?: "auto" | "on" | "off";
|
|
17
|
-
}) => react.JSX.Element;
|
|
18
|
-
Track: ({ children }: {
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
}) => react.JSX.Element;
|
|
21
|
-
Range: ({ children }: {
|
|
22
|
-
children: React.ReactNode;
|
|
23
|
-
}) => react.JSX.Element;
|
|
24
|
-
Thumb: ({ children }: {
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
}) => react.JSX.Element;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { Slider as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import e,{createContext as t}from"react";import{c as a}from"./clsx-BaVHROc5.js";import{c as n}from"./index-BVxS3Ixi.js";var o=t({rootClass:"",value:0,setValue:function(){},minValue:0,setMinValue:function(){},maxValue:100,setMaxValue:function(){}}),l=function(){return console.warn("Direct usage of Slider is not supported. Please use Slider.Root, Slider.Track, etc. instead."),null};l.Root=function(t){var l=t.children,r=t.className,c=void 0===r?"":r,i=t.customRootClass,s=void 0===i?"":i,u=t.defaultValue,d=void 0===u?0:u,m=t.min,v=void 0===m?0:m,f=t.max,p=void 0===f?100:f;t.step,t.disabled,t.readOnly,t.orientation,t.valueLabelDisplay;var g=n(s,"Slider"),x=e.useState(d),C=x[0],h=x[1],V=e.useState(v),P=V[0],E=V[1],M=e.useState(p),S=M[0],y=M[1],N={rootClass:g,value:C,setValue:h,minValue:P,setMinValue:E,maxValue:S,setMaxValue:y},R=function(e){var t=e.currentTarget.getBoundingClientRect(),a=e.clientX-t.left,n=Math.max(0,Math.min(100,a/t.width*100));h(n)};return e.createElement(o.Provider,{value:N},e.createElement("div",{className:a(g,c),onClick:function(e){e.stopPropagation(),R(e)},onPointerDown:function(e){e.stopPropagation(),R(e)},onPointerMove:function(e){var t=e.target;t.setPointerCapture(e.pointerId),e.stopPropagation(),t.focus(),e.preventDefault(),R(e),console.log("moving")}},l))},l.Track=function(t){var a=t.children,n=e.useContext(o).rootClass;return e.createElement("div",{className:"".concat(n,"-track")},a)},l.Range=function(t){var a=t.children,n=e.useContext(o),l=n.rootClass,r=n.value;return e.createElement("div",{className:"".concat(l,"-range"),style:{left:"calc(".concat(r,"% - 16px)"),width:"calc(".concat(r,"%)")}},a)},l.Thumb=function(t){t.children;var a=e.useContext(o),n=a.rootClass,l=a.value,r=e.useRef(null);return e.createElement("div",{className:"".concat(n,"-thumb"),onClick:function(e){var t;e.stopPropagation(),null===(t=r.current)||void 0===t||t.focus()},style:{left:"calc(".concat(l,"% - 16px)")}},e.createElement("span",{className:"".concat(n,"-thumb-value")}),e.createElement("input",{onChange:function(e){console.log(e.target.value)},value:l,style:{display:"none"},ref:r}))};export{l as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type StrongProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
customRootClass?: string;
|
|
7
|
-
} & React.ComponentProps<'strong'>;
|
|
8
|
-
declare const Strong: {
|
|
9
|
-
({ children, className, customRootClass, ...props }: StrongProps): React.JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { Strong as default };
|
|
14
|
-
export type { StrongProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as s,a}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as t}from"./index-BVxS3Ixi.js";var e="Strong",m=function(m){var c=m.children,l=m.className,i=m.customRootClass,n=s(m,["children","className","customRootClass"]),f=t(i,e);return r.createElement("strong",a({className:o(f,l)},n),c)};m.displayName=e;export{m as default};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
type SwitchThumbProps = {
|
|
5
|
-
asChild?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
children?: React__default.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
type SwitchRootProps = {
|
|
11
|
-
children: React__default.ReactNode;
|
|
12
|
-
customRootClass?: string;
|
|
13
|
-
color?: string;
|
|
14
|
-
variant?: string;
|
|
15
|
-
size?: string;
|
|
16
|
-
defaultChecked?: boolean;
|
|
17
|
-
checked?: boolean;
|
|
18
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
required?: boolean;
|
|
21
|
-
name?: string;
|
|
22
|
-
value?: string;
|
|
23
|
-
asChild?: boolean;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
declare const Switch: {
|
|
27
|
-
(): null;
|
|
28
|
-
Root: ({ children, customRootClass, color, variant, size, defaultChecked, checked, onCheckedChange, disabled, required, name, value, asChild, ...props }: SwitchRootProps) => React.JSX.Element;
|
|
29
|
-
Thumb: ({ asChild, className, children, ...props }: SwitchThumbProps) => React.JSX.Element;
|
|
30
|
-
};
|
|
31
|
-
declare namespace SwitchProps {
|
|
32
|
-
type Root = SwitchRootProps;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { SwitchProps, Switch as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import s,{createContext as d,useContext as i}from"react";import{B as c}from"./index-8D8A0ALD.js";import{c as t}from"./index-BVxS3Ixi.js";import{u as o,a as r,b as l}from"./index-DpUtikes.js";import{u as n}from"./index-fkj4Fdgt.js";import{P as h}from"./index-DIw4zyNG.js";var u=d({checked:!1,setChecked:function(){},rootClass:"",disabled:!1}),m=function(){return console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null};m.Root=function(d){var i=d.children,h=d.customRootClass,m=d.color,C=void 0===m?"":m,v=d.variant,k=d.size,f=d.defaultChecked,b=void 0!==f&&f,p=d.checked,w=d.onCheckedChange,j=d.disabled,x=void 0!==j&&j,N=d.required,R=void 0!==N&&N,S=d.name,g=d.value,q=d.asChild,z=void 0!==q&&q,E=e(d,["children","customRootClass","color","variant","size","defaultChecked","checked","onCheckedChange","disabled","required","name","value","asChild"]),P=n(p,b,w),T=P[0],B=P[1],D=t(h,"Switch"),_=o("switch",{variant:v,size:k}),y=r(C),A=l(_(),y()),F={checked:T,setChecked:B,rootClass:D,disabled:x},G=a(a(a({},A()),{"data-state":T?"checked":"unchecked","data-disabled":x?"":void 0,role:"switch","aria-checked":T,"aria-required":R,disabled:x}),E);return S&&(G.name=S),g&&(G.value=g),s.createElement(u.Provider,{value:F},s.createElement(c,a({onClick:function(){x||B(!T)},className:D,asChild:z},G),i))},m.Thumb=function(d){var c=d.asChild,t=void 0!==c&&c,o=d.className,r=d.children,l=e(d,["asChild","className","children"]),n=i(u),m=n.checked,C=n.rootClass,v=n.disabled,k={};return k["data-state"]=m?"checked":"unchecked",v&&(k["data-disabled"]=""),s.createElement(h.span,a({role:"switch",className:"".concat(C,"-indicator ").concat(o||""),asChild:t},k,l),r)};export{m as default};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
type TabNavLinkProps = {
|
|
5
|
-
children: React__default.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
value?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type TabNavRootProps = {
|
|
14
|
-
className?: string;
|
|
15
|
-
loop?: boolean;
|
|
16
|
-
orientation?: 'horizontal' | 'vertical';
|
|
17
|
-
children: React__default.ReactNode;
|
|
18
|
-
customRootClass?: string;
|
|
19
|
-
color?: string;
|
|
20
|
-
value?: string;
|
|
21
|
-
defaultValue?: string;
|
|
22
|
-
onValueChange?: (value: string) => void;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
declare const TabNav: {
|
|
26
|
-
(): null;
|
|
27
|
-
Root: ({ className, loop, orientation, children, color, customRootClass, defaultValue, onValueChange, value, ...props }: TabNavRootProps) => React.JSX.Element;
|
|
28
|
-
Link: ({ value, className, href, children, disabled, asChild }: TabNavLinkProps) => React.JSX.Element;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { TabNav as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{a,_ as e}from"./tslib.es6-BtVxab8e.js";import o,{createContext as n,useContext as t,useRef as r,useEffect as l}from"react";import{c as i}from"./clsx-BaVHROc5.js";import{R as s}from"./index-BNg6qXF-.js";import{P as u}from"./index-DIw4zyNG.js";import{c}from"./index-BVxS3Ixi.js";import{u as d}from"./index-fkj4Fdgt.js";import"./index-8D8A0ALD.js";var m=n({rootClass:"",tabValue:"",handleTabChange:function(){}}),f=function(){return console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null};f.Root=function(n){var t=n.className,r=n.loop,u=void 0===r||r,f=n.orientation,v=void 0===f?"horizontal":f,h=n.children;n.color;var p=n.customRootClass,b=void 0===p?"":p,C=n.defaultValue,N=void 0===C?"":C,j=n.onValueChange,x=void 0===j?function(){}:j,T=n.value,V=e(n,["className","loop","orientation","children","color","customRootClass","defaultValue","onValueChange","value"]),g=c(b,"TabNav"),R=d(T,N||"",x),E=R[0],k=R[1],P=function(a){k(a)};l((function(){N&&P(N)}),[N]);var L={rootClass:g,tabValue:E,handleTabChange:P};return o.createElement(m.Provider,{value:L},o.createElement(s.Root,a({loop:u,orientation:v},V),o.createElement(s.Group,{className:i(g,t)},h)))},f.Link=function(e){var n=e.value,l=e.className,c=void 0===l?"":l,d=e.href,f=void 0===d?"#":d,v=e.children,h=e.disabled,p=e.asChild,b=t(m),C=b.rootClass,N=b.tabValue,j=b.handleTabChange;p&&(h=!1);var x=r(null),T=n===N;return o.createElement(s.Item,{onFocus:function(){return n&&!h&&function(a){var e;h||(x.current&&(null===(e=x.current)||void 0===e||e.focus()),j(a))}(n)}},o.createElement(u.a,a({ref:x,className:i("".concat(C,"-link"),c),asChild:p,"aria-disabled":h,"aria-selected":T,disabled:h},h?{}:{href:f}),v))};export{f as default};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type TableProps = React.HTMLAttributes<HTMLTableElement> & {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
declare const Table: {
|
|
7
|
-
(): null;
|
|
8
|
-
Root: {
|
|
9
|
-
({ children, className, customRootClass, ...props }: any): React.JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
Body: {
|
|
13
|
-
({ children, className, ...props }: any): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
Head: {
|
|
17
|
-
({ children, className, ...props }: any): React.JSX.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
Row: {
|
|
21
|
-
({ children, className, ...props }: any): React.JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
Cell: {
|
|
25
|
-
({ children, className, ...props }: any): React.JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
28
|
-
ColumnCellHeader: {
|
|
29
|
-
({ children, className, ...props }: any): React.JSX.Element;
|
|
30
|
-
displayName: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export { Table as default };
|
|
35
|
-
export type { TableProps };
|
package/dist/components/Table.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import l from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as r}from"./index-BVxS3Ixi.js";var c="Table",t=function(t){var n=t.children,o=t.className,m=void 0===o?"":o,d=t.customRootClass,i=void 0===d?"":d,N=e(t,["children","className","customRootClass"]),u=r(i,c);return l.createElement("div",a({className:s("".concat(u,"-wrapper"),m)},N),l.createElement("table",{className:s(u)},n))};t.displayName=c;var n=function(r){var c=r.children,t=r.className,n=void 0===t?"header":t,o=e(r,["children","className"]);return l.createElement("thead",a({className:s(n)},o),c)};n.displayName="TableHead";var o=function(r){var c=r.children,t=r.className,n=void 0===t?"":t,o=e(r,["children","className"]);return l.createElement("tbody",a({className:s(n)},o),c)};o.displayName="TableBody";var m=function(r){var c=r.children,t=r.className,n=void 0===t?"row":t,o=e(r,["children","className"]);return l.createElement("tr",a({className:s(n)},o),c)};m.displayName="TableRow";var d=function(r){var c=r.children,t=r.className,n=void 0===t?"cell-header":t,o=e(r,["children","className"]);return l.createElement("th",a({className:s(n)},o),c)};d.displayName="TableColumnCellHeader";var i=function(r){var c=r.children,t=r.className,n=void 0===t?"cell":t,o=e(r,["children","className"]);return l.createElement("td",a({className:s(n)},o),c)};i.displayName="TableCell";var N=function(){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null};N.Root=t,N.Body=o,N.Head=n,N.Row=m,N.Cell=i,N.ColumnCellHeader=d;export{N as default};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type TabTriggerProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
value?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type TabRootProps = {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
customRootClass?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
value?: string;
|
|
16
|
-
color?: string;
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
onValueChange?: (value: string) => void;
|
|
19
|
-
orientation?: 'horizontal' | 'vertical';
|
|
20
|
-
dir?: 'ltr' | 'rtl';
|
|
21
|
-
activationMode?: 'automatic' | 'manual';
|
|
22
|
-
asChild?: boolean;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type TabContentProps = {
|
|
26
|
-
className?: string;
|
|
27
|
-
customRootClass?: string;
|
|
28
|
-
value?: string;
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
asChild?: boolean;
|
|
31
|
-
forceMount?: boolean;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
type TabListProps = {
|
|
35
|
-
className?: string;
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
asChild?: boolean;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type TabsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
-
};
|
|
43
|
-
declare const Tabs: {
|
|
44
|
-
(): null;
|
|
45
|
-
List: {
|
|
46
|
-
({ className, children, asChild }: TabListProps): React.JSX.Element;
|
|
47
|
-
displayName: string;
|
|
48
|
-
};
|
|
49
|
-
Content: {
|
|
50
|
-
({ className, value, children, customRootClass, asChild, forceMount }: TabContentProps): React.JSX.Element | null;
|
|
51
|
-
displayName: string;
|
|
52
|
-
};
|
|
53
|
-
Root: {
|
|
54
|
-
({ children, defaultValue, onValueChange, customRootClass, value, className, color, orientation, dir, activationMode, asChild, ...props }: TabRootProps): React.JSX.Element;
|
|
55
|
-
displayName: string;
|
|
56
|
-
};
|
|
57
|
-
Trigger: {
|
|
58
|
-
({ value, children, className, disabled, asChild, ...props }: TabTriggerProps): React.JSX.Element;
|
|
59
|
-
displayName: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export { Tabs as default };
|
|
64
|
-
export type { TabsProps };
|
package/dist/components/Tabs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use client';import a,{createContext as t,useContext as e,useRef as o,useEffect as i}from"react";import{c as r}from"./clsx-BaVHROc5.js";import{R as n}from"./index-BNg6qXF-.js";import{_ as s,a as l}from"./tslib.es6-BtVxab8e.js";import{c as d}from"./index-BVxS3Ixi.js";import{u as c}from"./index-fkj4Fdgt.js";import"./index-DIw4zyNG.js";import"./index-8D8A0ALD.js";var u=t(null),v=function(t){var o=t.className,i=void 0===o?"":o,s=t.children;t.asChild;var l=e(u);if(!l)throw new Error("TabList must be used within a TabRoot");var d=l.rootClass,c=l.orientation;return a.createElement(n.Group,{role:"tablist","aria-orientation":c,"aria-label":"todo",className:r("".concat(d,"-list"),i)},s)};v.displayName="TabList";var m=function(t){var i=t.value,d=t.children,c=t.className,v=void 0===c?"":c,m=t.disabled;t.asChild;var b=s(t,["value","children","className","disabled","asChild"]),f=e(u);if(!f)throw new Error("TabTrigger must be used within a TabRoot");var h=f.tabValue,C=f.handleTabChange,p=f.rootClass,T=f.orientation,N=f.activationMode,g=o(null),w=i===h,R={};return R["data-state"]=w?"active":"inactive",R["data-orientation"]=T||"horizontal",m&&(R["data-disabled"]=""),a.createElement(n.Item,{onFocus:function(){return i&&!m&&function(a){var t;m||(g.current&&(null===(t=g.current)||void 0===t||t.focus()),"automatic"===N&&C(a))}(i)}},a.createElement("button",l({ref:g,onClick:function(a){m||i&&C(i)},className:r("".concat(p,"-trigger"),w?"active":"",m?"disabled":"",v),role:"tab","aria-selected":w,"aria-disabled":m,disabled:m},R,b),d))};m.displayName="TabTrigger";var b="TabContent",f=function(t){var o=t.className,i=void 0===o?"":o,n=t.value,s=t.children,c=t.customRootClass;t.asChild;var v=t.forceMount,m=void 0!==v&&v,f=d(c,b),h=e(u);if(!h)throw new Error("TabContent must be used within a TabRoot");var C=h.tabValue,p=h.orientation,T=C===n;if(!(m||T))return null;var N={};return N["data-state"]=T?"active":"inactive",N["data-orientation"]=p||"horizontal",a.createElement("div",l({className:r(f,i),role:"tabpanel","aria-hidden":!T},N),s)};f.displayName=b;var h="Tabs",C=function(t){var e=t.children,o=t.defaultValue,v=void 0===o?"":o,m=t.onValueChange,b=void 0===m?function(){}:m,f=t.customRootClass,C=void 0===f?"":f,p=t.value,T=t.className,N=t.color,g=t.orientation,w=void 0===g?"horizontal":g,R=t.dir,E=void 0===R?"ltr":R,j=t.activationMode,x=void 0===j?"automatic":j;t.asChild;var V=s(t,["children","defaultValue","onValueChange","customRootClass","value","className","color","orientation","dir","activationMode","asChild"]),M=d(C,h),y=c(p,v||"",b),L=y[0],z=y[1],P=function(a){z(a)};i((function(){v&&P(v)}),[v]);var k={rootClass:M,tabValue:L,handleTabChange:P,orientation:w,activationMode:x},D={};return D["data-orientation"]=w,a.createElement(u.Provider,{value:k},a.createElement(n.Root,l({orientation:w,loop:!0,dir:E,className:r(M,T),"data-rad-ui-accent-color":N},D,V),e))};C.displayName=h;var p=function(){return console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null};p.List=v,p.Content=f,p.Root=C,p.Trigger=m;export{p as default};
|