@radui/ui 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +87 -47
  2. package/dist/components/Accordion.d.ts +94 -30
  3. package/dist/components/Accordion.js +1 -1
  4. package/dist/components/AlertDialog.d.ts +13 -14
  5. package/dist/components/AlertDialog.js +1 -1
  6. package/dist/components/AspectRatio.js +1 -1
  7. package/dist/components/Avatar.d.ts +4 -3
  8. package/dist/components/Avatar.js +1 -1
  9. package/dist/components/AvatarGroup.d.ts +1 -0
  10. package/dist/components/AvatarGroup.js +1 -1
  11. package/dist/components/AvatarPrimitiveFallback-KiY3slgV.js +1 -0
  12. package/dist/components/Badge.d.ts +6 -4
  13. package/dist/components/Badge.js +1 -1
  14. package/dist/components/BlockQuote.js +1 -1
  15. package/dist/components/Button.js +1 -1
  16. package/dist/components/Callout.d.ts +19 -11
  17. package/dist/components/Callout.js +1 -1
  18. package/dist/components/Card.d.ts +30 -1
  19. package/dist/components/Card.js +1 -1
  20. package/dist/components/Checkbox.d.ts +22 -6
  21. package/dist/components/Checkbox.js +1 -1
  22. package/dist/components/CheckboxCards.d.ts +25 -7
  23. package/dist/components/CheckboxCards.js +1 -1
  24. package/dist/components/CheckboxGroup.d.ts +22 -7
  25. package/dist/components/CheckboxGroup.js +1 -1
  26. package/dist/components/CheckboxGroupPrimitive-DIOswrR1.js +1 -0
  27. package/dist/components/Code.js +1 -1
  28. package/dist/components/Collapsible.d.ts +12 -9
  29. package/dist/components/Collapsible.js +1 -1
  30. package/dist/components/Combobox.d.ts +98 -0
  31. package/dist/components/Combobox.js +1 -0
  32. package/dist/components/ComboboxPrimitive-Bn1C5dkn.js +1 -0
  33. package/dist/components/ContextMenu.d.ts +31 -1
  34. package/dist/components/ContextMenu.js +1 -1
  35. package/dist/components/DataList.d.ts +12 -5
  36. package/dist/components/DataList.js +1 -1
  37. package/dist/components/Dialog.d.ts +37 -18
  38. package/dist/components/Dialog.js +1 -1
  39. package/dist/components/Disclosure.d.ts +6 -1
  40. package/dist/components/Disclosure.js +1 -1
  41. package/dist/components/DropdownMenu.d.ts +31 -1
  42. package/dist/components/DropdownMenu.js +1 -1
  43. package/dist/components/Em.js +1 -1
  44. package/dist/components/Heading.js +1 -1
  45. package/dist/components/HoverCard.d.ts +12 -1
  46. package/dist/components/HoverCard.js +1 -1
  47. package/dist/components/Kbd.d.ts +1 -1
  48. package/dist/components/Kbd.js +1 -1
  49. package/dist/components/Link.d.ts +3 -1
  50. package/dist/components/Link.js +1 -1
  51. package/dist/components/MenuPrimitive-6Qr46BSn.js +1 -0
  52. package/dist/components/Menubar.d.ts +81 -37
  53. package/dist/components/Menubar.js +1 -1
  54. package/dist/components/Minimap.d.ts +11 -8
  55. package/dist/components/Minimap.js +1 -1
  56. package/dist/components/NavigationMenu.d.ts +13 -12
  57. package/dist/components/NavigationMenu.js +1 -1
  58. package/dist/components/NumberField.d.ts +28 -6
  59. package/dist/components/NumberField.js +1 -1
  60. package/dist/components/Progress.d.ts +1 -1
  61. package/dist/components/Progress.js +1 -1
  62. package/dist/components/Quote.js +1 -1
  63. package/dist/components/Radio.js +1 -1
  64. package/dist/components/RadioCards.d.ts +7 -2
  65. package/dist/components/RadioCards.js +1 -1
  66. package/dist/components/RadioGroup.d.ts +1 -1
  67. package/dist/components/RadioGroup.js +1 -1
  68. package/dist/components/RadioGroupPrimitive-QSMno27i.js +1 -0
  69. package/dist/components/ScrollArea.d.ts +18 -2
  70. package/dist/components/ScrollArea.js +1 -1
  71. package/dist/components/Select.d.ts +20 -15
  72. package/dist/components/Select.js +1 -1
  73. package/dist/components/Separator.js +1 -1
  74. package/dist/components/Skeleton.js +1 -1
  75. package/dist/components/Slider.d.ts +57 -11
  76. package/dist/components/Slider.js +1 -1
  77. package/dist/components/Spinner.d.ts +13 -0
  78. package/dist/components/Spinner.js +1 -0
  79. package/dist/components/Splitter.d.ts +1 -1
  80. package/dist/components/Splitter.js +1 -1
  81. package/dist/components/Steps.d.ts +21 -9
  82. package/dist/components/Steps.js +1 -1
  83. package/dist/components/Strong.js +1 -1
  84. package/dist/components/Switch.d.ts +8 -7
  85. package/dist/components/Switch.js +1 -1
  86. package/dist/components/TabNav.d.ts +23 -5
  87. package/dist/components/TabNav.js +1 -1
  88. package/dist/components/Table.d.ts +9 -1
  89. package/dist/components/Table.js +1 -1
  90. package/dist/components/Tabs.d.ts +25 -1
  91. package/dist/components/Tabs.js +1 -1
  92. package/dist/components/Text.js +1 -1
  93. package/dist/components/TextArea.d.ts +18 -2
  94. package/dist/components/TextArea.js +1 -1
  95. package/dist/components/Theme.js +1 -1
  96. package/dist/components/ThemeContext-Sm-iNANd.js +1 -0
  97. package/dist/components/Toggle.js +1 -1
  98. package/dist/components/ToggleGroup.d.ts +33 -0
  99. package/dist/components/ToggleGroup.js +1 -1
  100. package/dist/components/Toolbar.d.ts +83 -0
  101. package/dist/components/Toolbar.js +1 -0
  102. package/dist/components/Tooltip.d.ts +6 -0
  103. package/dist/components/Tooltip.js +1 -1
  104. package/dist/components/Tree.d.ts +10 -1
  105. package/dist/components/Tree.js +1 -1
  106. package/dist/components/VisuallyHidden.d.ts +1 -1
  107. package/dist/components/VisuallyHidden.js +1 -1
  108. package/dist/components/check-DujVUWP-.js +44 -0
  109. package/dist/components/floating-ui.react-DMgxgTKq.js +5 -0
  110. package/dist/components/index-3dZuI04X.js +1 -0
  111. package/dist/components/index-6If6D2Zi.js +1 -0
  112. package/dist/components/index-98jQ1vTr.js +1 -0
  113. package/dist/components/index-BOy86lYu.js +1 -0
  114. package/dist/components/index-BZVbVgqN.js +1 -0
  115. package/dist/components/index-CTJl2pTM.js +1 -0
  116. package/dist/components/index-CXzybYmm.js +1 -0
  117. package/dist/components/index-DTYJVF-V.js +1 -0
  118. package/dist/components/index-hAp0hL9w.js +1 -0
  119. package/dist/components/index-wRElCyvx.js +1 -0
  120. package/dist/components/index-yqRHPukT.js +1 -0
  121. package/dist/themes/default.css +1 -1
  122. package/package.json +51 -32
  123. package/dist/components/AvatarPrimitiveFallback-BV0bK5Qg.js +0 -1
  124. package/dist/components/CheckboxGroupPrimitive-DrGqSxi3.js +0 -1
  125. package/dist/components/MenuPrimitive-CPcrK1EK.js +0 -1
  126. package/dist/components/RadioGroupPrimitive-D9grAL7G.js +0 -1
  127. package/dist/components/floating-ui.react-CLbXmKZY.js +0 -5
  128. package/dist/components/index-BRmT6kl7.js +0 -1
  129. package/dist/components/index-BVxS3Ixi.js +0 -1
  130. package/dist/components/index-Bf4LVEjJ.js +0 -1
  131. package/dist/components/index-BtoPzkH9.js +0 -1
  132. package/dist/components/index-DBZNt4Em.js +0 -1
  133. package/dist/components/index-Dc5Cm9z0.js +0 -1
  134. package/dist/components/index-Di6TooPD.js +0 -1
  135. package/dist/components/index-DnCiOYxZ.js +0 -1
  136. package/dist/components/index-XqbKa2D2.js +0 -1
  137. package/dist/components/index-YgKcfT__.js +0 -1
  138. package/dist/components/index-fkj4Fdgt.js +0 -1
  139. package/dist/components/tslib.es6-BtVxab8e.js +0 -1
