@geomak/ui 6.9.0 → 6.10.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.cjs +282 -205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +89 -13
- package/dist/index.js.map +1 -1
- package/dist/styles.css +9 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1247,6 +1247,48 @@ interface FABProps {
|
|
|
1247
1247
|
*/
|
|
1248
1248
|
declare function FAB({ icon, label, onClick, actions, position, size, tone, fixed, className, style, }: FABProps): react_jsx_runtime.JSX.Element;
|
|
1249
1249
|
|
|
1250
|
+
type PopConfirmTone = 'default' | 'danger';
|
|
1251
|
+
interface PopConfirmProps {
|
|
1252
|
+
/** The trigger element. Cloned as the popover anchor (rendered `asChild`). */
|
|
1253
|
+
children: React__default.ReactElement;
|
|
1254
|
+
/** The confirmation question / heading. */
|
|
1255
|
+
title: React__default.ReactNode;
|
|
1256
|
+
/** Optional secondary line under the title. */
|
|
1257
|
+
description?: React__default.ReactNode;
|
|
1258
|
+
/** Runs on confirm. If it returns a promise, the confirm button shows a loading state until it settles. */
|
|
1259
|
+
onConfirm?: () => void | Promise<void>;
|
|
1260
|
+
/** Runs on cancel / dismiss. */
|
|
1261
|
+
onCancel?: () => void;
|
|
1262
|
+
/** Confirm button label. Default `'Confirm'`. */
|
|
1263
|
+
confirmText?: React__default.ReactNode;
|
|
1264
|
+
/** Cancel button label. Default `'Cancel'`. */
|
|
1265
|
+
cancelText?: React__default.ReactNode;
|
|
1266
|
+
/** `'danger'` colours the confirm button red. Default `'default'`. */
|
|
1267
|
+
tone?: PopConfirmTone;
|
|
1268
|
+
/** Leading icon shown beside the title. */
|
|
1269
|
+
icon?: React__default.ReactNode;
|
|
1270
|
+
/** Side of the trigger to open on. Default `'top'`. */
|
|
1271
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
1272
|
+
/** Controlled open state (optional). */
|
|
1273
|
+
open?: boolean;
|
|
1274
|
+
onOpenChange?: (open: boolean) => void;
|
|
1275
|
+
className?: string;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* A lightweight confirm prompt anchored to its trigger, on Radix Popover. Use it
|
|
1279
|
+
* for in-place "are you sure?" gates (delete, archive) instead of a full Modal.
|
|
1280
|
+
* An async `onConfirm` keeps the confirm button in a loading state until it
|
|
1281
|
+
* resolves, then closes.
|
|
1282
|
+
*
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```tsx
|
|
1285
|
+
* <PopConfirm title="Delete this vessel?" tone="danger" confirmText="Delete" onConfirm={remove}>
|
|
1286
|
+
* <Button content="Delete" variant="danger" />
|
|
1287
|
+
* </PopConfirm>
|
|
1288
|
+
* ```
|
|
1289
|
+
*/
|
|
1290
|
+
declare function PopConfirm({ children, title, description, onConfirm, onCancel, confirmText, cancelText, tone, icon, side, open, onOpenChange, className, }: PopConfirmProps): react_jsx_runtime.JSX.Element;
|
|
1291
|
+
|
|
1250
1292
|
/** ─────────────────── types ─────────────────── */
|
|
1251
1293
|
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
1252
1294
|
type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
@@ -4315,4 +4357,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
4315
4357
|
/** Validate the CVV against the detected brand's expected length. */
|
|
4316
4358
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
4317
4359
|
|
|
4318
|
-
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, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, 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, 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 };
|
|
4360
|
+
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, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1247,6 +1247,48 @@ interface FABProps {
|
|
|
1247
1247
|
*/
|
|
1248
1248
|
declare function FAB({ icon, label, onClick, actions, position, size, tone, fixed, className, style, }: FABProps): react_jsx_runtime.JSX.Element;
|
|
1249
1249
|
|
|
1250
|
+
type PopConfirmTone = 'default' | 'danger';
|
|
1251
|
+
interface PopConfirmProps {
|
|
1252
|
+
/** The trigger element. Cloned as the popover anchor (rendered `asChild`). */
|
|
1253
|
+
children: React__default.ReactElement;
|
|
1254
|
+
/** The confirmation question / heading. */
|
|
1255
|
+
title: React__default.ReactNode;
|
|
1256
|
+
/** Optional secondary line under the title. */
|
|
1257
|
+
description?: React__default.ReactNode;
|
|
1258
|
+
/** Runs on confirm. If it returns a promise, the confirm button shows a loading state until it settles. */
|
|
1259
|
+
onConfirm?: () => void | Promise<void>;
|
|
1260
|
+
/** Runs on cancel / dismiss. */
|
|
1261
|
+
onCancel?: () => void;
|
|
1262
|
+
/** Confirm button label. Default `'Confirm'`. */
|
|
1263
|
+
confirmText?: React__default.ReactNode;
|
|
1264
|
+
/** Cancel button label. Default `'Cancel'`. */
|
|
1265
|
+
cancelText?: React__default.ReactNode;
|
|
1266
|
+
/** `'danger'` colours the confirm button red. Default `'default'`. */
|
|
1267
|
+
tone?: PopConfirmTone;
|
|
1268
|
+
/** Leading icon shown beside the title. */
|
|
1269
|
+
icon?: React__default.ReactNode;
|
|
1270
|
+
/** Side of the trigger to open on. Default `'top'`. */
|
|
1271
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
1272
|
+
/** Controlled open state (optional). */
|
|
1273
|
+
open?: boolean;
|
|
1274
|
+
onOpenChange?: (open: boolean) => void;
|
|
1275
|
+
className?: string;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* A lightweight confirm prompt anchored to its trigger, on Radix Popover. Use it
|
|
1279
|
+
* for in-place "are you sure?" gates (delete, archive) instead of a full Modal.
|
|
1280
|
+
* An async `onConfirm` keeps the confirm button in a loading state until it
|
|
1281
|
+
* resolves, then closes.
|
|
1282
|
+
*
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```tsx
|
|
1285
|
+
* <PopConfirm title="Delete this vessel?" tone="danger" confirmText="Delete" onConfirm={remove}>
|
|
1286
|
+
* <Button content="Delete" variant="danger" />
|
|
1287
|
+
* </PopConfirm>
|
|
1288
|
+
* ```
|
|
1289
|
+
*/
|
|
1290
|
+
declare function PopConfirm({ children, title, description, onConfirm, onCancel, confirmText, cancelText, tone, icon, side, open, onOpenChange, className, }: PopConfirmProps): react_jsx_runtime.JSX.Element;
|
|
1291
|
+
|
|
1250
1292
|
/** ─────────────────── types ─────────────────── */
|
|
1251
1293
|
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
1252
1294
|
type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
@@ -4315,4 +4357,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
4315
4357
|
/** Validate the CVV against the detected brand's expected length. */
|
|
4316
4358
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
4317
4359
|
|
|
4318
|
-
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, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, 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, 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 };
|
|
4360
|
+
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, Card, type CardBodyProps, type CardBrand, CardCarousel, type CardCarouselProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { colors_default } from './chunk-GKXP6OJJ.js';
|
|
2
2
|
export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-GKXP6OJJ.js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
4
|
+
import React18, { createContext, useState, useEffect, useMemo, useId, useCallback, useRef, useContext, useLayoutEffect, useSyncExternalStore } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
@@ -9,8 +9,8 @@ import { useReducedMotion, AnimatePresence, motion } from 'framer-motion';
|
|
|
9
9
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
10
10
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
11
11
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
12
|
-
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
13
12
|
import * as Popover from '@radix-ui/react-popover';
|
|
13
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
14
14
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
15
15
|
import * as NavigationMenu from '@radix-ui/react-navigation-menu';
|
|
16
16
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
@@ -1630,7 +1630,7 @@ function Kbd({
|
|
|
1630
1630
|
style
|
|
1631
1631
|
}) {
|
|
1632
1632
|
if (keys && keys.length > 0) {
|
|
1633
|
-
return /* @__PURE__ */ jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxs(
|
|
1633
|
+
return /* @__PURE__ */ jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
|
|
1634
1634
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
1635
1635
|
/* @__PURE__ */ jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
1636
1636
|
] }, `${k}-${i}`)) });
|
|
@@ -1704,7 +1704,7 @@ function CardCarousel({
|
|
|
1704
1704
|
style
|
|
1705
1705
|
}) {
|
|
1706
1706
|
const scrollerRef = useRef(null);
|
|
1707
|
-
const slides =
|
|
1707
|
+
const slides = React18.Children.toArray(children);
|
|
1708
1708
|
const [active, setActive] = useState(0);
|
|
1709
1709
|
const [atStart, setAtStart] = useState(true);
|
|
1710
1710
|
const [atEnd, setAtEnd] = useState(false);
|
|
@@ -1923,6 +1923,82 @@ function FAB({
|
|
|
1923
1923
|
}
|
|
1924
1924
|
);
|
|
1925
1925
|
}
|
|
1926
|
+
function PopConfirm({
|
|
1927
|
+
children,
|
|
1928
|
+
title,
|
|
1929
|
+
description,
|
|
1930
|
+
onConfirm,
|
|
1931
|
+
onCancel,
|
|
1932
|
+
confirmText = "Confirm",
|
|
1933
|
+
cancelText = "Cancel",
|
|
1934
|
+
tone = "default",
|
|
1935
|
+
icon,
|
|
1936
|
+
side = "top",
|
|
1937
|
+
open,
|
|
1938
|
+
onOpenChange,
|
|
1939
|
+
className = ""
|
|
1940
|
+
}) {
|
|
1941
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
|
1942
|
+
const [loading, setLoading] = useState(false);
|
|
1943
|
+
const isOpen = open ?? uncontrolledOpen;
|
|
1944
|
+
const setOpen = (next) => {
|
|
1945
|
+
onOpenChange?.(next);
|
|
1946
|
+
if (open === void 0) setUncontrolledOpen(next);
|
|
1947
|
+
};
|
|
1948
|
+
const handleConfirm = async () => {
|
|
1949
|
+
try {
|
|
1950
|
+
setLoading(true);
|
|
1951
|
+
await onConfirm?.();
|
|
1952
|
+
setOpen(false);
|
|
1953
|
+
} finally {
|
|
1954
|
+
setLoading(false);
|
|
1955
|
+
}
|
|
1956
|
+
};
|
|
1957
|
+
const handleCancel = () => {
|
|
1958
|
+
onCancel?.();
|
|
1959
|
+
setOpen(false);
|
|
1960
|
+
};
|
|
1961
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { open: isOpen, onOpenChange: (o) => o ? setOpen(true) : handleCancel(), children: [
|
|
1962
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
|
|
1963
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1964
|
+
Popover.Content,
|
|
1965
|
+
{
|
|
1966
|
+
side,
|
|
1967
|
+
sideOffset: 8,
|
|
1968
|
+
collisionPadding: 12,
|
|
1969
|
+
className: [
|
|
1970
|
+
"z-[400] w-64 rounded-lg border border-border bg-surface p-3.5 shadow-lg",
|
|
1971
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1972
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1973
|
+
className
|
|
1974
|
+
].filter(Boolean).join(" "),
|
|
1975
|
+
children: [
|
|
1976
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2.5", children: [
|
|
1977
|
+
icon && /* @__PURE__ */ jsx("span", { className: `mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center ${tone === "danger" ? "text-status-error" : "text-status-warning"}`, children: icon }),
|
|
1978
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1979
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: title }),
|
|
1980
|
+
description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-foreground-secondary leading-snug", children: description })
|
|
1981
|
+
] })
|
|
1982
|
+
] }),
|
|
1983
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex justify-end gap-2", children: [
|
|
1984
|
+
/* @__PURE__ */ jsx(Button, { content: cancelText, size: "sm", variant: "ghost", onClick: handleCancel }),
|
|
1985
|
+
/* @__PURE__ */ jsx(
|
|
1986
|
+
Button,
|
|
1987
|
+
{
|
|
1988
|
+
content: confirmText,
|
|
1989
|
+
size: "sm",
|
|
1990
|
+
variant: tone === "danger" ? "danger" : "primary",
|
|
1991
|
+
loading,
|
|
1992
|
+
onClick: handleConfirm
|
|
1993
|
+
}
|
|
1994
|
+
)
|
|
1995
|
+
] }),
|
|
1996
|
+
/* @__PURE__ */ jsx(Popover.Arrow, { className: "fill-surface" })
|
|
1997
|
+
]
|
|
1998
|
+
}
|
|
1999
|
+
) })
|
|
2000
|
+
] });
|
|
2001
|
+
}
|
|
1926
2002
|
var NotificationContext = createContext({
|
|
1927
2003
|
open: () => void 0,
|
|
1928
2004
|
close: () => void 0
|
|
@@ -3026,7 +3102,7 @@ function Field({
|
|
|
3026
3102
|
);
|
|
3027
3103
|
}
|
|
3028
3104
|
var SearchIcon = /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) });
|
|
3029
|
-
var SearchInput =
|
|
3105
|
+
var SearchInput = React18.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
|
|
3030
3106
|
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxs(
|
|
3031
3107
|
"div",
|
|
3032
3108
|
{
|
|
@@ -3527,7 +3603,7 @@ function TableBody({
|
|
|
3527
3603
|
return /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => {
|
|
3528
3604
|
const rowKey = getRowKey(row, i);
|
|
3529
3605
|
const isExpanded = expanded.has(rowKey);
|
|
3530
|
-
return /* @__PURE__ */ jsxs(
|
|
3606
|
+
return /* @__PURE__ */ jsxs(React18.Fragment, { children: [
|
|
3531
3607
|
/* @__PURE__ */ jsxs(
|
|
3532
3608
|
"tr",
|
|
3533
3609
|
{
|
|
@@ -4071,8 +4147,8 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
4071
4147
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
4072
4148
|
return /* @__PURE__ */ jsx("div", { className: ["min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className].filter(Boolean).join(" "), children });
|
|
4073
4149
|
}
|
|
4074
|
-
var elementsOfType = (children, type) =>
|
|
4075
|
-
(c) =>
|
|
4150
|
+
var elementsOfType = (children, type) => React18.Children.toArray(children).filter(
|
|
4151
|
+
(c) => React18.isValidElement(c) && c.type === type
|
|
4076
4152
|
);
|
|
4077
4153
|
var MOBILE_CHEVRON = /* @__PURE__ */ jsx(
|
|
4078
4154
|
"svg",
|
|
@@ -4109,9 +4185,9 @@ function MobileLinkRow({ link, onNavigate }) {
|
|
|
4109
4185
|
);
|
|
4110
4186
|
}
|
|
4111
4187
|
function MobilePanel({ panel, onNavigate }) {
|
|
4112
|
-
const nodes =
|
|
4188
|
+
const nodes = React18.Children.toArray(panel.props.children);
|
|
4113
4189
|
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 px-2 pb-3 pt-1", children: nodes.map((node, i) => {
|
|
4114
|
-
if (!
|
|
4190
|
+
if (!React18.isValidElement(node)) return null;
|
|
4115
4191
|
const el = node;
|
|
4116
4192
|
if (el.type === MegaMenuSection) {
|
|
4117
4193
|
const { title, children } = el.props;
|
|
@@ -4404,7 +4480,7 @@ function ThemeProvider({
|
|
|
4404
4480
|
className = "",
|
|
4405
4481
|
style
|
|
4406
4482
|
}) {
|
|
4407
|
-
const id =
|
|
4483
|
+
const id = React18.useId().replace(/:/g, "");
|
|
4408
4484
|
const scopeClass = `geo-th-${id}`;
|
|
4409
4485
|
const divRef = useRef(null);
|
|
4410
4486
|
useEffect(() => {
|
|
@@ -6408,7 +6484,7 @@ function OtpInput({
|
|
|
6408
6484
|
emit(valid.join(""));
|
|
6409
6485
|
focusBox(valid.length);
|
|
6410
6486
|
};
|
|
6411
|
-
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxs(
|
|
6487
|
+
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
|
|
6412
6488
|
/* @__PURE__ */ jsx(
|
|
6413
6489
|
"input",
|
|
6414
6490
|
{
|
|
@@ -7622,6 +7698,6 @@ function CreditCardForm({
|
|
|
7622
7698
|
);
|
|
7623
7699
|
}
|
|
7624
7700
|
|
|
7625
|
-
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Box, Breadcrumbs, Button, CARD_BRANDS, Card_default as Card, CardCarousel, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FAB, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, Kbd, List2 as List, LoadingSpinner, MegaMenu_default as MegaMenu, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Password, Portal, RadioGroup, Rating, ScalableContainer, SearchInput_default as SearchInput, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Slider, Statistic, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Wizard, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
|
|
7701
|
+
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Box, Breadcrumbs, Button, CARD_BRANDS, Card_default as Card, CardCarousel, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FAB, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, Kbd, List2 as List, LoadingSpinner, MegaMenu_default as MegaMenu, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Password, PopConfirm, Portal, RadioGroup, Rating, ScalableContainer, SearchInput_default as SearchInput, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Slider, Statistic, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Wizard, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
|
|
7626
7702
|
//# sourceMappingURL=index.js.map
|
|
7627
7703
|
//# sourceMappingURL=index.js.map
|