@adsgency_npm/adsgency-ads-ui 0.1.0-alpha.10 → 0.1.0-alpha.11
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.cjs +80 -2
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +79 -2
- package/package.json +1 -1
- package/dist/chunk-YJFQM6IB.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tokens/designTokens.cjs.map +0 -1
- package/dist/tokens/designTokens.js.map +0 -1
- package/dist/tokens/tailwindPreset.cjs.map +0 -1
- package/dist/tokens/tailwindPreset.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -68,6 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
AdsDatePicker: () => AdsDatePicker,
|
|
69
69
|
AdsDateTimePicker: () => AdsDateTimePicker,
|
|
70
70
|
AdsDialog: () => AdsDialog,
|
|
71
|
+
AdsDialogBody: () => AdsDialogBody,
|
|
71
72
|
AdsDialogClose: () => AdsDialogClose,
|
|
72
73
|
AdsDialogContent: () => AdsDialogContent,
|
|
73
74
|
AdsDialogDescription: () => AdsDialogDescription,
|
|
@@ -6285,7 +6286,8 @@ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
|
6285
6286
|
var import_lucide_react17 = require("lucide-react");
|
|
6286
6287
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6287
6288
|
var overlayClassName2 = "fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
|
|
6288
|
-
var contentClassName2 = "fixed left-1/2 top-1/2 z-50
|
|
6289
|
+
var contentClassName2 = "fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-[423px] -translate-x-1/2 -translate-y-1/2 flex-col gap-lg overflow-hidden rounded-radius-md border border-border bg-card p-xl shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.1),0px_10px_15px_-3px_rgba(0,0,0,0.1)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]";
|
|
6290
|
+
var bodyClassName = "min-h-0 flex-1 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]";
|
|
6289
6291
|
var closeButtonClassName = "absolute right-xl top-xl inline-flex h-6 w-6 items-center justify-center rounded-sm opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none";
|
|
6290
6292
|
var Dialog = DialogPrimitive.Root;
|
|
6291
6293
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -6311,15 +6313,83 @@ var DialogClose = React59.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6311
6313
|
}
|
|
6312
6314
|
));
|
|
6313
6315
|
DialogClose.displayName = "DialogClose";
|
|
6316
|
+
function flattenDialogChildren(children) {
|
|
6317
|
+
const nodes = [];
|
|
6318
|
+
React59.Children.forEach(children, (child) => {
|
|
6319
|
+
if (React59.isValidElement(child) && child.type === React59.Fragment) {
|
|
6320
|
+
nodes.push(...flattenDialogChildren(child.props.children));
|
|
6321
|
+
return;
|
|
6322
|
+
}
|
|
6323
|
+
nodes.push(child);
|
|
6324
|
+
});
|
|
6325
|
+
return nodes;
|
|
6326
|
+
}
|
|
6327
|
+
function isDialogSlotElement(child, component) {
|
|
6328
|
+
return React59.isValidElement(child) && child.type === component;
|
|
6329
|
+
}
|
|
6330
|
+
var DialogBody = React59.forwardRef(
|
|
6331
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6332
|
+
"div",
|
|
6333
|
+
{
|
|
6334
|
+
className: cn(bodyClassName, className),
|
|
6335
|
+
"data-slot": "ads-dialog-body",
|
|
6336
|
+
ref,
|
|
6337
|
+
...props
|
|
6338
|
+
}
|
|
6339
|
+
)
|
|
6340
|
+
);
|
|
6341
|
+
DialogBody.displayName = "DialogBody";
|
|
6314
6342
|
var DialogContent = React59.forwardRef(
|
|
6315
6343
|
({ children, className, closeLabel, hideCloseButton = false, ...props }, ref) => {
|
|
6316
6344
|
const { messages } = useAdsI18n();
|
|
6317
6345
|
const resolvedCloseLabel = closeLabel ?? messages.dialog.close;
|
|
6346
|
+
const childNodes = flattenDialogChildren(children);
|
|
6347
|
+
const headerIndex = childNodes.findIndex(
|
|
6348
|
+
(child) => isDialogSlotElement(child, DialogHeader)
|
|
6349
|
+
);
|
|
6350
|
+
let footerIndex = -1;
|
|
6351
|
+
for (let index = childNodes.length - 1; index >= 0; index -= 1) {
|
|
6352
|
+
if (isDialogSlotElement(childNodes[index], DialogFooter)) {
|
|
6353
|
+
footerIndex = index;
|
|
6354
|
+
break;
|
|
6355
|
+
}
|
|
6356
|
+
}
|
|
6357
|
+
const headerNode = headerIndex >= 0 ? childNodes[headerIndex] : null;
|
|
6358
|
+
const generatedHeaderNodes = [];
|
|
6359
|
+
if (headerNode === null) {
|
|
6360
|
+
for (let index = 0; index < childNodes.length; index += 1) {
|
|
6361
|
+
if (index === footerIndex) {
|
|
6362
|
+
break;
|
|
6363
|
+
}
|
|
6364
|
+
const child = childNodes[index];
|
|
6365
|
+
const isHeaderChild = isDialogSlotElement(child, DialogTitle) || isDialogSlotElement(child, DialogDescription);
|
|
6366
|
+
if (!isHeaderChild) {
|
|
6367
|
+
break;
|
|
6368
|
+
}
|
|
6369
|
+
generatedHeaderNodes.push(child);
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
const footerNode = footerIndex >= 0 && footerIndex !== headerIndex ? childNodes[footerIndex] : null;
|
|
6373
|
+
const bodyNodes = childNodes.filter(
|
|
6374
|
+
(child, index) => {
|
|
6375
|
+
if (index === headerIndex || index === footerIndex) {
|
|
6376
|
+
return false;
|
|
6377
|
+
}
|
|
6378
|
+
return !generatedHeaderNodes.includes(child);
|
|
6379
|
+
}
|
|
6380
|
+
);
|
|
6381
|
+
const explicitBodyNodes = bodyNodes.filter(
|
|
6382
|
+
(child) => isDialogSlotElement(child, DialogBody)
|
|
6383
|
+
);
|
|
6384
|
+
const looseBodyNodes = bodyNodes.filter(
|
|
6385
|
+
(child) => !isDialogSlotElement(child, DialogBody)
|
|
6386
|
+
);
|
|
6318
6387
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(DialogPortal, { children: [
|
|
6319
6388
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogOverlay, {}),
|
|
6320
6389
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
6321
6390
|
DialogPrimitive.Content,
|
|
6322
6391
|
{
|
|
6392
|
+
"data-slot": "ads-dialog-content",
|
|
6323
6393
|
className: cn(
|
|
6324
6394
|
contentClassName2,
|
|
6325
6395
|
adsTextColorClassName.card,
|
|
@@ -6328,7 +6398,11 @@ var DialogContent = React59.forwardRef(
|
|
|
6328
6398
|
ref,
|
|
6329
6399
|
...props,
|
|
6330
6400
|
children: [
|
|
6331
|
-
|
|
6401
|
+
headerNode,
|
|
6402
|
+
headerNode === null && generatedHeaderNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogHeader, { children: generatedHeaderNodes }) : null,
|
|
6403
|
+
explicitBodyNodes.length > 0 ? explicitBodyNodes : null,
|
|
6404
|
+
looseBodyNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogBody, { children: looseBodyNodes }) : null,
|
|
6405
|
+
footerNode,
|
|
6332
6406
|
!hideCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
6333
6407
|
DialogPrimitive.Close,
|
|
6334
6408
|
{
|
|
@@ -6351,6 +6425,7 @@ var DialogHeader = React59.forwardRef(
|
|
|
6351
6425
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6352
6426
|
"div",
|
|
6353
6427
|
{
|
|
6428
|
+
"data-slot": "ads-dialog-header",
|
|
6354
6429
|
className: cn("flex flex-col gap-sm pr-8 text-left", className),
|
|
6355
6430
|
ref,
|
|
6356
6431
|
...props
|
|
@@ -6362,6 +6437,7 @@ var DialogFooter = React59.forwardRef(
|
|
|
6362
6437
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6363
6438
|
"div",
|
|
6364
6439
|
{
|
|
6440
|
+
"data-slot": "ads-dialog-footer",
|
|
6365
6441
|
className: cn(
|
|
6366
6442
|
"flex flex-col-reverse gap-sm sm:flex-row sm:justify-end",
|
|
6367
6443
|
className
|
|
@@ -6401,6 +6477,7 @@ var AdsDialogOverlay = DialogOverlay;
|
|
|
6401
6477
|
var AdsDialogClose = DialogClose;
|
|
6402
6478
|
var AdsDialogContent = DialogContent;
|
|
6403
6479
|
var AdsDialogHeader = DialogHeader;
|
|
6480
|
+
var AdsDialogBody = DialogBody;
|
|
6404
6481
|
var AdsDialogFooter = DialogFooter;
|
|
6405
6482
|
var AdsDialogTitle = DialogTitle;
|
|
6406
6483
|
var AdsDialogDescription = DialogDescription;
|
|
@@ -6669,6 +6746,7 @@ var designTokens = {
|
|
|
6669
6746
|
AdsDatePicker,
|
|
6670
6747
|
AdsDateTimePicker,
|
|
6671
6748
|
AdsDialog,
|
|
6749
|
+
AdsDialogBody,
|
|
6672
6750
|
AdsDialogClose,
|
|
6673
6751
|
AdsDialogContent,
|
|
6674
6752
|
AdsDialogDescription,
|
package/dist/index.d.cts
CHANGED
|
@@ -901,6 +901,7 @@ interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof Dia
|
|
|
901
901
|
hideCloseButton?: boolean;
|
|
902
902
|
}
|
|
903
903
|
type DialogHeaderProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
904
|
+
type DialogBodyProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
904
905
|
type DialogFooterProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
905
906
|
type DialogTitleProps = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
906
907
|
type DialogDescriptionProps = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
@@ -911,6 +912,7 @@ declare const AdsDialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPri
|
|
|
911
912
|
declare const AdsDialogClose: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
912
913
|
declare const AdsDialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
913
914
|
declare const AdsDialogHeader: React$1.ForwardRefExoticComponent<DialogHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
915
|
+
declare const AdsDialogBody: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
914
916
|
declare const AdsDialogFooter: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
915
917
|
declare const AdsDialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
916
918
|
declare const AdsDialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -921,6 +923,7 @@ type AdsDialogOverlayProps = DialogOverlayProps;
|
|
|
921
923
|
type AdsDialogCloseProps = DialogCloseProps;
|
|
922
924
|
type AdsDialogContentProps = DialogContentProps;
|
|
923
925
|
type AdsDialogHeaderProps = DialogHeaderProps;
|
|
926
|
+
type AdsDialogBodyProps = DialogBodyProps;
|
|
924
927
|
type AdsDialogFooterProps = DialogFooterProps;
|
|
925
928
|
type AdsDialogTitleProps = DialogTitleProps;
|
|
926
929
|
type AdsDialogDescriptionProps = DialogDescriptionProps;
|
|
@@ -1088,4 +1091,4 @@ declare function useAdsI18n(): AdsI18nContextValue;
|
|
|
1088
1091
|
|
|
1089
1092
|
declare const adsDefaultMessages: Record<"en" | "zh", AdsMessages>;
|
|
1090
1093
|
|
|
1091
|
-
export { AdsAccordion, type AdsAccordionItem, type AdsAccordionMode, type AdsAccordionProps, Alert as AdsAlert, AlertDescription as AdsAlertDescription, AdsAlertDialog, AdsAlertDialogAction, type AdsAlertDialogActionProps, AdsAlertDialogCancel, type AdsAlertDialogCancelProps, AdsAlertDialogContent, type AdsAlertDialogContentProps, AdsAlertDialogDescription, type AdsAlertDialogDescriptionProps, AdsAlertDialogFooter, type AdsAlertDialogFooterProps, AdsAlertDialogHeader, type AdsAlertDialogHeaderProps, AdsAlertDialogOverlay, type AdsAlertDialogOverlayProps, AdsAlertDialogPortal, type AdsAlertDialogPortalProps, type AdsAlertDialogProps, AdsAlertDialogTitle, type AdsAlertDialogTitleProps, AdsAlertDialogTrigger, type AdsAlertDialogTriggerProps, AlertTitle as AdsAlertTitle, AdsBadge, type AdsBadgeProps, AdsBreadcrumb, AdsBreadcrumbEllipsis, type AdsBreadcrumbEllipsisProps, AdsBreadcrumbItem, type AdsBreadcrumbItemProps, AdsBreadcrumbLink, type AdsBreadcrumbLinkProps, AdsBreadcrumbList, type AdsBreadcrumbListProps, AdsBreadcrumbPage, type AdsBreadcrumbPageProps, type AdsBreadcrumbProps, AdsBreadcrumbSeparator, type AdsBreadcrumbSeparatorIcon, type AdsBreadcrumbSeparatorProps, AdsButton, AdsButtonGroup, AdsButtonGroupInput, type AdsButtonGroupInputProps, type AdsButtonGroupProps, AdsButtonGroupSeparator, type AdsButtonGroupSeparatorProps, AdsButtonGroupText, type AdsButtonGroupTextProps, type AdsButtonProps, AdsCalendar, type AdsCalendarCellSize, type AdsCalendarProps, type AdsCalendarSystem, AdsCheckbox, AdsDataPagination, type AdsDataPaginationClassNames, type AdsDataPaginationProps, AdsDataTable, type AdsDataTableColumn, type AdsDataTableExpandable, type AdsDataTablePaginationConfig, type AdsDataTableProps, type AdsDataTableRowSelection, type AdsDataTableSortOrder, type AdsDataTableSortState, AdsDataTableToolbar, type AdsDataTableToolbarProps, AdsDatePicker, type AdsDatePickerProps, AdsDateTimePicker, type AdsDateTimePickerProps, AdsDialog, AdsDialogClose, type AdsDialogCloseProps, AdsDialogContent, type AdsDialogContentProps, AdsDialogDescription, type AdsDialogDescriptionProps, AdsDialogFooter, type AdsDialogFooterProps, AdsDialogHeader, type AdsDialogHeaderProps, AdsDialogOverlay, type AdsDialogOverlayProps, AdsDialogPortal, type AdsDialogPortalProps, type AdsDialogProps, AdsDialogTitle, type AdsDialogTitleProps, AdsDialogTrigger, type AdsDialogTriggerProps, AdsEmpty, AdsEmptyActions, AdsEmptyContent, AdsEmptyDescription, AdsEmptyFooter, AdsEmptyHeader, AdsEmptyMedia, type AdsEmptyProps, AdsEmptyTitle, AdsField, AdsFieldActions, AdsFieldCheckboxRow, AdsFieldChoiceCard, AdsFieldDescription, AdsFieldError, AdsFieldGroup, AdsFieldHeader, AdsFieldItem, AdsFieldLabel, AdsFieldLegend, AdsFieldSeparator, AdsFieldSet, AdsI18nProvider, AdsInput, AdsInputGroup, AdsInputGroupInput, type AdsInputGroupInputProps, type AdsInputGroupProps, AdsInputGroupTextarea, type AdsInputGroupTextareaProps, AdsInputOTP, AdsInputOTPGroup, type AdsInputOTPProps, AdsInputOTPSeparator, AdsInputOTPSlot, type AdsInputProps, type AdsIntent, type AdsLocale, AdsMasonry, type AdsMasonryProps, type AdsMessages, type AdsMessagesOverride, AdsPagination, AdsPaginationContent, type AdsPaginationContentProps, AdsPaginationEllipsis, type AdsPaginationEllipsisProps, AdsPaginationItem, type AdsPaginationItemProps, AdsPaginationLink, type AdsPaginationLinkProps, AdsPaginationNext, type AdsPaginationNextProps, AdsPaginationPrevious, type AdsPaginationPreviousProps, type AdsPaginationProps, AdsPopover, AdsPopoverBody, type AdsPopoverBodyProps, AdsPopoverContent, type AdsPopoverContentProps, AdsPopoverDescription, type AdsPopoverDescriptionProps, AdsPopoverHeader, type AdsPopoverHeaderProps, type AdsPopoverProps, AdsPopoverTitle, type AdsPopoverTitleProps, AdsPopoverTrigger, type AdsPopoverTriggerProps, AdsProgress, type AdsProgressProps, type AdsProgressVariant, AdsRadioGroup, AdsRadioGroupCardOption, AdsRadioGroupOption, AdsSelect, SelectContent as AdsSelectContent, SelectGroup as AdsSelectGroup, SelectItem as AdsSelectItem, SelectLabel as AdsSelectLabel, Select as AdsSelectRoot, SelectScrollDownButton as AdsSelectScrollDownButton, SelectScrollUpButton as AdsSelectScrollUpButton, SelectSeparator as AdsSelectSeparator, SelectTrigger as AdsSelectTrigger, SelectValue as AdsSelectValue, AdsSeparator, type AdsSeparatorProps, type AdsSize, AdsSkeleton, type AdsSkeletonProps, AdsSlider, type AdsSliderProps, AdsSpinner, type AdsSpinnerProps, type AdsSpinnerSize, type AdsSpinnerTone, AdsSwitch, AdsTable, AdsTableBody, AdsTableCaption, AdsTableCell, AdsTableCol, AdsTableColGroup, AdsTableExpandCell, type AdsTableExpandCellProps, AdsTableFooter, AdsTableHead, AdsTableHeader, AdsTableRoot, AdsTableRow, AdsTableScrollArea, type AdsTableScrollAreaProps, AdsTableSelectionCell, type AdsTableSelectionCellProps, AdsTableSortHeader, type AdsTableSortHeaderProps, AdsTableSurface, AdsTabs, AdsTabsContent, type AdsTabsContentProps, AdsTabsList, type AdsTabsListProps, type AdsTabsProps, AdsTabsTrigger, type AdsTabsTriggerProps, AdsTextarea, AdsToast, type AdsToastAction, type AdsToastIntent, AdsToastManager, type AdsToastOptions, type AdsToastProps, AdsToaster, type AdsToasterProps, AdsToggle, AdsToggleGroup, AdsToggleGroupItem, type AdsToggleGroupItemProps, type AdsToggleGroupProps, type AdsToggleProps, AdsTooltip, AdsTooltipArrow, AdsTooltipContent, AdsTooltipProvider, AdsTooltipTrigger, AdsViewCustomersDataTable, type AdsViewCustomersDataTableProps, adsDefaultMessages, useAdsI18n };
|
|
1094
|
+
export { AdsAccordion, type AdsAccordionItem, type AdsAccordionMode, type AdsAccordionProps, Alert as AdsAlert, AlertDescription as AdsAlertDescription, AdsAlertDialog, AdsAlertDialogAction, type AdsAlertDialogActionProps, AdsAlertDialogCancel, type AdsAlertDialogCancelProps, AdsAlertDialogContent, type AdsAlertDialogContentProps, AdsAlertDialogDescription, type AdsAlertDialogDescriptionProps, AdsAlertDialogFooter, type AdsAlertDialogFooterProps, AdsAlertDialogHeader, type AdsAlertDialogHeaderProps, AdsAlertDialogOverlay, type AdsAlertDialogOverlayProps, AdsAlertDialogPortal, type AdsAlertDialogPortalProps, type AdsAlertDialogProps, AdsAlertDialogTitle, type AdsAlertDialogTitleProps, AdsAlertDialogTrigger, type AdsAlertDialogTriggerProps, AlertTitle as AdsAlertTitle, AdsBadge, type AdsBadgeProps, AdsBreadcrumb, AdsBreadcrumbEllipsis, type AdsBreadcrumbEllipsisProps, AdsBreadcrumbItem, type AdsBreadcrumbItemProps, AdsBreadcrumbLink, type AdsBreadcrumbLinkProps, AdsBreadcrumbList, type AdsBreadcrumbListProps, AdsBreadcrumbPage, type AdsBreadcrumbPageProps, type AdsBreadcrumbProps, AdsBreadcrumbSeparator, type AdsBreadcrumbSeparatorIcon, type AdsBreadcrumbSeparatorProps, AdsButton, AdsButtonGroup, AdsButtonGroupInput, type AdsButtonGroupInputProps, type AdsButtonGroupProps, AdsButtonGroupSeparator, type AdsButtonGroupSeparatorProps, AdsButtonGroupText, type AdsButtonGroupTextProps, type AdsButtonProps, AdsCalendar, type AdsCalendarCellSize, type AdsCalendarProps, type AdsCalendarSystem, AdsCheckbox, AdsDataPagination, type AdsDataPaginationClassNames, type AdsDataPaginationProps, AdsDataTable, type AdsDataTableColumn, type AdsDataTableExpandable, type AdsDataTablePaginationConfig, type AdsDataTableProps, type AdsDataTableRowSelection, type AdsDataTableSortOrder, type AdsDataTableSortState, AdsDataTableToolbar, type AdsDataTableToolbarProps, AdsDatePicker, type AdsDatePickerProps, AdsDateTimePicker, type AdsDateTimePickerProps, AdsDialog, AdsDialogBody, type AdsDialogBodyProps, AdsDialogClose, type AdsDialogCloseProps, AdsDialogContent, type AdsDialogContentProps, AdsDialogDescription, type AdsDialogDescriptionProps, AdsDialogFooter, type AdsDialogFooterProps, AdsDialogHeader, type AdsDialogHeaderProps, AdsDialogOverlay, type AdsDialogOverlayProps, AdsDialogPortal, type AdsDialogPortalProps, type AdsDialogProps, AdsDialogTitle, type AdsDialogTitleProps, AdsDialogTrigger, type AdsDialogTriggerProps, AdsEmpty, AdsEmptyActions, AdsEmptyContent, AdsEmptyDescription, AdsEmptyFooter, AdsEmptyHeader, AdsEmptyMedia, type AdsEmptyProps, AdsEmptyTitle, AdsField, AdsFieldActions, AdsFieldCheckboxRow, AdsFieldChoiceCard, AdsFieldDescription, AdsFieldError, AdsFieldGroup, AdsFieldHeader, AdsFieldItem, AdsFieldLabel, AdsFieldLegend, AdsFieldSeparator, AdsFieldSet, AdsI18nProvider, AdsInput, AdsInputGroup, AdsInputGroupInput, type AdsInputGroupInputProps, type AdsInputGroupProps, AdsInputGroupTextarea, type AdsInputGroupTextareaProps, AdsInputOTP, AdsInputOTPGroup, type AdsInputOTPProps, AdsInputOTPSeparator, AdsInputOTPSlot, type AdsInputProps, type AdsIntent, type AdsLocale, AdsMasonry, type AdsMasonryProps, type AdsMessages, type AdsMessagesOverride, AdsPagination, AdsPaginationContent, type AdsPaginationContentProps, AdsPaginationEllipsis, type AdsPaginationEllipsisProps, AdsPaginationItem, type AdsPaginationItemProps, AdsPaginationLink, type AdsPaginationLinkProps, AdsPaginationNext, type AdsPaginationNextProps, AdsPaginationPrevious, type AdsPaginationPreviousProps, type AdsPaginationProps, AdsPopover, AdsPopoverBody, type AdsPopoverBodyProps, AdsPopoverContent, type AdsPopoverContentProps, AdsPopoverDescription, type AdsPopoverDescriptionProps, AdsPopoverHeader, type AdsPopoverHeaderProps, type AdsPopoverProps, AdsPopoverTitle, type AdsPopoverTitleProps, AdsPopoverTrigger, type AdsPopoverTriggerProps, AdsProgress, type AdsProgressProps, type AdsProgressVariant, AdsRadioGroup, AdsRadioGroupCardOption, AdsRadioGroupOption, AdsSelect, SelectContent as AdsSelectContent, SelectGroup as AdsSelectGroup, SelectItem as AdsSelectItem, SelectLabel as AdsSelectLabel, Select as AdsSelectRoot, SelectScrollDownButton as AdsSelectScrollDownButton, SelectScrollUpButton as AdsSelectScrollUpButton, SelectSeparator as AdsSelectSeparator, SelectTrigger as AdsSelectTrigger, SelectValue as AdsSelectValue, AdsSeparator, type AdsSeparatorProps, type AdsSize, AdsSkeleton, type AdsSkeletonProps, AdsSlider, type AdsSliderProps, AdsSpinner, type AdsSpinnerProps, type AdsSpinnerSize, type AdsSpinnerTone, AdsSwitch, AdsTable, AdsTableBody, AdsTableCaption, AdsTableCell, AdsTableCol, AdsTableColGroup, AdsTableExpandCell, type AdsTableExpandCellProps, AdsTableFooter, AdsTableHead, AdsTableHeader, AdsTableRoot, AdsTableRow, AdsTableScrollArea, type AdsTableScrollAreaProps, AdsTableSelectionCell, type AdsTableSelectionCellProps, AdsTableSortHeader, type AdsTableSortHeaderProps, AdsTableSurface, AdsTabs, AdsTabsContent, type AdsTabsContentProps, AdsTabsList, type AdsTabsListProps, type AdsTabsProps, AdsTabsTrigger, type AdsTabsTriggerProps, AdsTextarea, AdsToast, type AdsToastAction, type AdsToastIntent, AdsToastManager, type AdsToastOptions, type AdsToastProps, AdsToaster, type AdsToasterProps, AdsToggle, AdsToggleGroup, AdsToggleGroupItem, type AdsToggleGroupItemProps, type AdsToggleGroupProps, type AdsToggleProps, AdsTooltip, AdsTooltipArrow, AdsTooltipContent, AdsTooltipProvider, AdsTooltipTrigger, AdsViewCustomersDataTable, type AdsViewCustomersDataTableProps, adsDefaultMessages, useAdsI18n };
|
package/dist/index.d.ts
CHANGED
|
@@ -901,6 +901,7 @@ interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof Dia
|
|
|
901
901
|
hideCloseButton?: boolean;
|
|
902
902
|
}
|
|
903
903
|
type DialogHeaderProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
904
|
+
type DialogBodyProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
904
905
|
type DialogFooterProps = React$1.HTMLAttributes<HTMLDivElement>;
|
|
905
906
|
type DialogTitleProps = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
906
907
|
type DialogDescriptionProps = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
@@ -911,6 +912,7 @@ declare const AdsDialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPri
|
|
|
911
912
|
declare const AdsDialogClose: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
912
913
|
declare const AdsDialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
913
914
|
declare const AdsDialogHeader: React$1.ForwardRefExoticComponent<DialogHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
915
|
+
declare const AdsDialogBody: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
914
916
|
declare const AdsDialogFooter: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
915
917
|
declare const AdsDialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
916
918
|
declare const AdsDialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -921,6 +923,7 @@ type AdsDialogOverlayProps = DialogOverlayProps;
|
|
|
921
923
|
type AdsDialogCloseProps = DialogCloseProps;
|
|
922
924
|
type AdsDialogContentProps = DialogContentProps;
|
|
923
925
|
type AdsDialogHeaderProps = DialogHeaderProps;
|
|
926
|
+
type AdsDialogBodyProps = DialogBodyProps;
|
|
924
927
|
type AdsDialogFooterProps = DialogFooterProps;
|
|
925
928
|
type AdsDialogTitleProps = DialogTitleProps;
|
|
926
929
|
type AdsDialogDescriptionProps = DialogDescriptionProps;
|
|
@@ -1088,4 +1091,4 @@ declare function useAdsI18n(): AdsI18nContextValue;
|
|
|
1088
1091
|
|
|
1089
1092
|
declare const adsDefaultMessages: Record<"en" | "zh", AdsMessages>;
|
|
1090
1093
|
|
|
1091
|
-
export { AdsAccordion, type AdsAccordionItem, type AdsAccordionMode, type AdsAccordionProps, Alert as AdsAlert, AlertDescription as AdsAlertDescription, AdsAlertDialog, AdsAlertDialogAction, type AdsAlertDialogActionProps, AdsAlertDialogCancel, type AdsAlertDialogCancelProps, AdsAlertDialogContent, type AdsAlertDialogContentProps, AdsAlertDialogDescription, type AdsAlertDialogDescriptionProps, AdsAlertDialogFooter, type AdsAlertDialogFooterProps, AdsAlertDialogHeader, type AdsAlertDialogHeaderProps, AdsAlertDialogOverlay, type AdsAlertDialogOverlayProps, AdsAlertDialogPortal, type AdsAlertDialogPortalProps, type AdsAlertDialogProps, AdsAlertDialogTitle, type AdsAlertDialogTitleProps, AdsAlertDialogTrigger, type AdsAlertDialogTriggerProps, AlertTitle as AdsAlertTitle, AdsBadge, type AdsBadgeProps, AdsBreadcrumb, AdsBreadcrumbEllipsis, type AdsBreadcrumbEllipsisProps, AdsBreadcrumbItem, type AdsBreadcrumbItemProps, AdsBreadcrumbLink, type AdsBreadcrumbLinkProps, AdsBreadcrumbList, type AdsBreadcrumbListProps, AdsBreadcrumbPage, type AdsBreadcrumbPageProps, type AdsBreadcrumbProps, AdsBreadcrumbSeparator, type AdsBreadcrumbSeparatorIcon, type AdsBreadcrumbSeparatorProps, AdsButton, AdsButtonGroup, AdsButtonGroupInput, type AdsButtonGroupInputProps, type AdsButtonGroupProps, AdsButtonGroupSeparator, type AdsButtonGroupSeparatorProps, AdsButtonGroupText, type AdsButtonGroupTextProps, type AdsButtonProps, AdsCalendar, type AdsCalendarCellSize, type AdsCalendarProps, type AdsCalendarSystem, AdsCheckbox, AdsDataPagination, type AdsDataPaginationClassNames, type AdsDataPaginationProps, AdsDataTable, type AdsDataTableColumn, type AdsDataTableExpandable, type AdsDataTablePaginationConfig, type AdsDataTableProps, type AdsDataTableRowSelection, type AdsDataTableSortOrder, type AdsDataTableSortState, AdsDataTableToolbar, type AdsDataTableToolbarProps, AdsDatePicker, type AdsDatePickerProps, AdsDateTimePicker, type AdsDateTimePickerProps, AdsDialog, AdsDialogClose, type AdsDialogCloseProps, AdsDialogContent, type AdsDialogContentProps, AdsDialogDescription, type AdsDialogDescriptionProps, AdsDialogFooter, type AdsDialogFooterProps, AdsDialogHeader, type AdsDialogHeaderProps, AdsDialogOverlay, type AdsDialogOverlayProps, AdsDialogPortal, type AdsDialogPortalProps, type AdsDialogProps, AdsDialogTitle, type AdsDialogTitleProps, AdsDialogTrigger, type AdsDialogTriggerProps, AdsEmpty, AdsEmptyActions, AdsEmptyContent, AdsEmptyDescription, AdsEmptyFooter, AdsEmptyHeader, AdsEmptyMedia, type AdsEmptyProps, AdsEmptyTitle, AdsField, AdsFieldActions, AdsFieldCheckboxRow, AdsFieldChoiceCard, AdsFieldDescription, AdsFieldError, AdsFieldGroup, AdsFieldHeader, AdsFieldItem, AdsFieldLabel, AdsFieldLegend, AdsFieldSeparator, AdsFieldSet, AdsI18nProvider, AdsInput, AdsInputGroup, AdsInputGroupInput, type AdsInputGroupInputProps, type AdsInputGroupProps, AdsInputGroupTextarea, type AdsInputGroupTextareaProps, AdsInputOTP, AdsInputOTPGroup, type AdsInputOTPProps, AdsInputOTPSeparator, AdsInputOTPSlot, type AdsInputProps, type AdsIntent, type AdsLocale, AdsMasonry, type AdsMasonryProps, type AdsMessages, type AdsMessagesOverride, AdsPagination, AdsPaginationContent, type AdsPaginationContentProps, AdsPaginationEllipsis, type AdsPaginationEllipsisProps, AdsPaginationItem, type AdsPaginationItemProps, AdsPaginationLink, type AdsPaginationLinkProps, AdsPaginationNext, type AdsPaginationNextProps, AdsPaginationPrevious, type AdsPaginationPreviousProps, type AdsPaginationProps, AdsPopover, AdsPopoverBody, type AdsPopoverBodyProps, AdsPopoverContent, type AdsPopoverContentProps, AdsPopoverDescription, type AdsPopoverDescriptionProps, AdsPopoverHeader, type AdsPopoverHeaderProps, type AdsPopoverProps, AdsPopoverTitle, type AdsPopoverTitleProps, AdsPopoverTrigger, type AdsPopoverTriggerProps, AdsProgress, type AdsProgressProps, type AdsProgressVariant, AdsRadioGroup, AdsRadioGroupCardOption, AdsRadioGroupOption, AdsSelect, SelectContent as AdsSelectContent, SelectGroup as AdsSelectGroup, SelectItem as AdsSelectItem, SelectLabel as AdsSelectLabel, Select as AdsSelectRoot, SelectScrollDownButton as AdsSelectScrollDownButton, SelectScrollUpButton as AdsSelectScrollUpButton, SelectSeparator as AdsSelectSeparator, SelectTrigger as AdsSelectTrigger, SelectValue as AdsSelectValue, AdsSeparator, type AdsSeparatorProps, type AdsSize, AdsSkeleton, type AdsSkeletonProps, AdsSlider, type AdsSliderProps, AdsSpinner, type AdsSpinnerProps, type AdsSpinnerSize, type AdsSpinnerTone, AdsSwitch, AdsTable, AdsTableBody, AdsTableCaption, AdsTableCell, AdsTableCol, AdsTableColGroup, AdsTableExpandCell, type AdsTableExpandCellProps, AdsTableFooter, AdsTableHead, AdsTableHeader, AdsTableRoot, AdsTableRow, AdsTableScrollArea, type AdsTableScrollAreaProps, AdsTableSelectionCell, type AdsTableSelectionCellProps, AdsTableSortHeader, type AdsTableSortHeaderProps, AdsTableSurface, AdsTabs, AdsTabsContent, type AdsTabsContentProps, AdsTabsList, type AdsTabsListProps, type AdsTabsProps, AdsTabsTrigger, type AdsTabsTriggerProps, AdsTextarea, AdsToast, type AdsToastAction, type AdsToastIntent, AdsToastManager, type AdsToastOptions, type AdsToastProps, AdsToaster, type AdsToasterProps, AdsToggle, AdsToggleGroup, AdsToggleGroupItem, type AdsToggleGroupItemProps, type AdsToggleGroupProps, type AdsToggleProps, AdsTooltip, AdsTooltipArrow, AdsTooltipContent, AdsTooltipProvider, AdsTooltipTrigger, AdsViewCustomersDataTable, type AdsViewCustomersDataTableProps, adsDefaultMessages, useAdsI18n };
|
|
1094
|
+
export { AdsAccordion, type AdsAccordionItem, type AdsAccordionMode, type AdsAccordionProps, Alert as AdsAlert, AlertDescription as AdsAlertDescription, AdsAlertDialog, AdsAlertDialogAction, type AdsAlertDialogActionProps, AdsAlertDialogCancel, type AdsAlertDialogCancelProps, AdsAlertDialogContent, type AdsAlertDialogContentProps, AdsAlertDialogDescription, type AdsAlertDialogDescriptionProps, AdsAlertDialogFooter, type AdsAlertDialogFooterProps, AdsAlertDialogHeader, type AdsAlertDialogHeaderProps, AdsAlertDialogOverlay, type AdsAlertDialogOverlayProps, AdsAlertDialogPortal, type AdsAlertDialogPortalProps, type AdsAlertDialogProps, AdsAlertDialogTitle, type AdsAlertDialogTitleProps, AdsAlertDialogTrigger, type AdsAlertDialogTriggerProps, AlertTitle as AdsAlertTitle, AdsBadge, type AdsBadgeProps, AdsBreadcrumb, AdsBreadcrumbEllipsis, type AdsBreadcrumbEllipsisProps, AdsBreadcrumbItem, type AdsBreadcrumbItemProps, AdsBreadcrumbLink, type AdsBreadcrumbLinkProps, AdsBreadcrumbList, type AdsBreadcrumbListProps, AdsBreadcrumbPage, type AdsBreadcrumbPageProps, type AdsBreadcrumbProps, AdsBreadcrumbSeparator, type AdsBreadcrumbSeparatorIcon, type AdsBreadcrumbSeparatorProps, AdsButton, AdsButtonGroup, AdsButtonGroupInput, type AdsButtonGroupInputProps, type AdsButtonGroupProps, AdsButtonGroupSeparator, type AdsButtonGroupSeparatorProps, AdsButtonGroupText, type AdsButtonGroupTextProps, type AdsButtonProps, AdsCalendar, type AdsCalendarCellSize, type AdsCalendarProps, type AdsCalendarSystem, AdsCheckbox, AdsDataPagination, type AdsDataPaginationClassNames, type AdsDataPaginationProps, AdsDataTable, type AdsDataTableColumn, type AdsDataTableExpandable, type AdsDataTablePaginationConfig, type AdsDataTableProps, type AdsDataTableRowSelection, type AdsDataTableSortOrder, type AdsDataTableSortState, AdsDataTableToolbar, type AdsDataTableToolbarProps, AdsDatePicker, type AdsDatePickerProps, AdsDateTimePicker, type AdsDateTimePickerProps, AdsDialog, AdsDialogBody, type AdsDialogBodyProps, AdsDialogClose, type AdsDialogCloseProps, AdsDialogContent, type AdsDialogContentProps, AdsDialogDescription, type AdsDialogDescriptionProps, AdsDialogFooter, type AdsDialogFooterProps, AdsDialogHeader, type AdsDialogHeaderProps, AdsDialogOverlay, type AdsDialogOverlayProps, AdsDialogPortal, type AdsDialogPortalProps, type AdsDialogProps, AdsDialogTitle, type AdsDialogTitleProps, AdsDialogTrigger, type AdsDialogTriggerProps, AdsEmpty, AdsEmptyActions, AdsEmptyContent, AdsEmptyDescription, AdsEmptyFooter, AdsEmptyHeader, AdsEmptyMedia, type AdsEmptyProps, AdsEmptyTitle, AdsField, AdsFieldActions, AdsFieldCheckboxRow, AdsFieldChoiceCard, AdsFieldDescription, AdsFieldError, AdsFieldGroup, AdsFieldHeader, AdsFieldItem, AdsFieldLabel, AdsFieldLegend, AdsFieldSeparator, AdsFieldSet, AdsI18nProvider, AdsInput, AdsInputGroup, AdsInputGroupInput, type AdsInputGroupInputProps, type AdsInputGroupProps, AdsInputGroupTextarea, type AdsInputGroupTextareaProps, AdsInputOTP, AdsInputOTPGroup, type AdsInputOTPProps, AdsInputOTPSeparator, AdsInputOTPSlot, type AdsInputProps, type AdsIntent, type AdsLocale, AdsMasonry, type AdsMasonryProps, type AdsMessages, type AdsMessagesOverride, AdsPagination, AdsPaginationContent, type AdsPaginationContentProps, AdsPaginationEllipsis, type AdsPaginationEllipsisProps, AdsPaginationItem, type AdsPaginationItemProps, AdsPaginationLink, type AdsPaginationLinkProps, AdsPaginationNext, type AdsPaginationNextProps, AdsPaginationPrevious, type AdsPaginationPreviousProps, type AdsPaginationProps, AdsPopover, AdsPopoverBody, type AdsPopoverBodyProps, AdsPopoverContent, type AdsPopoverContentProps, AdsPopoverDescription, type AdsPopoverDescriptionProps, AdsPopoverHeader, type AdsPopoverHeaderProps, type AdsPopoverProps, AdsPopoverTitle, type AdsPopoverTitleProps, AdsPopoverTrigger, type AdsPopoverTriggerProps, AdsProgress, type AdsProgressProps, type AdsProgressVariant, AdsRadioGroup, AdsRadioGroupCardOption, AdsRadioGroupOption, AdsSelect, SelectContent as AdsSelectContent, SelectGroup as AdsSelectGroup, SelectItem as AdsSelectItem, SelectLabel as AdsSelectLabel, Select as AdsSelectRoot, SelectScrollDownButton as AdsSelectScrollDownButton, SelectScrollUpButton as AdsSelectScrollUpButton, SelectSeparator as AdsSelectSeparator, SelectTrigger as AdsSelectTrigger, SelectValue as AdsSelectValue, AdsSeparator, type AdsSeparatorProps, type AdsSize, AdsSkeleton, type AdsSkeletonProps, AdsSlider, type AdsSliderProps, AdsSpinner, type AdsSpinnerProps, type AdsSpinnerSize, type AdsSpinnerTone, AdsSwitch, AdsTable, AdsTableBody, AdsTableCaption, AdsTableCell, AdsTableCol, AdsTableColGroup, AdsTableExpandCell, type AdsTableExpandCellProps, AdsTableFooter, AdsTableHead, AdsTableHeader, AdsTableRoot, AdsTableRow, AdsTableScrollArea, type AdsTableScrollAreaProps, AdsTableSelectionCell, type AdsTableSelectionCellProps, AdsTableSortHeader, type AdsTableSortHeaderProps, AdsTableSurface, AdsTabs, AdsTabsContent, type AdsTabsContentProps, AdsTabsList, type AdsTabsListProps, type AdsTabsProps, AdsTabsTrigger, type AdsTabsTriggerProps, AdsTextarea, AdsToast, type AdsToastAction, type AdsToastIntent, AdsToastManager, type AdsToastOptions, type AdsToastProps, AdsToaster, type AdsToasterProps, AdsToggle, AdsToggleGroup, AdsToggleGroupItem, type AdsToggleGroupItemProps, type AdsToggleGroupProps, type AdsToggleProps, AdsTooltip, AdsTooltipArrow, AdsTooltipContent, AdsTooltipProvider, AdsTooltipTrigger, AdsViewCustomersDataTable, type AdsViewCustomersDataTableProps, adsDefaultMessages, useAdsI18n };
|
package/dist/index.js
CHANGED
|
@@ -6126,7 +6126,8 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
|
6126
6126
|
import { X as X2 } from "lucide-react";
|
|
6127
6127
|
import { jsx as jsx65, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6128
6128
|
var overlayClassName2 = "fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
|
|
6129
|
-
var contentClassName2 = "fixed left-1/2 top-1/2 z-50
|
|
6129
|
+
var contentClassName2 = "fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-[423px] -translate-x-1/2 -translate-y-1/2 flex-col gap-lg overflow-hidden rounded-radius-md border border-border bg-card p-xl shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.1),0px_10px_15px_-3px_rgba(0,0,0,0.1)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]";
|
|
6130
|
+
var bodyClassName = "min-h-0 flex-1 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]";
|
|
6130
6131
|
var closeButtonClassName = "absolute right-xl top-xl inline-flex h-6 w-6 items-center justify-center rounded-sm opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none";
|
|
6131
6132
|
var Dialog = DialogPrimitive.Root;
|
|
6132
6133
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -6152,15 +6153,83 @@ var DialogClose = React59.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6152
6153
|
}
|
|
6153
6154
|
));
|
|
6154
6155
|
DialogClose.displayName = "DialogClose";
|
|
6156
|
+
function flattenDialogChildren(children) {
|
|
6157
|
+
const nodes = [];
|
|
6158
|
+
React59.Children.forEach(children, (child) => {
|
|
6159
|
+
if (React59.isValidElement(child) && child.type === React59.Fragment) {
|
|
6160
|
+
nodes.push(...flattenDialogChildren(child.props.children));
|
|
6161
|
+
return;
|
|
6162
|
+
}
|
|
6163
|
+
nodes.push(child);
|
|
6164
|
+
});
|
|
6165
|
+
return nodes;
|
|
6166
|
+
}
|
|
6167
|
+
function isDialogSlotElement(child, component) {
|
|
6168
|
+
return React59.isValidElement(child) && child.type === component;
|
|
6169
|
+
}
|
|
6170
|
+
var DialogBody = React59.forwardRef(
|
|
6171
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
|
|
6172
|
+
"div",
|
|
6173
|
+
{
|
|
6174
|
+
className: cn(bodyClassName, className),
|
|
6175
|
+
"data-slot": "ads-dialog-body",
|
|
6176
|
+
ref,
|
|
6177
|
+
...props
|
|
6178
|
+
}
|
|
6179
|
+
)
|
|
6180
|
+
);
|
|
6181
|
+
DialogBody.displayName = "DialogBody";
|
|
6155
6182
|
var DialogContent = React59.forwardRef(
|
|
6156
6183
|
({ children, className, closeLabel, hideCloseButton = false, ...props }, ref) => {
|
|
6157
6184
|
const { messages } = useAdsI18n();
|
|
6158
6185
|
const resolvedCloseLabel = closeLabel ?? messages.dialog.close;
|
|
6186
|
+
const childNodes = flattenDialogChildren(children);
|
|
6187
|
+
const headerIndex = childNodes.findIndex(
|
|
6188
|
+
(child) => isDialogSlotElement(child, DialogHeader)
|
|
6189
|
+
);
|
|
6190
|
+
let footerIndex = -1;
|
|
6191
|
+
for (let index = childNodes.length - 1; index >= 0; index -= 1) {
|
|
6192
|
+
if (isDialogSlotElement(childNodes[index], DialogFooter)) {
|
|
6193
|
+
footerIndex = index;
|
|
6194
|
+
break;
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
const headerNode = headerIndex >= 0 ? childNodes[headerIndex] : null;
|
|
6198
|
+
const generatedHeaderNodes = [];
|
|
6199
|
+
if (headerNode === null) {
|
|
6200
|
+
for (let index = 0; index < childNodes.length; index += 1) {
|
|
6201
|
+
if (index === footerIndex) {
|
|
6202
|
+
break;
|
|
6203
|
+
}
|
|
6204
|
+
const child = childNodes[index];
|
|
6205
|
+
const isHeaderChild = isDialogSlotElement(child, DialogTitle) || isDialogSlotElement(child, DialogDescription);
|
|
6206
|
+
if (!isHeaderChild) {
|
|
6207
|
+
break;
|
|
6208
|
+
}
|
|
6209
|
+
generatedHeaderNodes.push(child);
|
|
6210
|
+
}
|
|
6211
|
+
}
|
|
6212
|
+
const footerNode = footerIndex >= 0 && footerIndex !== headerIndex ? childNodes[footerIndex] : null;
|
|
6213
|
+
const bodyNodes = childNodes.filter(
|
|
6214
|
+
(child, index) => {
|
|
6215
|
+
if (index === headerIndex || index === footerIndex) {
|
|
6216
|
+
return false;
|
|
6217
|
+
}
|
|
6218
|
+
return !generatedHeaderNodes.includes(child);
|
|
6219
|
+
}
|
|
6220
|
+
);
|
|
6221
|
+
const explicitBodyNodes = bodyNodes.filter(
|
|
6222
|
+
(child) => isDialogSlotElement(child, DialogBody)
|
|
6223
|
+
);
|
|
6224
|
+
const looseBodyNodes = bodyNodes.filter(
|
|
6225
|
+
(child) => !isDialogSlotElement(child, DialogBody)
|
|
6226
|
+
);
|
|
6159
6227
|
return /* @__PURE__ */ jsxs32(DialogPortal, { children: [
|
|
6160
6228
|
/* @__PURE__ */ jsx65(DialogOverlay, {}),
|
|
6161
6229
|
/* @__PURE__ */ jsxs32(
|
|
6162
6230
|
DialogPrimitive.Content,
|
|
6163
6231
|
{
|
|
6232
|
+
"data-slot": "ads-dialog-content",
|
|
6164
6233
|
className: cn(
|
|
6165
6234
|
contentClassName2,
|
|
6166
6235
|
adsTextColorClassName.card,
|
|
@@ -6169,7 +6238,11 @@ var DialogContent = React59.forwardRef(
|
|
|
6169
6238
|
ref,
|
|
6170
6239
|
...props,
|
|
6171
6240
|
children: [
|
|
6172
|
-
|
|
6241
|
+
headerNode,
|
|
6242
|
+
headerNode === null && generatedHeaderNodes.length > 0 ? /* @__PURE__ */ jsx65(DialogHeader, { children: generatedHeaderNodes }) : null,
|
|
6243
|
+
explicitBodyNodes.length > 0 ? explicitBodyNodes : null,
|
|
6244
|
+
looseBodyNodes.length > 0 ? /* @__PURE__ */ jsx65(DialogBody, { children: looseBodyNodes }) : null,
|
|
6245
|
+
footerNode,
|
|
6173
6246
|
!hideCloseButton ? /* @__PURE__ */ jsxs32(
|
|
6174
6247
|
DialogPrimitive.Close,
|
|
6175
6248
|
{
|
|
@@ -6192,6 +6265,7 @@ var DialogHeader = React59.forwardRef(
|
|
|
6192
6265
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
|
|
6193
6266
|
"div",
|
|
6194
6267
|
{
|
|
6268
|
+
"data-slot": "ads-dialog-header",
|
|
6195
6269
|
className: cn("flex flex-col gap-sm pr-8 text-left", className),
|
|
6196
6270
|
ref,
|
|
6197
6271
|
...props
|
|
@@ -6203,6 +6277,7 @@ var DialogFooter = React59.forwardRef(
|
|
|
6203
6277
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
|
|
6204
6278
|
"div",
|
|
6205
6279
|
{
|
|
6280
|
+
"data-slot": "ads-dialog-footer",
|
|
6206
6281
|
className: cn(
|
|
6207
6282
|
"flex flex-col-reverse gap-sm sm:flex-row sm:justify-end",
|
|
6208
6283
|
className
|
|
@@ -6242,6 +6317,7 @@ var AdsDialogOverlay = DialogOverlay;
|
|
|
6242
6317
|
var AdsDialogClose = DialogClose;
|
|
6243
6318
|
var AdsDialogContent = DialogContent;
|
|
6244
6319
|
var AdsDialogHeader = DialogHeader;
|
|
6320
|
+
var AdsDialogBody = DialogBody;
|
|
6245
6321
|
var AdsDialogFooter = DialogFooter;
|
|
6246
6322
|
var AdsDialogTitle = DialogTitle;
|
|
6247
6323
|
var AdsDialogDescription = DialogDescription;
|
|
@@ -6444,6 +6520,7 @@ export {
|
|
|
6444
6520
|
AdsDatePicker,
|
|
6445
6521
|
AdsDateTimePicker,
|
|
6446
6522
|
AdsDialog,
|
|
6523
|
+
AdsDialogBody,
|
|
6447
6524
|
AdsDialogClose,
|
|
6448
6525
|
AdsDialogContent,
|
|
6449
6526
|
AdsDialogDescription,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tokens/designTokens.ts"],"sourcesContent":["export const designTokens = {\n background: \"#151619\",\n foreground: \"#fdfdfd\",\n card: \"#1b1c21\",\n cardForeground: \"#fdfdfd\",\n popover: \"#2a2b2f\",\n popoverForeground: \"#fdfdfd\",\n primary: \"#844fff\",\n primaryForeground: \"#fdfdfd\",\n secondary: \"#3f4043\",\n secondaryForeground: \"#fdfdfd\",\n muted: \"#3f4043\",\n mutedForeground: \"#7e7f81\",\n accent: \"#3f4043\",\n accentForeground: \"#fdfdfd\",\n destructive: \"#dc2626\",\n destructiveForeground: \"#ff9b9b\",\n border: \"#545558\",\n input: \"#151619\",\n ring: \"#a984ff\",\n brandSecondary: \"#af41ff\",\n brandSecondaryForeground: \"#151619\",\n brandGradientFrom: \"#6859ff\",\n brandGradientTo: \"#af41ff\",\n success: \"#008e61\",\n successForeground: \"#fdfdfd\",\n warning: \"#cd6c00\",\n warningForeground: \"#fdfdfd\",\n info: \"#844fff\",\n infoForeground: \"#fdfdfd\",\n borderMuted: \"#3f4043\",\n active: \"#422880\",\n activeForeground: \"#fdfdfd\",\n labelForeground: \"#a8a9aa\",\n icon: \"#939496\",\n iconMuted: \"#545558\",\n spacing: {\n xs: \"0.25rem\",\n sm: \"0.5rem\",\n md: \"0.75rem\",\n lg: \"1rem\",\n xl: \"1.5rem\",\n \"2xl\": \"2rem\",\n },\n radius: {\n sm: \"0.25rem\",\n md: \"0.375rem\",\n lg: \"0.5rem\",\n xl: \"0.75rem\",\n full: \"9999px\",\n },\n size: {\n controlHeight: \"2.5rem\",\n modalWidth: \"42rem\",\n sidebarWidth: \"17.5rem\",\n },\n zIndex: {\n toolbar: 30,\n overlay: 40,\n modal: 50,\n toast: 60,\n },\n} as const;\n\nexport type DesignTokens = typeof designTokens;\n"],"mappings":";;;AAAO,IAAM,eAAe;AAAA,EAC1B,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;","names":[]}
|