package/README.md CHANGED
@@ -1,88 +1,128 @@
1
1
  [![codecov](https://codecov.io/gh/rad-ui/ui/graph/badge.svg?token=Z74MUHF5TN)](https://codecov.io/gh/rad-ui/ui)
2
2
 
3
- # RAD UI
3
+ # Rad UI
4
4
 
5
- ![RAD UI](./assets/images/rad-ui-poster.png)
5
+ ![Rad UI Banner](./assets/images/rad-ui-banner.png)
6
6
 
7
- ## Sponsored by
7
+ ## What is Rad UI?
8
8
 
9
- <p align="center">
10
- <img src="./docs/public/sponsorship/browserstack_light.png" alt="BrowserStack" width="200" />
11
- &nbsp;&nbsp;&nbsp;
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
- ## Introduction to Rad UI
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 is a React UI library designed to simplify and enhance the process of building user interfaces. With a focus on ease of use and flexibility, Rad UI empowers developers to create engaging and efficient user experiences. Whether you're starting a new project or improving an existing one, Rad UI provides a collection of components and utilities to streamline development.
13
+ Rad UI handles behavior, accessibility, and composition so you can own structure, visuals, and tokens without compromise.
18
14
 
19
- Head over to [Storybook](https://main--657eda33d6033847be90aaf8.chromatic.com/) to check out latest components.
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
- For full documentation, visit [Documentation](https://www.rad-ui.com/docs/first-steps/introduction).
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
- To install Rad UI, run the following command from the root of your project's directory:
60
+ Install Rad UI from npm:
28
61
 
29
62
  ```bash
30
63
  npm install @radui/ui
31
64
  ```
32
65
 
33
- Description: Rad UI is a React UI library that simplifies UI development, offering a collection of components and utilities to enhance the user experience. It addresses common challenges in building interfaces, making it easier for developers to create intuitive and visually appealing applications.
34
- <!--
66
+ Rad UI works with modern React setups and is friendly to tokens, CSS variables, and custom theming strategies.
35
67
 
36
- ## Dependencies
68
+ ## Philosophy
37
69
 
38
- Describe any dependencies that must be installed for this software to work.
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
- ## Usage
72
+ We are strict about:
73
+ - Accessibility
74
+ - Keyboard and focus behavior
75
+ - Composition patterns
76
+ - Predictable APIs
43
77
 
44
- Show users how to use the software.
45
- Be specific.
46
- Use appropriate formatting when showing code snippets.
78
+ We are deliberately neutral about:
79
+ - Styling
80
+ - Theming
81
+ - Design tokens
82
+ - Visual language
47
83
 
48
- ## How to test the software
84
+ Bring your own system. Rad UI adapts.
49
85
 
50
- If the software includes automated tests, detail how to run those tests.
51
-
52
- ## Known issues
53
-
54
- Document any known significant shortcomings with the software.
86
+ ## Getting involved
55
87
 
56
- ## Getting help
88
+ Rad UI is open source and built in the open.
57
89
 
58
- Instruct users how to get help with this software; this might include links to an issue tracker, wiki, mailing list, etc.
90
+ If you care about UI architecture, accessibility, and long term maintainability, we would love your help.
59
91
 
60
- **Example**
92
+ Contribution guide:
93
+ https://www.rad-ui.com/docs/contributing/before-you-start
61
94
 
62
- If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker. -->
95
+ Dev environment setup:
96
+ https://www.rad-ui.com/docs/contributing/setting-up-dev-environment
63
97
 
64
- ## Getting involved
98
+ ## Community and support
65
99
 
66
- We encourage interested developers in getting involved in building a better future for the web. We can use all the help we can get to make the code and the docs a little bit every day.
67
- For more details, you can read on how to contribute to development of Rad UI in [Contribution Docs](https://www.rad-ui.com/docs/contributing/before-you-start).
100
+ GitHub Discussions:
101
+ https://github.com/rad-ui/ui/discussions
68
102
 
69
- [Setting Up Dev Environment](https://www.rad-ui.com/docs/contributing/setting-up-dev-environment)
103
+ Discord:
104
+ https://discord.com/invite/nMaQfeEPNp
70
105
 
71
- ## Where can I get more help, if I need it?
106
+ Questions, ideas, and strong opinions are welcome.
72
107
 
73
- [GitHub Discussions](https://github.com/rad-ui/ui/discussions)
74
- [Discord](https://discord.com/invite/nMaQfeEPNp)
108
+ ## License
75
109
 
76
- ## Open source licensing info
110
+ Rad UI is open source software.
111
+ See the LICENSE file for details.
77
112
 
78
- For Licensing information you can check out [LICENSE](LICENSE).
113
+ ## Development environment
79
114
 
80
- ## Dev Environment
115
+ Node versions tested:
116
+ - 18.19.0
117
+ - 19.x
118
+ - 20.x
119
+ - 21.4.0
81
120
 
82
- Node versions tested in 18.19.0 - 21.4.0
121
+ ## Credits
83
122
 
84
- ## Credits and references
123
+ Rad UI stands on the shoulders of great work in the ecosystem.
85
124
 
86
- 1. Project heavily inspired by RadixUI, Floating UI, shadcn/ui and many other libraries that defined the modern web that we know today
125
+ Heavily inspired by Radix UI, Floating UI, shadcn/ui, and other libraries that shaped modern UI development.
87
126
 
88
- This project is tested with BrowserStack
127
+ We respect them.
128
+ We made different tradeoffs.
@@ -1,36 +1,100 @@
1
1
  import React from 'react';
2
2
 
3
- type AccordionProps = React.HTMLAttributes<HTMLDivElement> & {
4
- children?: React.ReactNode;
3
+ type AccordionRootProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
4
+ customRootClass?: string;
5
+ transitionDuration?: number;
6
+ transitionTimingFunction?: string;
7
+ orientation?: 'horizontal' | 'vertical';
8
+ /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
9
+ disabled?: boolean;
10
+ asChild?: boolean;
11
+ loop?: boolean;
12
+ disableTabIndexing?: boolean;
13
+ /** @deprecated Prefer `type="multiple"`. */
14
+ openMultiple?: boolean;
15
+ /** Radix-aligned mode: single allows one open section; multiple allows several. */
16
+ type?: 'single' | 'multiple';
17
+ /**
18
+ * When `type` is single (default), whether the open item can be closed by activating its trigger again.
19
+ * Matches Radix: defaults to false (trigger does not collapse the only open item).
20
+ */
21
+ collapsible?: boolean;
22
+ value?: (number | string)[];
23
+ defaultValue?: (number | string)[];
24
+ onValueChange?: (value: (number | string)[]) => void;
5
25
  };
6
- declare const Accordion: {
7
- (): null;
8
- Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
9
- customRootClass?: string;
10
- transitionDuration?: number;
11
- transitionTimingFunction?: string;
12
- orientation?: "horizontal" | "vertical";
13
- asChild?: boolean;
14
- loop?: boolean;
15
- disableTabIndexing?: boolean;
16
- openMultiple?: boolean;
17
- value?: (number | string)[];
18
- defaultValue?: (number | string)[];
19
- onValueChange?: (value: (number | string)[]) => void;
20
- } & React.RefAttributes<HTMLDivElement>>;
21
- Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
- value?: number | string;
23
- disabled?: boolean;
24
- asChild?: boolean;
25
- } & React.RefAttributes<HTMLDivElement>>;
26
- Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
- Trigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
28
- index?: number;
29
- } & React.RefAttributes<HTMLButtonElement>>;
30
- Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
31
- index: number;
32
- } & React.RefAttributes<HTMLDivElement>>;
26
+ declare const AccordionRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
27
+ customRootClass?: string;
28
+ transitionDuration?: number;
29
+ transitionTimingFunction?: string;
30
+ orientation?: "horizontal" | "vertical";
31
+ /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
32
+ disabled?: boolean;
33
+ asChild?: boolean;
34
+ loop?: boolean;
35
+ disableTabIndexing?: boolean;
36
+ /** @deprecated Prefer `type="multiple"`. */
37
+ openMultiple?: boolean;
38
+ /** Radix-aligned mode: single allows one open section; multiple allows several. */
39
+ type?: "single" | "multiple";
40
+ /**
41
+ * When `type` is single (default), whether the open item can be closed by activating its trigger again.
42
+ * Matches Radix: defaults to false (trigger does not collapse the only open item).
43
+ */
44
+ collapsible?: boolean;
45
+ value?: (number | string)[];
46
+ defaultValue?: (number | string)[];
47
+ onValueChange?: (value: (number | string)[]) => void;
48
+ } & React.RefAttributes<HTMLDivElement>>;
49
+
50
+ type AccordionItemProps = React.ComponentPropsWithoutRef<'div'> & {
51
+ value?: number | string;
52
+ disabled?: boolean;
53
+ asChild?: boolean;
54
+ };
55
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
56
+ value?: number | string;
57
+ disabled?: boolean;
58
+ asChild?: boolean;
59
+ } & React.RefAttributes<HTMLDivElement>>;
60
+
61
+ type AccordionHeaderProps = React.ComponentPropsWithoutRef<'h3'> & {
62
+ asChild?: boolean;
63
+ };
64
+ declare const AccordionHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
65
+ asChild?: boolean;
66
+ } & React.RefAttributes<HTMLHeadingElement>>;
67
+
68
+ type AccordionTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
69
+ asChild?: boolean;
33
70
  };
71
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
72
+ asChild?: boolean;
73
+ } & React.RefAttributes<HTMLButtonElement>>;
74
+
75
+ type AccordionContentProps = React.ComponentPropsWithoutRef<'div'> & {
76
+ /** @deprecated Index is no longer required; ids come from collapsible context. */
77
+ index?: number;
78
+ forceMount?: boolean;
79
+ asChild?: boolean;
80
+ };
81
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
82
+ /** @deprecated Index is no longer required; ids come from collapsible context. */
83
+ index?: number;
84
+ forceMount?: boolean;
85
+ asChild?: boolean;
86
+ } & React.RefAttributes<HTMLDivElement>>;
87
+
88
+ type AccordionProps = React.ComponentPropsWithoutRef<typeof AccordionRoot>;
89
+ type AccordionCompound = typeof AccordionRoot & {
90
+ Root: typeof AccordionRoot;
91
+ Item: typeof AccordionItem;
92
+ Header: typeof AccordionHeader;
93
+ Trigger: typeof AccordionTrigger;
94
+ Content: typeof AccordionContent;
95
+ };
96
+
97
+ declare const Accordion: AccordionCompound;
34
98
 
