@geomak/ui 7.16.0 → 7.17.1
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 +89 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +89 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5307,6 +5307,19 @@ interface JwtResult<T> {
|
|
|
5307
5307
|
*/
|
|
5308
5308
|
declare function useJwt<T = Record<string, unknown>>(token: string | null | undefined): JwtResult<T>;
|
|
5309
5309
|
|
|
5310
|
+
interface UseDownloadReturn {
|
|
5311
|
+
/** Trigger a browser download of a Blob. */
|
|
5312
|
+
saveBlob: (blob: Blob, fileName: string) => void;
|
|
5313
|
+
/**
|
|
5314
|
+
* Decode a base64 string and download it as a file.
|
|
5315
|
+
* Accepts a raw base64 payload OR a full `data:<mime>;base64,<payload>` URI.
|
|
5316
|
+
* @param mimeType MIME for the Blob. Inferred from a data-URI prefix when
|
|
5317
|
+
* present, else 'application/octet-stream'.
|
|
5318
|
+
*/
|
|
5319
|
+
saveFromBase64: (base64: string, fileName: string, mimeType?: string) => void;
|
|
5320
|
+
}
|
|
5321
|
+
declare function useDownload(): UseDownloadReturn;
|
|
5322
|
+
|
|
5310
5323
|
interface ExportSaveOptions {
|
|
5311
5324
|
/** File name WITHOUT extension. Default: 'export' (Excel) / 'report' (PDF). */
|
|
5312
5325
|
fileName?: string;
|
|
@@ -5794,4 +5807,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
5794
5807
|
/** Validate the CVV against the detected brand's expected length. */
|
|
5795
5808
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
5796
5809
|
|
|
5797
|
-
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, Banner, type BannerProps, type BannerTone, Blog, type BlogPost, type BlogProps, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, type BreakpointState, Button, type ButtonProps, CARD_BRANDS, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, CartButton, type CartButtonProps, type CartContextValue, type CartItemInput, type CartLineItem, type CartProps, CartProvider, type CartProviderProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, type Cell, type CellEditInfo, type CellValue, Chat, type ChatMessage, type ChatProps, Checkbox, type CheckboxProps, Checkout, type CheckoutProps, type ClassValue, ColorPicker, type ColorPickerProps, type ConsentChoice, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CookieConsent, type CookieConsentProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, DataGrid, type DataGridProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type EditorArgs, EmptyCart, type EmptyCartProps, type ErrorMap, type ExcelSheetInput, type ExpandRowOptions, type ExportSaveOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, type Feature, FeatureGrid, type FeatureGridProps, 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, type FileSource, 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 GridColumn, type GridProps, type GridSortDirection, type GridSortState, type GridSource, IconButton, type IconButtonProps, Jumbotron, type JumbotronBackground, type JumbotronLayout, type JumbotronProps, type JwtResult, Kbd, type KbdProps, type KbdSize, LeadCapture, type LeadCaptureProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, LogoutTimer, type LogoutTimerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, MenuButton, type MenuButtonItem, type MenuButtonProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Parallax, type ParallaxProps, type ParsedSheet, Password, type PasswordProps, type PasswordRule, type PasswordScore, PasswordStrength, type PasswordStrengthProps, type PasswordStrengthResult, type PdfExportOptions, type PdfPage, PdfViewer, type PdfViewerProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, type PricingPlan, PricingPlans, type PricingPlansProps, RadioGroup, type RadioGroupProps, type RadioOption, RadioTile, type RadioTileOption, type RadioTileProps, Rating, type RatingProps, type RemoteSourceOptions, type RulesMap, ScalableContainer, type ScalableContainerProps, Scheduler, type SchedulerEvent, type SchedulerProps, type SchedulerRange, type SchedulerView, SearchInput, type SearchInputProps, type SearchOptions, SecureLayout, type SecureLayoutProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, type SheetData, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, type Slide, SlideShow, type SlideShowProps, Slider, type SliderMark, type SliderProps, type SliderValue, type SocialLink, type SocialPlatform, Socials, type SocialsProps, type SortDirection, type SortState, type Spacing, Spreadsheet, type SpreadsheetProps, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Stepper, type StepperActiveStatus, type StepperProps, type StepperStep, 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, type Testimonial, Testimonials, type TestimonialsProps, 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, Timeline, type TimelineEvent, type TimelineProps, type TimelineStatus, 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 UseExcelReturn, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type UsePdfReturn, type ValidateTrigger, Video, type VideoProps, VirtualList, type VirtualListProps, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
|
5810
|
+
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, Banner, type BannerProps, type BannerTone, Blog, type BlogPost, type BlogProps, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, type BreakpointState, Button, type ButtonProps, CARD_BRANDS, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, CartButton, type CartButtonProps, type CartContextValue, type CartItemInput, type CartLineItem, type CartProps, CartProvider, type CartProviderProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, type Cell, type CellEditInfo, type CellValue, Chat, type ChatMessage, type ChatProps, Checkbox, type CheckboxProps, Checkout, type CheckoutProps, type ClassValue, ColorPicker, type ColorPickerProps, type ConsentChoice, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CookieConsent, type CookieConsentProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, DataGrid, type DataGridProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type EditorArgs, EmptyCart, type EmptyCartProps, type ErrorMap, type ExcelSheetInput, type ExpandRowOptions, type ExportSaveOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, type Feature, FeatureGrid, type FeatureGridProps, 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, type FileSource, 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 GridColumn, type GridProps, type GridSortDirection, type GridSortState, type GridSource, IconButton, type IconButtonProps, Jumbotron, type JumbotronBackground, type JumbotronLayout, type JumbotronProps, type JwtResult, Kbd, type KbdProps, type KbdSize, LeadCapture, type LeadCaptureProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, LogoutTimer, type LogoutTimerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, MenuButton, type MenuButtonItem, type MenuButtonProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Parallax, type ParallaxProps, type ParsedSheet, Password, type PasswordProps, type PasswordRule, type PasswordScore, PasswordStrength, type PasswordStrengthProps, type PasswordStrengthResult, type PdfExportOptions, type PdfPage, PdfViewer, type PdfViewerProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, type PricingPlan, PricingPlans, type PricingPlansProps, RadioGroup, type RadioGroupProps, type RadioOption, RadioTile, type RadioTileOption, type RadioTileProps, Rating, type RatingProps, type RemoteSourceOptions, type RulesMap, ScalableContainer, type ScalableContainerProps, Scheduler, type SchedulerEvent, type SchedulerProps, type SchedulerRange, type SchedulerView, SearchInput, type SearchInputProps, type SearchOptions, SecureLayout, type SecureLayoutProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, type SheetData, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, type Slide, SlideShow, type SlideShowProps, Slider, type SliderMark, type SliderProps, type SliderValue, type SocialLink, type SocialPlatform, Socials, type SocialsProps, type SortDirection, type SortState, type Spacing, Spreadsheet, type SpreadsheetProps, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Stepper, type StepperActiveStatus, type StepperProps, type StepperStep, 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, type Testimonial, Testimonials, type TestimonialsProps, 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, Timeline, type TimelineEvent, type TimelineProps, type TimelineStatus, 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 UseDownloadReturn, type UseExcelReturn, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type UsePdfReturn, type ValidateTrigger, Video, type VideoProps, VirtualList, type VirtualListProps, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useDownload, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
package/dist/index.d.ts
CHANGED
|
@@ -5307,6 +5307,19 @@ interface JwtResult<T> {
|
|
|
5307
5307
|
*/
|
|
5308
5308
|
declare function useJwt<T = Record<string, unknown>>(token: string | null | undefined): JwtResult<T>;
|
|
5309
5309
|
|
|
5310
|
+
interface UseDownloadReturn {
|
|
5311
|
+
/** Trigger a browser download of a Blob. */
|
|
5312
|
+
saveBlob: (blob: Blob, fileName: string) => void;
|
|
5313
|
+
/**
|
|
5314
|
+
* Decode a base64 string and download it as a file.
|
|
5315
|
+
* Accepts a raw base64 payload OR a full `data:<mime>;base64,<payload>` URI.
|
|
5316
|
+
* @param mimeType MIME for the Blob. Inferred from a data-URI prefix when
|
|
5317
|
+
* present, else 'application/octet-stream'.
|
|
5318
|
+
*/
|
|
5319
|
+
saveFromBase64: (base64: string, fileName: string, mimeType?: string) => void;
|
|
5320
|
+
}
|
|
5321
|
+
declare function useDownload(): UseDownloadReturn;
|
|
5322
|
+
|
|
5310
5323
|
interface ExportSaveOptions {
|
|
5311
5324
|
/** File name WITHOUT extension. Default: 'export' (Excel) / 'report' (PDF). */
|
|
5312
5325
|
fileName?: string;
|
|
@@ -5794,4 +5807,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
5794
5807
|
/** Validate the CVV against the detected brand's expected length. */
|
|
5795
5808
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
5796
5809
|
|
|
5797
|
-
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, Banner, type BannerProps, type BannerTone, Blog, type BlogPost, type BlogProps, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, type BreakpointState, Button, type ButtonProps, CARD_BRANDS, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, CartButton, type CartButtonProps, type CartContextValue, type CartItemInput, type CartLineItem, type CartProps, CartProvider, type CartProviderProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, type Cell, type CellEditInfo, type CellValue, Chat, type ChatMessage, type ChatProps, Checkbox, type CheckboxProps, Checkout, type CheckoutProps, type ClassValue, ColorPicker, type ColorPickerProps, type ConsentChoice, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CookieConsent, type CookieConsentProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, DataGrid, type DataGridProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type EditorArgs, EmptyCart, type EmptyCartProps, type ErrorMap, type ExcelSheetInput, type ExpandRowOptions, type ExportSaveOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, type Feature, FeatureGrid, type FeatureGridProps, 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, type FileSource, 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 GridColumn, type GridProps, type GridSortDirection, type GridSortState, type GridSource, IconButton, type IconButtonProps, Jumbotron, type JumbotronBackground, type JumbotronLayout, type JumbotronProps, type JwtResult, Kbd, type KbdProps, type KbdSize, LeadCapture, type LeadCaptureProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, LogoutTimer, type LogoutTimerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, MenuButton, type MenuButtonItem, type MenuButtonProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Parallax, type ParallaxProps, type ParsedSheet, Password, type PasswordProps, type PasswordRule, type PasswordScore, PasswordStrength, type PasswordStrengthProps, type PasswordStrengthResult, type PdfExportOptions, type PdfPage, PdfViewer, type PdfViewerProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, type PricingPlan, PricingPlans, type PricingPlansProps, RadioGroup, type RadioGroupProps, type RadioOption, RadioTile, type RadioTileOption, type RadioTileProps, Rating, type RatingProps, type RemoteSourceOptions, type RulesMap, ScalableContainer, type ScalableContainerProps, Scheduler, type SchedulerEvent, type SchedulerProps, type SchedulerRange, type SchedulerView, SearchInput, type SearchInputProps, type SearchOptions, SecureLayout, type SecureLayoutProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, type SheetData, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, type Slide, SlideShow, type SlideShowProps, Slider, type SliderMark, type SliderProps, type SliderValue, type SocialLink, type SocialPlatform, Socials, type SocialsProps, type SortDirection, type SortState, type Spacing, Spreadsheet, type SpreadsheetProps, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Stepper, type StepperActiveStatus, type StepperProps, type StepperStep, 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, type Testimonial, Testimonials, type TestimonialsProps, 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, Timeline, type TimelineEvent, type TimelineProps, type TimelineStatus, 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 UseExcelReturn, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type UsePdfReturn, type ValidateTrigger, Video, type VideoProps, VirtualList, type VirtualListProps, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
|
5810
|
+
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, Banner, type BannerProps, type BannerTone, Blog, type BlogPost, type BlogProps, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, type BreakpointState, Button, type ButtonProps, CARD_BRANDS, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, Cart, CartButton, type CartButtonProps, type CartContextValue, type CartItemInput, type CartLineItem, type CartProps, CartProvider, type CartProviderProps, type CartSummaryRow, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, type Cell, type CellEditInfo, type CellValue, Chat, type ChatMessage, type ChatProps, Checkbox, type CheckboxProps, Checkout, type CheckoutProps, type ClassValue, ColorPicker, type ColorPickerProps, type ConsentChoice, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CookieConsent, type CookieConsentProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, DataGrid, type DataGridProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeltaDirection, Drawer, type DrawerProps, type DrawerSize, Dropdown, type DropdownItem, type DropdownProps, type EditorArgs, EmptyCart, type EmptyCartProps, type ErrorMap, type ExcelSheetInput, type ExpandRowOptions, type ExportSaveOptions, FAB, type FABAction, type FABPosition, type FABProps, type FABSize, type FABTone, FadingBase, type FadingBaseProps, type Feature, FeatureGrid, type FeatureGridProps, 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, type FileSource, 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 GridColumn, type GridProps, type GridSortDirection, type GridSortState, type GridSource, IconButton, type IconButtonProps, Jumbotron, type JumbotronBackground, type JumbotronLayout, type JumbotronProps, type JwtResult, Kbd, type KbdProps, type KbdSize, LeadCapture, type LeadCaptureProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, LogoutTimer, type LogoutTimerProps, MegaMenu, type MegaMenuFeaturedProps, type MegaMenuItemProps, type MegaMenuLinkProps, type MegaMenuPanelProps, type MegaMenuProps, type MegaMenuSectionProps, MenuButton, type MenuButtonItem, type MenuButtonProps, Modal, type ModalProps, type ModalSize, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Parallax, type ParallaxProps, type ParsedSheet, Password, type PasswordProps, type PasswordRule, type PasswordScore, PasswordStrength, type PasswordStrengthProps, type PasswordStrengthResult, type PdfExportOptions, type PdfPage, PdfViewer, type PdfViewerProps, PopConfirm, type PopConfirmProps, type PopConfirmTone, Portal, type PortalProps, type PricingPlan, PricingPlans, type PricingPlansProps, RadioGroup, type RadioGroupProps, type RadioOption, RadioTile, type RadioTileOption, type RadioTileProps, Rating, type RatingProps, type RemoteSourceOptions, type RulesMap, ScalableContainer, type ScalableContainerProps, Scheduler, type SchedulerEvent, type SchedulerProps, type SchedulerRange, type SchedulerView, SearchInput, type SearchInputProps, type SearchOptions, SecureLayout, type SecureLayoutProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, type SheetData, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, type Slide, SlideShow, type SlideShowProps, Slider, type SliderMark, type SliderProps, type SliderValue, type SocialLink, type SocialPlatform, Socials, type SocialsProps, type SortDirection, type SortState, type Spacing, Spreadsheet, type SpreadsheetProps, Statistic, type StatisticDelta, type StatisticProps, type StatisticSize, Stepper, type StepperActiveStatus, type StepperProps, type StepperStep, 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, type Testimonial, Testimonials, type TestimonialsProps, 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, Timeline, type TimelineEvent, type TimelineProps, type TimelineStatus, 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 UseDownloadReturn, type UseExcelReturn, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type UsePdfReturn, type ValidateTrigger, Video, type VideoProps, VirtualList, type VirtualListProps, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useDownload, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
package/dist/index.js
CHANGED
|
@@ -5056,12 +5056,52 @@ function useTargetBbox(ref) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
var TOOLTIP_WIDTH = 280;
|
|
5058
5058
|
var TOOLTIP_GAP = 12;
|
|
5059
|
-
function tooltipStyleFor(bbox, placement) {
|
|
5060
|
-
const
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5059
|
+
function tooltipStyleFor(bbox, placement, tooltipHeight) {
|
|
5060
|
+
const GAP2 = TOOLTIP_GAP;
|
|
5061
|
+
const W = TOOLTIP_WIDTH;
|
|
5062
|
+
const H = tooltipHeight;
|
|
5063
|
+
const vw = window.innerWidth;
|
|
5064
|
+
const vh = window.innerHeight;
|
|
5065
|
+
let side = placement ?? "right";
|
|
5066
|
+
if (side === "right" && bbox.right + GAP2 + W > vw) side = "left";
|
|
5067
|
+
if (side === "left" && bbox.left - W - GAP2 < 0) side = "right";
|
|
5068
|
+
if (side === "bottom" && bbox.bottom + GAP2 + H > vh) side = "top";
|
|
5069
|
+
if (side === "top" && bbox.top - GAP2 - H < 0) side = "bottom";
|
|
5070
|
+
let left;
|
|
5071
|
+
let top;
|
|
5072
|
+
let transform;
|
|
5073
|
+
if (side === "right") {
|
|
5074
|
+
left = bbox.right + GAP2;
|
|
5075
|
+
top = bbox.top + bbox.height / 2;
|
|
5076
|
+
transform = "translateY(-50%)";
|
|
5077
|
+
} else if (side === "left") {
|
|
5078
|
+
left = bbox.left - W - GAP2;
|
|
5079
|
+
top = bbox.top + bbox.height / 2;
|
|
5080
|
+
transform = "translateY(-50%)";
|
|
5081
|
+
} else if (side === "bottom") {
|
|
5082
|
+
left = bbox.left + bbox.width / 2;
|
|
5083
|
+
top = bbox.bottom + GAP2;
|
|
5084
|
+
transform = "translateX(-50%)";
|
|
5085
|
+
} else {
|
|
5086
|
+
left = bbox.left + bbox.width / 2;
|
|
5087
|
+
top = bbox.top - GAP2;
|
|
5088
|
+
transform = "translate(-50%, -100%)";
|
|
5089
|
+
}
|
|
5090
|
+
if (side === "top" || side === "bottom") {
|
|
5091
|
+
left = Math.max(GAP2 + W / 2, Math.min(left, vw - W / 2 - GAP2));
|
|
5092
|
+
} else {
|
|
5093
|
+
left = Math.max(GAP2, Math.min(left, vw - W - GAP2));
|
|
5094
|
+
}
|
|
5095
|
+
if (H > 0) {
|
|
5096
|
+
if (side === "right" || side === "left") {
|
|
5097
|
+
top = Math.max(GAP2 + H / 2, Math.min(top, vh - GAP2 - H / 2));
|
|
5098
|
+
} else if (side === "bottom") {
|
|
5099
|
+
top = Math.max(GAP2, Math.min(top, vh - GAP2 - H));
|
|
5100
|
+
} else {
|
|
5101
|
+
top = Math.max(GAP2 + H, Math.min(top, vh - GAP2));
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
return { left, top, transform, width: W };
|
|
5065
5105
|
}
|
|
5066
5106
|
function useFocusTrap(containerRef, active) {
|
|
5067
5107
|
useEffect(() => {
|
|
@@ -5109,6 +5149,11 @@ function Wizard({
|
|
|
5109
5149
|
const reduced = useReducedMotion();
|
|
5110
5150
|
const [open, setOpen] = useState(() => steps.length > 0 && !readDismissed(storageKey));
|
|
5111
5151
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
5152
|
+
const [tooltipHeight, setTooltipHeight] = useState(0);
|
|
5153
|
+
useLayoutEffect(() => {
|
|
5154
|
+
const h = tooltipRef.current?.offsetHeight ?? 0;
|
|
5155
|
+
if (h > 0) setTooltipHeight((prev) => prev === h ? prev : h);
|
|
5156
|
+
}, [activeIndex, open]);
|
|
5112
5157
|
const step = steps[activeIndex];
|
|
5113
5158
|
const bbox = useTargetBbox(step?.stepRef);
|
|
5114
5159
|
useFocusTrap(tooltipRef, open);
|
|
@@ -5161,7 +5206,7 @@ function Wizard({
|
|
|
5161
5206
|
right: 0,
|
|
5162
5207
|
height: bbox.height + SPOT_PAD * 2
|
|
5163
5208
|
} : { display: "none" };
|
|
5164
|
-
const tooltipStyle = bbox ? tooltipStyleFor(bbox, step?.placement) : { display: "none" };
|
|
5209
|
+
const tooltipStyle = bbox ? tooltipStyleFor(bbox, step?.placement, tooltipHeight) : { display: "none" };
|
|
5165
5210
|
const isLast = activeIndex === steps.length - 1;
|
|
5166
5211
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5167
5212
|
children,
|
|
@@ -11145,6 +11190,36 @@ function useJwt(token) {
|
|
|
11145
11190
|
const isValid = decoded.payload != null && !isExpired;
|
|
11146
11191
|
return { payload: decoded.payload, header: decoded.header, expiresAt, isExpired, isValid, raw: token ?? null };
|
|
11147
11192
|
}
|
|
11193
|
+
function useDownload() {
|
|
11194
|
+
const saveBlob = useCallback((blob, fileName) => {
|
|
11195
|
+
if (typeof window === "undefined") return;
|
|
11196
|
+
const url = URL.createObjectURL(blob);
|
|
11197
|
+
const a = document.createElement("a");
|
|
11198
|
+
a.href = url;
|
|
11199
|
+
a.download = fileName;
|
|
11200
|
+
a.click();
|
|
11201
|
+
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
11202
|
+
}, []);
|
|
11203
|
+
const saveFromBase64 = useCallback((base64, fileName, mimeType) => {
|
|
11204
|
+
let payload = base64;
|
|
11205
|
+
let inferredMime;
|
|
11206
|
+
if (base64.startsWith("data:")) {
|
|
11207
|
+
const commaIdx = base64.indexOf(",");
|
|
11208
|
+
if (commaIdx !== -1) {
|
|
11209
|
+
const header = base64.slice(5, commaIdx);
|
|
11210
|
+
const semiIdx = header.indexOf(";");
|
|
11211
|
+
if (semiIdx !== -1) inferredMime = header.slice(0, semiIdx);
|
|
11212
|
+
payload = base64.slice(commaIdx + 1);
|
|
11213
|
+
}
|
|
11214
|
+
}
|
|
11215
|
+
const binary = atob(payload);
|
|
11216
|
+
const bytes = new Uint8Array(binary.length);
|
|
11217
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
11218
|
+
const blob = new Blob([bytes], { type: mimeType ?? inferredMime ?? "application/octet-stream" });
|
|
11219
|
+
saveBlob(blob, fileName);
|
|
11220
|
+
}, [saveBlob]);
|
|
11221
|
+
return { saveBlob, saveFromBase64 };
|
|
11222
|
+
}
|
|
11148
11223
|
var INVALID_WS_CHARS = /[:\\/?\*[\]]/g;
|
|
11149
11224
|
function sanitizeName(name) {
|
|
11150
11225
|
return name.replace(INVALID_WS_CHARS, "_").slice(0, 31) || "Sheet";
|
|
@@ -11153,6 +11228,7 @@ var xlsxPromise2 = null;
|
|
|
11153
11228
|
var loadXlsx2 = () => xlsxPromise2 ??= import('xlsx');
|
|
11154
11229
|
function useExcel() {
|
|
11155
11230
|
const [isExporting, setIsExporting] = useState(false);
|
|
11231
|
+
const { saveBlob } = useDownload();
|
|
11156
11232
|
const exportSheets = useCallback(async (sheets, options = {}) => {
|
|
11157
11233
|
const { fileName = "export", onSave } = options;
|
|
11158
11234
|
setIsExporting(true);
|
|
@@ -11204,12 +11280,12 @@ function useExcel() {
|
|
|
11204
11280
|
if (onSave) {
|
|
11205
11281
|
await onSave(blob, name);
|
|
11206
11282
|
} else {
|
|
11207
|
-
|
|
11283
|
+
saveBlob(blob, name);
|
|
11208
11284
|
}
|
|
11209
11285
|
} finally {
|
|
11210
11286
|
setIsExporting(false);
|
|
11211
11287
|
}
|
|
11212
|
-
}, []);
|
|
11288
|
+
}, [saveBlob]);
|
|
11213
11289
|
const readWorkbook = useCallback(async (source) => {
|
|
11214
11290
|
const XLSX = await loadXlsx2();
|
|
11215
11291
|
let bytes;
|
|
@@ -11245,6 +11321,7 @@ var jspdfPromise2 = null;
|
|
|
11245
11321
|
var loadJspdf2 = () => jspdfPromise2 ??= import('jspdf');
|
|
11246
11322
|
function usePdf() {
|
|
11247
11323
|
const [isExporting, setIsExporting] = useState(false);
|
|
11324
|
+
const { saveBlob } = useDownload();
|
|
11248
11325
|
const exportCanvases = useCallback(async (pages, options = {}) => {
|
|
11249
11326
|
const { fileName = "report", onSave, orientation = "landscape" } = options;
|
|
11250
11327
|
const validPages = pages.filter((p) => p.canvas.width !== 0 && p.canvas.height !== 0);
|
|
@@ -11279,17 +11356,12 @@ function usePdf() {
|
|
|
11279
11356
|
if (onSave) {
|
|
11280
11357
|
await onSave(blob, name);
|
|
11281
11358
|
} else {
|
|
11282
|
-
|
|
11283
|
-
const a = document.createElement("a");
|
|
11284
|
-
a.href = url;
|
|
11285
|
-
a.download = name;
|
|
11286
|
-
a.click();
|
|
11287
|
-
URL.revokeObjectURL(url);
|
|
11359
|
+
saveBlob(blob, name);
|
|
11288
11360
|
}
|
|
11289
11361
|
} finally {
|
|
11290
11362
|
setIsExporting(false);
|
|
11291
11363
|
}
|
|
11292
|
-
}, []);
|
|
11364
|
+
}, [saveBlob]);
|
|
11293
11365
|
return { exportCanvases, isExporting };
|
|
11294
11366
|
}
|
|
11295
11367
|
var GRADIENT = "radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in oklab, var(--color-accent) 12%, transparent), transparent 70%)";
|
|
@@ -11832,6 +11904,6 @@ function LeadCapture({
|
|
|
11832
11904
|
);
|
|
11833
11905
|
}
|
|
11834
11906
|
|
|
11835
|
-
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Banner, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DataGrid, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton_default as IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PasswordStrength, PdfViewer, PopConfirm, Portal, PricingPlans, RadioGroup, RadioTile, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Spreadsheet, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, VirtualList, Wizard, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
|
11907
|
+
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Banner, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DataGrid, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton_default as IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PasswordStrength, PdfViewer, PopConfirm, Portal, PricingPlans, RadioGroup, RadioTile, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Spreadsheet, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, VirtualList, Wizard, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useDownload, useExcel, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification, usePdf };
|
|
11836
11908
|
//# sourceMappingURL=index.js.map
|
|
11837
11909
|
//# sourceMappingURL=index.js.map
|