@geomak/ui 6.4.0 → 6.5.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
@@ -974,6 +974,48 @@ interface BreadcrumbsProps {
974
974
  */
975
975
  declare function Breadcrumbs({ items, separator, maxItems, 'aria-label': ariaLabel, className, style, }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
976
976
 
977
+ type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'error' | 'info';
978
+ type BadgeVariant = 'solid' | 'soft' | 'outline';
979
+ type BadgeSize = 'sm' | 'md';
980
+ interface BadgeProps {
981
+ /** Pill label (label mode) when no `count` / `dot` is given. */
982
+ children?: React__default.ReactNode;
983
+ /** Semantic colour. Default `'neutral'`. */
984
+ tone?: BadgeTone;
985
+ /** Fill style. Default `'soft'`. */
986
+ variant?: BadgeVariant;
987
+ /** Size preset. Default `'md'`. */
988
+ size?: BadgeSize;
989
+ /** Optional leading icon (label mode). */
990
+ icon?: React__default.ReactNode;
991
+ /**
992
+ * Indicator mode — a numeric counter. With `children` it overlays the
993
+ * top-right corner of the wrapped element; without, it renders inline.
994
+ */
995
+ count?: number;
996
+ /** Cap the displayed count (e.g. `99+`). Default `99`. */
997
+ max?: number;
998
+ /** Render a bare dot indicator (no number). Overrides `count` display. */
999
+ dot?: boolean;
1000
+ /** Show the indicator even when `count` is 0. Default `false`. */
1001
+ showZero?: boolean;
1002
+ className?: string;
1003
+ style?: React__default.CSSProperties;
1004
+ }
1005
+ /**
1006
+ * A small status / count indicator. Three uses:
1007
+ *
1008
+ * 1. **Label pill** — `<Badge tone="success">Active</Badge>`.
1009
+ * 2. **Inline count** — `<Badge count={5} tone="error" />`.
1010
+ * 3. **Overlay** — wrap an element to anchor a count/dot to its top-right:
1011
+ * `<Badge count={3} tone="error"><IconButton … /></Badge>`.
1012
+ *
1013
+ * @example
1014
+ * <Badge tone="accent" variant="soft">Beta</Badge>
1015
+ * <Badge dot tone="success"><Avatar … /></Badge>
1016
+ */
1017
+ declare function Badge({ children, tone, variant, size, icon, count, max, dot, showZero, className, style, }: BadgeProps): react_jsx_runtime.JSX.Element;
1018
+
977
1019
  /** ─────────────────── types ─────────────────── */
978
1020
  type NotificationType = 'info' | 'success' | 'warning' | 'danger';
979
1021
  type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
@@ -4042,4 +4084,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
4042
4084
  /** Validate the CVV against the detected brand's expected length. */
4043
4085
  declare function cvvError(value: string, cardNumber: string): string | undefined;
4044
4086
 
4045
- export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, type CardBrand, 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, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, 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, 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, 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 };
4087
+ 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, type CardBrand, 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, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, 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, 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, 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
@@ -974,6 +974,48 @@ interface BreadcrumbsProps {
974
974
  */
975
975
  declare function Breadcrumbs({ items, separator, maxItems, 'aria-label': ariaLabel, className, style, }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
976
976
 
977
+ type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'error' | 'info';
978
+ type BadgeVariant = 'solid' | 'soft' | 'outline';
979
+ type BadgeSize = 'sm' | 'md';
980
+ interface BadgeProps {
981
+ /** Pill label (label mode) when no `count` / `dot` is given. */
982
+ children?: React__default.ReactNode;
983
+ /** Semantic colour. Default `'neutral'`. */
984
+ tone?: BadgeTone;
985
+ /** Fill style. Default `'soft'`. */
986
+ variant?: BadgeVariant;
987
+ /** Size preset. Default `'md'`. */
988
+ size?: BadgeSize;
989
+ /** Optional leading icon (label mode). */
990
+ icon?: React__default.ReactNode;
991
+ /**
992
+ * Indicator mode — a numeric counter. With `children` it overlays the
993
+ * top-right corner of the wrapped element; without, it renders inline.
994
+ */
995
+ count?: number;
996
+ /** Cap the displayed count (e.g. `99+`). Default `99`. */
997
+ max?: number;
998
+ /** Render a bare dot indicator (no number). Overrides `count` display. */
999
+ dot?: boolean;
1000
+ /** Show the indicator even when `count` is 0. Default `false`. */
1001
+ showZero?: boolean;
1002
+ className?: string;
1003
+ style?: React__default.CSSProperties;
1004
+ }
1005
+ /**
1006
+ * A small status / count indicator. Three uses:
1007
+ *
1008
+ * 1. **Label pill** — `<Badge tone="success">Active</Badge>`.
1009
+ * 2. **Inline count** — `<Badge count={5} tone="error" />`.
1010
+ * 3. **Overlay** — wrap an element to anchor a count/dot to its top-right:
1011
+ * `<Badge count={3} tone="error"><IconButton … /></Badge>`.
1012
+ *
1013
+ * @example
1014
+ * <Badge tone="accent" variant="soft">Beta</Badge>
1015
+ * <Badge dot tone="success"><Avatar … /></Badge>
1016
+ */
1017
+ declare function Badge({ children, tone, variant, size, icon, count, max, dot, showZero, className, style, }: BadgeProps): react_jsx_runtime.JSX.Element;
1018
+
977
1019
  /** ─────────────────── types ─────────────────── */
978
1020
  type NotificationType = 'info' | 'success' | 'warning' | 'danger';
979
1021
  type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
@@ -4042,4 +4084,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
4042
4084
  /** Validate the CVV against the detected brand's expected length. */
4043
4085
  declare function cvvError(value: string, cardNumber: string): string | undefined;
4044
4086
 
4045
- export { Accordion, type AccordionItemProps, type AccordionProps, AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CARD_BRANDS, type CardBrand, 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, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, 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, 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, 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 };
4087
+ 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, type CardBrand, 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, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, 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, 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, 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
@@ -1514,6 +1514,108 @@ function Breadcrumbs({
1514
1514
  ] }, entry === "ellipsis" ? "ellipsis" : entry.index);
1515
1515
  }) }) });
