@geomak/ui 6.15.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -628,19 +628,21 @@ interface IconButtonProps {
628
628
  */
629
629
  declare function IconButton({ icon, onClick, type, buttonType, disabled, size, loading, loadingIcon, className, style, }: IconButtonProps): react_jsx_runtime.JSX.Element;
630
630
 
631
+ type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
631
632
  interface ModalProps {
632
633
  /**
633
- * Max width of the modal panel in pixels (default 600).
634
- * On narrow viewports the panel fills the screen minus 1 rem on each side.
635
- * Height is always content-driven (max 90 dvh).
634
+ * Named width scale (default `'md'`). Keeps modals consistent across the
635
+ * app: sm 400 · md 600 · lg 800 · xl 1000 · full (viewport − 2rem).
636
636
  */
637
- width?: number;
637
+ size?: ModalSize;
638
638
  /**
639
- * @deprecated Use `width` instead. The second tuple value (height) was
640
- * never honoured and is silently ignored. Kept for backwards
641
- * compatibility — will be removed in a future major version.
639
+ * Explicit max-width escape hatch a number (px) or any CSS length
640
+ * (e.g. `'48rem'`). Overrides `size` when set.
641
+ *
642
+ * Height is always content-driven (max 90 dvh): modals grow with their
643
+ * content and scroll internally rather than taking a fixed height.
642
644
  */
643
- size?: [number, number] | [number];
645
+ width?: number | string;
644
646
  isOpen?: boolean;
645
647
  onClose?: () => void;
646
648
  onOk?: () => void;
@@ -667,13 +669,23 @@ interface ModalProps {
667
669
  */
668
670
  declare function Modal({ width, size, isOpen, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
669
671
 
672
+ type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
670
673
  interface DrawerProps {
671
674
  isOpen?: boolean;
672
675
  onClose?: () => void;
673
676
  hasFooter?: boolean;
674
677
  /** 'left' | 'right' — which edge the panel slides from */
675
678
  placement?: 'left' | 'right';
676
- width?: number;
679
+ /**
680
+ * Named width scale (default `'md'`): sm 280 · md 320 · lg 480 · xl 640 ·
681
+ * full (viewport − 1rem). The panel always spans the full viewport height.
682
+ */
683
+ size?: DrawerSize;
684
+ /**
685
+ * Explicit width escape hatch — a number (px) or any CSS length
686
+ * (e.g. `'30rem'`). Overrides `size` when set.
687
+ */
688
+ width?: number | string;
677
689
  okText?: string;
678
690
  cancelText?: string;
679
691
  onOk?: () => void;
@@ -695,7 +707,7 @@ interface DrawerProps {
695
707
  * <FilterForm />
696
708
  * </Drawer>
697
709
  */
698
- declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
710
+ declare function Drawer({ isOpen, onClose, hasFooter, placement, size, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
699
711
 
700
712
  interface TooltipProps {
701
713
  children: React__default.ReactNode;
@@ -4455,4 +4467,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
4455
4467
  /** Validate the CVV against the detected brand's expected length. */
4456
4468
  declare function cvvError(value: string, cardNumber: string): string | undefined;
4457
4469
 
4458
- export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, Calendar, type CalendarEvent, type CalendarProps, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, type CartLineItem, type CartProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, Field, type FieldArrayItem, type FieldBindings, FieldHelpIcon, type FieldKind, FieldLabel, type FieldLabelProps, type FieldProps, type FieldRule, type FieldRules, type FieldShellOptions, type FieldSize, type FieldSnapshot, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormContext, FormField, type FormFieldProps, type FormProps, FormStore, type FormStoreOptions, type FormValues, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, Kbd, type KbdProps, type KbdSize, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Password, type PasswordProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, RadioGroup, type RadioGroupProps, type RadioOption, Rating, type RatingProps, type RulesMap, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SliderValue, type Spacing, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Switch, type SwitchInputProps, Table, type TableColumn, type TableProps, Tabs, type TabsAddProps, type TabsListProps, type TabsOrientation, type TabsPanelProps, type TabsProps, type TabsSize, type TabsTriggerProps, type TabsVariant, TagsInput, type TagsInputProps, DatePicker as Temporal, type TemporalPickerProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, TimePicker, type TimePickerProps, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type ValidateTrigger, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
4470
+ export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, Calendar, type CalendarEvent, type CalendarProps, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, type CartLineItem, type CartProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, Field, type FieldArrayItem, type FieldBindings, FieldHelpIcon, type FieldKind, FieldLabel, type FieldLabelProps, type FieldProps, type FieldRule, type FieldRules, type FieldShellOptions, type FieldSize, type FieldSnapshot, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormContext, FormField, type FormFieldProps, type FormProps, FormStore, type FormStoreOptions, type FormValues, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, Kbd, type KbdProps, type KbdSize, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Password, type PasswordProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, RadioGroup, type RadioGroupProps, type RadioOption, Rating, type RatingProps, type RulesMap, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SliderValue, type Spacing, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Switch, type SwitchInputProps, Table, type TableColumn, type TableProps, Tabs, type TabsAddProps, type TabsListProps, type TabsOrientation, type TabsPanelProps, type TabsProps, type TabsSize, type TabsTriggerProps, type TabsVariant, TagsInput, type TagsInputProps, DatePicker as Temporal, type TemporalPickerProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, TimePicker, type TimePickerProps, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type ValidateTrigger, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
package/dist/index.d.ts CHANGED
@@ -628,19 +628,21 @@ interface IconButtonProps {
628
628
  */
629
629
  declare function IconButton({ icon, onClick, type, buttonType, disabled, size, loading, loadingIcon, className, style, }: IconButtonProps): react_jsx_runtime.JSX.Element;
630
630
 
631
+ type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
631
632
  interface ModalProps {
632
633
  /**
633
- * Max width of the modal panel in pixels (default 600).
634
- * On narrow viewports the panel fills the screen minus 1 rem on each side.
635
- * Height is always content-driven (max 90 dvh).
634
+ * Named width scale (default `'md'`). Keeps modals consistent across the
635
+ * app: sm 400 · md 600 · lg 800 · xl 1000 · full (viewport − 2rem).
636
636
  */
637
- width?: number;
637
+ size?: ModalSize;
638
638
  /**
639
- * @deprecated Use `width` instead. The second tuple value (height) was
640
- * never honoured and is silently ignored. Kept for backwards
641
- * compatibility — will be removed in a future major version.
639
+ * Explicit max-width escape hatch a number (px) or any CSS length
640
+ * (e.g. `'48rem'`). Overrides `size` when set.
641
+ *
642
+ * Height is always content-driven (max 90 dvh): modals grow with their
643
+ * content and scroll internally rather than taking a fixed height.
642
644
  */
643
- size?: [number, number] | [number];
645
+ width?: number | string;
644
646
  isOpen?: boolean;
645
647
  onClose?: () => void;
646
648
  onOk?: () => void;
@@ -667,13 +669,23 @@ interface ModalProps {
667
669
  */
668
670
  declare function Modal({ width, size, isOpen, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
669
671
 
672
+ type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
670
673
  interface DrawerProps {
671
674
  isOpen?: boolean;
672
675
  onClose?: () => void;
673
676
  hasFooter?: boolean;
674
677
  /** 'left' | 'right' — which edge the panel slides from */
675
678
  placement?: 'left' | 'right';
676
- width?: number;
679
+ /**
680
+ * Named width scale (default `'md'`): sm 280 · md 320 · lg 480 · xl 640 ·
681
+ * full (viewport − 1rem). The panel always spans the full viewport height.
682
+ */
683
+ size?: DrawerSize;
684
+ /**
685
+ * Explicit width escape hatch — a number (px) or any CSS length
686
+ * (e.g. `'30rem'`). Overrides `size` when set.
687
+ */
688
+ width?: number | string;
677
689
  okText?: string;
678
690
  cancelText?: string;
679
691
  onOk?: () => void;
@@ -695,7 +707,7 @@ interface DrawerProps {
695
707
  * <FilterForm />
696
708
  * </Drawer>
697
709
  */
698
- declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
710
+ declare function Drawer({ isOpen, onClose, hasFooter, placement, size, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
699
711
 
700
712
  interface TooltipProps {
701
713
  children: React__default.ReactNode;
@@ -4455,4 +4467,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
4455
4467
  /** Validate the CVV against the detected brand's expected length. */
4456
4468
  declare function cvvError(value: string, cardNumber: string): string | undefined;
4457
4469
 
4458
- export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, Calendar, type CalendarEvent, type CalendarProps, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, type CartLineItem, type CartProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, Field, type FieldArrayItem, type FieldBindings, FieldHelpIcon, type FieldKind, FieldLabel, type FieldLabelProps, type FieldProps, type FieldRule, type FieldRules, type FieldShellOptions, type FieldSize, type FieldSnapshot, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormContext, FormField, type FormFieldProps, type FormProps, FormStore, type FormStoreOptions, type FormValues, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, Kbd, type KbdProps, type KbdSize, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Password, type PasswordProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, RadioGroup, type RadioGroupProps, type RadioOption, Rating, type RatingProps, type RulesMap, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SliderValue, type Spacing, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Switch, type SwitchInputProps, Table, type TableColumn, type TableProps, Tabs, type TabsAddProps, type TabsListProps, type TabsOrientation, type TabsPanelProps, type TabsProps, type TabsSize, type TabsTriggerProps, type TabsVariant, TagsInput, type TagsInputProps, DatePicker as Temporal, type TemporalPickerProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, TimePicker, type TimePickerProps, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type ValidateTrigger, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
4470
+ export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, Calendar, type CalendarEvent, type CalendarProps, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, type CartLineItem, type CartProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, Field, type FieldArrayItem, type FieldBindings, FieldHelpIcon, type FieldKind, FieldLabel, type FieldLabelProps, type FieldProps, type FieldRule, type FieldRules, type FieldShellOptions, type FieldSize, type FieldSnapshot, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormContext, FormField, type FormFieldProps, type FormProps, FormStore, type FormStoreOptions, type FormValues, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, Kbd, type KbdProps, type KbdSize, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Password, type PasswordProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, RadioGroup, type RadioGroupProps, type RadioOption, Rating, type RatingProps, type RulesMap, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SliderValue, type Spacing, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Switch, type SwitchInputProps, Table, type TableColumn, type TableProps, Tabs, type TabsAddProps, type TabsListProps, type TabsOrientation, type TabsPanelProps, type TabsProps, type TabsSize, type TabsTriggerProps, type TabsVariant, TagsInput, type TagsInputProps, DatePicker as Temporal, type TemporalPickerProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, TimePicker, type TimePickerProps, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type ValidateTrigger, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
package/dist/index.js CHANGED
@@ -746,9 +746,16 @@ var Button = React20.forwardRef(function Button2({
746
746
  });
747
747
  Button.displayName = "Button";
748
748
  var Button_default = Button;
749
+ var SIZE_MAP = {
750
+ sm: 400,
751
+ md: 600,
752
+ lg: 800,
753
+ xl: 1e3,
754
+ full: "calc(100vw - 2rem)"
755
+ };
749
756
  function Modal({
750
757
  width,
751
- size,
758
+ size = "md",
752
759
  isOpen = false,
753
760
  onClose,
754
761
  onOk,
@@ -761,7 +768,7 @@ function Modal({
761
768
  className = ""
762
769
  }) {
763
770
  const reduced = useReducedMotion();
764
- const maxWidth = width ?? size?.[0] ?? 600;
771
+ const maxWidth = width ?? SIZE_MAP[size];
765
772
  return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: (open) => {
766
773
  if (!open) onClose?.();
767
774
  }, children: /* @__PURE__ */ jsxs(Dialog.Portal, { forceMount: true, children: [
@@ -829,12 +836,20 @@ function Modal({
829
836
  ) }) })
830
837
  ] }) });
831
838
  }
839
+ var SIZE_MAP2 = {
840
+ sm: 280,
841
+ md: 320,
842
+ lg: 480,
843
+ xl: 640,
844
+ full: "calc(100vw - 1rem)"
845
+ };
832
846
  function Drawer({
833
847
  isOpen = false,
834
848
  onClose,
835
849
  hasFooter = true,
836
850
  placement = "right",
837
- width = 320,
851
+ size = "md",
852
+ width,
838
853
  okText = "Ok",
839
854
  cancelText = "Cancel",
840
855
  onOk,
@@ -846,6 +861,8 @@ function Drawer({
846
861
  const reduced = useReducedMotion();
847
862
  const isRight = placement === "right";
848
863
  const hiddenX = isRight ? "100%" : "-100%";
864
+ const resolvedWidth = width ?? SIZE_MAP2[size];
865
+ const widthCss = typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth;
849
866
  return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: (open) => {
850
867
  if (!open) onClose?.();
851
868
  }, children: /* @__PURE__ */ jsxs(Dialog.Portal, { forceMount: true, children: [
@@ -863,7 +880,7 @@ function Drawer({
863
880
  motion.div,
864
881
  {
865
882
  className: `fixed top-0 bottom-0 ${isRight ? "right-0" : "left-0"} z-modal flex flex-col bg-surface shadow-xl focus:outline-none ${className}`.trim(),
866
- style: { width: `min(calc(100vw - 1rem), ${width}px)` },
883
+ style: { width: `min(calc(100vw - 1rem), ${widthCss})` },
867
884
  initial: { x: reduced ? 0 : hiddenX, opacity: reduced ? 0 : 1 },
868
885
  animate: { x: 0, opacity: 1 },
869
886
  exit: { x: reduced ? 0 : hiddenX, opacity: reduced ? 0 : 1 },
@@ -2445,7 +2462,7 @@ function useNotification() {
2445
2462
  danger: (props) => open({ type: "danger", ...props })
2446
2463
  };
2447
2464
  }
2448
- var SIZE_MAP = {
2465
+ var SIZE_MAP3 = {
2449
2466
  // xs is sized to fit beside button text (~14px) — async AutoComplete,
2450
2467
  // Button loading prop, inline status badges, etc.
2451
2468
  xs: { outer: "w-3.5 h-3.5", inner: "w-1.5 h-1.5", dot: "w-0.5 h-0.5", stroke: "border-[1.5px]", text: "text-[10px]" },
@@ -2462,7 +2479,7 @@ var letterVariants = {
2462
2479
  visible: { opacity: 1, y: 0, transition: { duration: 0.22, ease: "easeOut" } }
2463
2480
  };
2464
2481
  function SpinnerCore({ size, color }) {
2465
- const dims = SIZE_MAP[size];
2482
+ const dims = SIZE_MAP3[size];
2466
2483
  const ringColor = color ?? "var(--color-accent)";
2467
2484
  return /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-center", style: { color: ringColor }, children: [
2468
2485
  /* @__PURE__ */ jsx(
@@ -2501,7 +2518,7 @@ function LoadingSpinner({
2501
2518
  }) {
2502
2519
  const reduced = useReducedMotion();
2503
2520
  const letters = prompt ? Array.from(prompt) : [];
2504
- const dims = SIZE_MAP[size];
2521
+ const dims = SIZE_MAP3[size];
2505
2522
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2506
2523
  /* @__PURE__ */ jsx(SpinnerCore, { size, color: spinnerColor }),
2507
2524
  letters.length > 0 && /* @__PURE__ */ jsx(