@geomak/ui 6.7.0 → 6.8.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 +54 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -1
- package/dist/index.d.ts +50 -1
- package/dist/index.js +54 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +6 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1149,6 +1149,55 @@ interface CardCarouselProps {
|
|
|
1149
1149
|
*/
|
|
1150
1150
|
declare function CardCarousel({ children, itemWidth, gap, showArrows, showDots, 'aria-label': ariaLabel, className, style, }: CardCarouselProps): react_jsx_runtime.JSX.Element;
|
|
1151
1151
|
|
|
1152
|
+
type StatisticSize = 'sm' | 'md' | 'lg';
|
|
1153
|
+
type DeltaDirection = 'up' | 'down' | 'neutral';
|
|
1154
|
+
interface StatisticDelta {
|
|
1155
|
+
/** The change to show beside the arrow, e.g. `'12%'` or `+340`. */
|
|
1156
|
+
value: React__default.ReactNode;
|
|
1157
|
+
/** Arrow + colour direction. Default inferred `'neutral'`. */
|
|
1158
|
+
direction?: DeltaDirection;
|
|
1159
|
+
/**
|
|
1160
|
+
* Whether an `up` direction is a good thing (green) or bad (red). For
|
|
1161
|
+
* metrics like churn or latency, set `false` so a rise reads red.
|
|
1162
|
+
* Default `true`.
|
|
1163
|
+
*/
|
|
1164
|
+
positiveIsGood?: boolean;
|
|
1165
|
+
/** Optional trailing context, e.g. `'vs last month'`. */
|
|
1166
|
+
label?: React__default.ReactNode;
|
|
1167
|
+
}
|
|
1168
|
+
interface StatisticProps {
|
|
1169
|
+
/** Caption above the value. */
|
|
1170
|
+
label: React__default.ReactNode;
|
|
1171
|
+
/** The metric itself. */
|
|
1172
|
+
value: React__default.ReactNode;
|
|
1173
|
+
/** Rendered before the value (currency symbol, etc.). */
|
|
1174
|
+
prefix?: React__default.ReactNode;
|
|
1175
|
+
/** Rendered after the value (unit, %). */
|
|
1176
|
+
suffix?: React__default.ReactNode;
|
|
1177
|
+
/** Leading icon in a tinted square. */
|
|
1178
|
+
icon?: React__default.ReactNode;
|
|
1179
|
+
/** Trend indicator under the value. */
|
|
1180
|
+
delta?: StatisticDelta;
|
|
1181
|
+
/** Secondary help text under everything. */
|
|
1182
|
+
helpText?: React__default.ReactNode;
|
|
1183
|
+
/** Size preset. Default `'md'`. */
|
|
1184
|
+
size?: StatisticSize;
|
|
1185
|
+
/** Text alignment. Default `'left'`. */
|
|
1186
|
+
align?: 'left' | 'center';
|
|
1187
|
+
className?: string;
|
|
1188
|
+
style?: React__default.CSSProperties;
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* A single metric: caption, value (with optional prefix/suffix and icon), and an
|
|
1192
|
+
* optional trend delta whose colour follows direction — flipped for metrics
|
|
1193
|
+
* where a rise is bad via `positiveIsGood: false`.
|
|
1194
|
+
*
|
|
1195
|
+
* @example
|
|
1196
|
+
* <Statistic label="Revenue" value="48,210" prefix="$" delta={{ value: '12%', direction: 'up', label: 'vs last month' }} />
|
|
1197
|
+
* <Statistic label="Churn" value="3.1" suffix="%" delta={{ value: '0.4pt', direction: 'up', positiveIsGood: false }} />
|
|
1198
|
+
*/
|
|
1199
|
+
declare function Statistic({ label, value, prefix, suffix, icon, delta, helpText, size, align, className, style, }: StatisticProps): react_jsx_runtime.JSX.Element;
|
|
1200
|
+
|
|
1152
1201
|
/** ─────────────────── types ─────────────────── */
|
|
1153
1202
|
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
1154
1203
|
type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
@@ -4217,4 +4266,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
4217
4266
|
/** Validate the CVV against the detected brand's expected length. */
|
|
4218
4267
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
4219
4268
|
|
|
4220
|
-
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, 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, 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, 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 };
|
|
4269
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1149,6 +1149,55 @@ interface CardCarouselProps {
|
|
|
1149
1149
|
*/
|
|
1150
1150
|
declare function CardCarousel({ children, itemWidth, gap, showArrows, showDots, 'aria-label': ariaLabel, className, style, }: CardCarouselProps): react_jsx_runtime.JSX.Element;
|
|
1151
1151
|
|
|
1152
|
+
type StatisticSize = 'sm' | 'md' | 'lg';
|
|
1153
|
+
type DeltaDirection = 'up' | 'down' | 'neutral';
|
|
1154
|
+
interface StatisticDelta {
|
|
1155
|
+
/** The change to show beside the arrow, e.g. `'12%'` or `+340`. */
|
|
1156
|
+
value: React__default.ReactNode;
|
|
1157
|
+
/** Arrow + colour direction. Default inferred `'neutral'`. */
|
|
1158
|
+
direction?: DeltaDirection;
|
|
1159
|
+
/**
|
|
1160
|
+
* Whether an `up` direction is a good thing (green) or bad (red). For
|
|
1161
|
+
* metrics like churn or latency, set `false` so a rise reads red.
|
|
1162
|
+
* Default `true`.
|
|
1163
|
+
*/
|
|
1164
|
+
positiveIsGood?: boolean;
|
|
1165
|
+
/** Optional trailing context, e.g. `'vs last month'`. */
|
|
1166
|
+
label?: React__default.ReactNode;
|
|
1167
|
+
}
|
|
1168
|
+
interface StatisticProps {
|
|
1169
|
+
/** Caption above the value. */
|
|
1170
|
+
label: React__default.ReactNode;
|
|
1171
|
+
/** The metric itself. */
|
|
1172
|
+
value: React__default.ReactNode;
|
|
1173
|
+
/** Rendered before the value (currency symbol, etc.). */
|
|
1174
|
+
prefix?: React__default.ReactNode;
|
|
1175
|
+
/** Rendered after the value (unit, %). */
|
|
1176
|
+
suffix?: React__default.ReactNode;
|
|
1177
|
+
/** Leading icon in a tinted square. */
|
|
1178
|
+
icon?: React__default.ReactNode;
|
|
1179
|
+
/** Trend indicator under the value. */
|
|
1180
|
+
delta?: StatisticDelta;
|
|
1181
|
+
/** Secondary help text under everything. */
|
|
1182
|
+
helpText?: React__default.ReactNode;
|
|
1183
|
+
/** Size preset. Default `'md'`. */
|
|
1184
|
+
size?: StatisticSize;
|
|
1185
|
+
/** Text alignment. Default `'left'`. */
|
|
1186
|
+
align?: 'left' | 'center';
|
|
1187
|
+
className?: string;
|
|
1188
|
+
style?: React__default.CSSProperties;
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* A single metric: caption, value (with optional prefix/suffix and icon), and an
|
|
1192
|
+
* optional trend delta whose colour follows direction — flipped for metrics
|
|
1193
|
+
* where a rise is bad via `positiveIsGood: false`.
|
|
1194
|
+
*
|
|
1195
|
+
* @example
|
|
1196
|
+
* <Statistic label="Revenue" value="48,210" prefix="$" delta={{ value: '12%', direction: 'up', label: 'vs last month' }} />
|
|
1197
|
+
* <Statistic label="Churn" value="3.1" suffix="%" delta={{ value: '0.4pt', direction: 'up', positiveIsGood: false }} />
|
|
1198
|
+
*/
|
|
1199
|
+
declare function Statistic({ label, value, prefix, suffix, icon, delta, helpText, size, align, className, style, }: StatisticProps): react_jsx_runtime.JSX.Element;
|
|
1200
|
+
|
|
1152
1201
|
/** ─────────────────── types ─────────────────── */
|
|
1153
1202
|
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
1154
1203
|
type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
@@ -4217,4 +4266,4 @@ declare function expiryError(value: string, now?: Date): string | undefined;
|
|
|
4217
4266
|
/** Validate the CVV against the detected brand's expected length. */
|
|
4218
4267
|
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
4219
4268
|
|
|
4220
|
-
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, 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, 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, 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 };
|
|
4269
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1773,6 +1773,59 @@ function CardCarousel({
|
|
|
1773
1773
|
)) })
|
|
1774
1774
|
] });
|
|
1775
1775
|
}
|
|
1776
|
+
var VALUE_SIZE = {
|
|
1777
|
+
sm: "text-xl",
|
|
1778
|
+
md: "text-3xl",
|
|
1779
|
+
lg: "text-4xl"
|
|
1780
|
+
};
|
|
1781
|
+
var TONE2 = {
|
|
1782
|
+
good: "text-status-success",
|
|
1783
|
+
bad: "text-status-error",
|
|
1784
|
+
neutral: "text-foreground-muted"
|
|
1785
|
+
};
|
|
1786
|
+
var ArrowUp = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.2, "aria-hidden": "true", className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19V5M5 12l7-7 7 7" }) });
|
|
1787
|
+
var ArrowDown = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.2, "aria-hidden": "true", className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12l7 7 7-7" }) });
|
|
1788
|
+
function Statistic({
|
|
1789
|
+
label,
|
|
1790
|
+
value,
|
|
1791
|
+
prefix,
|
|
1792
|
+
suffix,
|
|
1793
|
+
icon,
|
|
1794
|
+
delta,
|
|
1795
|
+
helpText,
|
|
1796
|
+
size = "md",
|
|
1797
|
+
align = "left",
|
|
1798
|
+
className = "",
|
|
1799
|
+
style
|
|
1800
|
+
}) {
|
|
1801
|
+
const dir = delta?.direction ?? "neutral";
|
|
1802
|
+
const positiveIsGood = delta?.positiveIsGood ?? true;
|
|
1803
|
+
const deltaTone = dir === "neutral" ? "neutral" : dir === "up" === positiveIsGood ? "good" : "bad";
|
|
1804
|
+
return /* @__PURE__ */ jsxs(
|
|
1805
|
+
"div",
|
|
1806
|
+
{
|
|
1807
|
+
className: ["flex gap-3", align === "center" ? "flex-col items-center text-center" : "items-start", className].filter(Boolean).join(" "),
|
|
1808
|
+
style,
|
|
1809
|
+
children: [
|
|
1810
|
+
icon && align === "left" && /* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent", children: /* @__PURE__ */ jsx("span", { className: "h-5 w-5 inline-flex items-center justify-center", children: icon }) }),
|
|
1811
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1812
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium uppercase tracking-wide text-foreground-muted", children: label }),
|
|
1813
|
+
/* @__PURE__ */ jsxs("div", { className: `mt-1 flex items-baseline gap-0.5 font-semibold text-foreground tabular-nums ${VALUE_SIZE[size]} ${align === "center" ? "justify-center" : ""}`, children: [
|
|
1814
|
+
prefix && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted text-[0.6em] font-medium self-center", children: prefix }),
|
|
1815
|
+
/* @__PURE__ */ jsx("span", { className: "leading-none", children: value }),
|
|
1816
|
+
suffix && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted text-[0.5em] font-medium self-center", children: suffix })
|
|
1817
|
+
] }),
|
|
1818
|
+
delta && /* @__PURE__ */ jsxs("div", { className: `mt-1.5 flex items-center gap-1 text-sm font-medium ${align === "center" ? "justify-center" : ""} ${TONE2[deltaTone]}`, children: [
|
|
1819
|
+
dir === "up" ? ArrowUp : dir === "down" ? ArrowDown : null,
|
|
1820
|
+
/* @__PURE__ */ jsx("span", { children: delta.value }),
|
|
1821
|
+
delta.label && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted font-normal", children: delta.label })
|
|
1822
|
+
] }),
|
|
1823
|
+
helpText && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-foreground-muted", children: helpText })
|
|
1824
|
+
] })
|
|
1825
|
+
]
|
|
1826
|
+
}
|
|
1827
|
+
);
|
|
1828
|
+
}
|
|
1776
1829
|
var NotificationContext = createContext({
|
|
1777
1830
|
open: () => void 0,
|
|
1778
1831
|
close: () => void 0
|
|
@@ -7472,6 +7525,6 @@ function CreditCardForm({
|
|
|
7472
7525
|
);
|
|
7473
7526
|
}
|
|
7474
7527
|
|
|
7475
|
-
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, 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, 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 };
|
|
7528
|
+
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, 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 };
|
|
7476
7529
|
//# sourceMappingURL=index.js.map
|
|
7477
7530
|
//# sourceMappingURL=index.js.map
|