35
99
  export { Accordion as default };
36
- export type { AccordionProps };
100
+ export type { AccordionCompound, AccordionContentProps, AccordionHeaderProps, AccordionItemProps, AccordionProps, AccordionRootProps, AccordionTriggerProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,a as n,b as i}from"./tslib.es6-BtVxab8e.js";import t,{createContext as a,useRef as o,useState as r,useContext as l,useEffect as c,useId as s}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c as u}from"./index-BVxS3Ixi.js";import{u as m}from"./index-fkj4Fdgt.js";import{R as v}from"./index-BRmT6kl7.js";import{P as f}from"./index-Dc5Cm9z0.js";import{C as p}from"./index-XqbKa2D2.js";import{B as C}from"./index-DnCiOYxZ.js";var g=a({rootClass:"",activeItems:[],setActiveItems:function(){},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1}),h="Accordion",b=t.forwardRef((function(i,a){var r=i.children,l=i.orientation,c=void 0===l?"vertical":l,s=i.disableTabIndexing,p=void 0===s||s,C=i.asChild,b=i.transitionDuration,N=void 0===b?0:b,x=i.transitionTimingFunction,I=void 0===x?"linear":x,R=i.customRootClass,E=i.loop,T=void 0===E||E,A=i.openMultiple,V=void 0!==A&&A,j=i.value,y=i.defaultValue,D=void 0===y?[]:y,w=i.onValueChange,F=e(i,["children","orientation","disableTabIndexing","asChild","transitionDuration","transitionTimingFunction","customRootClass","loop","openMultiple","value","defaultValue","onValueChange"]),M=o(null),P=u(R,h),k=void 0!==j?V?j:j.length>0?[j[0]]:[]:void 0,H=V?D:D.length>0?[D[0]]:[],B=m(k,H,w),G=B[0],O=B[1];return t.createElement(g.Provider,{value:{rootClass:P,activeItems:G,setActiveItems:O,accordionRef:M,transitionDuration:N,transitionTimingFunction:I,openMultiple:V}},t.createElement(v.Root,{orientation:c,loop:T,disableTabIndexing:p},t.createElement(v.Group,null,t.createElement(f.div,n({className:d("".concat(P,"-root")),ref:function(e){var n=e;M.current=n,"function"==typeof a?a(n):a&&(a.current=n)},asChild:C},F),r))))}));b.displayName=h;var N=a({itemValue:0,setItemValue:function(){},disabled:!1}),x=t.forwardRef((function(i,a){var u=i.children,m=i.value,v=i.className,C=void 0===v?"":v,h=i.disabled,b=void 0!==h&&h;i.asChild;var x=e(i,["children","value","className","disabled","asChild"]),I=o(null),R=r(null!=m?m:0),E=R[0],T=R[1],A=l(g),V=A.rootClass,j=A.activeItems,y=A.transitionDuration,D=A.transitionTimingFunction,w=r(j.includes(E)),F=w[0],M=w[1];c((function(){M(j.includes(E))}),[j,E]);var P=s();return c((function(){void 0!==m&&m!==E&&T(m)}),[m]),t.createElement(N.Provider,{value:{itemValue:E,setItemValue:T,disabled:b}},t.createElement(p.Root,{open:F,onOpenChange:M,disabled:b,transitionDuration:y,transitionTimingFunction:D,asChild:!0},t.createElement(f.div,n({ref:function(e){var n=e;I.current=n,"function"==typeof a?a(n):a&&(a.current=n)},className:d("".concat(V,"-item"),C)},x,{id:"accordion-data-item-".concat(P),role:"region","data-state":F?"open":"closed"}),u)))}));x.displayName="AccordionItem";var I=t.forwardRef((function(i,a){var o=i.children,r=i.className,c=void 0===r?"":r,s=e(i,["children","className"]),u=l(g).rootClass;return t.createElement("div",n({ref:a,className:d("".concat(u,"-header"),c)},s),o)}));I.displayName="AccordionHeader";var R=t.forwardRef((function(a,o){var r=a.children,c=a.index,s=a.className,u=void 0===s?"":s,m=a.onClick,f=e(a,["children","index","className","onClick"]),h=l(g),b=h.setActiveItems,x=h.rootClass,I=h.activeItems,R=h.openMultiple,E=l(N),T=E.itemValue,A=E.disabled;return t.createElement(v.Item,null,t.createElement(p.Trigger,{disabled:A,asChild:!0},t.createElement(C,n({className:d("".concat(x,"-trigger"),u),ref:o,"aria-disabled":A,onClick:function(e){var n;n=I||[],R?n.includes(T)?b(n.filter((function(e){return e!==T}))):b(i(i([],n,!0),[T],!1)):n.includes(T)?b([]):b([T]),null==m||m(e)},"aria-expanded":I.includes(T),"aria-controls":"content-".concat(c)},f),r)))}));R.displayName="AccordionTrigger";var E=t.forwardRef((function(i,a){var o=i.children,r=i.index,c=i.className,s=void 0===c?"":c,u=e(i,["children","index","className"]),m=l(g).rootClass;return t.createElement(p.Content,n({ref:a,asChild:!0,className:d("".concat(m,"-content"),s),id:"content-".concat(r),role:"region","aria-labelledby":"section-".concat(r)},u),o)}));E.displayName="AccordionContent";var T=function(){return console.warn("Direct usage of Accordion is not supported. Please use Accordion.Root, Accordion.Item, etc. instead. "),null};T.Root=b,T.Item=x,T.Header=I,T.Trigger=R,T.Content=E;export{T as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import i,{createContext as t,useRef as n,useId as a,useContext as o,useCallback as r,isValidElement as s,cloneElement as l}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c}from"./index-6If6D2Zi.js";import{u as m}from"./index-wRElCyvx.js";import{R as u}from"./index-hAp0hL9w.js";import{P as f,m as h,c as p}from"./index-98jQ1vTr.js";import{C}from"./index-DTYJVF-V.js";import{B as b}from"./index-BOy86lYu.js";const g=t({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),v="Accordion",I=i.forwardRef((({children:i,orientation:t="vertical",disableTabIndexing:a=!1,asChild:o,transitionDuration:r=0,transitionTimingFunction:s="linear",customRootClass:l,disabled:h=!1,loop:p=!0,openMultiple:C=!1,type:b,collapsible:I=!1,value:N,defaultValue:x=[],onValueChange:R,dir:T,...j},y)=>{const A=n(null),M=c(l,v),$="multiple"===b||"single"!==b&&C,w=!!$||I,D=void 0!==N?$?N:N.length>0?[N[0]]:[]:void 0,F=$?x:x.length>0?[x[0]]:[],[V,P]=m(D,F,R),H="rtl"===T?"rtl":"ltr";return e(g.Provider,{value:{rootClass:M,activeItems:V,setActiveItems:P,accordionRef:A,transitionDuration:r,transitionTimingFunction:s,openMultiple:$,collapsible:w,disabled:h,orientation:t},children:e(u.Root,{orientation:t,loop:p,disableTabIndexing:a,dir:H,children:e(u.Group,{children:e(f.div,{className:d(`${M}-root`),dir:T,"data-orientation":t,ref:e=>{const i=e;A.current=i,"function"==typeof y?y(i):y&&(y.current=i)},asChild:o,...j,children:i})})})})}));I.displayName=v;const N=t({itemValue:"",disabled:!1,headerId:""});function x(...e){return i=>{e.forEach((e=>{e&&("function"==typeof e?e(i):e.current=i)}))}}const R=i.forwardRef((({children:t,value:n,className:s="",disabled:l=!1,asChild:c=!1,...m},u)=>{const h=i.useRef(null),p=a(),b=n??p,v=a(),{rootClass:I,activeItems:R,setActiveItems:T,transitionDuration:j,transitionTimingFunction:y,openMultiple:A,collapsible:M,disabled:$,orientation:w}=o(g),D=l||$,F=R.includes(b),V=r((e=>{D||T(A?i=>e?i.includes(b)?i:[...i,b]:i.filter((e=>e!==b)):e?[b]:e=>!M&&e.includes(b)&&1===e.length?e:[])}),[D,A,b,T,M]);return e(N.Provider,{value:{itemValue:b,disabled:D,headerId:v},children:e(C.Root,{open:F,onOpenChange:V,disabled:D,transitionDuration:j,transitionTimingFunction:y,asChild:!0,children:e(f.div,{ref:x(h,u),className:d(`${I}-item`,s),"data-state":F?"open":"closed","data-disabled":D?"":void 0,"data-orientation":w,asChild:c,...m,children:t})})})}));R.displayName="AccordionItem";const T=i.forwardRef((({children:i,className:t="",asChild:n=!1,...a},r)=>{const{rootClass:c,orientation:m}=o(g),u=d(`${c}-header`,t);if(n&&s(i)){const e=i,t=h({className:u,"data-orientation":m},e.props);return l(e,{...t,ref:p(r,e.ref)})}return e("h3",{ref:r,className:u,"data-orientation":m,...a,children:i})}));T.displayName="AccordionHeader";const j=i.forwardRef((({children:i,className:t="",asChild:n=!1,id:a,...r},s)=>{const{rootClass:l,activeItems:c,orientation:m}=o(g),{itemValue:f,disabled:h,headerId:p}=o(N);return e(u.Item,{domId:a??p,children:e(C.Trigger,{disabled:h,asChild:!0,children:e(b,{className:d(`${l}-trigger`,t),ref:s,"aria-disabled":h,"aria-expanded":c.includes(f),"data-orientation":m,asChild:n,...r,children:i})})})}));j.displayName="AccordionTrigger";const y=i.forwardRef((({children:i,index:t,className:n="",forceMount:a,asChild:r=!1,...s},l)=>{const{rootClass:c,orientation:m}=o(g),{headerId:u}=o(N);return e(C.Content,{ref:l,asChild:r,forceMount:a,className:d(`${c}-content`,n),role:"region","aria-labelledby":u,"data-orientation":m,...s,children:r?i:e("div",{className:`${c}-content-inner`,children:i})})}));y.displayName="AccordionContent";const A=Object.assign(I,{Root:I,Item:R,Header:T,Trigger:j,Content:y});export{A as default};
@@ -1,6 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default from 'react';
3
3
  import DialogPrimitive from '~/core/primitives/Dialog';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
  import Primitive from '~/core/primitives/Primitive';
5
6
 
6
7
  type DialogPrimitiveActionProps = {
@@ -15,15 +16,9 @@ type DialogPrimitiveCancelProps = {
15
16
  className?: string;
16
17
  };
17
18
 
18
- type DialogPrimitiveContentProps = {
19
- children: React__default.ReactNode;
19
+ type DialogPrimitiveFooterProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Footer>;
20
+ type AlertDialogFooterProps = DialogPrimitiveFooterProps & {
20
21
  className?: string;
21
- asChild?: boolean;
22
- forceMount?: boolean;
23
- role?: string;
24
- 'aria-modal'?: boolean;
25
- 'aria-labelledby'?: string;
26
- 'aria-describedby'?: string;
27
22
  };
28
23
 
29
24
  type DialogPrimitiveRootProps$1 = {
@@ -57,6 +52,13 @@ type AlertDialogPortalProps = DialogPrimitivePortalProps & {
57
52
  keepMounted?: boolean;
58
53
  };
59
54
 
55
+ type DialogPrimitiveContentProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
56
+ type AlertDialogContentProps = DialogPrimitiveContentProps & {
57
+ className?: string;
58
+ asChild?: boolean;
59
+ forceMount?: boolean;
60
+ };
61
+
60
62
  type PrimitiveH2Props = React__default.ComponentPropsWithoutRef<typeof Primitive.h2>;
61
63
  type AlertDialogTitleProps = PrimitiveH2Props & {
62
64
  className?: string;
@@ -94,16 +96,13 @@ declare const AlertDialog: {
94
96
  children?: React.ReactNode;
95
97
  } & React$1.RefAttributes<HTMLDivElement>>;
96
98
  Portal: {
97
- ({ children, ...props }: AlertDialogPortalProps): React$1.JSX.Element;
99
+ ({ children, ...props }: AlertDialogPortalProps): react_jsx_runtime.JSX.Element;
98
100
  displayName: string;
99
101
  };
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>>;
102
+ Content: React$1.ForwardRefExoticComponent<AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
105
103
  Title: React$1.ForwardRefExoticComponent<AlertDialogTitleProps & React$1.RefAttributes<HTMLElement>>;
106
104
  Description: React$1.ForwardRefExoticComponent<AlertDialogDescriptionProps & React$1.RefAttributes<HTMLElement>>;
105
+ Footer: React$1.ForwardRefExoticComponent<AlertDialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
107
106
  Cancel: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
108
107
  className?: string;
109
108
  } & React$1.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- 'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.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-BtoPzkH9.js";import{F as v}from"./index-Di6TooPD.js";import{P as p}from"./index-Dc5Cm9z0.js";import"./index-DnCiOYxZ.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],E=A[1],b=o(void 0),j=b[0],x=b[1],T=o(void 0),M={rootClass:y,isOpen:O,setIsOpen:E,titleId:j,descriptionId:T[0],setTitleId:x,setDescriptionId:T[1]};return t.createElement(u.Root,a({open:O,onOpenChange:E,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),E=n(I);return s((function(){E.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){E.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 E=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),E=n(I);return s((function(){E.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){E.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)}));E.displayName="AlertDialogDescription";var b=function(){return console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null};b.Root=C,b.Trigger=g,b.Overlay=I,b.Portal=D,b.Content=N,b.Title=O,b.Description=E,b.Cancel=y,b.Action=A;export{b as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as a,useRef as o,useEffect as i}from"react";import{c as l}from"./index-6If6D2Zi.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-CTJl2pTM.js";import{F as m}from"./index-yqRHPukT.js";import{P as p}from"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./ThemeContext-Sm-iNANd.js";import"./floating-ui.react-DMgxgTKq.js";import"react-dom";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),C="AlertDialog",u=r((({children:s,className:r="",customRootClass:a="",defaultOpen:o=!1,open:i,onOpenChange:m,...p},u)=>{const N=l(a,C),[f,g]=c(i,o,m),[D,I]=t(void 0),[y,A]=t(void 0),v={rootClass:N,isOpen:f,setIsOpen:g,titleId:D,descriptionId:y,setTitleId:I,setDescriptionId:A};return e(d.Root,{open:f,onOpenChange:g,className:n(N,r),...p,children:e(h.Provider,{value:v,children:e("div",{ref:u,className:n(N,r),children:s})})})}));u.displayName=C;const N=r((({children:s,className:r="",asChild:t=!1,forceMount:o=!1,...i},l)=>{const{rootClass:c,titleId:m,descriptionId:p}=a(h);return e(d.Content,{ref:l,className:n(`${c}-content`,r),asChild:t,forceMount:o,role:"alertdialog","aria-modal":!0,"aria-labelledby":m,"aria-describedby":p,...i,children:s})}));N.displayName="AlertDialogContent";const f=r((({children:s,asChild:r,className:t="",disabled:o=!1,...i},l)=>{const{rootClass:c,isOpen:m}=a(h),p=m?"open":"closed",C=o?"":void 0;return e(d.Trigger,{ref:l,className:n(`${c}-trigger`,t),asChild:r,disabled:o,"data-state":p,"data-disabled":C,...i,children:s})}));f.displayName="AlertDialogTrigger";const g=({children:s,...r})=>e(d.Portal,{...r,children:s});g.displayName="AlertDialogPortal";const D=r((({className:s="",asChild:r=!1,forceMount:t=!1,children:o,...i},l)=>{const{rootClass:c}=a(h);return e(d.Overlay,{ref:l,className:n(`${c}-overlay`,s),asChild:r,forceMount:t,...i,children:o})}));D.displayName="AlertDialogOverlay";const I=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Cancel,{ref:i,className:`${l}-cancel ${t}`,asChild:r,...o,children:s})}));I.displayName="AlertDialogCancel";const y=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Action,{ref:i,className:`${l}-action ${t}`,asChild:r,...o,children:s})}));y.displayName="AlertDialogAction";const A=r((({children:s,className:r="",...t},o)=>{const{rootClass:i}=a(h);return e(d.Footer,{ref:o,className:n(`${i}-footer`,r),...t,children:s})}));A.displayName="AlertDialogFooter";const v=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setTitleId:C,titleId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.h2,{ref:c,id:f,className:`${d}-title ${r}`,asChild:t,...n,children:s})}));v.displayName="AlertDialogTitle";const $=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setDescriptionId:C,descriptionId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.p,{ref:c,id:f,className:`${d}-description ${r}`,asChild:t,...n,children:s})}));$.displayName="AlertDialogDescription";const O=()=>(console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null);O.Root=u,O.Trigger=f,O.Overlay=D,O.Portal=g,O.Content=N,O.Title=v,O.Description=$,O.Footer=A,O.Cancel=I,O.Action=y;export{O as default};
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as s}from"./tslib.es6-BtVxab8e.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};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as t}from"./index-6If6D2Zi.js";import{c as a}from"./clsx-BaVHROc5.js";const e="AspectRatio",o=s.forwardRef((({children:s,customRootClass:o,className:m,ratio:c="1",...i},d)=>{isNaN(Number(c))&&!c.match(/^(\d+)\/(\d+)$/)&&(c="1"),Number(c)<=0&&(c="1");const l=t(o,e);return r("div",{ref:d,style:{aspectRatio:c},className:a(l,m),...i,children:s})}));o.displayName=e;export{o as default};
@@ -1,10 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
4
3
  import AvatarPrimitiveRoot from '~/core/primitives/Avatar/fragments/AvatarPrimitiveRoot';
5
4
  import AvatarPrimitiveImage from '~/core/primitives/Avatar/fragments/AvatarPrimitiveImage';
6
-
7
- type AvatarFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
5
+ import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
8
6
 
9
7
  type AvatarRootProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveRoot> & {
10
8
  customRootClass?: string;
@@ -16,6 +14,8 @@ type AvatarRootProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrim
16
14
 
17
15
  type AvatarImageProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveImage>;
18
16
 
17
+ type AvatarFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
18
+
19
19
  declare const Avatar: {
20
20
  (): null;
21
21
  displayName: string;
@@ -29,3 +29,4 @@ declare namespace AvatarProps {
29
29
  }
30
30
 
31
31
  export { AvatarProps, Avatar as default };
32
+ export type { AvatarFallbackProps, AvatarImageProps, AvatarRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as r}from"./tslib.es6-BtVxab8e.js";import e,{createContext as s,useContext as o}from"react";import{A as t,a as l,b as i}from"./AvatarPrimitiveFallback-BV0bK5Qg.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-Bf4LVEjJ.js";import"./index-Dc5Cm9z0.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};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as o}from"react";import{A as t,a as e,b as l}from"./AvatarPrimitiveFallback-KiY3slgV.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-6If6D2Zi.js";import{c as m,a as n,b as d}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const f=s({size:"",variant:"",color:"",rootClass:""}),v="Avatar",p=r.forwardRef((({children:r,customRootClass:s="",className:o="",size:e="",variant:l="",color:p="",...u},A)=>{const N=i(s,v),b=m("avatar",{variant:l,size:e}),j=d(p),x=n(b,j);return a(f.Provider,{value:{size:e,variant:l,color:p,rootClass:N},children:a(t,{ref:A,className:c(N,o),...x,...u,children:r})})}));p.displayName=v;const u=r.forwardRef((({src:r="",alt:s="",...t},l)=>{const{rootClass:i}=o(f);return a(e,{ref:l,className:c(`${i}-image`),src:r,alt:s,...t})}));u.displayName="AvatarImage";const A=r.forwardRef((({children:r,className:s="",...t},e)=>{const{rootClass:i}=o(f);return a(l,{ref:e,className:c(`${i}-fallback`,s),...t,children:r})}));A.displayName="AvatarFallback";const N=()=>(console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null);N.displayName="Avatar",N.Root=p,N.Image=u,N.Fallback=A;export{N as default};
@@ -43,3 +43,4 @@ declare namespace AvatarGroupProps {
43
43
  }
44
44
 
45
45
  export { AvatarGroupProps, AvatarGroup as default };
46
+ export type { AvatarGroupAvatarProps, AvatarGroupFallbackProps, AvatarGroupItemProps, AvatarGroupRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as r}from"./tslib.es6-BtVxab8e.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-Bf4LVEjJ.js";import{A as m,a as v,b as d}from"./AvatarPrimitiveFallback-BV0bK5Qg.js";import"./index-Dc5Cm9z0.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,G=t.className,b=void 0===G?"":G,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,b)},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),G=c(N());return e.createElement(m,r({ref:l,className:o("".concat(A,"-item"),f)},G(),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 G=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)}));G.displayName="AvatarGroupFallback";var b=function(){return console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null};b.Root=p,b.Item=A,b.Avatar=N,b.Fallback=G;export{b as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as e}from"./index-6If6D2Zi.js";import{c as l,a as c,b as i}from"./index-3dZuI04X.js";import{A as n,a as m,b as d}from"./AvatarPrimitiveFallback-KiY3slgV.js";import"./index-98jQ1vTr.js";const p=s({rootClass:"",size:"",variant:""}),v="AvatarGroup",f=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:i,className:n="",...m},d)=>{const f=e(r,v),u=l("avatar",{variant:t,size:s}),A=c(u);return a(p.Provider,{value:{size:s,variant:t,rootClass:f},children:a("div",{ref:d,className:o(f,n),...A,...m,children:i})})}));f.displayName=v;const u=r.forwardRef((({color:r="",children:s,className:e,...l},m)=>{const{rootClass:d}=t(p),v=i(r),f=c(v);return a(n,{ref:m,className:o(`${d}-item`,e),...f,...l,children:s})}));u.displayName="AvatarGroupItem";const A=r.forwardRef((({src:r,alt:s,...t},o)=>a(m,{ref:o,src:r,alt:s,...t})));A.displayName="AvatarGroupAvatar";const N=r.forwardRef((({children:r,className:s,...e},l)=>{const{rootClass:c}=t(p);return a(d,{ref:l,className:o(`${c}-fallback`,s),...e,children:r})}));N.displayName="AvatarGroupFallback";const G=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);G.Root=f,G.Item=u,G.Avatar=A,G.Fallback=N;export{G as default};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useState as i,useMemo as s,useContext as o,useEffect as n}from"react";import{P as t}from"./index-98jQ1vTr.js";const d=e({}),l=a.forwardRef((({children:e,asChild:o=!1,...n},l)=>{const[m,c]=i(!1),[h,p]=i(!1),f=s((()=>{if(!e)return!1;const r=e=>{if(a.isValidElement(e)){if("img"===e.type&&e.props?.src)return!0;if(e.props?.src)return!0;if(e.props?.children)return a.Children.toArray(e.props.children).some(r)}return!1};return a.Children.toArray(e).some(r)}),[e]),u={isImageLoaded:m,hasError:h,setHasError:p,handleLoadImage:()=>{c(!0),p(!1)},handleErrorImage:()=>{c(!1),p(!0)}};return r(d.Provider,{value:u,children:r(t.span,{ref:l,asChild:o,"data-rad-ui-has-image":f?"":void 0,...n,children:e})})}));l.displayName="AvatarPrimitiveRoot";const m=a.forwardRef((({src:a="",alt:e="",...i},s)=>{const{handleErrorImage:l,handleLoadImage:m,hasError:c}=o(d);return c?null:(n((()=>{a||l()}),[a,l,c]),r(t.img,{ref:s,src:a,alt:e,onError:l,onLoad:m,...i}))}));m.displayName="AvatarPrimitiveImage";const c=a.forwardRef((({children:a,asChild:e=!1,className:i="",...s},n)=>{const{isImageLoaded:l}=o(d);return l?null:r(t.span,{ref:n,asChild:e,className:i,...s,children:a})}));c.displayName="AvatarPrimitiveFallback";export{l as A,m as a,c as b};
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
 
3
+ type BadgeVariant = 'solid' | 'soft' | 'surface' | 'outline' | 'ghost';
4
+ type BadgeSize = 'small' | 'medium' | 'large' | 'x-large';
3
5
  type BadgeProps = React.ComponentPropsWithoutRef<'div'> & {
4
6
  customRootClass?: string;
5
- variant?: string;
6
- size?: string;
7
+ variant?: BadgeVariant;
8
+ size?: BadgeSize;
7
9
  color?: string;
8
10
  };
9
11
  declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
12
  customRootClass?: string;
11
- variant?: string;
12
- size?: string;
13
+ variant?: BadgeVariant;
14
+ size?: BadgeSize;
13
15
  color?: string;
14
16
  } & React.RefAttributes<HTMLDivElement>>;
15
17
 
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as s}from"./tslib.es6-BtVxab8e.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-Bf4LVEjJ.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,j=c.color,x=void 0===j?"":j,N=c.variant,b=void 0===N?"":N,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:b,size:R}),w=t(x),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};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./index-6If6D2Zi.js";import{c as e}from"./clsx-BaVHROc5.js";import{c as o,a as i,b as m}from"./index-3dZuI04X.js";const t="Badge",c=r.forwardRef((({children:r,customRootClass:c="",className:d="",color:l="",variant:n="solid",size:f="medium",...p},u)=>{const x=s(c,t),j=o("badge",{variant:n,size:f}),v=m(l),N=i(j,v);return a("div",{ref:u,className:e(x,d),...N,...p,children:r})}));c.displayName=t;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.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=a(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",o({ref:i,className:s(q,u)},j,x),l)}));c.displayName=e;export{c as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as t}from"./index-6If6D2Zi.js";const e="BlockQuote",c=a.forwardRef((({children:a,customRootClass:c="",className:s="",color:i="",variant:l="",size:m="",...d},n)=>{const u=t(c,e),f={};return l&&(f["data-block-quote-variant"]=l),m&&(f["data-block-quote-size"]=m),i&&(f["data-rad-ui-accent-color"]=i),o("blockquote",{ref:n,className:r(u,s),...d,...f,children:a})}));c.displayName=e;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{_ as o,a}from"./tslib.es6-BtVxab8e.js";import i,{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-DnCiOYxZ.js";import{u as d,a as n,b as l}from"./index-Bf4LVEjJ.js";import"./index-Dc5Cm9z0.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 i.createElement(r,a({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};
1
+ 'use client';import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as s}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BOy86lYu.js";import{c as i,a as e,b as n}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const d="Button",m=o((({children:o,type:m="button",customRootClass:c="",className:l="",variant:p="",size:f="",color:u="",disabled:x=!1,onClick:b,...j},v)=>{const y=a(c,d),C=i("button",{variant:p,size:f}),N=n(u),h=e(C,N);return t(r,{ref:v,type:m,disabled:x,"data-disabled":x?"":void 0,className:s(y,l),...h,onClick:t=>{if(x)return t.preventDefault(),void t.stopPropagation();b?.(t)},...j,children:o})}));m.displayName=d;export{m as default};