@mks2508/mks-ui 0.5.8 → 0.6.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.
@@ -37,7 +37,7 @@ import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescript
37
37
  import { checkboxStyles } from "./ui/Checkbox/Checkbox.styles.js";
38
38
  import { Checkbox, CheckboxIndicator, useCheckbox } from "./ui/Checkbox/index.js";
39
39
  import { dialogStyles } from "./ui/Dialog/Dialog.styles.js";
40
- import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog } from "./ui/Dialog/index.js";
40
+ import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, useDialog } from "./ui/Dialog/index.js";
41
41
  import { useDataState } from "./hooks/State/UseDataState.js";
42
42
  import { Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, useMenu, useMenuActiveValue } from "./ui/Menu/index.js";
43
43
  import { popoverStyles } from "./ui/Popover/Popover.styles.js";
@@ -115,4 +115,4 @@ import { HugeIcons } from "./icons/index.js";
115
115
  import { IconWrapper } from "./lib/icon-wrapper.js";
116
116
  import "./lib/index.js";
117
117
 
118
- export { ANIMATION_CONFIGS, ANIMATION_DEFAULTS, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionStyles, AccordionTrigger, ActivityIcon, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPopup, AlertDialogPortal, AlertDialogStyles, AlertDialogTitle, AlertDialogTrigger, ArrowDownToLineIcon, ArrowUpIcon, AutoHeight, Badge, BellElectricIcon, BellIcon, BotIcon, BoxIcon, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Check, Checkbox, CheckboxIndicator, CircleCheckIcon, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CornerBracket, CountingNumber, DataCard, DataCardActions, DataCardBracket, DataCardLabel, DataCardToggle, DataCardValue, DeleteIcon, Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicToggle, DynamicToggleGroup, DynamicToggleOption, EASINGS, EFFECTS, Edit2, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GOOEY_DEFAULTS, Globe, GooeyCanvas, GooeyFilter, Highlight, HighlightItem, HomeIcon, HugeIcons, IconWrapper, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Layers, LayoutPanelTopIcon, ListIcon, Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Morph, MorphPath, MorphingPopover, MorphingPopoverWithTarget, PRESETS, Package, Palette, PlusIcon, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RESPONSIVE_CONFIGS, RefreshCw, ReorderRoot as Reorder, Rocket, Save, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsIcon, SlidingNumber, SlidingText, Slot, Switch, SwitchIcon, SwitchThumb, TIMING, TRANSFORMS, Tabs, TabsHighlight, TabsHighlightItem, TabsList, TabsPanel, TabsPanels, TabsTab, TerminalIcon, TextFlow, Textarea, Tooltip, TooltipArrow, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipTrigger, Trash2, TrendingDownIcon, TrendingUpIcon, Type, Upload, XIcon, accordionVariants, badgeVariants, bracketVariants, buildColorMatrixValues, buildFilterString, buttonStateStyles, buttonVariants, calculateSeparatorCoordination, cardVariants, checkboxStyles, cn, computeBlur, dataCardStyles, dataCardVariants, dialogStyles, dynamicToggleStyles, dynamicToggleVariants, fieldVariants, getResponsiveDuration, getResponsiveStagger, getStrictContext, inputGroupAddonVariants, inputGroupButtonVariants, morphPathDown, morphPathUp, popoverStyles, progressStyles, shouldShowSeparator, switchStyles, tabsIndicatorVariants, tabsListVariants, tabsTabVariants, tooltipStyles, useAccordionItem, useAlertDialog, useAnimationOrchestrator, useAutoHeight, useCSSGridMorph, useCheckbox, useComboboxAnchor, useControlledState, useDataCard, useDataState, useDialog, useDynamicToggle, useElementRegistry, useFLIPAnimation, useFLIPClipPath, useHighlight, useIsInView, useListFormat, useMenu, useMenuActiveValue, useMorph, useMorphContext, useMorphPath, usePopover, usePositionCapture, useProgress, useReorder, useReorderPresence, useSwitch, useTooltip, useViewTransitions };
118
+ export { ANIMATION_CONFIGS, ANIMATION_DEFAULTS, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionStyles, AccordionTrigger, ActivityIcon, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPopup, AlertDialogPortal, AlertDialogStyles, AlertDialogTitle, AlertDialogTrigger, ArrowDownToLineIcon, ArrowUpIcon, AutoHeight, Badge, BellElectricIcon, BellIcon, BotIcon, BoxIcon, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Check, Checkbox, CheckboxIndicator, CircleCheckIcon, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CornerBracket, CountingNumber, DataCard, DataCardActions, DataCardBracket, DataCardLabel, DataCardToggle, DataCardValue, DeleteIcon, Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicToggle, DynamicToggleGroup, DynamicToggleOption, EASINGS, EFFECTS, Edit2, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GOOEY_DEFAULTS, Globe, GooeyCanvas, GooeyFilter, Highlight, HighlightItem, HomeIcon, HugeIcons, IconWrapper, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Layers, LayoutPanelTopIcon, ListIcon, Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Morph, MorphPath, MorphingPopover, MorphingPopoverWithTarget, PRESETS, Package, Palette, PlusIcon, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RESPONSIVE_CONFIGS, RefreshCw, ReorderRoot as Reorder, Rocket, Save, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsIcon, SlidingNumber, SlidingText, Slot, Switch, SwitchIcon, SwitchThumb, TIMING, TRANSFORMS, Tabs, TabsHighlight, TabsHighlightItem, TabsList, TabsPanel, TabsPanels, TabsTab, TerminalIcon, TextFlow, Textarea, Tooltip, TooltipArrow, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipTrigger, Trash2, TrendingDownIcon, TrendingUpIcon, Type, Upload, XIcon, accordionVariants, badgeVariants, bracketVariants, buildColorMatrixValues, buildFilterString, buttonStateStyles, buttonVariants, calculateSeparatorCoordination, cardVariants, checkboxStyles, cn, computeBlur, dataCardStyles, dataCardVariants, dialogStyles, dynamicToggleStyles, dynamicToggleVariants, fieldVariants, getResponsiveDuration, getResponsiveStagger, getStrictContext, inputGroupAddonVariants, inputGroupButtonVariants, morphPathDown, morphPathUp, popoverStyles, progressStyles, shouldShowSeparator, switchStyles, tabsIndicatorVariants, tabsListVariants, tabsTabVariants, tooltipStyles, useAccordionItem, useAlertDialog, useAnimationOrchestrator, useAutoHeight, useCSSGridMorph, useCheckbox, useComboboxAnchor, useControlledState, useDataCard, useDataState, useDialog, useDynamicToggle, useElementRegistry, useFLIPAnimation, useFLIPClipPath, useHighlight, useIsInView, useListFormat, useMenu, useMenuActiveValue, useMorph, useMorphContext, useMorphPath, usePopover, usePositionCapture, useProgress, useReorder, useReorderPresence, useSwitch, useTooltip, useViewTransitions };
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.styles.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/Dialog.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,UAAU,CAkC/C,CAAC"}
1
+ {"version":3,"file":"Dialog.styles.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/Dialog.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,UAAU,CAqC/C,CAAC"}
@@ -13,6 +13,7 @@
13
13
  const dialogStyles = {
14
14
  root: "",
15
15
  backdrop: "fixed inset-0 z-50 bg-black/80",
16
+ viewport: "",
16
17
  popup: [
17
18
  "fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
18
19
  "w-full max-w-lg",
@@ -19,7 +19,7 @@ import type { SlotOverrides, IBaseConfig } from '../../../core/types';
19
19
  * <DialogPopup slots={{ popup: 'max-w-lg rounded-xl' }} />
20
20
  * ```
21
21
  */
22
- export type DialogSlot = 'root' | 'backdrop' | 'popup' | 'header' | 'footer' | 'title' | 'description' | 'close';
22
+ export type DialogSlot = 'root' | 'backdrop' | 'viewport' | 'popup' | 'header' | 'footer' | 'title' | 'description' | 'close';
23
23
  /**
24
24
  * Direction from which the dialog popup flips in during its entrance animation.
25
25
  *
@@ -124,6 +124,25 @@ export interface IDialogBackdropProps extends Omit<Omit<React.ComponentProps<typ
124
124
  /** Style slot overrides. */
125
125
  slots?: SlotOverrides<DialogSlot>;
126
126
  }
127
+ /**
128
+ * Props for the `DialogViewport` component.
129
+ * Required wrapper around DialogPopup per Base UI v1.x.
130
+ * Must be a direct child of DialogPortal.
131
+ *
132
+ * @example
133
+ * ```tsx
134
+ * <DialogPortal>
135
+ * <DialogBackdrop />
136
+ * <DialogViewport>
137
+ * <DialogPopup>...</DialogPopup>
138
+ * </DialogViewport>
139
+ * </DialogPortal>
140
+ * ```
141
+ */
142
+ export interface IDialogViewportProps extends React.ComponentProps<typeof DialogPrimitive.Viewport> {
143
+ /** Style slot overrides. */
144
+ slots?: SlotOverrides<DialogSlot>;
145
+ }
127
146
  /**
128
147
  * Props for the `DialogPopup` component.
129
148
  * The main content container with perspective-flip entrance animation.
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.types.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/Dialog.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM/D;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,aAAa,GACb,OAAO,CAAC;AAMZ;;;;;;;GAOG;AACH,MAAM,MAAM,mB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AAU,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,4BAA4B;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,4BAA4B;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC;IAC1D,4BAA4B;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC;IAChE,4BAA4B;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACnC"}
@@ -1,4 +1,4 @@
1
- import type { DialogContextType, IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogBackdropProps, IDialogPopupProps, IDialogCloseProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps } from './Dialog.types';
1
+ import type { DialogContextType, IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogViewportProps, IDialogBackdropProps, IDialogPopupProps, IDialogCloseProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps } from './Dialog.types';
2
2
  declare const useDialog: () => DialogContextType;
3
3
  /**
4
4
  * Root Dialog component.
@@ -54,18 +54,39 @@ declare function DialogPortal({ slots: _slots, ...props }: IDialogPortalProps):
54
54
  * ```
55
55
  */
56
56
  declare function DialogBackdrop({ slots, className, transition, ...props }: IDialogBackdropProps): import("react/jsx-runtime").JSX.Element;
57
+ /**
58
+ * Required viewport wrapper around DialogPopup.
59
+ * Base UI v1.x requires Dialog.Viewport as a direct child of Dialog.Portal
60
+ * and parent of Dialog.Popup.
61
+ *
62
+ * @param props - Viewport props forwarded to Base UI Dialog.Viewport
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * <DialogPortal>
67
+ * <DialogBackdrop />
68
+ * <DialogViewport>
69
+ * <DialogPopup>...</DialogPopup>
70
+ * </DialogViewport>
71
+ * </DialogPortal>
72
+ * ```
73
+ */
74
+ declare function DialogViewport({ slots, className, ...props }: IDialogViewportProps): import("react/jsx-runtime").JSX.Element;
57
75
  /**
58
76
  * Main dialog content container with a perspective-flip entrance animation.
59
77
  * The `from` prop controls the axis and direction of the 3D rotation.
78
+ * Must be wrapped in a `DialogViewport`.
60
79
  *
61
80
  * @param props - Popup props including `from` direction and motion transition overrides
62
81
  *
63
82
  * @example
64
83
  * ```tsx
65
- * <DialogPopup from="bottom" className="max-w-md">
66
- * <DialogTitle>Confirm</DialogTitle>
67
- * <p>Are you sure?</p>
68
- * </DialogPopup>
84
+ * <DialogViewport>
85
+ * <DialogPopup from="bottom" className="max-w-md">
86
+ * <DialogTitle>Confirm</DialogTitle>
87
+ * <p>Are you sure?</p>
88
+ * </DialogPopup>
89
+ * </DialogViewport>
69
90
  * ```
70
91
  */
71
92
  declare function DialogPopup({ from, initialFocus, finalFocus, slots, className, transition, ...props }: IDialogPopupProps): import("react/jsx-runtime").JSX.Element;
@@ -132,7 +153,7 @@ declare function DialogTitle({ slots, className, ...props }: IDialogTitleProps):
132
153
  * ```
133
154
  */
134
155
  declare function DialogDescription({ slots, className, ...props }: IDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
135
- export { Dialog, DialogPortal, DialogBackdrop, DialogClose, DialogTrigger, DialogPopup, DialogHeader, DialogFooter, DialogTitle, DialogDescription, useDialog, };
136
- export type { IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogCloseProps, IDialogBackdropProps, IDialogPopupProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps, DialogContextType, DialogFlipDirection, DialogSlot, IDialogConfig, } from './Dialog.types';
156
+ export { Dialog, DialogPortal, DialogViewport, DialogBackdrop, DialogClose, DialogTrigger, DialogPopup, DialogHeader, DialogFooter, DialogTitle, DialogDescription, useDialog, };
157
+ export type { IDialogProps, IDialogTriggerProps, IDialogPortalProps, IDialogViewportProps, IDialogCloseProps, IDialogBackdropProps, IDialogPopupProps, IDialogHeaderProps, IDialogFooterProps, IDialogTitleProps, IDialogDescriptionProps, DialogContextType, DialogFlipDirection, DialogSlot, IDialogConfig, } from './Dialog.types';
137
158
  export { dialogStyles } from './Dialog.styles';
138
159
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Dialog/index.tsx"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EACV,iBAAiB,EAEjB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAMxB,QAAA,MAAuB,SAAS,yBACsB,CAAC;AAMvD;;;;;;;;;;;;GAYG;AACH,iBAAS,MAAM,CAAC,KAAK,EAAE,YAAY,2CAkBlC;AAMD;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAQzE;AAMD;;;;;;;;;;;;;GAaG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAcpE;AAMD;;;;;;;;;;GAUG;AACH,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,SAAS,EACT,UAA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;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAQvE;AAMD;;;;;;;;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAQvE;AAMD;;;;;;;;;GASG;AACH,iBAAS,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAQrE;AAMD;;;;;;;;;GASG;AACH,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAQzB;AAMD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,CAAC;AAGF,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -121,17 +121,44 @@ function DialogBackdrop({ slots, className, transition = {
121
121
  });
122
122
  }
123
123
  /**
124
+ * Required viewport wrapper around DialogPopup.
125
+ * Base UI v1.x requires Dialog.Viewport as a direct child of Dialog.Portal
126
+ * and parent of Dialog.Popup.
127
+ *
128
+ * @param props - Viewport props forwarded to Base UI Dialog.Viewport
129
+ *
130
+ * @example
131
+ * ```tsx
132
+ * <DialogPortal>
133
+ * <DialogBackdrop />
134
+ * <DialogViewport>
135
+ * <DialogPopup>...</DialogPopup>
136
+ * </DialogViewport>
137
+ * </DialogPortal>
138
+ * ```
139
+ */
140
+ function DialogViewport({ slots, className, ...props }) {
141
+ return /* @__PURE__ */ jsx(Dialog.Viewport, {
142
+ "data-slot": "dialog-viewport",
143
+ className: cn(dialogStyles.viewport, slots?.viewport, className),
144
+ ...props
145
+ });
146
+ }
147
+ /**
124
148
  * Main dialog content container with a perspective-flip entrance animation.
125
149
  * The `from` prop controls the axis and direction of the 3D rotation.
150
+ * Must be wrapped in a `DialogViewport`.
126
151
  *
127
152
  * @param props - Popup props including `from` direction and motion transition overrides
128
153
  *
129
154
  * @example
130
155
  * ```tsx
131
- * <DialogPopup from="bottom" className="max-w-md">
132
- * <DialogTitle>Confirm</DialogTitle>
133
- * <p>Are you sure?</p>
134
- * </DialogPopup>
156
+ * <DialogViewport>
157
+ * <DialogPopup from="bottom" className="max-w-md">
158
+ * <DialogTitle>Confirm</DialogTitle>
159
+ * <p>Are you sure?</p>
160
+ * </DialogPopup>
161
+ * </DialogViewport>
135
162
  * ```
136
163
  */
137
164
  function DialogPopup({ from = "top", initialFocus, finalFocus, slots, className, transition = {
@@ -262,4 +289,4 @@ function DialogDescription({ slots, className, ...props }) {
262
289
  }
263
290
 
264
291
  //#endregion
265
- export { Dialog$1 as Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog };
292
+ export { Dialog$1 as Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, useDialog };
@@ -5,7 +5,7 @@ import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescript
5
5
  import { checkboxStyles } from "./Checkbox/Checkbox.styles.js";
6
6
  import { Checkbox, CheckboxIndicator, useCheckbox } from "./Checkbox/index.js";
7
7
  import { dialogStyles } from "./Dialog/Dialog.styles.js";
8
- import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, useDialog } from "./Dialog/index.js";
8
+ import { Dialog, DialogBackdrop, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, useDialog } from "./Dialog/index.js";
9
9
  import { Menu, MenuArrow, MenuCheckboxItem, MenuCheckboxItemIndicator, MenuGroup, MenuGroupLabel, MenuHighlight, MenuHighlightItem, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuSeparator, MenuShortcut, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, useMenu, useMenuActiveValue } from "./Menu/index.js";
10
10
  import { popoverStyles } from "./Popover/Popover.styles.js";
11
11
  import { Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, usePopover } from "./Popover/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mks2508/mks-ui",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "description": "UI component library - Shadcn/Animate UI based with DevEnv components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",