@plumeria/headlessui 14.2.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![License](https://img.shields.io/badge/License-MIT-10B981)
4
4
  ![npm](https://img.shields.io/npm/v/@plumeria/headlessui?&color=10B981)
5
5
 
6
- Accessible UI component wrappers built on [Radix UI](https://www.radix-ui.com/) primitives, designed to work seamlessly with Plumeria's `styleName` abstraction layer.
6
+ A curated set of essential headless primitives, built on [Radix UI](https://www.radix-ui.com/) and designed to work seamlessly with Plumeria's `styleName` abstraction layer.
7
7
 
8
8
  Each component is a pure passthrough — it forwards refs and spreads props onto the underlying Radix primitive. `styleName` is compiled to `className`/`style` at the call site before the component runs, so no Plumeria-specific logic is needed inside the components.
9
9
 
@@ -23,13 +23,7 @@ pnpm i @plumeria/headlessui
23
23
 
24
24
  ```tsx
25
25
  import * as css from '@plumeria/core';
26
- import {
27
- Accordion,
28
- AccordionItem,
29
- AccordionHeader,
30
- AccordionTrigger,
31
- AccordionContent,
32
- } from '@plumeria/headlessui';
26
+ import { Accordion } from '@plumeria/headlessui';
33
27
 
34
28
  const styles = css.create({
35
29
  root: {
@@ -59,30 +53,205 @@ const styles = css.create({
59
53
 
60
54
  export const FAQ = () => (
61
55
  <Accordion type="single" collapsible styleName={styles.root}>
62
- <AccordionItem value="item-1">
63
- <AccordionHeader>
64
- <AccordionTrigger styleName={styles.trigger}>
56
+ <Accordion.Item value="item-1">
57
+ <Accordion.Header>
58
+ <Accordion.Trigger styleName={styles.trigger}>
65
59
  Is it accessible?
66
- </AccordionTrigger>
67
- </AccordionHeader>
68
- <AccordionContent styleName={styles.content}>
60
+ </Accordion.Trigger>
61
+ </Accordion.Header>
62
+ <Accordion.Content styleName={styles.content}>
69
63
  Yes. It adheres to the WAI-ARIA design pattern.
70
- </AccordionContent>
71
- </AccordionItem>
64
+ </Accordion.Content>
65
+ </Accordion.Item>
72
66
  </Accordion>
73
67
  );
74
68
  ```
75
69
 
76
70
  ## Components
77
71
 
78
- | Component group | Primitives |
79
- |---|---|
80
- | **Dialog** | Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose |
81
- | **Popover** | Popover, PopoverTrigger, PopoverPortal, PopoverContent, PopoverClose, PopoverArrow, PopoverAnchor |
82
- | **Tooltip** | TooltipProvider, Tooltip, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow |
83
- | **Accordion** | Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent |
84
- | **Tabs** | Tabs, TabsList, TabsTrigger, TabsContent |
85
- | **Collapsible** | Collapsible, CollapsibleTrigger, CollapsibleContent |
72
+ The following twenty component groups are exported. All components support `ref` forwarding and props spread.
73
+
74
+ ### Accordion
75
+
76
+ - `Item`
77
+ - `Header`
78
+ - `Trigger`
79
+ - `Content`
80
+
81
+ ### AlertDialog
82
+
83
+ - `Trigger`
84
+ - `Portal`
85
+ - `Overlay`
86
+ - `Content`
87
+ - `Title`
88
+ - `Description`
89
+ - `Action`
90
+ - `Cancel`
91
+
92
+ ### Checkbox
93
+
94
+ - `Indicator`
95
+
96
+ ### Collapsible
97
+
98
+ - `Trigger`
99
+ - `Content`
100
+
101
+ ### ContextMenu
102
+
103
+ - `Trigger`
104
+ - `Portal`
105
+ - `Content`
106
+ - `Group`
107
+ - `Label`
108
+ - `Item`
109
+ - `CheckboxItem`
110
+ - `RadioGroup`
111
+ - `RadioItem`
112
+ - `ItemIndicator`
113
+ - `Separator`
114
+ - `Arrow`
115
+ - `Sub`
116
+ - `SubTrigger`
117
+ - `SubContent`
118
+
119
+ ### Dialog
120
+
121
+ - `Trigger`
122
+ - `Portal`
123
+ - `Overlay`
124
+ - `Content`
125
+ - `Title`
126
+ - `Description`
127
+ - `Close`
128
+
129
+ ### DropdownMenu
130
+
131
+ - `Trigger`
132
+ - `Portal`
133
+ - `Content`
134
+ - `Group`
135
+ - `Label`
136
+ - `Item`
137
+ - `CheckboxItem`
138
+ - `RadioGroup`
139
+ - `RadioItem`
140
+ - `ItemIndicator`
141
+ - `Separator`
142
+ - `Arrow`
143
+ - `Sub`
144
+ - `SubTrigger`
145
+ - `SubContent`
146
+
147
+ ### Menubar
148
+
149
+ - `Menu`
150
+ - `Trigger`
151
+ - `Portal`
152
+ - `Content`
153
+ - `Group`
154
+ - `Label`
155
+ - `Item`
156
+ - `CheckboxItem`
157
+ - `RadioGroup`
158
+ - `RadioItem`
159
+ - `ItemIndicator`
160
+ - `Separator`
161
+ - `Arrow`
162
+ - `Sub`
163
+ - `SubTrigger`
164
+ - `SubContent`
165
+
166
+ ### NavigationMenu
167
+
168
+ - `Sub`
169
+ - `List`
170
+ - `Item`
171
+ - `Trigger`
172
+ - `Link`
173
+ - `Indicator`
174
+ - `Content`
175
+ - `Viewport`
176
+
177
+ ### Popover
178
+
179
+ - `Trigger`
180
+ - `Portal`
181
+ - `Content`
182
+ - `Close`
183
+ - `Arrow`
184
+ - `Anchor`
185
+
186
+ ### RadioGroup
187
+
188
+ - `Item`
189
+ - `Indicator`
190
+
191
+ ### ScrollArea
192
+
193
+ - `Viewport`
194
+ - `Scrollbar`
195
+ - `Thumb`
196
+ - `Corner`
197
+
198
+ ### Select
199
+
200
+ - `Trigger`
201
+ - `Value`
202
+ - `Icon`
203
+ - `Portal`
204
+ - `Content`
205
+ - `Viewport`
206
+ - `Group`
207
+ - `Label`
208
+ - `Item`
209
+ - `ItemText`
210
+ - `ItemIndicator`
211
+ - `ScrollUpButton`
212
+ - `ScrollDownButton`
213
+ - `Separator`
214
+ - `Arrow`
215
+
216
+ ### Slider
217
+
218
+ - `Track`
219
+ - `Range`
220
+ - `Thumb`
221
+
222
+ ### Switch
223
+
224
+ - `Thumb`
225
+
226
+ ### Tabs
227
+
228
+ - `List`
229
+ - `Trigger`
230
+ - `Content`
231
+
232
+ ### Toast
233
+
234
+ - `Provider`
235
+ - `Viewport`
236
+ - `Title`
237
+ - `Description`
238
+ - `Action`
239
+ - `Close`
240
+
241
+ ### Toggle
242
+
243
+
244
+ ### ToggleGroup
245
+
246
+ - `Item`
247
+
248
+ ### Tooltip
249
+
250
+ - `Provider`
251
+ - `Trigger`
252
+ - `Portal`
253
+ - `Content`
254
+ - `Arrow`
86
255
 
87
256
  ## License
88
257
 
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- export declare const Accordion: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
4
- export declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- export declare const AccordionHeader: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
6
- export declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- export declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const Accordion: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>> & {
4
+ Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ Header: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
6
+ Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ };
package/dist/Accordion.js CHANGED
@@ -1,23 +1,29 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
- export const Accordion = React.forwardRef((props, ref) => {
4
+ const AccordionRoot = React.forwardRef((props, ref) => {
5
5
  return _jsx(AccordionPrimitive.Root, { ref: ref, ...props });
6
6
  });
7
- Accordion.displayName = 'Accordion';
8
- export const AccordionItem = React.forwardRef((props, ref) => {
7
+ AccordionRoot.displayName = 'Accordion';
8
+ const AccordionItem = React.forwardRef((props, ref) => {
9
9
  return _jsx(AccordionPrimitive.Item, { ref: ref, ...props });
10
10
  });
11
11
  AccordionItem.displayName = 'AccordionItem';
12
- export const AccordionHeader = React.forwardRef((props, ref) => {
12
+ const AccordionHeader = React.forwardRef((props, ref) => {
13
13
  return _jsx(AccordionPrimitive.Header, { ref: ref, ...props });
14
14
  });
15
15
  AccordionHeader.displayName = 'AccordionHeader';
16
- export const AccordionTrigger = React.forwardRef((props, ref) => {
16
+ const AccordionTrigger = React.forwardRef((props, ref) => {
17
17
  return _jsx(AccordionPrimitive.Trigger, { ref: ref, ...props });
18
18
  });
19
19
  AccordionTrigger.displayName = 'AccordionTrigger';
20
- export const AccordionContent = React.forwardRef((props, ref) => {
20
+ const AccordionContent = React.forwardRef((props, ref) => {
21
21
  return _jsx(AccordionPrimitive.Content, { ref: ref, ...props });
22
22
  });
23
23
  AccordionContent.displayName = 'AccordionContent';
24
+ export const Accordion = Object.assign(AccordionRoot, {
25
+ Item: AccordionItem,
26
+ Header: AccordionHeader,
27
+ Trigger: AccordionTrigger,
28
+ Content: AccordionContent,
29
+ });
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ export declare const AlertDialog: {
4
+ (props: AlertDialogPrimitive.AlertDialogProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ } & {
7
+ Trigger: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ Portal: {
9
+ (props: AlertDialogPrimitive.AlertDialogPortalProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ Overlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ Content: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ Title: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
15
+ Description: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
16
+ Action: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ Cancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ };
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
4
+ const AlertDialogRoot = (props) => {
5
+ return _jsx(AlertDialogPrimitive.Root, { ...props });
6
+ };
7
+ AlertDialogRoot.displayName = 'AlertDialog';
8
+ const AlertDialogTrigger = React.forwardRef((props, ref) => {
9
+ return _jsx(AlertDialogPrimitive.Trigger, { ref: ref, ...props });
10
+ });
11
+ AlertDialogTrigger.displayName = 'AlertDialogTrigger';
12
+ const AlertDialogPortal = (props) => {
13
+ return _jsx(AlertDialogPrimitive.Portal, { ...props });
14
+ };
15
+ AlertDialogPortal.displayName = 'AlertDialogPortal';
16
+ const AlertDialogOverlay = React.forwardRef((props, ref) => {
17
+ return _jsx(AlertDialogPrimitive.Overlay, { ref: ref, ...props });
18
+ });
19
+ AlertDialogOverlay.displayName = 'AlertDialogOverlay';
20
+ const AlertDialogContent = React.forwardRef((props, ref) => {
21
+ return _jsx(AlertDialogPrimitive.Content, { ref: ref, ...props });
22
+ });
23
+ AlertDialogContent.displayName = 'AlertDialogContent';
24
+ const AlertDialogTitle = React.forwardRef((props, ref) => {
25
+ return _jsx(AlertDialogPrimitive.Title, { ref: ref, ...props });
26
+ });
27
+ AlertDialogTitle.displayName = 'AlertDialogTitle';
28
+ const AlertDialogDescription = React.forwardRef((props, ref) => {
29
+ return _jsx(AlertDialogPrimitive.Description, { ref: ref, ...props });
30
+ });
31
+ AlertDialogDescription.displayName = 'AlertDialogDescription';
32
+ const AlertDialogAction = React.forwardRef((props, ref) => {
33
+ return _jsx(AlertDialogPrimitive.Action, { ref: ref, ...props });
34
+ });
35
+ AlertDialogAction.displayName = 'AlertDialogAction';
36
+ const AlertDialogCancel = React.forwardRef((props, ref) => {
37
+ return _jsx(AlertDialogPrimitive.Cancel, { ref: ref, ...props });
38
+ });
39
+ AlertDialogCancel.displayName = 'AlertDialogCancel';
40
+ export const AlertDialog = Object.assign(AlertDialogRoot, {
41
+ Trigger: AlertDialogTrigger,
42
+ Portal: AlertDialogPortal,
43
+ Overlay: AlertDialogOverlay,
44
+ Content: AlertDialogContent,
45
+ Title: AlertDialogTitle,
46
+ Description: AlertDialogDescription,
47
+ Action: AlertDialogAction,
48
+ Cancel: AlertDialogCancel,
49
+ });
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
4
+ Indicator: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
+ const CheckboxRoot = React.forwardRef((props, ref) => {
5
+ return _jsx(CheckboxPrimitive.Root, { ref: ref, ...props });
6
+ });
7
+ CheckboxRoot.displayName = 'Checkbox';
8
+ const CheckboxIndicator = React.forwardRef((props, ref) => {
9
+ return _jsx(CheckboxPrimitive.Indicator, { ref: ref, ...props });
10
+ });
11
+ CheckboxIndicator.displayName = 'CheckboxIndicator';
12
+ export const Checkbox = Object.assign(CheckboxRoot, {
13
+ Indicator: CheckboxIndicator,
14
+ });
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
3
- export declare const Collapsible: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
- export declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const Collapsible: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
4
+ Trigger: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ Content: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ };
@@ -1,15 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
4
- export const Collapsible = React.forwardRef((props, ref) => {
4
+ const CollapsibleRoot = React.forwardRef((props, ref) => {
5
5
  return _jsx(CollapsiblePrimitive.Root, { ref: ref, ...props });
6
6
  });
7
- Collapsible.displayName = 'Collapsible';
8
- export const CollapsibleTrigger = React.forwardRef((props, ref) => {
7
+ CollapsibleRoot.displayName = 'Collapsible';
8
+ const CollapsibleTrigger = React.forwardRef((props, ref) => {
9
9
  return _jsx(CollapsiblePrimitive.Trigger, { ref: ref, ...props });
10
10
  });
11
11
  CollapsibleTrigger.displayName = 'CollapsibleTrigger';
12
- export const CollapsibleContent = React.forwardRef((props, ref) => {
12
+ const CollapsibleContent = React.forwardRef((props, ref) => {
13
13
  return _jsx(CollapsiblePrimitive.Content, { ref: ref, ...props });
14
14
  });
15
15
  CollapsibleContent.displayName = 'CollapsibleContent';
16
+ export const Collapsible = Object.assign(CollapsibleRoot, {
17
+ Trigger: CollapsibleTrigger,
18
+ Content: CollapsibleContent,
19
+ });
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import type { StyleName } from '@plumeria/core';
3
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
4
+ export declare const ContextMenu: {
5
+ (props: ContextMenuPrimitive.ContextMenuProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ } & {
8
+ Trigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ Portal: {
10
+ (props: ContextMenuPrimitive.ContextMenuPortalProps): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ Content: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ Group: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ Label: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ Item: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ CheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ RadioGroup: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ RadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ ItemIndicator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
21
+ Separator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ Arrow: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & {
23
+ styleName?: StyleName;
24
+ } & React.RefAttributes<SVGSVGElement>>;
25
+ Sub: {
26
+ (props: ContextMenuPrimitive.ContextMenuSubProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ };
29
+ SubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
+ SubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
+ };
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
4
+ const ContextMenuRoot = (props) => {
5
+ return _jsx(ContextMenuPrimitive.Root, { ...props });
6
+ };
7
+ ContextMenuRoot.displayName = 'ContextMenu';
8
+ const ContextMenuTrigger = React.forwardRef((props, ref) => {
9
+ return _jsx(ContextMenuPrimitive.Trigger, { ref: ref, ...props });
10
+ });
11
+ ContextMenuTrigger.displayName = 'ContextMenuTrigger';
12
+ const ContextMenuPortal = (props) => {
13
+ return _jsx(ContextMenuPrimitive.Portal, { ...props });
14
+ };
15
+ ContextMenuPortal.displayName = 'ContextMenuPortal';
16
+ const ContextMenuContent = React.forwardRef((props, ref) => {
17
+ return _jsx(ContextMenuPrimitive.Content, { ref: ref, ...props });
18
+ });
19
+ ContextMenuContent.displayName = 'ContextMenuContent';
20
+ const ContextMenuGroup = React.forwardRef((props, ref) => {
21
+ return _jsx(ContextMenuPrimitive.Group, { ref: ref, ...props });
22
+ });
23
+ ContextMenuGroup.displayName = 'ContextMenuGroup';
24
+ const ContextMenuLabel = React.forwardRef((props, ref) => {
25
+ return _jsx(ContextMenuPrimitive.Label, { ref: ref, ...props });
26
+ });
27
+ ContextMenuLabel.displayName = 'ContextMenuLabel';
28
+ const ContextMenuItem = React.forwardRef((props, ref) => {
29
+ return _jsx(ContextMenuPrimitive.Item, { ref: ref, ...props });
30
+ });
31
+ ContextMenuItem.displayName = 'ContextMenuItem';
32
+ const ContextMenuCheckboxItem = React.forwardRef((props, ref) => {
33
+ return _jsx(ContextMenuPrimitive.CheckboxItem, { ref: ref, ...props });
34
+ });
35
+ ContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem';
36
+ const ContextMenuRadioGroup = React.forwardRef((props, ref) => {
37
+ return _jsx(ContextMenuPrimitive.RadioGroup, { ref: ref, ...props });
38
+ });
39
+ ContextMenuRadioGroup.displayName = 'ContextMenuRadioGroup';
40
+ const ContextMenuRadioItem = React.forwardRef((props, ref) => {
41
+ return _jsx(ContextMenuPrimitive.RadioItem, { ref: ref, ...props });
42
+ });
43
+ ContextMenuRadioItem.displayName = 'ContextMenuRadioItem';
44
+ const ContextMenuItemIndicator = React.forwardRef((props, ref) => {
45
+ return _jsx(ContextMenuPrimitive.ItemIndicator, { ref: ref, ...props });
46
+ });
47
+ ContextMenuItemIndicator.displayName = 'ContextMenuItemIndicator';
48
+ const ContextMenuSeparator = React.forwardRef((props, ref) => {
49
+ return _jsx(ContextMenuPrimitive.Separator, { ref: ref, ...props });
50
+ });
51
+ ContextMenuSeparator.displayName = 'ContextMenuSeparator';
52
+ const ContextMenuArrow = React.forwardRef((props, ref) => {
53
+ return _jsx(ContextMenuPrimitive.Arrow, { ref: ref, ...props });
54
+ });
55
+ ContextMenuArrow.displayName = 'ContextMenuArrow';
56
+ const ContextMenuSub = (props) => {
57
+ return _jsx(ContextMenuPrimitive.Sub, { ...props });
58
+ };
59
+ ContextMenuSub.displayName = 'ContextMenuSub';
60
+ const ContextMenuSubTrigger = React.forwardRef((props, ref) => {
61
+ return _jsx(ContextMenuPrimitive.SubTrigger, { ref: ref, ...props });
62
+ });
63
+ ContextMenuSubTrigger.displayName = 'ContextMenuSubTrigger';
64
+ const ContextMenuSubContent = React.forwardRef((props, ref) => {
65
+ return _jsx(ContextMenuPrimitive.SubContent, { ref: ref, ...props });
66
+ });
67
+ ContextMenuSubContent.displayName = 'ContextMenuSubContent';
68
+ export const ContextMenu = Object.assign(ContextMenuRoot, {
69
+ Trigger: ContextMenuTrigger,
70
+ Portal: ContextMenuPortal,
71
+ Content: ContextMenuContent,
72
+ Group: ContextMenuGroup,
73
+ Label: ContextMenuLabel,
74
+ Item: ContextMenuItem,
75
+ CheckboxItem: ContextMenuCheckboxItem,
76
+ RadioGroup: ContextMenuRadioGroup,
77
+ RadioItem: ContextMenuRadioItem,
78
+ ItemIndicator: ContextMenuItemIndicator,
79
+ Separator: ContextMenuSeparator,
80
+ Arrow: ContextMenuArrow,
81
+ Sub: ContextMenuSub,
82
+ SubTrigger: ContextMenuSubTrigger,
83
+ SubContent: ContextMenuSubContent,
84
+ });
package/dist/Dialog.d.ts CHANGED
@@ -3,14 +3,15 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  export declare const Dialog: {
4
4
  (props: DialogPrimitive.DialogProps): import("react/jsx-runtime").JSX.Element;
5
5
  displayName: string;
6
+ } & {
7
+ Trigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ Portal: {
9
+ (props: DialogPrimitive.DialogPortalProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ Title: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
15
+ Description: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
16
+ Close: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
17
  };
7
- export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
- export declare const DialogPortal: {
9
- (props: DialogPrimitive.DialogPortalProps): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
12
- export declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- export declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
15
- export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
16
- export declare const DialogClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
package/dist/Dialog.js CHANGED
@@ -1,35 +1,44 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import * as DialogPrimitive from '@radix-ui/react-dialog';
4
- export const Dialog = (props) => {
4
+ const DialogRoot = (props) => {
5
5
  return _jsx(DialogPrimitive.Root, { ...props });
6
6
  };
7
- Dialog.displayName = 'Dialog';
8
- export const DialogTrigger = React.forwardRef((props, ref) => {
7
+ DialogRoot.displayName = 'Dialog';
8
+ const DialogTrigger = React.forwardRef((props, ref) => {
9
9
  return _jsx(DialogPrimitive.Trigger, { ref: ref, ...props });
10
10
  });
11
11
  DialogTrigger.displayName = 'DialogTrigger';
12
- export const DialogPortal = (props) => {
12
+ const DialogPortal = (props) => {
13
13
  return _jsx(DialogPrimitive.Portal, { ...props });
14
14
  };
15
15
  DialogPortal.displayName = 'DialogPortal';
16
- export const DialogOverlay = React.forwardRef((props, ref) => {
16
+ const DialogOverlay = React.forwardRef((props, ref) => {
17
17
  return _jsx(DialogPrimitive.Overlay, { ref: ref, ...props });
18
18
  });
19
19
  DialogOverlay.displayName = 'DialogOverlay';
20
- export const DialogContent = React.forwardRef((props, ref) => {
20
+ const DialogContent = React.forwardRef((props, ref) => {
21
21
  return _jsx(DialogPrimitive.Content, { ref: ref, ...props });
22
22
  });
23
23
  DialogContent.displayName = 'DialogContent';
24
- export const DialogTitle = React.forwardRef((props, ref) => {
24
+ const DialogTitle = React.forwardRef((props, ref) => {
25
25
  return _jsx(DialogPrimitive.Title, { ref: ref, ...props });
26
26
  });
27
27
  DialogTitle.displayName = 'DialogTitle';
28
- export const DialogDescription = React.forwardRef((props, ref) => {
28
+ const DialogDescription = React.forwardRef((props, ref) => {
29
29
  return _jsx(DialogPrimitive.Description, { ref: ref, ...props });
30
30
  });
31
31
  DialogDescription.displayName = 'DialogDescription';
32
- export const DialogClose = React.forwardRef((props, ref) => {
32
+ const DialogClose = React.forwardRef((props, ref) => {
33
33
  return _jsx(DialogPrimitive.Close, { ref: ref, ...props });
34
34
  });
35
35
  DialogClose.displayName = 'DialogClose';
36
+ export const Dialog = Object.assign(DialogRoot, {
37
+ Trigger: DialogTrigger,
38
+ Portal: DialogPortal,
39
+ Overlay: DialogOverlay,
40
+ Content: DialogContent,
41
+ Title: DialogTitle,
42
+ Description: DialogDescription,
43
+ Close: DialogClose,
44
+ });
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import type { StyleName } from '@plumeria/core';
3
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
+ export declare const DropdownMenu: {
5
+ (props: DropdownMenuPrimitive.DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ } & {
8
+ Trigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ Portal: {
10
+ (props: DropdownMenuPrimitive.DropdownMenuPortalProps): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ Content: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ Group: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ Label: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ Item: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ CheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ RadioGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ RadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ ItemIndicator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
21
+ Separator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ Arrow: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & {
23
+ styleName?: StyleName;
24
+ } & React.RefAttributes<SVGSVGElement>>;
25
+ Sub: {
26
+ (props: DropdownMenuPrimitive.DropdownMenuSubProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ };
29
+ SubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
+ SubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
+ };