@radui/ui 0.1.6 → 0.1.9
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 +87 -47
- package/dist/components/Accordion.d.ts +67 -0
- package/dist/components/Accordion.js +1 -0
- package/dist/components/AlertDialog.d.ts +116 -0
- package/dist/components/AlertDialog.js +1 -0
- package/dist/components/AspectRatio.d.ts +13 -0
- package/dist/components/AspectRatio.js +1 -0
- package/dist/components/Avatar.d.ts +31 -0
- package/dist/components/Avatar.js +1 -0
- package/dist/components/AvatarGroup.d.ts +45 -0
- package/dist/components/AvatarGroup.js +1 -0
- package/dist/components/AvatarPrimitiveFallback-SECStDbi.js +1 -0
- package/dist/components/Badge.d.ts +17 -0
- package/dist/components/Badge.js +1 -0
- package/dist/components/BlockQuote.d.ts +17 -0
- package/dist/components/BlockQuote.js +1 -0
- package/dist/components/Button.d.ts +24 -0
- package/dist/components/Button.js +1 -0
- package/dist/components/Callout.d.ts +31 -0
- package/dist/components/Callout.js +1 -0
- package/dist/components/Card.d.ts +20 -0
- package/dist/components/Card.js +1 -0
- package/dist/components/Checkbox.d.ts +33 -0
- package/dist/components/Checkbox.js +1 -0
- package/dist/components/CheckboxCards.d.ts +34 -0
- package/dist/components/CheckboxCards.js +1 -0
- package/dist/components/CheckboxGroup.d.ts +38 -0
- package/dist/components/CheckboxGroup.js +1 -0
- package/dist/components/CheckboxGroupPrimitive-CEeFUCQV.js +1 -0
- package/dist/components/Code.d.ts +17 -0
- package/dist/components/Code.js +1 -0
- package/dist/components/Collapsible.d.ts +24 -0
- package/dist/components/Collapsible.js +1 -0
- package/dist/components/ContextMenu.d.ts +122 -0
- package/dist/components/ContextMenu.js +1 -0
- package/dist/components/DataList.d.ts +16 -0
- package/dist/components/DataList.js +1 -0
- package/dist/components/Dialog.d.ts +97 -0
- package/dist/components/Dialog.js +1 -0
- package/dist/components/Disclosure.d.ts +35 -0
- package/dist/components/Disclosure.js +1 -0
- package/dist/components/DropdownMenu.d.ts +122 -0
- package/dist/components/DropdownMenu.js +1 -0
- package/dist/components/Em.d.ts +11 -0
- package/dist/components/Em.js +1 -0
- package/dist/components/Heading.d.ts +25 -0
- package/dist/components/Heading.js +1 -0
- package/dist/components/HoverCard.d.ts +38 -0
- package/dist/components/HoverCard.js +1 -0
- package/dist/components/Kbd.d.ts +11 -0
- package/dist/components/Kbd.js +1 -0
- package/dist/components/Link.d.ts +11 -0
- package/dist/components/Link.js +1 -0
- package/dist/components/MenuPrimitive-CBMvjJyH.js +1 -0
- package/dist/components/Menubar.d.ts +109 -0
- package/dist/components/Menubar.js +1 -0
- package/dist/components/Minimap.d.ts +48 -0
- package/dist/components/Minimap.js +1 -0
- package/dist/components/NavigationMenu.d.ts +35 -0
- package/dist/components/NavigationMenu.js +1 -0
- package/dist/components/NumberField.d.ts +23 -0
- package/dist/components/NumberField.js +1 -0
- package/dist/components/Progress.d.ts +27 -0
- package/dist/components/Progress.js +1 -0
- package/dist/components/Quote.d.ts +11 -0
- package/dist/components/Quote.js +1 -0
- package/dist/components/Radio.d.ts +21 -0
- package/dist/components/Radio.js +1 -0
- package/dist/components/RadioCards.d.ts +38 -0
- package/dist/components/RadioCards.js +1 -0
- package/dist/components/RadioGroup.d.ts +51 -0
- package/dist/components/RadioGroup.js +1 -0
- package/dist/components/RadioGroupPrimitive-CbRZK8wB.js +1 -0
- package/dist/components/ScrollArea.d.ts +26 -0
- package/dist/components/ScrollArea.js +1 -0
- package/dist/components/Select.d.ts +90 -0
- package/dist/components/Select.js +1 -0
- package/dist/components/Separator.d.ts +14 -0
- package/dist/components/Separator.js +1 -0
- package/dist/components/Skeleton.d.ts +19 -0
- package/dist/components/Skeleton.js +1 -0
- package/dist/components/Slider.d.ts +81 -0
- package/dist/components/Slider.js +1 -0
- package/dist/components/Splitter.d.ts +57 -0
- package/dist/components/Splitter.js +1 -0
- package/dist/components/Steps.d.ts +38 -0
- package/dist/components/Steps.js +1 -0
- package/dist/components/Strong.d.ts +13 -0
- package/dist/components/Strong.js +1 -0
- package/dist/components/Switch.d.ts +57 -0
- package/dist/components/Switch.js +1 -0
- package/dist/components/TabNav.d.ts +21 -0
- package/dist/components/TabNav.js +1 -0
- package/dist/components/Table.d.ts +31 -0
- package/dist/components/Table.js +1 -0
- package/dist/components/Tabs.d.ts +43 -0
- package/dist/components/Tabs.js +1 -0
- package/dist/components/Text.d.ts +17 -0
- package/dist/components/Text.js +1 -0
- package/dist/components/TextArea.d.ts +22 -0
- package/dist/components/TextArea.js +1 -0
- package/dist/components/Theme.d.ts +17 -0
- package/dist/components/Theme.js +1 -0
- package/dist/components/Toggle.d.ts +34 -0
- package/dist/components/Toggle.js +1 -0
- package/dist/components/ToggleGroup.d.ts +63 -0
- package/dist/components/ToggleGroup.js +1 -0
- package/dist/components/Tooltip.d.ts +35 -0
- package/dist/components/Tooltip.js +1 -0
- package/dist/components/Tree.d.ts +37 -0
- package/dist/components/Tree.js +1 -0
- package/dist/components/VisuallyHidden.d.ts +12 -0
- package/dist/components/VisuallyHidden.js +1 -0
- package/dist/components/clsx-BaVHROc5.js +1 -0
- package/dist/components/floating-ui.react-CLbXmKZY.js +5 -0
- package/dist/components/index-BVxS3Ixi.js +1 -0
- package/dist/components/index-BgvB1-RV.js +1 -0
- package/dist/components/index-Br4Ygpsh.js +1 -0
- package/dist/components/index-BuGKU1-S.js +1 -0
- package/dist/components/index-BxNZdFaZ.js +1 -0
- package/dist/components/index-CD1lNchI.js +1 -0
- package/dist/components/index-DBZNt4Em.js +1 -0
- package/dist/components/index-DR_GC01Z.js +1 -0
- package/dist/components/index-Di6TooPD.js +1 -0
- package/dist/components/index-DzAecJCk.js +1 -0
- package/dist/components/index-fkj4Fdgt.js +1 -0
- package/dist/components/tslib.es6-B3RR16LH.js +1 -0
- package/dist/themes/default.css +1 -0
- package/dist/themes/tailwind-presets/default.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,88 +1,128 @@
|
|
|
1
1
|
[](https://codecov.io/gh/rad-ui/ui)
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Rad UI
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What is Rad UI?
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
<img src="./docs/public/sponsorship/browserstack_light.png" alt="BrowserStack" width="200" />
|
|
11
|
-
|
|
12
|
-
<img src="./docs/public/sponsorship/code_rabbit_light.png" alt="CodeRabbit" width="200" />
|
|
13
|
-
</p>
|
|
9
|
+
Rad UI is a single, cohesive React component system for teams that want full control over their UI.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
It is built for long lived products, custom design systems, and engineers who are tired of fighting pre baked styles, fragile abstractions, and dependency soup.
|
|
16
12
|
|
|
17
|
-
Rad UI
|
|
13
|
+
Rad UI handles behavior, accessibility, and composition so you can own structure, visuals, and tokens without compromise.
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
If your UI is becoming infrastructure, Rad UI is built for you.
|
|
16
|
+
|
|
17
|
+
## Why Rad UI exists
|
|
18
|
+
|
|
19
|
+
Most UI libraries optimize for speed at the start and cost you later.
|
|
20
|
+
|
|
21
|
+
They ship opinions disguised as convenience.
|
|
22
|
+
They lock you into styling decisions.
|
|
23
|
+
They scale poorly once your product and team grow.
|
|
24
|
+
|
|
25
|
+
Rad UI takes a different approach.
|
|
26
|
+
|
|
27
|
+
- One codebase, not a bundle of libraries
|
|
28
|
+
- One accessibility model across all components
|
|
29
|
+
- Predictable behavior and upgrade paths
|
|
30
|
+
- Detach first architecture with clean escape hatches
|
|
31
|
+
- Designed to plug into your existing design system
|
|
32
|
+
|
|
33
|
+
We chose cohesion over assembly and ownership over shortcuts.
|
|
34
|
+
|
|
35
|
+
## What Rad UI is not
|
|
36
|
+
|
|
37
|
+
- Not a starter kit
|
|
38
|
+
- Not a theme library
|
|
39
|
+
- Not a copy paste UI generator
|
|
40
|
+
- Not optimized for screenshots or demos
|
|
41
|
+
|
|
42
|
+
Rad UI is intentionally boring in the ways that save you time and money later.
|
|
43
|
+
|
|
44
|
+
## Components and examples
|
|
45
|
+
|
|
46
|
+
Explore the full component set and live examples in Storybook:
|
|
47
|
+
|
|
48
|
+
https://main--657eda33d6033847be90aaf8.chromatic.com/
|
|
20
49
|
|
|
21
50
|
## Documentation
|
|
22
51
|
|
|
23
|
-
|
|
52
|
+
Complete guides, architecture notes, and contribution docs live here:
|
|
53
|
+
|
|
54
|
+
https://www.rad-ui.com/docs/first-steps/introduction
|
|
55
|
+
|
|
56
|
+
Docs are treated as product, not an afterthought.
|
|
24
57
|
|
|
25
58
|
## Installation
|
|
26
59
|
|
|
27
|
-
|
|
60
|
+
Install Rad UI from npm:
|
|
28
61
|
|
|
29
62
|
```bash
|
|
30
63
|
npm install @radui/ui
|
|
31
64
|
```
|
|
32
65
|
|
|
33
|
-
|
|
34
|
-
<!--
|
|
66
|
+
Rad UI works with modern React setups and is friendly to tokens, CSS variables, and custom theming strategies.
|
|
35
67
|
|
|
36
|
-
##
|
|
68
|
+
## Philosophy
|
|
37
69
|
|
|
38
|
-
|
|
39
|
-
This includes programming languages, databases or other storage mechanisms, build tools, frameworks, and so forth.
|
|
40
|
-
If specific versions of other software are required, or known not to work, call that out.
|
|
70
|
+
Rad UI is opinionated where bugs live and flexible where taste lives.
|
|
41
71
|
|
|
42
|
-
|
|
72
|
+
We are strict about:
|
|
73
|
+
- Accessibility
|
|
74
|
+
- Keyboard and focus behavior
|
|
75
|
+
- Composition patterns
|
|
76
|
+
- Predictable APIs
|
|
43
77
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
We are deliberately neutral about:
|
|
79
|
+
- Styling
|
|
80
|
+
- Theming
|
|
81
|
+
- Design tokens
|
|
82
|
+
- Visual language
|
|
47
83
|
|
|
48
|
-
|
|
84
|
+
Bring your own system. Rad UI adapts.
|
|
49
85
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## Known issues
|
|
53
|
-
|
|
54
|
-
Document any known significant shortcomings with the software.
|
|
86
|
+
## Getting involved
|
|
55
87
|
|
|
56
|
-
|
|
88
|
+
Rad UI is open source and built in the open.
|
|
57
89
|
|
|
58
|
-
|
|
90
|
+
If you care about UI architecture, accessibility, and long term maintainability, we would love your help.
|
|
59
91
|
|
|
60
|
-
|
|
92
|
+
Contribution guide:
|
|
93
|
+
https://www.rad-ui.com/docs/contributing/before-you-start
|
|
61
94
|
|
|
62
|
-
|
|
95
|
+
Dev environment setup:
|
|
96
|
+
https://www.rad-ui.com/docs/contributing/setting-up-dev-environment
|
|
63
97
|
|
|
64
|
-
##
|
|
98
|
+
## Community and support
|
|
65
99
|
|
|
66
|
-
|
|
67
|
-
|
|
100
|
+
GitHub Discussions:
|
|
101
|
+
https://github.com/rad-ui/ui/discussions
|
|
68
102
|
|
|
69
|
-
|
|
103
|
+
Discord:
|
|
104
|
+
https://discord.com/invite/nMaQfeEPNp
|
|
70
105
|
|
|
71
|
-
|
|
106
|
+
Questions, ideas, and strong opinions are welcome.
|
|
72
107
|
|
|
73
|
-
|
|
74
|
-
[Discord](https://discord.com/invite/nMaQfeEPNp)
|
|
108
|
+
## License
|
|
75
109
|
|
|
76
|
-
|
|
110
|
+
Rad UI is open source software.
|
|
111
|
+
See the LICENSE file for details.
|
|
77
112
|
|
|
78
|
-
|
|
113
|
+
## Development environment
|
|
79
114
|
|
|
80
|
-
|
|
115
|
+
Node versions tested:
|
|
116
|
+
- 18.19.0
|
|
117
|
+
- 19.x
|
|
118
|
+
- 20.x
|
|
119
|
+
- 21.4.0
|
|
81
120
|
|
|
82
|
-
|
|
121
|
+
## Credits
|
|
83
122
|
|
|
84
|
-
|
|
123
|
+
Rad UI stands on the shoulders of great work in the ecosystem.
|
|
85
124
|
|
|
86
|
-
|
|
125
|
+
Heavily inspired by Radix UI, Floating UI, shadcn/ui, and other libraries that shaped modern UI development.
|
|
87
126
|
|
|
88
|
-
|
|
127
|
+
We respect them.
|
|
128
|
+
We made different tradeoffs.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type AccordionRootProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
|
|
4
|
+
customRootClass?: string;
|
|
5
|
+
transitionDuration?: number;
|
|
6
|
+
transitionTimingFunction?: string;
|
|
7
|
+
orientation?: 'horizontal' | 'vertical';
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
disableTabIndexing?: boolean;
|
|
11
|
+
openMultiple?: boolean;
|
|
12
|
+
value?: (number | string)[];
|
|
13
|
+
defaultValue?: (number | string)[];
|
|
14
|
+
onValueChange?: (value: (number | string)[]) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type AccordionItemProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
18
|
+
value?: number | string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type AccordionHeaderProps = React.ComponentPropsWithoutRef<'div'>;
|
|
24
|
+
|
|
25
|
+
type AccordionTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
|
|
26
|
+
index?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type AccordionContentProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
30
|
+
index: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type AccordionProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare const Accordion: {
|
|
38
|
+
(): null;
|
|
39
|
+
Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
|
|
40
|
+
customRootClass?: string;
|
|
41
|
+
transitionDuration?: number;
|
|
42
|
+
transitionTimingFunction?: string;
|
|
43
|
+
orientation?: "horizontal" | "vertical";
|
|
44
|
+
asChild?: boolean;
|
|
45
|
+
loop?: boolean;
|
|
46
|
+
disableTabIndexing?: boolean;
|
|
47
|
+
openMultiple?: boolean;
|
|
48
|
+
value?: (number | string)[];
|
|
49
|
+
defaultValue?: (number | string)[];
|
|
50
|
+
onValueChange?: (value: (number | string)[]) => void;
|
|
51
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
53
|
+
value?: number | string;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
Trigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
59
|
+
index?: number;
|
|
60
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
+
Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
62
|
+
index: number;
|
|
63
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { Accordion as default };
|
|
67
|
+
export type { AccordionContentProps, AccordionHeaderProps, AccordionItemProps, AccordionProps, AccordionRootProps, AccordionTriggerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as e,a as n,b as t}from"./tslib.es6-B3RR16LH.js";import i,{createContext as o,useRef as r,useState as a,useEffect as c,useContext as l,useId as s}from"react";import{c as u}from"./clsx-BaVHROc5.js";import{c as d}from"./index-BVxS3Ixi.js";import{u as m}from"./index-fkj4Fdgt.js";import{R as f}from"./index-Br4Ygpsh.js";import{P as v}from"./index-DR_GC01Z.js";import{C as p}from"./index-BgvB1-RV.js";import{B as h}from"./index-BxNZdFaZ.js";var g=o({rootClass:"",activeItems:[],setActiveItems:function(){},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1}),C="Accordion",N=i.forwardRef((function(o,l){var s=o.children,p=o.orientation,h=void 0===p?"vertical":p,N=o.disableTabIndexing,x=void 0===N||N,b=o.asChild,I=o.transitionDuration,A=void 0===I?0:I,T=o.transitionTimingFunction,R=void 0===T?"linear":T,E=o.customRootClass,F=o.loop,y=void 0===F||F,V=o.openMultiple,j=void 0!==V&&V,w=o.value,D=o.defaultValue,H=void 0===D?[]:D,M=o.onValueChange,q=e(o,["children","orientation","disableTabIndexing","asChild","transitionDuration","transitionTimingFunction","customRootClass","loop","openMultiple","value","defaultValue","onValueChange"]),P=r(null),k=d(E,C),B=a(null),G=B[0],O=B[1],_=r(),z=r([]),J=void 0!==w?j?w:w.length>0?[w[0]]:[]:void 0,K=j?H:H.length>0?[H[0]]:[],L=m(J,K,M),Q=L[0],S=L[1];return c((function(){if(0!==A&&P.current&&!j){var e=z.current,t=Q;if(e.length!==t.length||e.some((function(e){return!t.includes(e)}))||t.some((function(n){return!e.includes(n)}))){var i=P.current.offsetHeight;O(i),_.current&&clearTimeout(_.current),requestAnimationFrame((function(){requestAnimationFrame((function(){P.current&&(O(null),P.current.offsetHeight,requestAnimationFrame((function(){if(P.current){var e=P.current.offsetHeight;i!==e&&(O(i),requestAnimationFrame((function(){O(e)}))),_.current=setTimeout((function(){O(null)}),A)}})))}))}))}return z.current=n([],t,!0),function(){_.current&&clearTimeout(_.current)}}z.current=n([],Q,!0)}),[Q,A,j]),i.createElement(g.Provider,{value:{rootClass:k,activeItems:Q,setActiveItems:S,accordionRef:P,transitionDuration:A,transitionTimingFunction:R,openMultiple:j}},i.createElement(f.Root,{orientation:h,loop:y,disableTabIndexing:x},i.createElement(f.Group,null,i.createElement(v.div,t({className:u("".concat(k,"-root")),ref:function(e){var n=e;P.current=n,"function"==typeof l?l(n):l&&(l.current=n)},style:t(t({},null!==G&&A>0?{height:"".concat(G,"px"),overflow:"hidden",transition:"height ".concat(A,"ms ").concat(R)}:{}),q.style||{}),asChild:b},q),s))))}));N.displayName=C;var x=o({itemValue:0,setItemValue:function(){},disabled:!1}),b=i.forwardRef((function(n,o){var d=n.children,m=n.value,f=n.className,h=void 0===f?"":f,C=n.disabled,N=void 0!==C&&C;n.asChild;var b=e(n,["children","value","className","disabled","asChild"]),I=r(null),A=a(null!=m?m:0),T=A[0],R=A[1],E=l(g),F=E.rootClass,y=E.activeItems,V=E.transitionDuration,j=E.transitionTimingFunction,w=a(y.includes(T)),D=w[0],H=w[1];c((function(){H(y.includes(T))}),[y,T]);var M=s();return c((function(){void 0!==m&&m!==T&&R(m)}),[m]),i.createElement(x.Provider,{value:{itemValue:T,setItemValue:R,disabled:N}},i.createElement(p.Root,{open:D,onOpenChange:H,disabled:N,transitionDuration:V,transitionTimingFunction:j,asChild:!0},i.createElement(v.div,t({ref:function(e){var n=e;I.current=n,"function"==typeof o?o(n):o&&(o.current=n)},className:u("".concat(F,"-item"),h)},b,{id:"accordion-data-item-".concat(M),role:"region","data-state":D?"open":"closed"}),d)))}));b.displayName="AccordionItem";var I=i.forwardRef((function(n,o){var r=n.children,a=n.className,c=void 0===a?"":a,s=e(n,["children","className"]),d=l(g).rootClass;return i.createElement("div",t({ref:o,className:u("".concat(d,"-header"),c)},s),r)}));I.displayName="AccordionHeader";var A=i.forwardRef((function(o,r){var a=o.children,c=o.index,s=o.className,d=void 0===s?"":s,m=o.onClick,v=e(o,["children","index","className","onClick"]),C=l(g),N=C.setActiveItems,b=C.rootClass,I=C.activeItems,A=C.openMultiple,T=l(x),R=T.itemValue,E=T.disabled;return i.createElement(f.Item,null,i.createElement(p.Trigger,{disabled:E,asChild:!0},i.createElement(h,t({className:u("".concat(b,"-trigger"),d),ref:r,"aria-disabled":E,onClick:function(e){var t;t=I||[],A?t.includes(R)?N(t.filter((function(e){return e!==R}))):N(n(n([],t,!0),[R],!1)):t.includes(R)?N([]):N([R]),null==m||m(e)},"aria-expanded":I.includes(R),"aria-controls":void 0!==c?"content-".concat(c):void 0},v),a)))}));A.displayName="AccordionTrigger";var T=i.forwardRef((function(n,o){var r=n.children,a=n.index,c=n.className,s=void 0===c?"":c,d=e(n,["children","index","className"]),m=l(g).rootClass;return i.createElement(p.Content,t({ref:o,asChild:!0,className:u("".concat(m,"-content"),s),id:"content-".concat(a),role:"region"},d),r)}));T.displayName="AccordionContent";var R=function(){return console.warn("Direct usage of Accordion is not supported. Please use Accordion.Root, Accordion.Item, etc. instead. "),null};R.Root=N,R.Item=b,R.Header=I,R.Trigger=A,R.Content=T;export{R as default};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import DialogPrimitive from '~/core/primitives/Dialog';
|
|
4
|
+
import Primitive from '~/core/primitives/Primitive';
|
|
5
|
+
|
|
6
|
+
type DialogPrimitiveActionProps = {
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type DialogPrimitiveCancelProps = {
|
|
13
|
+
children: React__default.ReactNode;
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type DialogPrimitiveContentProps = {
|
|
19
|
+
children: React__default.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
forceMount?: boolean;
|
|
23
|
+
role?: string;
|
|
24
|
+
'aria-modal'?: boolean;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
26
|
+
'aria-describedby'?: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type DialogPrimitiveRootProps$1 = {
|
|
30
|
+
children: React__default.ReactNode;
|
|
31
|
+
open?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
onClickOutside?: () => void;
|
|
34
|
+
className?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type DialogPrimitiveRootProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
|
38
|
+
type AlertDialogRootProps = Omit<DialogPrimitiveRootProps, 'open' | 'onOpenChange'> & {
|
|
39
|
+
customRootClass?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
defaultOpen?: boolean;
|
|
42
|
+
open?: boolean;
|
|
43
|
+
onOpenChange?: (open: boolean) => void;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type DialogPrimitiveTriggerProps = {
|
|
47
|
+
children: React__default.ReactNode;
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
className?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
type DialogPrimitivePortalProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
|
54
|
+
type AlertDialogPortalProps = DialogPrimitivePortalProps & {
|
|
55
|
+
container?: Element | null;
|
|
56
|
+
forceMount?: boolean;
|
|
57
|
+
keepMounted?: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type PrimitiveH2Props = React__default.ComponentPropsWithoutRef<typeof Primitive.h2>;
|
|
61
|
+
type AlertDialogTitleProps = PrimitiveH2Props & {
|
|
62
|
+
className?: string;
|
|
63
|
+
asChild?: boolean;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type PrimitivePProps = React__default.ComponentPropsWithoutRef<typeof Primitive.p>;
|
|
67
|
+
type AlertDialogDescriptionProps = PrimitivePProps & {
|
|
68
|
+
className?: string;
|
|
69
|
+
asChild?: boolean;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
declare const AlertDialog: {
|
|
73
|
+
(): null;
|
|
74
|
+
Root: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitiveRootProps$1 & React$1.RefAttributes<HTMLDivElement>, "ref">, "open" | "onOpenChange"> & {
|
|
75
|
+
customRootClass?: string;
|
|
76
|
+
className?: string;
|
|
77
|
+
defaultOpen?: boolean;
|
|
78
|
+
open?: boolean;
|
|
79
|
+
onOpenChange?: (open: boolean) => void;
|
|
80
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
Trigger: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
82
|
+
className?: string;
|
|
83
|
+
disabled?: boolean;
|
|
84
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
85
|
+
Overlay: React$1.ForwardRefExoticComponent<Omit<{
|
|
86
|
+
className?: string;
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
forceMount?: boolean;
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
91
|
+
className?: string;
|
|
92
|
+
asChild?: boolean;
|
|
93
|
+
forceMount?: boolean;
|
|
94
|
+
children?: React.ReactNode;
|
|
95
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
96
|
+
Portal: {
|
|
97
|
+
({ children, ...props }: AlertDialogPortalProps): React$1.JSX.Element;
|
|
98
|
+
displayName: string;
|
|
99
|
+
};
|
|
100
|
+
Content: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
101
|
+
className?: string;
|
|
102
|
+
asChild?: boolean;
|
|
103
|
+
forceMount?: boolean;
|
|
104
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
Title: React$1.ForwardRefExoticComponent<AlertDialogTitleProps & React$1.RefAttributes<HTMLElement>>;
|
|
106
|
+
Description: React$1.ForwardRefExoticComponent<AlertDialogDescriptionProps & React$1.RefAttributes<HTMLElement>>;
|
|
107
|
+
Cancel: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
108
|
+
className?: string;
|
|
109
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
110
|
+
Action: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
111
|
+
className?: string;
|
|
112
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export { AlertDialog as default };
|
|
116
|
+
export type { AlertDialogRootProps as __fix_types_1 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as e,b as a}from"./tslib.es6-B3RR16LH.js";import t,{createContext as i,forwardRef as r,useState as o,useContext as l,useRef as n,useEffect as s}from"react";import{c}from"./index-BVxS3Ixi.js";import{c as d}from"./clsx-BaVHROc5.js";import{u as m}from"./index-fkj4Fdgt.js";import{D as u}from"./index-DzAecJCk.js";import{F as v}from"./index-Di6TooPD.js";import{P as p}from"./index-DR_GC01Z.js";import"./index-BxNZdFaZ.js";import"./floating-ui.react-CLbXmKZY.js";import"react/jsx-runtime";import"react-dom";var f=i({rootClass:"",isOpen:!1,setIsOpen:function(){},titleId:void 0,descriptionId:void 0,setTitleId:function(){},setDescriptionId:function(){}}),h="AlertDialog",C=r((function(i,r){var l=i.children,n=i.className,s=void 0===n?"":n,v=i.customRootClass,p=void 0===v?"":v,C=i.defaultOpen,N=void 0!==C&&C,g=i.open,D=i.onOpenChange,I=e(i,["children","className","customRootClass","defaultOpen","open","onOpenChange"]),y=c(p,h),A=m(g,N,D),O=A[0],b=A[1],E=o(void 0),j=E[0],x=E[1],T=o(void 0),M={rootClass:y,isOpen:O,setIsOpen:b,titleId:j,descriptionId:T[0],setTitleId:x,setDescriptionId:T[1]};return t.createElement(u.Root,a({open:O,onOpenChange:b,className:d(y,s)},I),t.createElement(f.Provider,{value:M},t.createElement("div",{ref:r,className:d(y,s)},l)))}));C.displayName=h;var N=r((function(i,r){var o=i.children,n=i.className,s=void 0===n?"":n,c=i.asChild,m=void 0!==c&&c,v=i.forceMount,p=void 0!==v&&v,h=e(i,["children","className","asChild","forceMount"]),C=l(f),N=C.rootClass,g=C.titleId,D=C.descriptionId;return t.createElement(u.Content,a({ref:r,className:d("".concat(N,"-content"),s),asChild:m,forceMount:p,role:"alertdialog","aria-modal":!0,"aria-labelledby":g,"aria-describedby":D},h),o)}));N.displayName="AlertDialogContent";var g=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,m=i.disabled,v=void 0!==m&&m,p=e(i,["children","asChild","className","disabled"]),h=l(f),C=h.rootClass,N=h.isOpen?"open":"closed",g=v?"":void 0;return t.createElement(u.Trigger,a({ref:r,className:d("".concat(C,"-trigger"),c),asChild:n,disabled:v,"data-state":N,"data-disabled":g},p),o)}));g.displayName="AlertDialogTrigger";var D=function(i){var r=i.children,o=e(i,["children"]);return t.createElement(u.Portal,a({},o),r)};D.displayName="AlertDialogPortal";var I=r((function(i,r){var o=i.className,n=void 0===o?"":o,s=i.asChild,c=void 0!==s&&s,m=i.forceMount,v=void 0!==m&&m,p=i.children,h=e(i,["className","asChild","forceMount","children"]),C=l(f).rootClass;return t.createElement(u.Overlay,a({ref:r,className:d("".concat(C,"-overlay"),n),asChild:c,forceMount:v},h),p)}));I.displayName="AlertDialogOverlay";var y=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,d=e(i,["children","asChild","className"]),m=l(f).rootClass;return t.createElement(u.Cancel,a({ref:r,className:"".concat(m,"-cancel ").concat(c),asChild:n},d),o)}));y.displayName="AlertDialogCancel";var A=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,d=e(i,["children","asChild","className"]),m=l(f).rootClass;return t.createElement(u.Action,a({ref:r,className:"".concat(m,"-action ").concat(c),asChild:n},d),o)}));A.displayName="AlertDialogAction";var O=r((function(i,r){var o=i.children,c=i.className,d=void 0===c?"":c,m=i.asChild,u=void 0!==m&&m,h=i.id,C=e(i,["children","className","asChild","id"]),N=l(f),g=N.rootClass,D=N.setTitleId,I=N.titleId,y=v.useId(),A=null!=h?h:y,O=n(A),b=n(I);return s((function(){b.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){b.current===O.current&&D(void 0)}}),[A,D]),t.createElement(p.h2,a({ref:r,id:A,className:"".concat(g,"-title ").concat(d),asChild:u},C),o)}));O.displayName="AlertDialogTitle";var b=r((function(i,r){var o=i.children,c=i.className,d=void 0===c?"":c,m=i.asChild,u=void 0!==m&&m,h=i.id,C=e(i,["children","className","asChild","id"]),N=l(f),g=N.rootClass,D=N.setDescriptionId,I=N.descriptionId,y=v.useId(),A=null!=h?h:y,O=n(A),b=n(I);return s((function(){b.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){b.current===O.current&&D(void 0)}}),[A,D]),t.createElement(p.p,a({ref:r,id:A,className:"".concat(g,"-description ").concat(d),asChild:u},C),o)}));b.displayName="AlertDialogDescription";var E=function(){return console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null};E.Root=C,E.Trigger=g,E.Overlay=I,E.Portal=D,E.Content=N,E.Title=O,E.Description=b,E.Cancel=y,E.Action=A;export{E as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
|
|
3
|
+
type AspectRatioProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
|
+
customRootClass?: string;
|
|
5
|
+
ratio?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const AspectRatio: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
customRootClass?: string;
|
|
9
|
+
ratio?: string;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
|
|
12
|
+
export { AspectRatio as default };
|
|
13
|
+
export type { AspectRatioProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as a,b as s}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";var o="AspectRatio",m=r.forwardRef((function(m,i){var c=m.children,l=m.customRootClass,d=m.className,f=m.ratio,p=void 0===f?"1":f,N=a(m,["children","customRootClass","className","ratio"]);isNaN(Number(p))&&!p.match(/^(\d+)\/(\d+)$/)&&(p="1"),Number(p)<=0&&(p="1");var n=t(l,o);return r.createElement("div",s({ref:i,style:{aspectRatio:p},className:e(n,d)},N),c)}));m.displayName=o;export{m as default};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
|
|
4
|
+
import AvatarPrimitiveRoot from '~/core/primitives/Avatar/fragments/AvatarPrimitiveRoot';
|
|
5
|
+
import AvatarPrimitiveImage from '~/core/primitives/Avatar/fragments/AvatarPrimitiveImage';
|
|
6
|
+
|
|
7
|
+
type AvatarFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
|
|
8
|
+
|
|
9
|
+
type AvatarRootProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveRoot> & {
|
|
10
|
+
customRootClass?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type AvatarImageProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveImage>;
|
|
18
|
+
|
|
19
|
+
declare const Avatar: {
|
|
20
|
+
(): null;
|
|
21
|
+
displayName: string;
|
|
22
|
+
Root: React.ForwardRefExoticComponent<AvatarRootProps & React.RefAttributes<HTMLElement>>;
|
|
23
|
+
Image: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLElement>>;
|
|
24
|
+
Fallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLElement>>;
|
|
25
|
+
};
|
|
26
|
+
declare namespace AvatarProps {
|
|
27
|
+
type Root = AvatarRootProps;
|
|
28
|
+
type Image = AvatarImageProps;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { AvatarProps, Avatar as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as a,b as r}from"./tslib.es6-B3RR16LH.js";import e,{createContext as s,useContext as o}from"react";import{A as t,a as l,b as i}from"./AvatarPrimitiveFallback-SECStDbi.js";import{c}from"./clsx-BaVHROc5.js";import{c as m}from"./index-BVxS3Ixi.js";import{u as n,a as v,b as d}from"./index-CD1lNchI.js";import"./index-DR_GC01Z.js";var f=s({size:"",variant:"",color:"",rootClass:""}),u="Avatar",p=e.forwardRef((function(s,o){var l=s.children,i=s.customRootClass,p=void 0===i?"":i,N=s.className,A=void 0===N?"":N,b=s.size,R=void 0===b?"":b,j=s.variant,C=void 0===j?"":j,g=s.color,k=void 0===g?"":g,x=a(s,["children","customRootClass","className","size","variant","color"]),z=m(p,u),h=n("avatar",{variant:C,size:R}),w=v(k),y=d(h(),w());return e.createElement(f.Provider,{value:{size:R,variant:C,color:k,rootClass:z}},e.createElement(t,r({ref:o,className:c(z,A)},y(),x),l))}));p.displayName=u;var N=e.forwardRef((function(s,t){var i=s.src,m=void 0===i?"":i,n=s.alt,v=void 0===n?"":n,d=a(s,["src","alt"]),u=o(f).rootClass;return e.createElement(l,r({ref:t,className:c("".concat(u,"-image")),src:m,alt:v},d))}));N.displayName="AvatarImage";var A=e.forwardRef((function(s,t){var l=s.children,m=s.className,n=void 0===m?"":m,v=a(s,["children","className"]),d=o(f).rootClass;return e.createElement(i,r({ref:t,className:c("".concat(d,"-fallback"),n)},v),l)}));A.displayName="AvatarFallback";var b=function(){return console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null};b.displayName="Avatar",b.Root=p,b.Image=N,b.Fallback=A;export{b as default};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import Primitive from '~/core/primitives/Primitive';
|
|
4
|
+
import AvatarPrimitiveRoot from '~/core/primitives/Avatar/fragments/AvatarPrimitiveRoot';
|
|
5
|
+
import { AvatarRootImageProps as AvatarRootImageProps$1 } from '~/core/primitives/Avatar/fragments/AvatarPrimitiveImage';
|
|
6
|
+
import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
|
|
7
|
+
|
|
8
|
+
type AvatarRootImageProps = React__default.ComponentPropsWithoutRef<typeof Primitive.img> & {
|
|
9
|
+
src?: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type AvatarGroupRootProps = React__default.ComponentPropsWithoutRef<'div'> & {
|
|
14
|
+
customRootClass?: string | '';
|
|
15
|
+
size?: string;
|
|
16
|
+
variant?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type AvatarGroupItemProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveRoot> & {
|
|
20
|
+
color?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type AvatarGroupAvatarProps = AvatarRootImageProps$1;
|
|
24
|
+
|
|
25
|
+
type AvatarGroupFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
|
|
26
|
+
|
|
27
|
+
declare const AvatarGroup: {
|
|
28
|
+
(): null;
|
|
29
|
+
Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
30
|
+
customRootClass?: string | "";
|
|
31
|
+
size?: string;
|
|
32
|
+
variant?: string;
|
|
33
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
Item: React.ForwardRefExoticComponent<AvatarGroupItemProps & React.RefAttributes<HTMLElement>>;
|
|
35
|
+
Avatar: React.ForwardRefExoticComponent<AvatarRootImageProps & React.RefAttributes<HTMLElement>>;
|
|
36
|
+
Fallback: React.ForwardRefExoticComponent<AvatarGroupFallbackProps & React.RefAttributes<HTMLElement>>;
|
|
37
|
+
};
|
|
38
|
+
declare namespace AvatarGroupProps {
|
|
39
|
+
type Root = AvatarGroupRootProps;
|
|
40
|
+
type Item = AvatarGroupItemProps;
|
|
41
|
+
type Avatar = AvatarGroupAvatarProps;
|
|
42
|
+
type Fallback = AvatarGroupFallbackProps;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { AvatarGroupProps, AvatarGroup as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as a,b as r}from"./tslib.es6-B3RR16LH.js";import e,{createContext as t,useContext as s}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as l}from"./index-BVxS3Ixi.js";import{u as i,b as c,a as n}from"./index-CD1lNchI.js";import{A as m,a as v,b as d}from"./AvatarPrimitiveFallback-SECStDbi.js";import"./index-DR_GC01Z.js";var u=t({rootClass:"",size:"",variant:""}),f="AvatarGroup",p=e.forwardRef((function(t,s){var n=t.customRootClass,m=void 0===n?"":n,v=t.size,d=void 0===v?"":v,p=t.variant,A=void 0===p?"":p,N=t.children,b=t.className,G=void 0===b?"":b,R=a(t,["customRootClass","size","variant","children","className"]),h=l(m,f),j=i("avatar",{variant:A,size:d}),C=c(j());return e.createElement(u.Provider,{value:{size:d,variant:A,rootClass:h}},e.createElement("div",r({ref:s,className:o(h,G)},C(),R),N))}));p.displayName=f;var A=e.forwardRef((function(t,l){var i=t.color,v=void 0===i?"":i,d=t.children,f=t.className,p=a(t,["color","children","className"]),A=s(u).rootClass,N=n(v),b=c(N());return e.createElement(m,r({ref:l,className:o("".concat(A,"-item"),f)},b(),p),d)}));A.displayName="AvatarGroupItem";var N=e.forwardRef((function(t,s){var o=t.src,l=t.alt,i=a(t,["src","alt"]);return e.createElement(v,r({ref:s,src:o,alt:l},i))}));N.displayName="AvatarGroupAvatar";var b=e.forwardRef((function(t,l){var i=t.children,c=t.className,n=a(t,["children","className"]),m=s(u).rootClass;return e.createElement(d,r({ref:l,className:o("".concat(m,"-fallback"),c)},n),i)}));b.displayName="AvatarGroupFallback";var G=function(){return console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null};G.Root=p,G.Item=A,G.Avatar=N,G.Fallback=b;export{G as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as r,b as a}from"./tslib.es6-B3RR16LH.js";import e,{createContext as i,useState as o,useMemo as n,useContext as d,useEffect as l}from"react";import{P as t}from"./index-DR_GC01Z.js";var s=i({}),m=e.forwardRef((function(i,d){var l=i.children,m=i.asChild,c=void 0!==m&&m,v=r(i,["children","asChild"]),f=o(!1),u=f[0],h=f[1],p=o(!1),E=p[0],g=p[1],C=n((function(){if(!l)return!1;var r=function(a){var i,o,n;if(e.isValidElement(a)){if("img"===a.type&&(null===(i=a.props)||void 0===i?void 0:i.src))return!0;if(null===(o=a.props)||void 0===o?void 0:o.src)return!0;if(null===(n=a.props)||void 0===n?void 0:n.children)return e.Children.toArray(a.props.children).some(r)}return!1};return e.Children.toArray(l).some(r)}),[l]),I={isImageLoaded:u,hasError:E,setHasError:g,handleLoadImage:function(){h(!0),g(!1)},handleErrorImage:function(){h(!1),g(!0)}};return e.createElement(s.Provider,{value:I},e.createElement(t.span,a({ref:d,asChild:c,"data-rad-ui-has-image":C?"":void 0},v),l))}));m.displayName="AvatarPrimitiveRoot";var c=e.forwardRef((function(i,o){var n=i.src,m=void 0===n?"":n,c=i.alt,v=void 0===c?"":c,f=r(i,["src","alt"]),u=d(s),h=u.handleErrorImage,p=u.handleLoadImage,E=u.hasError;return E?null:(l((function(){m||h()}),[m,h,E]),e.createElement(t.img,a({ref:o,src:m,alt:v,onError:h,onLoad:p},f)))}));c.displayName="AvatarPrimitiveImage";var v=e.forwardRef((function(i,o){var n=i.children,l=i.asChild,m=void 0!==l&&l,c=i.className,v=void 0===c?"":c,f=r(i,["children","asChild","className"]);return d(s).isImageLoaded?null:e.createElement(t.span,a({ref:o,asChild:m,className:v},f),n)}));v.displayName="AvatarPrimitiveFallback";export{m as A,c as a,v as b};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type BadgeProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
4
|
+
customRootClass?: string;
|
|
5
|
+
variant?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
|
+
customRootClass?: string;
|
|
11
|
+
variant?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
|
|
16
|
+
export { Badge as default };
|
|
17
|
+
export type { BadgeProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as a,b as s}from"./tslib.es6-B3RR16LH.js";import o from"react";import{c as r}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";import{u as i,a as t,b as m}from"./index-CD1lNchI.js";var d="Badge",c=o.forwardRef((function(c,l){var n=c.children,v=c.customRootClass,f=void 0===v?"":v,p=c.className,u=void 0===p?"":p,b=c.color,j=void 0===b?"":b,x=c.variant,N=void 0===x?"":x,z=c.size,R=void 0===z?"":z,g=a(c,["children","customRootClass","className","color","variant","size"]),h=r(f,d),C=i("badge",{variant:N,size:R}),w=t(j),y=m(C(),w());return o.createElement("div",s({ref:l,className:e(h,u)},y(),g),n)}));c.displayName=d;export{c as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type BlockQuoteProps = React.ComponentPropsWithoutRef<'blockquote'> & {
|
|
4
|
+
customRootClass?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
variant?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const BlockQuote: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & {
|
|
10
|
+
customRootClass?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
variant?: string;
|
|
13
|
+
size?: string;
|
|
14
|
+
} & React.RefAttributes<HTMLQuoteElement>>;
|
|
15
|
+
|
|
16
|
+
export { BlockQuote as default };
|
|
17
|
+
export type { BlockQuoteProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as o,b as a}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as t}from"./index-BVxS3Ixi.js";var e="BlockQuote",c=r.forwardRef((function(c,i){var l=c.children,d=c.customRootClass,m=void 0===d?"":d,n=c.className,u=void 0===n?"":n,v=c.color,f=void 0===v?"":v,p=c.variant,b=void 0===p?"":p,k=c.size,N=void 0===k?"":k,j=o(c,["children","customRootClass","className","color","variant","size"]),q=t(m,e),x={};return b&&(x["data-block-quote-variant"]=b),N&&(x["data-block-quote-size"]=N),f&&(x["data-rad-ui-accent-color"]=f),r.createElement("blockquote",a({ref:i,className:s(q,u)},j,x),l)}));c.displayName=e;export{c as default};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import ButtonPrimitive from '~/core/primitives/Button';
|
|
3
|
+
|
|
4
|
+
type ButtonProps = {
|
|
5
|
+
customRootClass?: string;
|
|
6
|
+
variant?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
} & ComponentPropsWithoutRef<typeof ButtonPrimitive>;
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<{
|
|
11
|
+
customRootClass?: string;
|
|
12
|
+
variant?: string;
|
|
13
|
+
size?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
} & Omit<{
|
|
16
|
+
label?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
onChange?: any;
|
|
21
|
+
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
|
|
23
|
+
export { Button as default };
|
|
24
|
+
export type { ButtonProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as o,b as i}from"./tslib.es6-B3RR16LH.js";import a,{forwardRef as s}from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BxNZdFaZ.js";import{u as d,a as n,b as l}from"./index-CD1lNchI.js";import"./index-DR_GC01Z.js";var m="Button",c=s((function(s,c){var p=s.children,v=s.type,u=void 0===v?"button":v,f=s.customRootClass,b=void 0===f?"":f,j=s.className,x=void 0===j?"":j,C=s.variant,y=void 0===C?"":C,N=s.size,k=void 0===N?"":N,z=s.color,h=void 0===z?"":z,B=s.disabled,R=void 0!==B&&B,g=s.onClick,D=o(s,["children","type","customRootClass","className","variant","size","color","disabled","onClick"]),E=t(b,m),P=d("button",{variant:y,size:k}),_=n(h),q=l(P(),_());return a.createElement(r,i({ref:c,type:u,disabled:R,"data-disabled":R?"":void 0,className:e(E,x)},q(),{onClick:function(o){if(R)return o.preventDefault(),void o.stopPropagation();null==g||g(o)}},D),p)}));c.displayName=m;export{c as default};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Callout: {
|
|
4
|
+
(): null;
|
|
5
|
+
Root: react.ForwardRefExoticComponent<((Omit<react.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & react.RefAttributes<HTMLElement>, "ref"> | Omit<react.HTMLAttributes<HTMLElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
} & react.RefAttributes<HTMLElement>, "ref">) & {
|
|
11
|
+
color?: string;
|
|
12
|
+
variant?: string;
|
|
13
|
+
intent?: string;
|
|
14
|
+
size?: string;
|
|
15
|
+
customRootClass?: string;
|
|
16
|
+
}) & react.RefAttributes<HTMLElement>>;
|
|
17
|
+
Icon: react.ForwardRefExoticComponent<(Omit<react.InputHTMLAttributes<HTMLInputElement> & {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
} & react.RefAttributes<HTMLElement>, "ref"> | Omit<react.HTMLAttributes<HTMLElement> & {
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
} & react.RefAttributes<HTMLElement>, "ref">) & react.RefAttributes<HTMLElement>>;
|
|
23
|
+
Text: react.ForwardRefExoticComponent<(Omit<react.InputHTMLAttributes<HTMLInputElement> & {
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
} & react.RefAttributes<HTMLElement>, "ref"> | Omit<react.HTMLAttributes<HTMLElement> & {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
} & react.RefAttributes<HTMLElement>, "ref">) & react.RefAttributes<HTMLElement>>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { Callout as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';import{_ as a,b as e}from"./tslib.es6-B3RR16LH.js";import o,{createContext as s,useContext as t}from"react";import{c as r}from"./index-BVxS3Ixi.js";import{c as l}from"./clsx-BaVHROc5.js";import{P as i}from"./index-DR_GC01Z.js";import{u as c,a as n,b as d}from"./index-CD1lNchI.js";var m=s({rootClass:""}),u="Callout",v=o.forwardRef((function(s,t){var v=s.children,f=s.asChild,C=void 0!==f&&f,p=s.className,N=void 0===p?"":p,h=s.color,x=void 0===h?"":h,R=s.variant,j=void 0===R?"":R,w=s.intent,E=void 0===w?"":w,b=s.size,y=void 0===b?"":b,z=s.customRootClass,I=void 0===z?"":z,P=a(s,["children","asChild","className","color","variant","intent","size","customRootClass"]),T=r(I,u),g=c("callout",{variant:"destructive"===j?"":j,intent:E||("destructive"===j?"destructive":""),size:y}),D=n(x),_=d(g(),D());return o.createElement(m.Provider,{value:{rootClass:T}},o.createElement(i.div,e({ref:t,asChild:C,className:l(T,N)},_(),P),v))}));v.displayName=u;var f=o.forwardRef((function(s,r){var c=s.children,n=s.className,d=void 0===n?"":n,u=a(s,["children","className"]),v=t(m).rootClass;return o.createElement(i.span,e({ref:r,className:l("".concat(v,"-icon"),d)},u),c)}));f.displayName="CalloutIcon";var C=o.forwardRef((function(s,r){var c=s.children,n=s.className,d=void 0===n?"":n,u=a(s,["children","className"]),v=t(m).rootClass;return o.createElement(i.p,e({ref:r,className:l("".concat(v,"-text"),d)},u),c)}));C.displayName="CalloutText";var p=function(){return console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null};p.Root=v,p.Icon=f,p.Text=C;export{p as default};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const CardRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
customRootClass?: string;
|
|
5
|
+
variant?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
type CardProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
10
|
+
customRootClass?: string;
|
|
11
|
+
variant?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
};
|
|
14
|
+
type CardComponent = React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
15
|
+
Root: typeof CardRoot;
|
|
16
|
+
};
|
|
17
|
+
declare const Card: CardComponent;
|
|
18
|
+
|
|
19
|
+
export { Card as default };
|
|
20
|
+
export type { CardProps };
|