@moontra/moonui-pro 2.2.10 → 2.2.12
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/dist/index.mjs +133 -139
- package/package.json +1 -1
- package/src/components/ui/alert.tsx +3 -3
- package/src/components/ui/avatar.tsx +4 -4
- package/src/components/ui/breadcrumb.tsx +18 -25
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/card.tsx +6 -6
- package/src/components/ui/checkbox.tsx +9 -9
- package/src/components/ui/dialog.tsx +12 -12
- package/src/components/ui/dropdown-menu.tsx +7 -7
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/radio-group.tsx +21 -25
- package/src/components/ui/select.tsx +10 -10
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/table.tsx +10 -15
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toast.tsx +12 -12
- package/src/components/ui/tooltip.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -101,7 +101,7 @@ const MoonUIAlertPro = React.forwardRef<HTMLDivElement, AlertProps>(
|
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
|
-
|
|
104
|
+
MoonUIAlert.displayName = "AlertPro";
|
|
105
105
|
|
|
106
106
|
const MoonUIAlertTitlePro = React.forwardRef<
|
|
107
107
|
HTMLParagraphElement,
|
|
@@ -113,7 +113,7 @@ const MoonUIAlertTitlePro = React.forwardRef<
|
|
|
113
113
|
{...props}
|
|
114
114
|
/>
|
|
115
115
|
));
|
|
116
|
-
|
|
116
|
+
MoonUIAlertTitle.displayName = "AlertTitlePro";
|
|
117
117
|
|
|
118
118
|
const MoonUIAlertDescriptionPro = React.forwardRef<
|
|
119
119
|
HTMLParagraphElement,
|
|
@@ -125,7 +125,7 @@ const MoonUIAlertDescriptionPro = React.forwardRef<
|
|
|
125
125
|
{...props}
|
|
126
126
|
/>
|
|
127
127
|
));
|
|
128
|
-
|
|
128
|
+
MoonUIAlertDescription.displayName = "AlertDescriptionPro";
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
// Internal aliases for Pro component usage
|
|
@@ -53,7 +53,7 @@ const MoonUIAvatarPro = React.forwardRef<
|
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
));
|
|
56
|
-
|
|
56
|
+
MoonUIAvatar.displayName = AvatarPrimitive.Root.displayName;
|
|
57
57
|
|
|
58
58
|
const MoonUIAvatarImagePro = React.forwardRef<
|
|
59
59
|
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
@@ -65,7 +65,7 @@ const MoonUIAvatarImagePro = React.forwardRef<
|
|
|
65
65
|
{...props}
|
|
66
66
|
/>
|
|
67
67
|
));
|
|
68
|
-
|
|
68
|
+
MoonUIAvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
69
69
|
|
|
70
70
|
const MoonUIAvatarFallbackPro = React.forwardRef<
|
|
71
71
|
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
@@ -80,7 +80,7 @@ const MoonUIAvatarFallbackPro = React.forwardRef<
|
|
|
80
80
|
{...props}
|
|
81
81
|
/>
|
|
82
82
|
));
|
|
83
|
-
|
|
83
|
+
MoonUIAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
84
84
|
|
|
85
85
|
// Avatar Group Component for displaying multiple avatars
|
|
86
86
|
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -132,7 +132,7 @@ const MoonUIAvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
|
132
132
|
);
|
|
133
133
|
MoonUIAvatarGroup.displayName = "AvatarGroup";
|
|
134
134
|
|
|
135
|
-
export { MoonUIAvatarPro, MoonUIAvatarImagePro, MoonUIAvatarFallbackPro, AvatarGroup };
|
|
135
|
+
export { MoonUIAvatarPro, MoonUIAvatarImagePro, MoonUIAvatarFallbackPro, MoonUIAvatarGroup as AvatarGroup };
|
|
136
136
|
|
|
137
137
|
// Backward compatibility exports
|
|
138
138
|
export { MoonUIAvatarPro as Avatar, MoonUIAvatarImagePro as AvatarImage, MoonUIAvatarFallbackPro as AvatarFallback };
|
|
@@ -64,17 +64,17 @@ const MoonUIBreadcrumbPro = React.forwardRef<HTMLElement, BreadcrumbProps>(
|
|
|
64
64
|
/>
|
|
65
65
|
)
|
|
66
66
|
);
|
|
67
|
-
|
|
67
|
+
MoonUIBreadcrumb.displayName = "BreadcrumbPro";
|
|
68
68
|
|
|
69
69
|
const MoonUIBreadcrumbListPro = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(
|
|
70
70
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
71
71
|
const MoonUIchildrenArrayPro = React.Children.toArray(props.children).filter(Boolean);
|
|
72
|
-
const MoonUIchildCountPro =
|
|
72
|
+
const MoonUIchildCountPro = MoonUIchildrenArrayPro.length;
|
|
73
73
|
|
|
74
|
-
if (collapsed &&
|
|
75
|
-
const MoonUIfirstItemPro =
|
|
74
|
+
if (collapsed && MoonUIchildCountPro > collapsedWidth) {
|
|
75
|
+
const MoonUIfirstItemPro = MoonUIchildrenArrayPro[0];
|
|
76
76
|
// const MoonUImiddleItemsPro = childrenArray.slice(1, -2); // Uncomment when needed
|
|
77
|
-
const MoonUIlastTwoItemsPro =
|
|
77
|
+
const MoonUIlastTwoItemsPro = MoonUIchildrenArrayPro.slice(-2);
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
80
|
<ol
|
|
@@ -85,9 +85,9 @@ const MoonUIBreadcrumbListPro = React.forwardRef<HTMLOListElement, BreadcrumbLis
|
|
|
85
85
|
)}
|
|
86
86
|
{...props}
|
|
87
87
|
>
|
|
88
|
-
{
|
|
88
|
+
{MoonUIfirstItemPro}
|
|
89
89
|
<BreadcrumbEllipsis />
|
|
90
|
-
{
|
|
90
|
+
{MoonUIlastTwoItemsPro}
|
|
91
91
|
</ol>
|
|
92
92
|
);
|
|
93
93
|
}
|
|
@@ -104,7 +104,7 @@ const MoonUIBreadcrumbListPro = React.forwardRef<HTMLOListElement, BreadcrumbLis
|
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
MoonUIBreadcrumbList.displayName = "BreadcrumbListPro";
|
|
108
108
|
|
|
109
109
|
const MoonUIBreadcrumbItemPro = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
|
|
110
110
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
@@ -118,22 +118,22 @@ const MoonUIBreadcrumbItemPro = React.forwardRef<HTMLLIElement, BreadcrumbItemPr
|
|
|
118
118
|
aria-current={isCurrent ? "page" : undefined}
|
|
119
119
|
{...props}
|
|
120
120
|
>
|
|
121
|
-
<
|
|
121
|
+
<MoonUICompPro
|
|
122
122
|
className={cn(
|
|
123
123
|
"transition-colors duration-200 hover:text-foreground",
|
|
124
124
|
isCurrent
|
|
125
125
|
? "font-medium text-foreground dark:text-white dark:text-opacity-95"
|
|
126
126
|
: "text-muted-foreground hover:text-foreground dark:text-gray-400 dark:hover:text-gray-200 dark:hover:text-opacity-95 hover:underline hover:underline-offset-4 hover:decoration-gray-300/30"
|
|
127
127
|
)}
|
|
128
|
-
{...
|
|
128
|
+
{...MoonUIitemPropsPro}
|
|
129
129
|
>
|
|
130
130
|
{props.children}
|
|
131
|
-
</
|
|
131
|
+
</MoonUICompPro>
|
|
132
132
|
</li>
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
|
-
|
|
136
|
+
MoonUIBreadcrumbItem.displayName = "BreadcrumbItemPro";
|
|
137
137
|
|
|
138
138
|
const MoonUIBreadcrumbSeparatorPro = ({
|
|
139
139
|
children,
|
|
@@ -149,7 +149,7 @@ const MoonUIBreadcrumbSeparatorPro = ({
|
|
|
149
149
|
{children || <ChevronRight className="h-3.5 w-3.5" />}
|
|
150
150
|
</span>
|
|
151
151
|
);
|
|
152
|
-
|
|
152
|
+
MoonUIBreadcrumbSeparator.displayName = "BreadcrumbSeparatorPro";
|
|
153
153
|
|
|
154
154
|
const MoonUIBreadcrumbEllipsisPro = ({
|
|
155
155
|
className,
|
|
@@ -165,7 +165,7 @@ const MoonUIBreadcrumbEllipsisPro = ({
|
|
|
165
165
|
<span className="sr-only">More pages</span>
|
|
166
166
|
</span>
|
|
167
167
|
);
|
|
168
|
-
|
|
168
|
+
MoonUIBreadcrumbEllipsis.displayName = "BreadcrumbEllipsisPro";
|
|
169
169
|
|
|
170
170
|
const MoonUIBreadcrumbLinkPro = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(
|
|
171
171
|
({ className, href, ...props }, ref) => (
|
|
@@ -180,7 +180,7 @@ const MoonUIBreadcrumbLinkPro = React.forwardRef<HTMLAnchorElement, React.Anchor
|
|
|
180
180
|
/>
|
|
181
181
|
)
|
|
182
182
|
);
|
|
183
|
-
|
|
183
|
+
MoonUIBreadcrumbLink.displayName = "BreadcrumbLinkPro";
|
|
184
184
|
|
|
185
185
|
const MoonUIBreadcrumbPagePro = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(
|
|
186
186
|
({ className, ...props }, ref) => (
|
|
@@ -194,28 +194,21 @@ const MoonUIBreadcrumbPagePro = React.forwardRef<HTMLSpanElement, React.HTMLAttr
|
|
|
194
194
|
/>
|
|
195
195
|
)
|
|
196
196
|
);
|
|
197
|
-
|
|
197
|
+
MoonUIBreadcrumbPage.displayName = "BreadcrumbPagePro";
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
// Internal aliases for Pro component usage
|
|
201
201
|
export const breadcrumbVariantsInternal = MoonUIbreadcrumbVariantsPro
|
|
202
202
|
export const BreadcrumbInternal = MoonUIBreadcrumbPro
|
|
203
203
|
export const BreadcrumbListInternal = MoonUIBreadcrumbListPro
|
|
204
|
-
export const childrenArrayInternal = MoonUIchildrenArrayPro
|
|
205
|
-
export const childCountInternal = MoonUIchildCountPro
|
|
206
|
-
export const firstItemInternal = MoonUIfirstItemPro
|
|
207
|
-
export const middleItemsInternal = MoonUImiddleItemsPro
|
|
208
|
-
export const lastTwoItemsInternal = MoonUIlastTwoItemsPro
|
|
209
204
|
export const BreadcrumbItemInternal = MoonUIBreadcrumbItemPro
|
|
210
|
-
export const CompInternal = MoonUICompPro
|
|
211
|
-
export const itemPropsInternal = MoonUIitemPropsPro
|
|
212
205
|
export const BreadcrumbSeparatorInternal = MoonUIBreadcrumbSeparatorPro
|
|
213
206
|
export const BreadcrumbEllipsisInternal = MoonUIBreadcrumbEllipsisPro
|
|
214
207
|
export const BreadcrumbLinkInternal = MoonUIBreadcrumbLinkPro
|
|
215
208
|
export const BreadcrumbPageInternal = MoonUIBreadcrumbPagePro
|
|
216
209
|
|
|
217
210
|
// Pro exports
|
|
218
|
-
export { MoonUIbreadcrumbVariantsPro, MoonUIBreadcrumbPro, MoonUIBreadcrumbListPro,
|
|
211
|
+
export { MoonUIbreadcrumbVariantsPro, MoonUIBreadcrumbPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbSeparatorPro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbPagePro }
|
|
219
212
|
|
|
220
213
|
// Clean exports (without MoonUI prefix for easier usage)
|
|
221
|
-
export { MoonUIbreadcrumbVariantsPro as breadcrumbVariants, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbListPro as BreadcrumbList,
|
|
214
|
+
export { MoonUIbreadcrumbVariantsPro as breadcrumbVariants, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbPagePro as BreadcrumbPage };
|
|
@@ -216,7 +216,7 @@ const MoonUIButtonPro = React.forwardRef<HTMLButtonElement, MoonUIButtonProProps
|
|
|
216
216
|
}
|
|
217
217
|
);
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
MoonUIButton.displayName = "MoonUIButtonPro";
|
|
220
220
|
|
|
221
221
|
export { MoonUIButtonPro, moonUIButtonProVariants };
|
|
222
222
|
|
|
@@ -80,7 +80,7 @@ const MoonUICardPro = React.forwardRef<HTMLDivElement, MoonUICardProProps>(
|
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
|
|
83
|
+
MoonUICard.displayName = "MoonUICardPro";
|
|
84
84
|
|
|
85
85
|
const MoonUICardHeaderPro = React.forwardRef<
|
|
86
86
|
HTMLDivElement,
|
|
@@ -92,7 +92,7 @@ const MoonUICardHeaderPro = React.forwardRef<
|
|
|
92
92
|
{...props}
|
|
93
93
|
/>
|
|
94
94
|
));
|
|
95
|
-
|
|
95
|
+
MoonUICardHeader.displayName = "MoonUICardHeaderPro";
|
|
96
96
|
|
|
97
97
|
const MoonUICardTitlePro = React.forwardRef<
|
|
98
98
|
HTMLHeadingElement,
|
|
@@ -104,7 +104,7 @@ const MoonUICardTitlePro = React.forwardRef<
|
|
|
104
104
|
{...props}
|
|
105
105
|
/>
|
|
106
106
|
));
|
|
107
|
-
|
|
107
|
+
MoonUICardTitle.displayName = "MoonUICardTitlePro";
|
|
108
108
|
|
|
109
109
|
const MoonUICardDescriptionPro = React.forwardRef<
|
|
110
110
|
HTMLParagraphElement,
|
|
@@ -116,7 +116,7 @@ const MoonUICardDescriptionPro = React.forwardRef<
|
|
|
116
116
|
{...props}
|
|
117
117
|
/>
|
|
118
118
|
));
|
|
119
|
-
|
|
119
|
+
MoonUICardDescription.displayName = "MoonUICardDescriptionPro";
|
|
120
120
|
|
|
121
121
|
const MoonUICardContentPro = React.forwardRef<
|
|
122
122
|
HTMLDivElement,
|
|
@@ -124,7 +124,7 @@ const MoonUICardContentPro = React.forwardRef<
|
|
|
124
124
|
>(({ className, ...props }, ref) => (
|
|
125
125
|
<div ref={ref} className={cn("pt-0", className)} {...props} />
|
|
126
126
|
));
|
|
127
|
-
|
|
127
|
+
MoonUICardContent.displayName = "MoonUICardContentPro";
|
|
128
128
|
|
|
129
129
|
const MoonUICardFooterPro = React.forwardRef<
|
|
130
130
|
HTMLDivElement,
|
|
@@ -136,7 +136,7 @@ const MoonUICardFooterPro = React.forwardRef<
|
|
|
136
136
|
{...props}
|
|
137
137
|
/>
|
|
138
138
|
));
|
|
139
|
-
|
|
139
|
+
MoonUICardFooter.displayName = "MoonUICardFooterPro";
|
|
140
140
|
|
|
141
141
|
export { MoonUICardPro, MoonUICardHeaderPro, MoonUICardFooterPro, MoonUICardTitlePro, MoonUICardDescriptionPro, MoonUICardContentPro };
|
|
142
142
|
|
|
@@ -68,7 +68,7 @@ export interface MoonUICheckboxProProps
|
|
|
68
68
|
|
|
69
69
|
const MoonUICheckboxPro = React.forwardRef<
|
|
70
70
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
71
|
-
|
|
71
|
+
MoonUICheckboxProProps
|
|
72
72
|
>(({
|
|
73
73
|
className,
|
|
74
74
|
variant,
|
|
@@ -94,7 +94,7 @@ const MoonUICheckboxPro = React.forwardRef<
|
|
|
94
94
|
<CheckboxPrimitive.Root
|
|
95
95
|
ref={ref}
|
|
96
96
|
checked={effectiveChecked}
|
|
97
|
-
className={cn(
|
|
97
|
+
className={cn(moonUICheckboxVariantsPro({ variant, size, radius, animation }), className)}
|
|
98
98
|
{...props}
|
|
99
99
|
>
|
|
100
100
|
<CheckboxPrimitive.Indicator
|
|
@@ -195,7 +195,7 @@ const MoonUICheckboxLabel = React.forwardRef<HTMLLabelElement, CheckboxLabelProp
|
|
|
195
195
|
MoonUICheckboxLabel.displayName = "CheckboxLabel";
|
|
196
196
|
|
|
197
197
|
// Checkbox ve Label içeren bileşen
|
|
198
|
-
interface CheckboxWithLabelProps extends
|
|
198
|
+
interface CheckboxWithLabelProps extends MoonUICheckboxProProps {
|
|
199
199
|
/**
|
|
200
200
|
* Label içeriği
|
|
201
201
|
*/
|
|
@@ -226,34 +226,34 @@ const MoonUICheckboxWithLabel = React.forwardRef<
|
|
|
226
226
|
return (
|
|
227
227
|
<div className="flex items-center">
|
|
228
228
|
{labelPosition === "start" && (
|
|
229
|
-
<
|
|
229
|
+
<MoonUICheckboxLabel
|
|
230
230
|
htmlFor={checkboxId}
|
|
231
231
|
position="start"
|
|
232
232
|
disabled={checkboxProps.disabled}
|
|
233
233
|
className={labelClassName}
|
|
234
234
|
>
|
|
235
235
|
{label}
|
|
236
|
-
</
|
|
236
|
+
</MoonUICheckboxLabel>
|
|
237
237
|
)}
|
|
238
238
|
|
|
239
|
-
<
|
|
239
|
+
<MoonUICheckboxPro ref={ref} id={checkboxId} {...checkboxProps} />
|
|
240
240
|
|
|
241
241
|
{labelPosition === "end" && (
|
|
242
|
-
<
|
|
242
|
+
<MoonUICheckboxLabel
|
|
243
243
|
htmlFor={checkboxId}
|
|
244
244
|
position="end"
|
|
245
245
|
disabled={checkboxProps.disabled}
|
|
246
246
|
className={labelClassName}
|
|
247
247
|
>
|
|
248
248
|
{label}
|
|
249
|
-
</
|
|
249
|
+
</MoonUICheckboxLabel>
|
|
250
250
|
)}
|
|
251
251
|
</div>
|
|
252
252
|
);
|
|
253
253
|
});
|
|
254
254
|
MoonUICheckboxWithLabel.displayName = "CheckboxWithLabel";
|
|
255
255
|
|
|
256
|
-
export { MoonUICheckboxPro, CheckboxGroup, CheckboxLabel, CheckboxWithLabel };
|
|
256
|
+
export { MoonUICheckboxPro, MoonUICheckboxGroup as CheckboxGroup, MoonUICheckboxLabel as CheckboxLabel, MoonUICheckboxWithLabel as CheckboxWithLabel };
|
|
257
257
|
|
|
258
258
|
// Clean exports (only checkbox specific)
|
|
259
259
|
export { MoonUICheckboxPro as Checkbox };
|
|
@@ -136,7 +136,7 @@ interface MoonUIDialogContentProProps
|
|
|
136
136
|
|
|
137
137
|
const MoonUIDialogContentPro = React.forwardRef<
|
|
138
138
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
139
|
-
|
|
139
|
+
MoonUIDialogContentProProps
|
|
140
140
|
>(
|
|
141
141
|
(
|
|
142
142
|
{
|
|
@@ -168,8 +168,8 @@ const MoonUIDialogContentPro = React.forwardRef<
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
return (
|
|
171
|
-
<
|
|
172
|
-
<
|
|
171
|
+
<MoonUIDialogPortal>
|
|
172
|
+
<MoonUIDialogOverlay
|
|
173
173
|
variant={overlayVariant}
|
|
174
174
|
animation={overlayAnimation}
|
|
175
175
|
onClick={hideCloseButton ? undefined : handleClose}
|
|
@@ -197,7 +197,7 @@ const MoonUIDialogContentPro = React.forwardRef<
|
|
|
197
197
|
>
|
|
198
198
|
{/* Başlık ve açıklama varsa otomatik olarak DialogHeader oluştur */}
|
|
199
199
|
{(title || description || icon) && (
|
|
200
|
-
<
|
|
200
|
+
<MoonUIDialogHeaderPro className="flex gap-4">
|
|
201
201
|
{/* İkon veya loading/success durumları */}
|
|
202
202
|
{(icon || loading || success) && (
|
|
203
203
|
<div className="flex shrink-0 items-center justify-center">
|
|
@@ -215,14 +215,14 @@ const MoonUIDialogContentPro = React.forwardRef<
|
|
|
215
215
|
</div>
|
|
216
216
|
)}
|
|
217
217
|
<div className="flex-1">
|
|
218
|
-
{title && <
|
|
218
|
+
{title && <MoonUIDialogTitlePro>{title}</MoonUIDialogTitlePro>}
|
|
219
219
|
{description && (
|
|
220
|
-
<
|
|
220
|
+
<MoonUIDialogDescriptionPro>
|
|
221
221
|
{description}
|
|
222
|
-
</
|
|
222
|
+
</MoonUIDialogDescriptionPro>
|
|
223
223
|
)}
|
|
224
224
|
</div>
|
|
225
|
-
</
|
|
225
|
+
</MoonUIDialogHeaderPro>
|
|
226
226
|
)}
|
|
227
227
|
|
|
228
228
|
{/* Main content */}
|
|
@@ -239,7 +239,7 @@ const MoonUIDialogContentPro = React.forwardRef<
|
|
|
239
239
|
</DialogPrimitive.Close>
|
|
240
240
|
)}
|
|
241
241
|
</DialogPrimitive.Content>
|
|
242
|
-
</
|
|
242
|
+
</MoonUIDialogPortal>
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
245
|
);
|
|
@@ -257,7 +257,7 @@ const MoonUIDialogHeaderPro = ({
|
|
|
257
257
|
{...props}
|
|
258
258
|
/>
|
|
259
259
|
);
|
|
260
|
-
|
|
260
|
+
MoonUIDialogHeader.displayName = "MoonUIDialogHeaderPro";
|
|
261
261
|
|
|
262
262
|
const MoonUIDialogFooterPro = ({
|
|
263
263
|
className,
|
|
@@ -271,7 +271,7 @@ const MoonUIDialogFooterPro = ({
|
|
|
271
271
|
{...props}
|
|
272
272
|
/>
|
|
273
273
|
);
|
|
274
|
-
|
|
274
|
+
MoonUIDialogFooter.displayName = "MoonUIDialogFooterPro";
|
|
275
275
|
|
|
276
276
|
const MoonUIDialogTitlePro = React.forwardRef<
|
|
277
277
|
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
@@ -327,7 +327,7 @@ export { MoonUIDialogPro,
|
|
|
327
327
|
MoonUIDialogTitlePro,
|
|
328
328
|
MoonUIDialogDescriptionPro,
|
|
329
329
|
MoonUIDialogClosePro,
|
|
330
|
-
|
|
330
|
+
MoonUIDialogForm,
|
|
331
331
|
};
|
|
332
332
|
|
|
333
333
|
// Backward compatibility exports
|
|
@@ -53,7 +53,7 @@ const MoonUIDropdownMenuSubContentPro = React.forwardRef<
|
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
))
|
|
56
|
-
|
|
56
|
+
MoonUIDropdownMenuSubContentPro.displayName =
|
|
57
57
|
DropdownMenuPrimitive.SubContent.displayName
|
|
58
58
|
|
|
59
59
|
const MoonUIDropdownMenuContentPro = React.forwardRef<
|
|
@@ -72,7 +72,7 @@ const MoonUIDropdownMenuContentPro = React.forwardRef<
|
|
|
72
72
|
/>
|
|
73
73
|
</DropdownMenuPrimitive.Portal>
|
|
74
74
|
))
|
|
75
|
-
|
|
75
|
+
MoonUIDropdownMenuContentPro.displayName = DropdownMenuPrimitive.Content.displayName
|
|
76
76
|
|
|
77
77
|
const MoonUIDropdownMenuItemPro = React.forwardRef<
|
|
78
78
|
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
@@ -90,7 +90,7 @@ const MoonUIDropdownMenuItemPro = React.forwardRef<
|
|
|
90
90
|
{...props}
|
|
91
91
|
/>
|
|
92
92
|
))
|
|
93
|
-
|
|
93
|
+
MoonUIDropdownMenuItemPro.displayName = DropdownMenuPrimitive.Item.displayName
|
|
94
94
|
|
|
95
95
|
const MoonUIDropdownMenuCheckboxItemPro = React.forwardRef<
|
|
96
96
|
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
@@ -113,7 +113,7 @@ const MoonUIDropdownMenuCheckboxItemPro = React.forwardRef<
|
|
|
113
113
|
{children}
|
|
114
114
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
115
|
))
|
|
116
|
-
|
|
116
|
+
MoonUIDropdownMenuCheckboxItemPro.displayName =
|
|
117
117
|
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
118
118
|
|
|
119
119
|
const MoonUIDropdownMenuRadioItemPro = React.forwardRef<
|
|
@@ -136,7 +136,7 @@ const MoonUIDropdownMenuRadioItemPro = React.forwardRef<
|
|
|
136
136
|
{children}
|
|
137
137
|
</DropdownMenuPrimitive.RadioItem>
|
|
138
138
|
))
|
|
139
|
-
|
|
139
|
+
MoonUIDropdownMenuRadioItemPro.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
140
140
|
|
|
141
141
|
const MoonUIDropdownMenuLabelPro = React.forwardRef<
|
|
142
142
|
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
@@ -154,7 +154,7 @@ const MoonUIDropdownMenuLabelPro = React.forwardRef<
|
|
|
154
154
|
{...props}
|
|
155
155
|
/>
|
|
156
156
|
))
|
|
157
|
-
|
|
157
|
+
MoonUIDropdownMenuLabelPro.displayName = DropdownMenuPrimitive.Label.displayName
|
|
158
158
|
|
|
159
159
|
const MoonUIDropdownMenuSeparatorPro = React.forwardRef<
|
|
160
160
|
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
@@ -166,7 +166,7 @@ const MoonUIDropdownMenuSeparatorPro = React.forwardRef<
|
|
|
166
166
|
{...props}
|
|
167
167
|
/>
|
|
168
168
|
))
|
|
169
|
-
|
|
169
|
+
MoonUIDropdownMenuSeparatorPro.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
170
170
|
|
|
171
171
|
const MoonUIDropdownMenuShortcutPro = ({
|
|
172
172
|
className,
|
|
@@ -130,7 +130,7 @@ const MoonUIPopoverContentPro = React.forwardRef<
|
|
|
130
130
|
/>
|
|
131
131
|
</>
|
|
132
132
|
));
|
|
133
|
-
|
|
133
|
+
MoonUIPopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* PopoverClose bileşeni
|
|
@@ -65,22 +65,22 @@ const MoonUIRadioGroupContextPro = React.createContext<{
|
|
|
65
65
|
const MoonUIRadioGroupPro = React.forwardRef<HTMLDivElement, RadioGroupProps>(
|
|
66
66
|
({ className, value, onValueChange, disabled, name, ...props }, ref) => {
|
|
67
67
|
return (
|
|
68
|
-
<
|
|
68
|
+
<MoonUIRadioGroupContextPro.Provider value={{ value, onValueChange, disabled, name }}>
|
|
69
69
|
<div
|
|
70
70
|
ref={ref}
|
|
71
71
|
role="radiogroup"
|
|
72
72
|
className={cn("grid gap-2", className)}
|
|
73
73
|
{...props}
|
|
74
74
|
/>
|
|
75
|
-
</
|
|
75
|
+
</MoonUIRadioGroupContextPro.Provider>
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
|
-
|
|
79
|
+
MoonUIRadioGroup.displayName = "RadioGroupPro";
|
|
80
80
|
|
|
81
81
|
export interface RadioGroupItemProps
|
|
82
82
|
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,
|
|
83
|
-
VariantProps<typeof
|
|
83
|
+
VariantProps<typeof MoonUIradioGroupItemVariantsPro> {
|
|
84
84
|
/**
|
|
85
85
|
* Custom indicator component
|
|
86
86
|
*/
|
|
@@ -104,13 +104,13 @@ const MoonUIRadioGroupItemPro = React.forwardRef<
|
|
|
104
104
|
RadioGroupItemProps
|
|
105
105
|
>(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
|
|
106
106
|
// Get context values from radio group
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const
|
|
107
|
+
const radioGroup = React.useContext(MoonUIRadioGroupContextPro);
|
|
108
|
+
const generatedId = React.useId();
|
|
109
|
+
const radioId = id || generatedId;
|
|
110
|
+
const isChecked = radioGroup.value === value;
|
|
111
111
|
|
|
112
112
|
// Call onValueChange function when RadioGroupItem changes
|
|
113
|
-
const
|
|
113
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
114
114
|
if (radioGroup.onValueChange) {
|
|
115
115
|
radioGroup.onValueChange(e.target.value);
|
|
116
116
|
}
|
|
@@ -137,7 +137,7 @@ const MoonUIRadioGroupItemPro = React.forwardRef<
|
|
|
137
137
|
<label
|
|
138
138
|
htmlFor={radioId}
|
|
139
139
|
className={cn(
|
|
140
|
-
|
|
140
|
+
MoonUIradioGroupItemVariantsPro({ variant, size }),
|
|
141
141
|
"rounded-full",
|
|
142
142
|
"focus-visible:ring-primary/50",
|
|
143
143
|
"relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",
|
|
@@ -155,7 +155,7 @@ const MoonUIRadioGroupItemPro = React.forwardRef<
|
|
|
155
155
|
</div>
|
|
156
156
|
);
|
|
157
157
|
});
|
|
158
|
-
|
|
158
|
+
MoonUIRadioGroupItem.displayName = "RadioGroupItemPro";
|
|
159
159
|
|
|
160
160
|
// Radio Label Component
|
|
161
161
|
interface RadioLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
@@ -191,7 +191,7 @@ const MoonUIRadioLabelPro = React.forwardRef<HTMLLabelElement, RadioLabelProps>(
|
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
|
-
|
|
194
|
+
MoonUIRadioLabel.displayName = "RadioLabelPro";
|
|
195
195
|
|
|
196
196
|
// Radio Item and Label combination
|
|
197
197
|
interface RadioItemWithLabelProps extends RadioGroupItemProps {
|
|
@@ -222,23 +222,23 @@ const MoonUIRadioItemWithLabelPro = React.forwardRef<
|
|
|
222
222
|
labelClassName,
|
|
223
223
|
...radioProps
|
|
224
224
|
}, ref) => {
|
|
225
|
-
const
|
|
226
|
-
const
|
|
225
|
+
const generatedId = React.useId();
|
|
226
|
+
const radioId = id || generatedId;
|
|
227
227
|
|
|
228
228
|
return (
|
|
229
229
|
<div className="flex items-center">
|
|
230
|
-
<
|
|
231
|
-
<
|
|
230
|
+
<MoonUIRadioGroupItemPro ref={ref} id={radioId} {...radioProps} />
|
|
231
|
+
<MoonUIRadioLabelPro
|
|
232
232
|
htmlFor={radioId}
|
|
233
233
|
disabled={radioProps.disabled}
|
|
234
234
|
className={labelClassName}
|
|
235
235
|
>
|
|
236
236
|
{label}
|
|
237
|
-
</
|
|
237
|
+
</MoonUIRadioLabelPro>
|
|
238
238
|
</div>
|
|
239
239
|
);
|
|
240
240
|
});
|
|
241
|
-
|
|
241
|
+
MoonUIRadioItemWithLabel.displayName = "RadioItemWithLabelPro";
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
// Internal aliases for Pro component usage
|
|
@@ -246,16 +246,12 @@ export const radioGroupItemVariantsInternal = MoonUIradioGroupItemVariantsPro
|
|
|
246
246
|
export const RadioGroupContextInternal = MoonUIRadioGroupContextPro
|
|
247
247
|
export const RadioGroupInternal = MoonUIRadioGroupPro
|
|
248
248
|
export const RadioGroupItemInternal = MoonUIRadioGroupItemPro
|
|
249
|
-
export const radioGroupInternal =
|
|
250
|
-
export const generatedIdInternal = MoonUIgeneratedIdPro
|
|
251
|
-
export const radioIdInternal = MoonUIradioIdPro
|
|
252
|
-
export const isCheckedInternal = MoonUIisCheckedPro
|
|
253
|
-
export const handleChangeInternal = MoonUIhandleChangePro
|
|
249
|
+
export const radioGroupInternal = MoonUIRadioGroupPro
|
|
254
250
|
export const RadioLabelInternal = MoonUIRadioLabelPro
|
|
255
251
|
export const RadioItemWithLabelInternal = MoonUIRadioItemWithLabelPro
|
|
256
252
|
|
|
257
253
|
// Pro exports
|
|
258
|
-
export { MoonUIradioGroupItemVariantsPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupPro, MoonUIRadioGroupItemPro,
|
|
254
|
+
export { MoonUIradioGroupItemVariantsPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupPro, MoonUIRadioGroupItemPro, MoonUIRadioLabelPro, MoonUIRadioItemWithLabelPro }
|
|
259
255
|
|
|
260
256
|
// Clean exports (without MoonUI prefix for easier usage)
|
|
261
|
-
export { MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupItemPro as RadioGroupItem,
|
|
257
|
+
export { MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioLabelPro as RadioLabel, MoonUIRadioItemWithLabelPro as RadioItemWithLabel };
|