@leta-io/components 0.5.2 → 0.6.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/assets/check.png +0 -0
- package/dist/assets/check.webp +0 -0
- package/dist/assets/recordings.png +0 -0
- package/dist/assets/recordings.webp +0 -0
- package/dist/index.d.ts +70 -10
- package/dist/index.js +316 -84
- package/package.json +3 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -2535,8 +2535,12 @@ interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'
|
|
|
2535
2535
|
/** Renders a trailing dismiss (×) button and is the dismiss handler. */
|
|
2536
2536
|
onDismiss?: () => void;
|
|
2537
2537
|
/**
|
|
2538
|
-
* Auto-dismiss delay in ms.
|
|
2539
|
-
*
|
|
2538
|
+
* Auto-dismiss delay in ms. With `onDismiss`, the toast shows a **progress bar**
|
|
2539
|
+
* along its top edge that runs from full to empty over this time, then fires
|
|
2540
|
+
* `onDismiss`. Hovering the toast, or focusing anything in it, pauses both, and
|
|
2541
|
+
* leaving resumes from where it stopped (Figma `68:36772`, 2026-10-27). LETA uses
|
|
2542
|
+
* 6000ms, or 8000ms when the toast carries an action (Doc 3 §4). Read when the
|
|
2543
|
+
* toast mounts.
|
|
2540
2544
|
*/
|
|
2541
2545
|
duration?: number;
|
|
2542
2546
|
/** Optional trailing CTA (a `<Button>`), shown when `showCTA`. */
|
|
@@ -2547,11 +2551,13 @@ interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'
|
|
|
2547
2551
|
/**
|
|
2548
2552
|
* Desktop Toast — a transient, auto-dismissing notification confirming the
|
|
2549
2553
|
* outcome of an action. Per Doc 3 §4, the consumer's toast container places
|
|
2550
|
-
* these
|
|
2551
|
-
* default / 8s when a CTA is present (set
|
|
2552
|
-
*
|
|
2553
|
-
*
|
|
2554
|
-
*
|
|
2554
|
+
* these at the window's **bottom-left** (newest at the bottom, nearest the
|
|
2555
|
+
* corner) and persists them 6s by default / 8s when a CTA is present (set
|
|
2556
|
+
* `duration`); positioning and stacking are the container's, this component is
|
|
2557
|
+
* the visual surface and owns the countdown — a 4px progress bar across its top
|
|
2558
|
+
* edge, paused while hovered or focused. `type="error"` (a destructive outcome)
|
|
2559
|
+
* renders `role="alert"`/`aria-live="assertive"` instead of `role="status"`/
|
|
2560
|
+
* `polite`. Figma `68:36772`.
|
|
2555
2561
|
*/
|
|
2556
2562
|
declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
2557
2563
|
|
|
@@ -2826,7 +2832,7 @@ interface TruncatedIdTextProps {
|
|
|
2826
2832
|
*/
|
|
2827
2833
|
declare function TruncatedIdText({ id, className, color, style }: TruncatedIdTextProps): React.ReactElement;
|
|
2828
2834
|
|
|
2829
|
-
type EmptyStateType = 'no-results' | 'no-reviews' | 'no-broadcast-logs' | 'image-upload' | 'file-upload' | 'no-suspensions' | 'no-items' | 'no-orders' | 'no-network' | 'new-update' | 'no-data' | 'no-trips' | 'no-drivers' | 'no-products' | 'error' | 'comments' | 'notifications' | 'calendar' | 'recording';
|
|
2835
|
+
type EmptyStateType = 'no-results' | 'no-reviews' | 'no-broadcast-logs' | 'image-upload' | 'file-upload' | 'no-suspensions' | 'no-items' | 'no-orders' | 'no-network' | 'new-update' | 'no-data' | 'no-trips' | 'no-drivers' | 'no-products' | 'error' | 'comments' | 'notifications' | 'calendar' | 'recording' | 'check';
|
|
2830
2836
|
type EmptyStateSize = 'mobile' | 'desktop';
|
|
2831
2837
|
interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
2832
2838
|
/** Preset scenario — sets the illustration + default copy. Default `no-orders`. */
|
|
@@ -3279,6 +3285,18 @@ interface MapSearchResultGroup {
|
|
|
3279
3285
|
/** The group's rows — `DesktopMenuOptions type="dropdown-advanced"`, 4px apart. */
|
|
3280
3286
|
children: React.ReactNode;
|
|
3281
3287
|
}
|
|
3288
|
+
/**
|
|
3289
|
+
* Which keyboard hints the footer shows (Doc 11 §11 — only the ones that work
|
|
3290
|
+
* right now). Each field overrides the state's default.
|
|
3291
|
+
*/
|
|
3292
|
+
interface MapSearchFooterHints {
|
|
3293
|
+
/** "↑ ↓ to select" — there is at least one item to highlight. */
|
|
3294
|
+
select?: boolean;
|
|
3295
|
+
/** "Tab to switch filter" — chips are showing. */
|
|
3296
|
+
switchFilter?: boolean;
|
|
3297
|
+
/** "↵ to open / to view / to search", by what is highlighted; `null` hides it. */
|
|
3298
|
+
enter?: 'open' | 'view' | 'search' | null;
|
|
3299
|
+
}
|
|
3282
3300
|
interface MapSearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3283
3301
|
/** Panel state. `idle` = field only; the rest attach a results panel. Default `active-results`. */
|
|
3284
3302
|
state?: MapSearchState;
|
|
@@ -3319,6 +3337,28 @@ interface MapSearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
|
|
|
3319
3337
|
/** Replaces the panel body (the recent-search list or the result groups). */
|
|
3320
3338
|
children?: React.ReactNode;
|
|
3321
3339
|
disabled?: boolean;
|
|
3340
|
+
/** A search is running: a spinner sits beside the × (Doc 11 §6). */
|
|
3341
|
+
loading?: boolean;
|
|
3342
|
+
/** The ×'s accessible name. Default "Clear Search"; the global overlay, whose × closes it, passes "Close search". */
|
|
3343
|
+
clearLabel?: string;
|
|
3344
|
+
/** Override the footer's per-state hints (see {@link MapSearchFooterHints}). */
|
|
3345
|
+
footerHints?: MapSearchFooterHints;
|
|
3346
|
+
/**
|
|
3347
|
+
* `active-results` only: start at 360 and grow with the results up to 480, then
|
|
3348
|
+
* scroll the body (Doc 11 §3). Default false — a fixed 480.
|
|
3349
|
+
*/
|
|
3350
|
+
fitHeight?: boolean;
|
|
3351
|
+
/**
|
|
3352
|
+
* Whether the filter chips are in the tab order. Default true. A consumer that
|
|
3353
|
+
* keeps focus in the input and moves between chips with Tab itself (the Search
|
|
3354
|
+
* Overlay, Doc 3 §15) passes false: the chips leave the tab order and a click on
|
|
3355
|
+
* one doesn't take focus from the input.
|
|
3356
|
+
*/
|
|
3357
|
+
filtersTabbable?: boolean;
|
|
3358
|
+
/** Ref to the scrolling body (`active-history` / `active-results`) — for scroll-into-view and load-more. */
|
|
3359
|
+
bodyRef?: React.Ref<HTMLDivElement>;
|
|
3360
|
+
/** Props for the scrolling body, e.g. `role="listbox"` and an `id` for `aria-controls`. */
|
|
3361
|
+
bodyProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
3322
3362
|
}
|
|
3323
3363
|
/**
|
|
3324
3364
|
* Overlay search — the `Search Input` type of Data Entry `38:42`, **Overlay** variant.
|
|
@@ -3536,6 +3576,26 @@ interface DesktopMenuOptionsProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
3536
3576
|
subtext?: string;
|
|
3537
3577
|
/** dropdown-advanced: full content override (else a flat title + subtext + chevron is built from label/subtext). */
|
|
3538
3578
|
content?: React.ReactNode;
|
|
3579
|
+
/**
|
|
3580
|
+
* dropdown-advanced: the Library's **Leading Content** SLOT — replaces the
|
|
3581
|
+
* built-in icon + title + subtext with caller content (e.g. a title carrying a
|
|
3582
|
+
* status badge and bold match text, as the Search Overlay's result rows do).
|
|
3583
|
+
* Fills the row; the Trailing Content slot keeps its place beside it.
|
|
3584
|
+
*/
|
|
3585
|
+
leadingContent?: React.ReactNode;
|
|
3586
|
+
/**
|
|
3587
|
+
* dropdown-advanced: the Library's **Trailing Content** SLOT — e.g. the arrow a
|
|
3588
|
+
* search result shows on hover, or (Search Overlay v2) its actions button.
|
|
3589
|
+
* Replaces the chevron.
|
|
3590
|
+
*/
|
|
3591
|
+
trailingContent?: React.ReactNode;
|
|
3592
|
+
/**
|
|
3593
|
+
* Draw the row in its Hover look without the pointer on it — a **keyboard
|
|
3594
|
+
* highlight** (a listbox's active option). When this prop is passed at all, the
|
|
3595
|
+
* row stops tracking its own hover: highlight is then the caller's alone, so a
|
|
3596
|
+
* pointer resting on one row and arrow keys on another never light up two rows.
|
|
3597
|
+
*/
|
|
3598
|
+
highlighted?: boolean;
|
|
3539
3599
|
/**
|
|
3540
3600
|
* filter-group: how many options are currently selected in the List section.
|
|
3541
3601
|
* Drives the single "{n} selected" chip shown beneath the label; the chip is
|
|
@@ -3730,7 +3790,7 @@ interface DesktopDropdownsProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
3730
3790
|
/**
|
|
3731
3791
|
* Override the empty-state message for the `combobox-empty` / `combobox-search-empty`
|
|
3732
3792
|
* variants (e.g. "No depots found"). Defaults to the `no-results` preset copy
|
|
3733
|
-
* ("
|
|
3793
|
+
* ("Check the spelling or adjust your filters").
|
|
3734
3794
|
*/
|
|
3735
3795
|
emptyDescription?: string;
|
|
3736
3796
|
/** User Menu display name. */
|
|
@@ -5452,4 +5512,4 @@ interface ExtraLargeModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
5452
5512
|
*/
|
|
5453
5513
|
declare const ExtraLargeModal: React.ForwardRefExoticComponent<ExtraLargeModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
5454
5514
|
|
|
5455
|
-
export { ALL_ORDER_COLUMNS, AVATAR_PHOTOS, AccordionChevron, AccordionContent, AccordionHeader, type AccordionHeaderProps, AlertDialog, type AlertDialogProps, type AlertDialogVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, BROADCASTED_ORDER_COLUMNS, Badge, type BadgeColor, type BadgeProps, type BreadcrumbCrumb, Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsType, Button, type ButtonPlatform, type ButtonProps, type ButtonSize, type ButtonVariant, CANCELLED_ORDER_COLUMNS, CARET_SIDE, CREATED_BY_COLUMN, Calendar, type CalendarProps, type CaretAlign, type CaretSide, CarouselPagination, type CarouselPaginationProps, Cell, type CellProps, type CellState, type CellType, Checkbox, type CheckboxProps, Chip, type ChipProps, CollapsedSidebarLogo, type CollapsedSidebarLogoProps, ConfigurationCard, type ConfigurationCardProps, type ConfigurationCardState, ConfigurationContainer, type ConfigurationContainerProps, ContentCard, type ContentCardProps, ContentPrimitives, type ContentPrimitivesProps, type ContentPrimitivesType, DEFAULT_SORT_OPTIONS, DIALOG_OVERLAY_DEFAULT_TIER, DOORSTEP_DELIVERY_IMAGE, type DataRowCell, DataRows, type DataRowsProps, type DataRowsState, type DataRowsVariant, DateTimePicker, type DateTimePickerProps, type DateTimePickerType, type DesktopDropdownVariant, DesktopDropdowns, type DesktopDropdownsProps, type DesktopMenuOptionState, type DesktopMenuOptionType, DesktopMenuOptions, type DesktopMenuOptionsProps, DesktopMetricCard, type DesktopMetricCardProps, DesktopProgressIndicator, type DesktopProgressIndicatorProps, type DesktopProgressIndicatorVariant, DesktopSegmentControl, type DesktopSegmentControlItem, type DesktopSegmentControlProps, type DesktopSegmentControlVariant, DialogOverlay, type DialogOverlayHelpers, type DialogOverlayProps, DurationLabel, type DurationLabelProps, type DurationLabelStatus, type DurationLabelVariant, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateType, ExtraLargeModal, type ExtraLargeModalProps, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, FileUpload, FileUploadCard, type FileUploadCardProps, type FileUploadCardStatus, type FileUploadProps, type FilterGroupDimension, Flag, type FlagProps, FloatingToolbar, type FloatingToolbarActionsProps, type FloatingToolbarContextProps, type FloatingToolbarPlacement, type FloatingToolbarProps, FooterFrame, type FooterFrameProps, type FooterFrameVariant, FormDemarcator, GroupedInput, type GroupedInputProps, type GroupedInputVariant, HoverTip, type HoverTipProps, InputField, type InputFieldProps, type InputFieldVariant, InputGroup, type InputGroupProps, InputSection, type InputSectionProps, LAST_UPDATED_COLUMN, LargeModal, type LargeModalProps, type LargeModalVariant, LeadingInputFieldElement, type LeadingInputFieldElementProps, type LeadingInputFieldElementVariant, LetaLogo, type LetaLogoProps, ListGroup, type ListGroupProps, type ListItemData, ListSection, type ListSectionProps, LoadingOverlay, type LoadingOverlayProps, MAP_ROUTE_DRIVEN, MAP_ROUTE_PLANNED, MapIcon, type MapIconProps, type MapIconVariant, MapLegend, type MapLegendEntry, type MapLegendProps, MapSearchInput, type MapSearchInputProps, type MapSearchResultGroup, type MapSearchState, MapView, type MapViewProps, MapZoomControl, type MapZoomControlProps, MenuDivider, MenuFlyout, type MenuFlyoutProps, MenuPanel, type MenuPanelProps, type MetricCardState, type MetricVariance, MobileBadge, type MobileBadgeColor, type MobileBadgeProps, type MobileBadgeVariant, MobileChip, type MobileChipProps, MobileDropdown, type MobileDropdownOption, type MobileDropdownProps, MobileFeaturedIcon, type MobileFeaturedIconColor, type MobileFeaturedIconProps, type MobileFeaturedIconSize, type MobileFeaturedIconVariant, MobileFileUpload, type MobileFileUploadImage, type MobileFileUploadProps, MobileMapSearchInput, type MobileMapSearchInputProps, type MobileMenuOptionState, type MobileMenuOptionType, MobileMenuOptions, type MobileMenuOptionsProps, MobileNavTab, type MobileNavTabProps, MobileSearchInput, type MobileSearchInputProps, MobileSegment, type MobileSegmentProps, ModalDialog, type ModalDialogProps, type ModalDialogVariant, ModalHeaders, type ModalHeadersProps, type ModalHeadersVariant, ModalShell, type ModalShellProps, NotificationBanner, type NotificationBannerProps, type NotificationBannerType, type NotificationBannerVariant, ORDER_TABLE_COLUMNS, ORDER_TABLE_COLUMNS_FINISHED, OptionCard, type OptionCardProps, type OptionCardState, Page, type PageProps, PageTab, type PageTabProps, PageTabsControl, type PageTabsControlItem, type PageTabsControlProps, type PageTabsControlVariant, type PageVariant, Pagination, type PaginationProps, type PaginationVariant, Placeholder, type PlaceholderProps, Popover, type PopoverPlacement, type PopoverProps, ProgressTracker, type ProgressTrackerProps, RadioButton, type RadioButtonProps, SCHEDULED_ORDER_COLUMNS, SIGNATURE_IMAGE, type ScrollEdges, SearchInput, type SearchInputProps, SegmentSwitcherTab, type SegmentSwitcherTabProps, Select, type SelectProps, type SelectedFilterChip, SelectedFilterControl, type SelectedFilterControlProps, SelectionControl, type SelectionControlProps, type SelectionControlVariant, Shortcut, ShortcutHint, type ShortcutHintProps, type ShortcutKey, type ShortcutProps, SideBar, type SideBarGroup, type SideBarItem, type SideBarProps, type SideBarVariant, Sidetab, type SidetabItem, type SidetabProps, Skeleton, type SkeletonProps, type SortOption, StackedCards, type StackedCardsProps, Stepper, StepperInput, type StepperInputProps, type StepperProps, type StepperVariant, type SurroundingTheme, Table, type TableColumn, type TableColumnRole, TableContainer, type TableContainerProps, type TableContainerVariant, TableDataControl, type TableDataControlProps, type TableDataControlVariant, type TableProps, type TableRow, TableSection, type TableSectionProps, Tag, type TagProps, TextArea, type TextAreaBasicProps, type TextAreaProps, type TextAreaRichProps, type TextAreaVariant, Title, type TitleProps, type TitleVariant, Toast, type ToastProps, type ToastType, Toggle, ToggleButton, type ToggleButtonProps, type ToggleProps, Tooltip, type TooltipPlatform, type TooltipPosition, type TooltipPositionInput, type TooltipProps, type TooltipRect, type TooltipSide, type TooltipVariant, TopBar, type TopBarProps, type TopBarVariant, TopFilter, type TopFilterProps, TopFilterSection, type TopFilterSectionItem, type TopFilterSectionProps, TrailingInputFieldElement, type TrailingInputFieldElementProps, type TrailingInputFieldElementVariant, TruncatedIdText, type TruncatedIdTextProps, TruncatedText, type TruncatedTextProps, UNASSIGNED_ORDER_COLUMNS, UserMenu, type UserMenuProps, type UserMenuState, ViewSwitcherTab, type ViewSwitcherTabProps, WizardTab, type WizardTabProps, abbreviateId, animateScrollTop, computeTooltipPosition, downloadFile, htmlToPlainText, inverseTheme, sanitizeRichText, sortLabelFor, useAccordion, useEscapeLayer, useRovingFocus, useScrollEdges, useScrollShadow, useSurroundingTheme };
|
|
5515
|
+
export { ALL_ORDER_COLUMNS, AVATAR_PHOTOS, AccordionChevron, AccordionContent, AccordionHeader, type AccordionHeaderProps, AlertDialog, type AlertDialogProps, type AlertDialogVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, BROADCASTED_ORDER_COLUMNS, Badge, type BadgeColor, type BadgeProps, type BreadcrumbCrumb, Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsType, Button, type ButtonPlatform, type ButtonProps, type ButtonSize, type ButtonVariant, CANCELLED_ORDER_COLUMNS, CARET_SIDE, CREATED_BY_COLUMN, Calendar, type CalendarProps, type CaretAlign, type CaretSide, CarouselPagination, type CarouselPaginationProps, Cell, type CellProps, type CellState, type CellType, Checkbox, type CheckboxProps, Chip, type ChipProps, CollapsedSidebarLogo, type CollapsedSidebarLogoProps, ConfigurationCard, type ConfigurationCardProps, type ConfigurationCardState, ConfigurationContainer, type ConfigurationContainerProps, ContentCard, type ContentCardProps, ContentPrimitives, type ContentPrimitivesProps, type ContentPrimitivesType, DEFAULT_SORT_OPTIONS, DIALOG_OVERLAY_DEFAULT_TIER, DOORSTEP_DELIVERY_IMAGE, type DataRowCell, DataRows, type DataRowsProps, type DataRowsState, type DataRowsVariant, DateTimePicker, type DateTimePickerProps, type DateTimePickerType, type DesktopDropdownVariant, DesktopDropdowns, type DesktopDropdownsProps, type DesktopMenuOptionState, type DesktopMenuOptionType, DesktopMenuOptions, type DesktopMenuOptionsProps, DesktopMetricCard, type DesktopMetricCardProps, DesktopProgressIndicator, type DesktopProgressIndicatorProps, type DesktopProgressIndicatorVariant, DesktopSegmentControl, type DesktopSegmentControlItem, type DesktopSegmentControlProps, type DesktopSegmentControlVariant, DialogOverlay, type DialogOverlayHelpers, type DialogOverlayProps, DurationLabel, type DurationLabelProps, type DurationLabelStatus, type DurationLabelVariant, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateType, ExtraLargeModal, type ExtraLargeModalProps, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, FileUpload, FileUploadCard, type FileUploadCardProps, type FileUploadCardStatus, type FileUploadProps, type FilterGroupDimension, Flag, type FlagProps, FloatingToolbar, type FloatingToolbarActionsProps, type FloatingToolbarContextProps, type FloatingToolbarPlacement, type FloatingToolbarProps, FooterFrame, type FooterFrameProps, type FooterFrameVariant, FormDemarcator, GroupedInput, type GroupedInputProps, type GroupedInputVariant, HoverTip, type HoverTipProps, InputField, type InputFieldProps, type InputFieldVariant, InputGroup, type InputGroupProps, InputSection, type InputSectionProps, LAST_UPDATED_COLUMN, LargeModal, type LargeModalProps, type LargeModalVariant, LeadingInputFieldElement, type LeadingInputFieldElementProps, type LeadingInputFieldElementVariant, LetaLogo, type LetaLogoProps, ListGroup, type ListGroupProps, type ListItemData, ListSection, type ListSectionProps, LoadingOverlay, type LoadingOverlayProps, MAP_ROUTE_DRIVEN, MAP_ROUTE_PLANNED, MapIcon, type MapIconProps, type MapIconVariant, MapLegend, type MapLegendEntry, type MapLegendProps, type MapSearchFooterHints, MapSearchInput, type MapSearchInputProps, type MapSearchResultGroup, type MapSearchState, MapView, type MapViewProps, MapZoomControl, type MapZoomControlProps, MenuDivider, MenuFlyout, type MenuFlyoutProps, MenuPanel, type MenuPanelProps, type MetricCardState, type MetricVariance, MobileBadge, type MobileBadgeColor, type MobileBadgeProps, type MobileBadgeVariant, MobileChip, type MobileChipProps, MobileDropdown, type MobileDropdownOption, type MobileDropdownProps, MobileFeaturedIcon, type MobileFeaturedIconColor, type MobileFeaturedIconProps, type MobileFeaturedIconSize, type MobileFeaturedIconVariant, MobileFileUpload, type MobileFileUploadImage, type MobileFileUploadProps, MobileMapSearchInput, type MobileMapSearchInputProps, type MobileMenuOptionState, type MobileMenuOptionType, MobileMenuOptions, type MobileMenuOptionsProps, MobileNavTab, type MobileNavTabProps, MobileSearchInput, type MobileSearchInputProps, MobileSegment, type MobileSegmentProps, ModalDialog, type ModalDialogProps, type ModalDialogVariant, ModalHeaders, type ModalHeadersProps, type ModalHeadersVariant, ModalShell, type ModalShellProps, NotificationBanner, type NotificationBannerProps, type NotificationBannerType, type NotificationBannerVariant, ORDER_TABLE_COLUMNS, ORDER_TABLE_COLUMNS_FINISHED, OptionCard, type OptionCardProps, type OptionCardState, Page, type PageProps, PageTab, type PageTabProps, PageTabsControl, type PageTabsControlItem, type PageTabsControlProps, type PageTabsControlVariant, type PageVariant, Pagination, type PaginationProps, type PaginationVariant, Placeholder, type PlaceholderProps, Popover, type PopoverPlacement, type PopoverProps, ProgressTracker, type ProgressTrackerProps, RadioButton, type RadioButtonProps, SCHEDULED_ORDER_COLUMNS, SIGNATURE_IMAGE, type ScrollEdges, SearchInput, type SearchInputProps, SegmentSwitcherTab, type SegmentSwitcherTabProps, Select, type SelectProps, type SelectedFilterChip, SelectedFilterControl, type SelectedFilterControlProps, SelectionControl, type SelectionControlProps, type SelectionControlVariant, Shortcut, ShortcutHint, type ShortcutHintProps, type ShortcutKey, type ShortcutProps, SideBar, type SideBarGroup, type SideBarItem, type SideBarProps, type SideBarVariant, Sidetab, type SidetabItem, type SidetabProps, Skeleton, type SkeletonProps, type SortOption, StackedCards, type StackedCardsProps, Stepper, StepperInput, type StepperInputProps, type StepperProps, type StepperVariant, type SurroundingTheme, Table, type TableColumn, type TableColumnRole, TableContainer, type TableContainerProps, type TableContainerVariant, TableDataControl, type TableDataControlProps, type TableDataControlVariant, type TableProps, type TableRow, TableSection, type TableSectionProps, Tag, type TagProps, TextArea, type TextAreaBasicProps, type TextAreaProps, type TextAreaRichProps, type TextAreaVariant, Title, type TitleProps, type TitleVariant, Toast, type ToastProps, type ToastType, Toggle, ToggleButton, type ToggleButtonProps, type ToggleProps, Tooltip, type TooltipPlatform, type TooltipPosition, type TooltipPositionInput, type TooltipProps, type TooltipRect, type TooltipSide, type TooltipVariant, TopBar, type TopBarProps, type TopBarVariant, TopFilter, type TopFilterProps, TopFilterSection, type TopFilterSectionItem, type TopFilterSectionProps, TrailingInputFieldElement, type TrailingInputFieldElementProps, type TrailingInputFieldElementVariant, TruncatedIdText, type TruncatedIdTextProps, TruncatedText, type TruncatedTextProps, UNASSIGNED_ORDER_COLUMNS, UserMenu, type UserMenuProps, type UserMenuState, ViewSwitcherTab, type ViewSwitcherTabProps, WizardTab, type WizardTabProps, abbreviateId, animateScrollTop, computeTooltipPosition, downloadFile, htmlToPlainText, inverseTheme, sanitizeRichText, sortLabelFor, useAccordion, useEscapeLayer, useRovingFocus, useScrollEdges, useScrollShadow, useSurroundingTheme };
|
package/dist/index.js
CHANGED
|
@@ -3204,7 +3204,14 @@ var STYLES4 = `
|
|
|
3204
3204
|
.leta-search-field__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
|
|
3205
3205
|
.leta-search-field__input:disabled { cursor: not-allowed; }
|
|
3206
3206
|
.leta-search-field__input:disabled::placeholder { color: var(--text-disabled-placeholder-disabled); }
|
|
3207
|
+
@keyframes leta-search-field-spin { to { transform: rotate(360deg); } }
|
|
3208
|
+
.leta-search-field__spinner { display: flex; animation: leta-search-field-spin 0.9s linear infinite; }
|
|
3209
|
+
@media (prefers-reduced-motion: reduce) { .leta-search-field__spinner { animation: none; } }
|
|
3207
3210
|
`;
|
|
3211
|
+
function SearchFieldSpinner() {
|
|
3212
|
+
ensureStyles9();
|
|
3213
|
+
return /* @__PURE__ */ jsx31("span", { className: "leta-search-field__spinner", role: "status", "aria-label": "Searching", style: { flexShrink: 0, color: "var(--icons-neutral-idle)" }, children: /* @__PURE__ */ jsx31(Icon16, { name: "Loading", size: 16 }) });
|
|
3214
|
+
}
|
|
3208
3215
|
function ensureStyles9() {
|
|
3209
3216
|
if (typeof document === "undefined") return;
|
|
3210
3217
|
if (document.getElementById(STYLE_ID12)) return;
|
|
@@ -3228,6 +3235,11 @@ var SearchField = /* @__PURE__ */ React31.forwardRef(function SearchField2({
|
|
|
3228
3235
|
onChange,
|
|
3229
3236
|
className,
|
|
3230
3237
|
style,
|
|
3238
|
+
trailing,
|
|
3239
|
+
clearLabel = "Clear Search",
|
|
3240
|
+
clearVariant = "glyph",
|
|
3241
|
+
onFocus,
|
|
3242
|
+
onBlur,
|
|
3231
3243
|
...inputProps
|
|
3232
3244
|
}, ref) {
|
|
3233
3245
|
ensureStyles9();
|
|
@@ -3284,22 +3296,35 @@ var SearchField = /* @__PURE__ */ React31.forwardRef(function SearchField2({
|
|
|
3284
3296
|
},
|
|
3285
3297
|
onFocus: (e) => {
|
|
3286
3298
|
setFocused(true);
|
|
3287
|
-
|
|
3299
|
+
onFocus?.(e);
|
|
3288
3300
|
},
|
|
3289
3301
|
onBlur: (e) => {
|
|
3290
3302
|
setFocused(false);
|
|
3291
|
-
|
|
3303
|
+
onBlur?.(e);
|
|
3292
3304
|
},
|
|
3293
3305
|
style: { color: disabled ? "var(--text-disabled-placeholder-disabled)" : "var(--text-default-label)" },
|
|
3294
3306
|
...inputProps
|
|
3295
3307
|
}
|
|
3296
3308
|
),
|
|
3297
|
-
|
|
3309
|
+
trailing,
|
|
3310
|
+
clearVisible && clearVariant === "ghost" && // Figma's open Overlay: Extra Small Ghost icon-only (24×24), 16 from the value.
|
|
3311
|
+
/* @__PURE__ */ jsx31(
|
|
3312
|
+
Button,
|
|
3313
|
+
{
|
|
3314
|
+
variant: "ghost",
|
|
3315
|
+
size: "extra-small",
|
|
3316
|
+
iconOnly: "Cancel",
|
|
3317
|
+
"aria-label": clearLabel,
|
|
3318
|
+
onClick: handleClear,
|
|
3319
|
+
style: { flexShrink: 0, marginLeft: "calc(var(--spacing-16px) - var(--spacing-8px))" }
|
|
3320
|
+
}
|
|
3321
|
+
),
|
|
3322
|
+
clearVisible && clearVariant === "glyph" && /* @__PURE__ */ jsx31(
|
|
3298
3323
|
"button",
|
|
3299
3324
|
{
|
|
3300
3325
|
type: "button",
|
|
3301
3326
|
onClick: handleClear,
|
|
3302
|
-
"aria-label":
|
|
3327
|
+
"aria-label": clearLabel,
|
|
3303
3328
|
style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", border: 0, background: "transparent", padding: 0, cursor: "pointer", color: "var(--icons-neutral-default)" },
|
|
3304
3329
|
children: /* @__PURE__ */ jsx31(Icon16, { name: "Cancel", size: 16 })
|
|
3305
3330
|
}
|
|
@@ -3600,8 +3625,9 @@ function surfaceVar(type, eff, active, selected, disabled) {
|
|
|
3600
3625
|
return `--surface-neutral-sidetab-navigation-${eff}`;
|
|
3601
3626
|
}
|
|
3602
3627
|
}
|
|
3603
|
-
function borderVar(type, active, disabled) {
|
|
3628
|
+
function borderVar(type, active, disabled, eff = "idle") {
|
|
3604
3629
|
if (disabled) return null;
|
|
3630
|
+
if (type === "dropdown-advanced" && eff !== "idle") return `--border-neutral-dropdown-advanced-${eff}`;
|
|
3605
3631
|
if (type === "filter-group") return active ? "--border-secondary-filter-group-active" : "--border-neutral-filter-group-idle";
|
|
3606
3632
|
if (active && (type === "sidebar-main" || type === "sidebar-main-icon")) return "--border-neutral-sidebar-main-navigation-active";
|
|
3607
3633
|
if (active && type === "sidebar-sub") return "--border-neutral-sidebar-sub-navigation-active";
|
|
@@ -3672,12 +3698,19 @@ var DesktopMenuOptions = /* @__PURE__ */ React35.forwardRef(function DesktopMenu
|
|
|
3672
3698
|
showChevron,
|
|
3673
3699
|
subtext,
|
|
3674
3700
|
content,
|
|
3701
|
+
leadingContent,
|
|
3702
|
+
trailingContent,
|
|
3703
|
+
highlighted,
|
|
3675
3704
|
selectedCount,
|
|
3676
3705
|
onDeselectAll,
|
|
3677
3706
|
onSelect,
|
|
3678
3707
|
className,
|
|
3679
3708
|
style,
|
|
3680
3709
|
role,
|
|
3710
|
+
onMouseEnter,
|
|
3711
|
+
onMouseLeave,
|
|
3712
|
+
onMouseDown,
|
|
3713
|
+
onMouseUp,
|
|
3681
3714
|
...rest
|
|
3682
3715
|
}, ref) {
|
|
3683
3716
|
ensureStyles10();
|
|
@@ -3687,9 +3720,9 @@ var DesktopMenuOptions = /* @__PURE__ */ React35.forwardRef(function DesktopMenu
|
|
|
3687
3720
|
const disabled = state ? state === "disabled" || state === "disabled-selected" : disabledProp;
|
|
3688
3721
|
const active = state ? state === "active" || state === "active-selected" : activeProp;
|
|
3689
3722
|
const selected = state ? state.endsWith("-selected") : selectedProp;
|
|
3690
|
-
const eff = disabled ? "idle" : state ? state.startsWith("hover") ? "hover" : state.startsWith("pressed") ? "pressed" : "idle" : press ? "pressed" : hover ? "hover" : "idle";
|
|
3723
|
+
const eff = disabled ? "idle" : state ? state.startsWith("hover") ? "hover" : state.startsWith("pressed") ? "pressed" : "idle" : press ? "pressed" : (highlighted !== void 0 ? highlighted : hover) ? "hover" : "idle";
|
|
3691
3724
|
const bg = surfaceVar(type, eff, active, selected, disabled);
|
|
3692
|
-
const bd = borderVar(type, active, disabled);
|
|
3725
|
+
const bd = borderVar(type, active, disabled, eff);
|
|
3693
3726
|
const txtVar = textVar(type, active, disabled);
|
|
3694
3727
|
const txtClass = textClass(type, active);
|
|
3695
3728
|
const fire = () => {
|
|
@@ -3746,7 +3779,15 @@ var DesktopMenuOptions = /* @__PURE__ */ React35.forwardRef(function DesktopMenu
|
|
|
3746
3779
|
}
|
|
3747
3780
|
case "dropdown-advanced": {
|
|
3748
3781
|
const advChevron = showChevron ?? false;
|
|
3749
|
-
|
|
3782
|
+
const usesSlots = leadingContent !== void 0 || trailingContent !== void 0;
|
|
3783
|
+
inner = content ?? (usesSlots ? (
|
|
3784
|
+
// The Library's two SLOTs (Leading Content, gap 12 inside; Trailing Content
|
|
3785
|
+
// hugging its content), 20 apart.
|
|
3786
|
+
/* @__PURE__ */ jsxs25("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-20px)", width: "100%", minWidth: 0 }, children: [
|
|
3787
|
+
/* @__PURE__ */ jsx35("div", { style: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "var(--spacing-12px)", flex: 1, minWidth: 0 }, children: leadingContent }),
|
|
3788
|
+
trailingContent != null && /* @__PURE__ */ jsx35("div", { style: { display: "flex", alignItems: "center", justifyContent: "flex-end", flexShrink: 0 }, children: trailingContent })
|
|
3789
|
+
] })
|
|
3790
|
+
) : /* @__PURE__ */ jsxs25("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-20px)", width: "100%" }, children: [
|
|
3750
3791
|
/* @__PURE__ */ jsxs25("div", { style: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "var(--spacing-12px)", flex: 1, minWidth: 0 }, children: [
|
|
3751
3792
|
leadingIcon && // Figma `Leading Icon` frame: 20×22, padding-top 2 — the glyph sits
|
|
3752
3793
|
// on the title's line.
|
|
@@ -3756,8 +3797,22 @@ var DesktopMenuOptions = /* @__PURE__ */ React35.forwardRef(function DesktopMenu
|
|
|
3756
3797
|
subtext != null && /* @__PURE__ */ jsx35("span", { className: "text-body-s-regular", style: { color: "var(--text-default-sub-body)" }, children: subtext })
|
|
3757
3798
|
] })
|
|
3758
3799
|
] }),
|
|
3759
|
-
advChevron
|
|
3760
|
-
|
|
3800
|
+
advChevron ? chevron("right", 20) : /* @__PURE__ */ jsx35(
|
|
3801
|
+
"span",
|
|
3802
|
+
{
|
|
3803
|
+
"aria-hidden": true,
|
|
3804
|
+
style: {
|
|
3805
|
+
display: "flex",
|
|
3806
|
+
flexShrink: 0,
|
|
3807
|
+
width: 20,
|
|
3808
|
+
height: 20,
|
|
3809
|
+
color: "var(--icons-neutral-default)",
|
|
3810
|
+
visibility: eff === "idle" ? "hidden" : "visible"
|
|
3811
|
+
},
|
|
3812
|
+
children: /* @__PURE__ */ jsx35(Icon20, { name: "Enter", size: 20 })
|
|
3813
|
+
}
|
|
3814
|
+
)
|
|
3815
|
+
] }));
|
|
3761
3816
|
break;
|
|
3762
3817
|
}
|
|
3763
3818
|
case "checkbox-selection":
|
|
@@ -3851,13 +3906,23 @@ var DesktopMenuOptions = /* @__PURE__ */ React35.forwardRef(function DesktopMenu
|
|
|
3851
3906
|
fire();
|
|
3852
3907
|
}
|
|
3853
3908
|
},
|
|
3854
|
-
onMouseEnter: () =>
|
|
3855
|
-
|
|
3909
|
+
onMouseEnter: (e) => {
|
|
3910
|
+
setHover(true);
|
|
3911
|
+
onMouseEnter?.(e);
|
|
3912
|
+
},
|
|
3913
|
+
onMouseLeave: (e) => {
|
|
3856
3914
|
setHover(false);
|
|
3857
3915
|
setPress(false);
|
|
3916
|
+
onMouseLeave?.(e);
|
|
3917
|
+
},
|
|
3918
|
+
onMouseDown: (e) => {
|
|
3919
|
+
setPress(true);
|
|
3920
|
+
onMouseDown?.(e);
|
|
3921
|
+
},
|
|
3922
|
+
onMouseUp: (e) => {
|
|
3923
|
+
setPress(false);
|
|
3924
|
+
onMouseUp?.(e);
|
|
3858
3925
|
},
|
|
3859
|
-
onMouseDown: () => setPress(true),
|
|
3860
|
-
onMouseUp: () => setPress(false),
|
|
3861
3926
|
style: container,
|
|
3862
3927
|
...rest,
|
|
3863
3928
|
children: inner
|
|
@@ -4321,6 +4386,11 @@ var SideBar = /* @__PURE__ */ React38.forwardRef(function SideBar2({
|
|
|
4321
4386
|
return "0:0";
|
|
4322
4387
|
}, [groups]);
|
|
4323
4388
|
const [activeKey, setActiveKey] = React38.useState(seedActive);
|
|
4389
|
+
const [prevSeed, setPrevSeed] = React38.useState(seedActive);
|
|
4390
|
+
if (seedActive !== prevSeed) {
|
|
4391
|
+
setPrevSeed(seedActive);
|
|
4392
|
+
setActiveKey(seedActive);
|
|
4393
|
+
}
|
|
4324
4394
|
const width = collapsed ? 72 : 240;
|
|
4325
4395
|
const toggle = () => {
|
|
4326
4396
|
setCollapsed((c) => {
|
|
@@ -7917,6 +7987,7 @@ var EMPTY_STATE_ILLUSTRATIONS = {
|
|
|
7917
7987
|
"no-notifications": new URL("./assets/no-notifications.png", import.meta.url).href,
|
|
7918
7988
|
calendar: new URL("./assets/calendar.png", import.meta.url).href,
|
|
7919
7989
|
recordings: new URL("./assets/recordings.png", import.meta.url).href,
|
|
7990
|
+
check: new URL("./assets/check.png", import.meta.url).href,
|
|
7920
7991
|
"error": new URL("./assets/error.png", import.meta.url).href
|
|
7921
7992
|
};
|
|
7922
7993
|
var EMPTY_STATE_ILLUSTRATIONS_WEBP = {
|
|
@@ -7937,6 +8008,7 @@ var EMPTY_STATE_ILLUSTRATIONS_WEBP = {
|
|
|
7937
8008
|
"no-notifications": new URL("./assets/no-notifications.webp", import.meta.url).href,
|
|
7938
8009
|
calendar: new URL("./assets/calendar.webp", import.meta.url).href,
|
|
7939
8010
|
recordings: new URL("./assets/recordings.webp", import.meta.url).href,
|
|
8011
|
+
check: new URL("./assets/check.webp", import.meta.url).href,
|
|
7940
8012
|
"error": new URL("./assets/error.webp", import.meta.url).href
|
|
7941
8013
|
};
|
|
7942
8014
|
|
|
@@ -7951,31 +8023,36 @@ function ensureIllustrationStyles() {
|
|
|
7951
8023
|
document.head.appendChild(el);
|
|
7952
8024
|
}
|
|
7953
8025
|
var PRESET = {
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
"
|
|
8026
|
+
// Every description ends with a full stop (ruled 2026-10-27 — Figma had them on
|
|
8027
|
+
// most Desktop variants and the code had dropped them all).
|
|
8028
|
+
// Copy per Figma (2026-10-21): the No Results variants read "Check the spelling or
|
|
8029
|
+
// adjust your filters." Surfaces with their own ruled copy pass `description`.
|
|
8030
|
+
"no-results": { illustration: "no-results", heading: "No matching results", description: "Check the spelling or adjust your filters." },
|
|
8031
|
+
"no-reviews": { illustration: "no-reviews", heading: "No reviews", description: "All reviews will be displayed here." },
|
|
8032
|
+
"no-broadcast-logs": { illustration: "no-broadcast-logs", heading: "No broadcast logs", description: "All info will be displayed here." },
|
|
8033
|
+
"image-upload": { illustration: "image-upload", heading: "Select image to upload", description: "Or drag and drop here." },
|
|
8034
|
+
"file-upload": { illustration: "file-upload", heading: "Select file to upload", description: "Or drag and drop here." },
|
|
7959
8035
|
"no-suspensions": { illustration: "no-suspensions", heading: "No suspensions", description: "You are currently eligible to receive order broadcasts from partner companies." },
|
|
7960
|
-
"no-items": { illustration: "no-items", heading: "No items", description: "You have no returnables" },
|
|
7961
|
-
"no-orders": { illustration: "no-orders", heading: "No orders yet", description: "All orders will be displayed here" },
|
|
8036
|
+
"no-items": { illustration: "no-items", heading: "No items", description: "You have no returnables." },
|
|
8037
|
+
"no-orders": { illustration: "no-orders", heading: "No orders yet", description: "All orders will be displayed here." },
|
|
7962
8038
|
"no-network": { illustration: "no-network", heading: "Check your connection", description: "Could not connect to the internet. Please check your network." },
|
|
7963
8039
|
"new-update": { illustration: "new-update", heading: "Get the new update", description: "Update to the latest version with bug fixes and improvements." },
|
|
7964
|
-
"no-data": { illustration: "no-data", heading: "No data yet", description: "All data will be displayed here" },
|
|
7965
|
-
"no-trips": { illustration: "no-trips", heading: "No trips yet", description: "All trips will be displayed here" },
|
|
7966
|
-
"no-drivers": { illustration: "no-drivers", heading: "No drivers", description: "All drivers will be displayed here" },
|
|
8040
|
+
"no-data": { illustration: "no-data", heading: "No data yet", description: "All data will be displayed here." },
|
|
8041
|
+
"no-trips": { illustration: "no-trips", heading: "No trips yet", description: "All trips will be displayed here." },
|
|
8042
|
+
"no-drivers": { illustration: "no-drivers", heading: "No drivers", description: "All drivers will be displayed here." },
|
|
7967
8043
|
"no-products": { illustration: "no-items", heading: "No products", description: "No products have been added." },
|
|
7968
8044
|
"error": { illustration: "error", heading: "Oops, something went wrong", description: "We couldn't load your content. Reload the page." },
|
|
7969
|
-
// Added 2026-08-26 (Figma `Type=Comments` / `Type=Notifications`).
|
|
7970
|
-
//
|
|
7971
|
-
|
|
7972
|
-
"
|
|
7973
|
-
"notifications": { illustration: "no-notifications", heading: "No notifications yet", description: "New notifications will be displayed here" },
|
|
8045
|
+
// Added 2026-08-26 (Figma `Type=Comments` / `Type=Notifications`). Both
|
|
8046
|
+
// illustrations ship at the same 150×150 render size as every other type.
|
|
8047
|
+
"comments": { illustration: "no-comments", heading: "No comments yet", description: "All comments will be displayed here." },
|
|
8048
|
+
"notifications": { illustration: "no-notifications", heading: "No notifications yet", description: "New notifications will be displayed here." },
|
|
7974
8049
|
// Added 2026-10-06 (Figma `Type=Calendar`, desktop). Figma reads "No Schedule";
|
|
7975
8050
|
// sentence-cased like every other preset title (2026-10-02 ruling).
|
|
7976
|
-
"calendar": { illustration: "calendar", heading: "No schedule", description: "All schedules will be displayed here" },
|
|
8051
|
+
"calendar": { illustration: "calendar", heading: "No schedule", description: "All schedules will be displayed here." },
|
|
7977
8052
|
// Added 2026-10-21 (Figma `Type=Recording`, Desktop + Mobile — same copy in both).
|
|
7978
|
-
"recording": { illustration: "recordings", heading: "No recordings", description: "All recordings will be displayed here" }
|
|
8053
|
+
"recording": { illustration: "recordings", heading: "No recordings", description: "All recordings will be displayed here." },
|
|
8054
|
+
// Added 2026-10-27 (Figma `Type=Check`, Desktop + Mobile) — nothing left to do.
|
|
8055
|
+
"check": { illustration: "check", heading: "You\u2019re all good", description: "Any pending tasks will be displayed here." }
|
|
7979
8056
|
};
|
|
7980
8057
|
var ILLUSTRATION_SIZE = 150;
|
|
7981
8058
|
var HEADING_CLASS = {
|
|
@@ -8004,7 +8081,10 @@ var EmptyState = /* @__PURE__ */ React62.forwardRef(function EmptyState2({
|
|
|
8004
8081
|
display: "flex",
|
|
8005
8082
|
flexDirection: "column",
|
|
8006
8083
|
alignItems: "center",
|
|
8007
|
-
|
|
8084
|
+
// Desktop keeps 20 between illustration, copy and CTA; Mobile packs them
|
|
8085
|
+
// tight (Figma Container gap 0, 2026-10-27 — the illustration's own
|
|
8086
|
+
// whitespace does the separating).
|
|
8087
|
+
gap: size === "mobile" ? 0 : "var(--spacing-20px)",
|
|
8008
8088
|
width: 300,
|
|
8009
8089
|
padding: "var(--padding-16px)",
|
|
8010
8090
|
boxSizing: "border-box",
|
|
@@ -9114,6 +9194,7 @@ var FooterFrame = /* @__PURE__ */ React72.forwardRef(
|
|
|
9114
9194
|
const isCard = variant === "card";
|
|
9115
9195
|
const itemGap = variant === "search-overlay" ? "var(--spacing-16px)" : "var(--spacing-8px)";
|
|
9116
9196
|
const hasLeading = leading != null && leading !== false;
|
|
9197
|
+
const wraps = variant === "search-overlay";
|
|
9117
9198
|
return /* @__PURE__ */ jsxs52(
|
|
9118
9199
|
"div",
|
|
9119
9200
|
{
|
|
@@ -9127,7 +9208,7 @@ var FooterFrame = /* @__PURE__ */ React72.forwardRef(
|
|
|
9127
9208
|
// the trailing buttons' own gap is 8px (handled on the inner flex).
|
|
9128
9209
|
gap: 10,
|
|
9129
9210
|
width: "100%",
|
|
9130
|
-
height: HEIGHT[variant],
|
|
9211
|
+
...wraps ? { minHeight: HEIGHT[variant], flexWrap: "wrap", rowGap: "var(--spacing-8px)" } : { height: HEIGHT[variant] },
|
|
9131
9212
|
padding: isCard ? 0 : "var(--padding-16px)",
|
|
9132
9213
|
backgroundColor: isCard ? "transparent" : "var(--surface-neutral-bg-default)",
|
|
9133
9214
|
// No top border (Figma removed the footer's top outline across all
|
|
@@ -9154,8 +9235,8 @@ var FooterFrame = /* @__PURE__ */ React72.forwardRef(
|
|
|
9154
9235
|
},
|
|
9155
9236
|
...rest,
|
|
9156
9237
|
children: [
|
|
9157
|
-
hasLeading && /* @__PURE__ */ jsx71("div", { style: { display: "flex", alignItems: "center", gap: itemGap, minWidth: 0 }, children: leading }),
|
|
9158
|
-
/* @__PURE__ */ jsx71("div", { style: { display: "flex", alignItems: "center", gap: itemGap, flexShrink: 0 }, children })
|
|
9238
|
+
hasLeading && /* @__PURE__ */ jsx71("div", { style: { display: "flex", alignItems: "center", gap: itemGap, minWidth: 0, ...wraps ? { flexWrap: "wrap", rowGap: "var(--spacing-8px)" } : null }, children: leading }),
|
|
9239
|
+
/* @__PURE__ */ jsx71("div", { style: { display: "flex", alignItems: "center", gap: itemGap, flexShrink: 0, ...wraps ? { flexWrap: "wrap", rowGap: "var(--spacing-8px)" } : null }, children })
|
|
9159
9240
|
]
|
|
9160
9241
|
}
|
|
9161
9242
|
);
|
|
@@ -10583,6 +10664,23 @@ var InputSection = /* @__PURE__ */ React87.forwardRef(function InputSection2({ t
|
|
|
10583
10664
|
import * as React88 from "react";
|
|
10584
10665
|
import { Icon as Icon38 } from "@leta-io/icons";
|
|
10585
10666
|
import { jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
10667
|
+
var STYLE_ID27 = "leta-toast-styles";
|
|
10668
|
+
var STYLES18 = `
|
|
10669
|
+
@keyframes leta-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
10670
|
+
.leta-toast-progress {
|
|
10671
|
+
transform-origin: left center;
|
|
10672
|
+
animation-name: leta-toast-progress;
|
|
10673
|
+
animation-timing-function: linear;
|
|
10674
|
+
animation-fill-mode: forwards;
|
|
10675
|
+
}
|
|
10676
|
+
`;
|
|
10677
|
+
function ensureStyles24() {
|
|
10678
|
+
if (typeof document === "undefined" || document.getElementById(STYLE_ID27)) return;
|
|
10679
|
+
const el = document.createElement("style");
|
|
10680
|
+
el.id = STYLE_ID27;
|
|
10681
|
+
el.textContent = STYLES18;
|
|
10682
|
+
document.head.appendChild(el);
|
|
10683
|
+
}
|
|
10586
10684
|
var TYPE_CONFIG2 = {
|
|
10587
10685
|
success: { icon: "Check-Circle", iconColor: "var(--icons-success-default)" },
|
|
10588
10686
|
warning: { icon: "Warning", iconColor: "var(--icons-warning-default)" },
|
|
@@ -10598,17 +10696,38 @@ var Toast = /* @__PURE__ */ React88.forwardRef(function Toast2({
|
|
|
10598
10696
|
duration,
|
|
10599
10697
|
children,
|
|
10600
10698
|
showCTA = false,
|
|
10699
|
+
className,
|
|
10601
10700
|
style,
|
|
10701
|
+
onMouseEnter,
|
|
10702
|
+
onMouseLeave,
|
|
10703
|
+
onFocus,
|
|
10704
|
+
onBlur,
|
|
10602
10705
|
...rest
|
|
10603
10706
|
}, ref) {
|
|
10707
|
+
ensureStyles24();
|
|
10604
10708
|
const config = TYPE_CONFIG2[type];
|
|
10605
10709
|
const isDestructive = type === "error";
|
|
10710
|
+
const autoDismiss = Boolean(duration && onDismiss);
|
|
10711
|
+
const [hovered, setHovered] = React88.useState(false);
|
|
10712
|
+
const [focused, setFocused] = React88.useState(false);
|
|
10713
|
+
const paused = hovered || focused;
|
|
10714
|
+
const remaining = React88.useRef(duration ?? 0);
|
|
10715
|
+
const dismiss = React88.useRef(onDismiss);
|
|
10716
|
+
React88.useEffect(() => {
|
|
10717
|
+
dismiss.current = onDismiss;
|
|
10718
|
+
});
|
|
10606
10719
|
React88.useEffect(() => {
|
|
10607
|
-
if (!
|
|
10608
|
-
const
|
|
10609
|
-
|
|
10610
|
-
|
|
10720
|
+
if (!autoDismiss || paused) return;
|
|
10721
|
+
const started = Date.now();
|
|
10722
|
+
const id = setTimeout(() => dismiss.current?.(), remaining.current);
|
|
10723
|
+
return () => {
|
|
10724
|
+
clearTimeout(id);
|
|
10725
|
+
remaining.current = Math.max(0, remaining.current - (Date.now() - started));
|
|
10726
|
+
};
|
|
10727
|
+
}, [autoDismiss, paused]);
|
|
10611
10728
|
const rootStyle = {
|
|
10729
|
+
position: "relative",
|
|
10730
|
+
overflow: "hidden",
|
|
10612
10731
|
display: "flex",
|
|
10613
10732
|
flexDirection: "row",
|
|
10614
10733
|
alignItems: "center",
|
|
@@ -10629,12 +10748,41 @@ var Toast = /* @__PURE__ */ React88.forwardRef(function Toast2({
|
|
|
10629
10748
|
ref,
|
|
10630
10749
|
role: isDestructive ? "alert" : "status",
|
|
10631
10750
|
"aria-live": isDestructive ? "assertive" : "polite",
|
|
10751
|
+
className: ["leta-toast", className].filter(Boolean).join(" "),
|
|
10632
10752
|
style: rootStyle,
|
|
10753
|
+
onMouseEnter: (e) => {
|
|
10754
|
+
setHovered(true);
|
|
10755
|
+
onMouseEnter?.(e);
|
|
10756
|
+
},
|
|
10757
|
+
onMouseLeave: (e) => {
|
|
10758
|
+
setHovered(false);
|
|
10759
|
+
onMouseLeave?.(e);
|
|
10760
|
+
},
|
|
10761
|
+
onFocus: (e) => {
|
|
10762
|
+
setFocused(true);
|
|
10763
|
+
onFocus?.(e);
|
|
10764
|
+
},
|
|
10765
|
+
onBlur: (e) => {
|
|
10766
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setFocused(false);
|
|
10767
|
+
onBlur?.(e);
|
|
10768
|
+
},
|
|
10633
10769
|
...rest,
|
|
10634
10770
|
children: [
|
|
10635
|
-
/* @__PURE__ */
|
|
10636
|
-
|
|
10637
|
-
|
|
10771
|
+
autoDismiss && /* @__PURE__ */ jsx83("div", { "aria-hidden": true, style: { position: "absolute", top: 0, left: 0, right: 0, height: 4, backgroundColor: "var(--surface-neutral-bg-default)" }, children: /* @__PURE__ */ jsx83(
|
|
10772
|
+
"div",
|
|
10773
|
+
{
|
|
10774
|
+
className: "leta-toast-progress",
|
|
10775
|
+
style: {
|
|
10776
|
+
height: "100%",
|
|
10777
|
+
backgroundColor: "var(--surface-success-task-progress-bar)",
|
|
10778
|
+
animationDuration: `${duration}ms`,
|
|
10779
|
+
animationPlayState: paused ? "paused" : "running"
|
|
10780
|
+
}
|
|
10781
|
+
}
|
|
10782
|
+
) }),
|
|
10783
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "var(--spacing-12px)", minWidth: 0 }, children: [
|
|
10784
|
+
/* @__PURE__ */ jsx83("div", { style: { flexShrink: 0, width: 24, height: 24, paddingTop: "var(--padding-2px)", color: config.iconColor }, children: /* @__PURE__ */ jsx83(Icon38, { name: config.icon, outlined: false, size: 24 }) }),
|
|
10785
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "column", minWidth: 0 }, children: [
|
|
10638
10786
|
showTitle && title && /* @__PURE__ */ jsx83("span", { className: "text-body-l-medium", style: { color: "var(--text-default-heading)" }, children: title }),
|
|
10639
10787
|
showSubtitle && subtitle && /* @__PURE__ */ jsx83("span", { className: "text-body-m-regular", style: { color: "var(--text-default-sub-body)" }, children: subtitle })
|
|
10640
10788
|
] })
|
|
@@ -10670,18 +10818,18 @@ import "@leta-io/icons";
|
|
|
10670
10818
|
import * as React89 from "react";
|
|
10671
10819
|
import { Icon as Icon39 } from "@leta-io/icons";
|
|
10672
10820
|
import { Fragment as Fragment19, jsx as jsx84, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
10673
|
-
var
|
|
10674
|
-
var
|
|
10821
|
+
var STYLE_ID28 = "leta-mmo-styles";
|
|
10822
|
+
var STYLES19 = `
|
|
10675
10823
|
.leta-mmo { cursor: pointer; }
|
|
10676
10824
|
.leta-mmo[aria-disabled="true"] { cursor: not-allowed; }
|
|
10677
10825
|
.leta-mmo:focus-visible { outline: var(--stroke-sm) solid var(--border-secondary-component-focus); outline-offset: 2px; }
|
|
10678
10826
|
`;
|
|
10679
|
-
function
|
|
10827
|
+
function ensureStyles25() {
|
|
10680
10828
|
if (typeof document === "undefined") return;
|
|
10681
|
-
if (document.getElementById(
|
|
10829
|
+
if (document.getElementById(STYLE_ID28)) return;
|
|
10682
10830
|
const el = document.createElement("style");
|
|
10683
|
-
el.id =
|
|
10684
|
-
el.textContent =
|
|
10831
|
+
el.id = STYLE_ID28;
|
|
10832
|
+
el.textContent = STYLES19;
|
|
10685
10833
|
document.head.appendChild(el);
|
|
10686
10834
|
}
|
|
10687
10835
|
function surfaceVar3(type, press, active, disabled) {
|
|
@@ -10719,7 +10867,7 @@ function borderVar3(type, press, active, disabled) {
|
|
|
10719
10867
|
}
|
|
10720
10868
|
}
|
|
10721
10869
|
var MobileMenuOptions = /* @__PURE__ */ React89.forwardRef(function MobileMenuOptions2({ type = "combobox", label = "Insert Text", leadingIcon, showLeadingIcon = false, active = false, selected = false, disabled = false, state, onSelect, className, style, role, ...rest }, ref) {
|
|
10722
|
-
|
|
10870
|
+
ensureStyles25();
|
|
10723
10871
|
const [press, setPress] = React89.useState(false);
|
|
10724
10872
|
const isCell = type === "mobile-day-cell";
|
|
10725
10873
|
const isSel = type === "checkbox-selection" || type === "radio-selection";
|
|
@@ -11630,8 +11778,8 @@ function cleanStickyMarker(marker) {
|
|
|
11630
11778
|
|
|
11631
11779
|
// src/TextArea/TextArea.tsx
|
|
11632
11780
|
import { Fragment as Fragment22, jsx as jsx87, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
11633
|
-
var
|
|
11634
|
-
var
|
|
11781
|
+
var STYLE_ID29 = "leta-textarea-styles";
|
|
11782
|
+
var STYLES20 = `
|
|
11635
11783
|
.leta-textarea__input {
|
|
11636
11784
|
border: 0;
|
|
11637
11785
|
outline: none;
|
|
@@ -11654,12 +11802,12 @@ var STYLES19 = `
|
|
|
11654
11802
|
}
|
|
11655
11803
|
.leta-textarea__rich-input:empty::before { content: ''; }
|
|
11656
11804
|
`;
|
|
11657
|
-
function
|
|
11805
|
+
function ensureStyles26() {
|
|
11658
11806
|
if (typeof document === "undefined") return;
|
|
11659
|
-
if (document.getElementById(
|
|
11807
|
+
if (document.getElementById(STYLE_ID29)) return;
|
|
11660
11808
|
const el = document.createElement("style");
|
|
11661
|
-
el.id =
|
|
11662
|
-
el.textContent =
|
|
11809
|
+
el.id = STYLE_ID29;
|
|
11810
|
+
el.textContent = STYLES20;
|
|
11663
11811
|
document.head.appendChild(el);
|
|
11664
11812
|
}
|
|
11665
11813
|
function LabelSection({
|
|
@@ -12103,7 +12251,7 @@ var RichField = /* @__PURE__ */ React92.forwardRef(function RichField2({ props,
|
|
|
12103
12251
|
] });
|
|
12104
12252
|
});
|
|
12105
12253
|
var TextArea = /* @__PURE__ */ React92.forwardRef(function TextArea2(props, ref) {
|
|
12106
|
-
|
|
12254
|
+
ensureStyles26();
|
|
12107
12255
|
const [focused, setFocused] = React92.useState(false);
|
|
12108
12256
|
const borderColor = borderColorFor(props.disabled, props.error, focused);
|
|
12109
12257
|
return /* @__PURE__ */ jsxs64(
|
|
@@ -12163,6 +12311,56 @@ var OPEN_HEIGHT = {
|
|
|
12163
12311
|
"active-results": 480
|
|
12164
12312
|
};
|
|
12165
12313
|
var Demarcator2 = () => /* @__PURE__ */ jsx89("div", { "aria-hidden": true, style: { height: 0, flexShrink: 0, borderTop: "var(--stroke-xs) solid var(--border-neutral-default)" } });
|
|
12314
|
+
var CHIP_FADE = 24;
|
|
12315
|
+
function FilterChipRow({
|
|
12316
|
+
filters,
|
|
12317
|
+
activeFilter,
|
|
12318
|
+
onFilterChange,
|
|
12319
|
+
tabbable
|
|
12320
|
+
}) {
|
|
12321
|
+
const scrollRef = React94.useRef(null);
|
|
12322
|
+
const edges = useScrollEdges(scrollRef);
|
|
12323
|
+
React94.useEffect(() => {
|
|
12324
|
+
const el = scrollRef.current?.children[activeFilter];
|
|
12325
|
+
el?.scrollIntoView?.({ block: "nearest", inline: "nearest" });
|
|
12326
|
+
}, [activeFilter]);
|
|
12327
|
+
return /* @__PURE__ */ jsx89("div", { style: { display: "flex", padding: "0 var(--padding-12px) var(--padding-12px)", marginTop: "calc(var(--spacing-16px) - var(--padding-12px))", minWidth: 0 }, children: /* @__PURE__ */ jsx89(
|
|
12328
|
+
"div",
|
|
12329
|
+
{
|
|
12330
|
+
ref: scrollRef,
|
|
12331
|
+
role: "group",
|
|
12332
|
+
"aria-label": "Filters",
|
|
12333
|
+
className: "scroll-hidden",
|
|
12334
|
+
style: {
|
|
12335
|
+
display: "flex",
|
|
12336
|
+
alignItems: "center",
|
|
12337
|
+
gap: "var(--spacing-8px)",
|
|
12338
|
+
flex: 1,
|
|
12339
|
+
minWidth: 0,
|
|
12340
|
+
overflowX: "auto",
|
|
12341
|
+
overscrollBehavior: "contain",
|
|
12342
|
+
scrollbarWidth: "none",
|
|
12343
|
+
// Room for the chips' focus rings, which the scroller would clip.
|
|
12344
|
+
padding: "6px",
|
|
12345
|
+
margin: "-6px",
|
|
12346
|
+
maskImage: `linear-gradient(to right, ${edges.atStart ? "#000" : "transparent"} 0, #000 ${CHIP_FADE}px, #000 calc(100% - ${CHIP_FADE}px), ${edges.atEnd ? "#000" : "transparent"} 100%)`
|
|
12347
|
+
},
|
|
12348
|
+
children: filters.map((f, i) => /* @__PURE__ */ jsx89(
|
|
12349
|
+
Chip,
|
|
12350
|
+
{
|
|
12351
|
+
label: f,
|
|
12352
|
+
active: i === activeFilter,
|
|
12353
|
+
"aria-pressed": i === activeFilter,
|
|
12354
|
+
tabIndex: tabbable ? void 0 : -1,
|
|
12355
|
+
onMouseDown: tabbable ? void 0 : (e) => e.preventDefault(),
|
|
12356
|
+
onClick: onFilterChange ? () => onFilterChange(i) : void 0,
|
|
12357
|
+
style: { flexShrink: 0 }
|
|
12358
|
+
},
|
|
12359
|
+
i
|
|
12360
|
+
))
|
|
12361
|
+
}
|
|
12362
|
+
) });
|
|
12363
|
+
}
|
|
12166
12364
|
var SAMPLE_GROUPS = ["Group Name", "Group Name"].map((title) => ({
|
|
12167
12365
|
title,
|
|
12168
12366
|
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx89(DesktopMenuOptions, { type: "dropdown-advanced", label: "Title", subtext: "Enter description here" }, i))
|
|
@@ -12186,6 +12384,13 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12186
12384
|
showFooter = true,
|
|
12187
12385
|
children,
|
|
12188
12386
|
disabled = false,
|
|
12387
|
+
loading = false,
|
|
12388
|
+
clearLabel,
|
|
12389
|
+
footerHints,
|
|
12390
|
+
fitHeight = false,
|
|
12391
|
+
filtersTabbable = true,
|
|
12392
|
+
bodyRef,
|
|
12393
|
+
bodyProps,
|
|
12189
12394
|
value,
|
|
12190
12395
|
defaultValue,
|
|
12191
12396
|
onChange,
|
|
@@ -12205,6 +12410,9 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12205
12410
|
placeholder,
|
|
12206
12411
|
onClear,
|
|
12207
12412
|
showClear: open,
|
|
12413
|
+
clearLabel,
|
|
12414
|
+
clearVariant: open ? "ghost" : "glyph",
|
|
12415
|
+
trailing: open && loading ? /* @__PURE__ */ jsx89(SearchFieldSpinner, {}) : void 0,
|
|
12208
12416
|
disabled,
|
|
12209
12417
|
value,
|
|
12210
12418
|
defaultValue,
|
|
@@ -12236,7 +12444,7 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12236
12444
|
},
|
|
12237
12445
|
children: [
|
|
12238
12446
|
field,
|
|
12239
|
-
state === "active-results" && /* @__PURE__ */ jsx89(
|
|
12447
|
+
state === "active-results" && /* @__PURE__ */ jsx89(FilterChipRow, { filters, activeFilter, onFilterChange, tabbable: filtersTabbable })
|
|
12240
12448
|
]
|
|
12241
12449
|
}
|
|
12242
12450
|
);
|
|
@@ -12255,10 +12463,22 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12255
12463
|
/* @__PURE__ */ jsx89("span", { className: "text-body-m-regular", style: { color: "var(--text-default-sub-body)", textWrap: "pretty" }, children: noHistoryText })
|
|
12256
12464
|
] }) });
|
|
12257
12465
|
} else if (state === "active-history") {
|
|
12258
|
-
body = /* @__PURE__ */ jsxs66("div", { style: { ...bodyStyle, gap: "var(--spacing-8px)", padding: "var(--padding-16px)", overflowY: "auto", overscrollBehavior: "contain" }, children: [
|
|
12466
|
+
body = /* @__PURE__ */ jsxs66("div", { ref: bodyRef, ...bodyProps, className: ["scroll-slim", bodyProps?.className].filter(Boolean).join(" "), style: { ...bodyStyle, gap: "var(--spacing-8px)", padding: "var(--padding-16px)", overflowY: "auto", overscrollBehavior: "contain", ...bodyProps?.style }, children: [
|
|
12259
12467
|
/* @__PURE__ */ jsxs66("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "var(--spacing-8px)" }, children: [
|
|
12260
12468
|
/* @__PURE__ */ jsx89("span", { className: "text-body-s-medium", style: { color: "var(--text-default-sub-heading)" }, children: recentTitle }),
|
|
12261
|
-
/* @__PURE__ */ jsx89(
|
|
12469
|
+
/* @__PURE__ */ jsx89(
|
|
12470
|
+
Button,
|
|
12471
|
+
{
|
|
12472
|
+
variant: "plain",
|
|
12473
|
+
size: "small",
|
|
12474
|
+
iconLeft: "Cancel",
|
|
12475
|
+
showUnderline: false,
|
|
12476
|
+
onClick: onClearHistory,
|
|
12477
|
+
tabIndex: filtersTabbable ? void 0 : -1,
|
|
12478
|
+
onMouseDown: filtersTabbable ? void 0 : (e) => e.preventDefault(),
|
|
12479
|
+
children: "Clear All"
|
|
12480
|
+
}
|
|
12481
|
+
)
|
|
12262
12482
|
] }),
|
|
12263
12483
|
children ?? /* @__PURE__ */ jsx89("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)" }, children: ["LTA-ID-001", "LTA-ID-002", "Michael", "Kitisuru"].map((l) => /* @__PURE__ */ jsx89(DesktopMenuOptions, { type: "dropdown-basic", label: l, leadingIcon: "History", showLeadingIcon: true, showChevron: false }, l)) })
|
|
12264
12484
|
] });
|
|
@@ -12266,15 +12486,27 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12266
12486
|
body = /* @__PURE__ */ jsx89("div", { style: { ...bodyStyle, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx89("div", { style: { width: 480, maxWidth: "100%", padding: "var(--padding-12px) var(--padding-16px)", boxSizing: "border-box" }, children: /* @__PURE__ */ jsx89(EmptyState, { type: "no-results", size: "desktop", showIcon: false, heading: noResultsTitle, description: noResultsText, style: { width: "100%" } }) }) });
|
|
12267
12487
|
} else {
|
|
12268
12488
|
const list = groups ?? SAMPLE_GROUPS;
|
|
12269
|
-
body = /* @__PURE__ */ jsx89(
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12489
|
+
body = /* @__PURE__ */ jsx89(
|
|
12490
|
+
"div",
|
|
12491
|
+
{
|
|
12492
|
+
ref: bodyRef,
|
|
12493
|
+
...bodyProps,
|
|
12494
|
+
className: ["scroll-slim", bodyProps?.className].filter(Boolean).join(" "),
|
|
12495
|
+
style: { ...bodyStyle, ...fitHeight ? { flex: "1 1 auto" } : null, overflowY: "auto", overscrollBehavior: "contain", ...bodyProps?.style },
|
|
12496
|
+
children: /* @__PURE__ */ jsx89("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-16px)", padding: "var(--padding-12px) var(--padding-16px)" }, children: children ?? list.map((g, i) => /* @__PURE__ */ jsxs66(React94.Fragment, { children: [
|
|
12497
|
+
i > 0 && /* @__PURE__ */ jsx89(Demarcator2, {}),
|
|
12498
|
+
/* @__PURE__ */ jsxs66("div", { role: "group", "aria-label": g.title, style: { display: "flex", flexDirection: "column", gap: "var(--spacing-8px)" }, children: [
|
|
12499
|
+
/* @__PURE__ */ jsx89("span", { className: "text-body-s-medium", style: { color: "var(--text-default-sub-heading)" }, children: g.title }),
|
|
12500
|
+
/* @__PURE__ */ jsx89("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)" }, children: g.children })
|
|
12501
|
+
] })
|
|
12502
|
+
] }, i)) })
|
|
12503
|
+
}
|
|
12504
|
+
);
|
|
12276
12505
|
}
|
|
12277
12506
|
const hasRows = state === "active-history" || state === "active-results";
|
|
12507
|
+
const hintSelect = footerHints?.select ?? hasRows;
|
|
12508
|
+
const hintSwitch = footerHints?.switchFilter ?? state === "active-results";
|
|
12509
|
+
const hintEnter = footerHints && "enter" in footerHints ? footerHints.enter : hasRows ? "open" : null;
|
|
12278
12510
|
const footer = showFooter && /* @__PURE__ */ jsxs66(
|
|
12279
12511
|
FooterFrame,
|
|
12280
12512
|
{
|
|
@@ -12282,11 +12514,11 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12282
12514
|
style: { boxShadow: "inset 0 var(--stroke-xs) 0 var(--border-neutral-input-field)", flexShrink: 0 },
|
|
12283
12515
|
leading: /* @__PURE__ */ jsxs66(Fragment24, { children: [
|
|
12284
12516
|
/* @__PURE__ */ jsx89(ShortcutHint, { keys: ["Esc"], action: "to close" }),
|
|
12285
|
-
|
|
12517
|
+
hintSelect && /* @__PURE__ */ jsx89(ShortcutHint, { keys: [{ icon: "Up-Arrow", label: "Up arrow" }, { icon: "Down-Arrow", label: "Down arrow" }], action: "to select" })
|
|
12286
12518
|
] }),
|
|
12287
12519
|
children: [
|
|
12288
|
-
|
|
12289
|
-
|
|
12520
|
+
hintSwitch && /* @__PURE__ */ jsx89(ShortcutHint, { keys: ["Tab"], action: "to switch filter" }),
|
|
12521
|
+
hintEnter && /* @__PURE__ */ jsx89(ShortcutHint, { keys: [{ icon: "Enter", label: "Enter" }], action: `to ${hintEnter}` })
|
|
12290
12522
|
]
|
|
12291
12523
|
}
|
|
12292
12524
|
);
|
|
@@ -12305,7 +12537,7 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12305
12537
|
flexDirection: "column",
|
|
12306
12538
|
width: OPEN_WIDTH,
|
|
12307
12539
|
maxWidth: "100%",
|
|
12308
|
-
height: OPEN_HEIGHT[state],
|
|
12540
|
+
...fitHeight && state === "active-results" ? { minHeight: OPEN_HEIGHT["no-history"], maxHeight: OPEN_HEIGHT["active-results"] } : { height: OPEN_HEIGHT[state] },
|
|
12309
12541
|
boxSizing: "border-box",
|
|
12310
12542
|
borderRadius: "var(--rounding-xl)",
|
|
12311
12543
|
overflow: "hidden",
|
|
@@ -12553,20 +12785,20 @@ var FileUploadCard = /* @__PURE__ */ React98.forwardRef(function FileUploadCard2
|
|
|
12553
12785
|
import * as React99 from "react";
|
|
12554
12786
|
import { Icon as Icon45 } from "@leta-io/icons";
|
|
12555
12787
|
import { jsx as jsx94, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
12556
|
-
var
|
|
12557
|
-
var
|
|
12788
|
+
var STYLE_ID30 = "leta-mobile-file-upload-styles";
|
|
12789
|
+
var STYLES21 = `
|
|
12558
12790
|
.leta-mfu__add, .leta-mfu__delete { cursor: pointer; }
|
|
12559
12791
|
.leta-mfu__add:focus-visible, .leta-mfu__delete:focus-visible {
|
|
12560
12792
|
outline: var(--stroke-sm) solid var(--border-secondary-component-focus);
|
|
12561
12793
|
outline-offset: 4px;
|
|
12562
12794
|
}
|
|
12563
12795
|
`;
|
|
12564
|
-
function
|
|
12796
|
+
function ensureStyles27() {
|
|
12565
12797
|
if (typeof document === "undefined") return;
|
|
12566
|
-
if (document.getElementById(
|
|
12798
|
+
if (document.getElementById(STYLE_ID30)) return;
|
|
12567
12799
|
const el = document.createElement("style");
|
|
12568
|
-
el.id =
|
|
12569
|
-
el.textContent =
|
|
12800
|
+
el.id = STYLE_ID30;
|
|
12801
|
+
el.textContent = STYLES21;
|
|
12570
12802
|
document.head.appendChild(el);
|
|
12571
12803
|
}
|
|
12572
12804
|
var TILE = { width: 111, height: 104, flexShrink: 0, borderRadius: "var(--rounding-lg)", boxSizing: "border-box" };
|
|
@@ -12584,7 +12816,7 @@ var MobileFileUpload = /* @__PURE__ */ React99.forwardRef(function MobileFileUpl
|
|
|
12584
12816
|
style,
|
|
12585
12817
|
...rest
|
|
12586
12818
|
}, ref) {
|
|
12587
|
-
|
|
12819
|
+
ensureStyles27();
|
|
12588
12820
|
const adds = addTiles ?? (images.length === 0 ? 3 : 0);
|
|
12589
12821
|
return /* @__PURE__ */ jsxs70(
|
|
12590
12822
|
"div",
|
|
@@ -13219,8 +13451,8 @@ function rootTheme() {
|
|
|
13219
13451
|
|
|
13220
13452
|
// src/FloatingToolbar/FloatingToolbar.tsx
|
|
13221
13453
|
import { Fragment as Fragment28, jsx as jsx97, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
13222
|
-
var
|
|
13223
|
-
var
|
|
13454
|
+
var STYLE_ID31 = "leta-floating-toolbar-styles";
|
|
13455
|
+
var STYLES22 = `
|
|
13224
13456
|
@keyframes leta-floating-toolbar-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
|
|
13225
13457
|
@keyframes leta-floating-toolbar-out { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 8px; } }
|
|
13226
13458
|
.leta-floating-toolbar[data-presence="enter"] { animation: leta-floating-toolbar-in 200ms cubic-bezier(0.16, 1, 0.3, 1); }
|
|
@@ -13229,11 +13461,11 @@ var STYLES21 = `
|
|
|
13229
13461
|
.leta-floating-toolbar[data-presence] { animation: none; }
|
|
13230
13462
|
}
|
|
13231
13463
|
`;
|
|
13232
|
-
function
|
|
13233
|
-
if (typeof document === "undefined" || document.getElementById(
|
|
13464
|
+
function ensureStyles28() {
|
|
13465
|
+
if (typeof document === "undefined" || document.getElementById(STYLE_ID31)) return;
|
|
13234
13466
|
const el = document.createElement("style");
|
|
13235
|
-
el.id =
|
|
13236
|
-
el.textContent =
|
|
13467
|
+
el.id = STYLE_ID31;
|
|
13468
|
+
el.textContent = STYLES22;
|
|
13237
13469
|
document.head.appendChild(el);
|
|
13238
13470
|
}
|
|
13239
13471
|
var EXIT_MS2 = 160;
|
|
@@ -13279,7 +13511,7 @@ var DefaultActions = () => /* @__PURE__ */ jsxs72(Fragment28, { children: [
|
|
|
13279
13511
|
] });
|
|
13280
13512
|
var FloatingToolbar = /* @__PURE__ */ React103.forwardRef(
|
|
13281
13513
|
function FloatingToolbar2(props, ref) {
|
|
13282
|
-
|
|
13514
|
+
ensureStyles28();
|
|
13283
13515
|
const anchorRef = React103.useRef(null);
|
|
13284
13516
|
const setRefs = (el) => {
|
|
13285
13517
|
anchorRef.current = el;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leta-io/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "LETA React component library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"country-flag-icons": "^1.6.17",
|
|
29
29
|
"leaflet": "^1.9.4",
|
|
30
30
|
"lottie-web": "^5.12.2",
|
|
31
|
-
"@leta-io/icons": "0.
|
|
32
|
-
"@leta-io/design-tokens": "0.
|
|
31
|
+
"@leta-io/icons": "0.6.0",
|
|
32
|
+
"@leta-io/design-tokens": "0.6.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0",
|