1516
1516
  }
1517
+ var TONE = {
1518
+ neutral: {
1519
+ solid: "bg-foreground-secondary text-background",
1520
+ soft: "bg-surface-raised text-foreground-secondary",
1521
+ outline: "border border-border text-foreground-secondary",
1522
+ dot: "bg-foreground-secondary"
1523
+ },
1524
+ accent: {
1525
+ solid: "bg-accent text-accent-fg",
1526
+ soft: "bg-accent/10 text-accent",
1527
+ outline: "border border-accent text-accent",
1528
+ dot: "bg-accent"
1529
+ },
1530
+ success: {
1531
+ solid: "bg-status-success text-white",
1532
+ soft: "bg-status-success/12 text-status-success",
1533
+ outline: "border border-status-success text-status-success",
1534
+ dot: "bg-status-success"
1535
+ },
1536
+ warning: {
1537
+ solid: "bg-status-warning text-white",
1538
+ soft: "bg-status-warning/15 text-status-warning",
1539
+ outline: "border border-status-warning text-status-warning",
1540
+ dot: "bg-status-warning"
1541
+ },
1542
+ error: {
1543
+ solid: "bg-status-error text-white",
1544
+ soft: "bg-status-error/12 text-status-error",
1545
+ outline: "border border-status-error text-status-error",
1546
+ dot: "bg-status-error"
1547
+ },
1548
+ info: {
1549
+ solid: "bg-status-info text-white",
1550
+ soft: "bg-status-info/12 text-status-info",
1551
+ outline: "border border-status-info text-status-info",
1552
+ dot: "bg-status-info"
1553
+ }
1554
+ };
1555
+ var SIZE2 = {
1556
+ sm: "h-[18px] px-1.5 text-[11px] gap-1 rounded-full",
1557
+ md: "h-5 px-2 text-xs gap-1 rounded-full"
1558
+ };
1559
+ function Badge({
1560
+ children,
1561
+ tone = "neutral",
1562
+ variant = "soft",
1563
+ size = "md",
1564
+ icon,
1565
+ count,
1566
+ max = 99,
1567
+ dot = false,
1568
+ showZero = false,
1569
+ className = "",
1570
+ style
1571
+ }) {
1572
+ const isIndicator = dot || count != null;
1573
+ const hidden = !dot && count != null && count === 0 && !showZero;
1574
+ const display2 = count != null && count > max ? `${max}+` : count;
1575
+ if (!isIndicator) {
1576
+ return /* @__PURE__ */ jsxs(
1577
+ "span",
1578
+ {
1579
+ className: [
1580
+ "inline-flex items-center font-medium select-none whitespace-nowrap leading-none",
1581
+ SIZE2[size],
1582
+ TONE[tone][variant],
1583
+ className
1584
+ ].filter(Boolean).join(" "),
1585
+ style,
1586
+ children: [
1587
+ icon && /* @__PURE__ */ jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center", children: icon }),
1588
+ children
1589
+ ]
1590
+ }
1591
+ );
1592
+ }
1593
+ const indicator = dot ? /* @__PURE__ */ jsx(
1594
+ "span",
1595
+ {
1596
+ className: ["inline-block rounded-full", size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5", TONE[tone].dot, className].filter(Boolean).join(" "),
1597
+ style: children ? void 0 : style,
1598
+ "aria-hidden": children ? true : void 0
1599
+ }
1600
+ ) : /* @__PURE__ */ jsx(
1601
+ "span",
1602
+ {
1603
+ className: [
1604
+ "inline-flex items-center justify-center rounded-full font-semibold leading-none tabular-nums",
1605
+ size === "sm" ? "h-4 min-w-4 px-1 text-[10px]" : "h-[18px] min-w-[18px] px-1.5 text-[11px]",
1606
+ TONE[tone].solid,
1607
+ className
1608
+ ].filter(Boolean).join(" "),
1609
+ style: children ? void 0 : style,
1610
+ children: display2
1611
+ }
1612
+ );
1613
+ if (!children) return hidden ? null : indicator;
1614
+ return /* @__PURE__ */ jsxs("span", { className: "relative inline-flex", style, children: [
1615
+ children,
1616
+ !hidden && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 flex", children: indicator })
1617
+ ] });
1618
+ }
1517
1619
  var NotificationContext = createContext({
1518
1620
  open: () => void 0,
1519
1621
  close: () => void 0
@@ -5590,7 +5692,7 @@ function TextArea({
5590
5692
  }
5591
5693
  );
5592
5694
  }
5593
- var SIZE2 = {
5695
+ var SIZE3 = {
5594
5696
  sm: { h: "h-control-sm", text: "text-xs", pad: "px-2.5" },
5595
5697
  md: { h: "h-control-md", text: "text-sm", pad: "px-3.5" },
5596
5698
  lg: { h: "h-control-lg", text: "text-sm", pad: "px-4" }
@@ -5612,7 +5714,7 @@ function SegmentedControl({
5612
5714
  errorMessage,
5613
5715
  "aria-label": ariaLabel
5614
5716
  }) {
5615
- const sz = SIZE2[size];
5717
+ const sz = SIZE3[size];
5616
5718
  const groupId = useId();
5617
5719
  const errorId = useId();
5618
5720
  const hasError = errorMessage != null;
@@ -7213,6 +7315,6 @@ function CreditCardForm({
7213
7315
  );
7214
7316
  }
7215
7317
 
7216
- export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Box, Breadcrumbs, Button, CARD_BRANDS, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, 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, 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 };
7318
+ export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Box, Breadcrumbs, Button, CARD_BRANDS, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, 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, 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 };
7217
7319
  //# sourceMappingURL=index.js.map
7218
7320
  //# sourceMappingURL=index.js.map