@thalassic/ui 22.17.3 → 22.17.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thalassic/ui",
3
- "version": "22.17.3",
3
+ "version": "22.17.5",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/aria": "^22.0.0",
@@ -2723,14 +2723,34 @@ declare class MenuItemComponent {
2723
2723
 
2724
2724
  type menuPosition = overlayPosition;
2725
2725
  type menuItemType = 'item' | 'label' | 'divider' | 'custom';
2726
+ type menuItemRole = 'menuitem' | 'menuitemradio' | 'menuitemcheckbox';
2726
2727
  interface BaseMenuItem {
2727
2728
  type: menuItemType;
2728
2729
  }
2729
2730
  interface MenuActionItem extends BaseMenuItem {
2730
2731
  type: 'item';
2731
2732
  label: string;
2733
+ /** Secondary line rendered under the label, exposed to assistive tech via `aria-describedby`. */
2734
+ description?: string;
2732
2735
  icon?: string;
2733
- shortcut?: string;
2736
+ /** Keyboard shortcut, one entry per key — each renders as its own keycap (e.g. ['⌘', 'C']). */
2737
+ shortcut?: string[];
2738
+ /**
2739
+ * ARIA role of the item. Defaults to `menuitem`. A `menuitemradio` / `menuitemcheckbox` item
2740
+ * renders a leading check indicator driven by `checked`; the consumer owns the checked state
2741
+ * (including radio-group exclusivity) and re-passes it through `items`.
2742
+ */
2743
+ role?: menuItemRole;
2744
+ /** Checked state of a `menuitemradio` / `menuitemcheckbox` item. Ignored for plain items. */
2745
+ checked?: boolean;
2746
+ /** Whether selecting the item closes the menu. Defaults to `true`. */
2747
+ closeOnSelect?: boolean;
2748
+ /**
2749
+ * Key of a `<tls-menu-item>` slot whose content replaces this item's default content
2750
+ * (check indicator, icon, label, shortcut). The menu still renders the interactive
2751
+ * wrapper with its ARIA and keyboard wiring. Takes precedence over `#itemTemplate`.
2752
+ */
2753
+ templateKey?: string;
2734
2754
  disabled?: boolean;
2735
2755
  data?: unknown;
2736
2756
  action?: () => void;
@@ -2750,6 +2770,27 @@ interface MenuCustomItem {
2750
2770
  key: string;
2751
2771
  }
2752
2772
  type MenuItemDefinition = MenuActionItem | MenuDivider | MenuLabel | MenuCustomItem;
2773
+ /** A non-label item paired with its index in the source `items` array (the index keys per-item element ids). */
2774
+ interface MenuRenderEntry {
2775
+ item: Exclude<MenuItemDefinition, MenuLabel>;
2776
+ index: number;
2777
+ }
2778
+ /**
2779
+ * A `label` item together with the run of items it introduces — everything up to
2780
+ * the next label or divider. Rendered as a `role="group"` container named after
2781
+ * the label, so assistive tech announces the section an item belongs to.
2782
+ */
2783
+ interface MenuRenderGroup {
2784
+ kind: 'group';
2785
+ label: MenuLabel;
2786
+ entries: MenuRenderEntry[];
2787
+ }
2788
+ /** An item outside any labeled section, rendered directly in the menu. */
2789
+ interface MenuRenderSingle {
2790
+ kind: 'single';
2791
+ entry: MenuRenderEntry;
2792
+ }
2793
+ type MenuRenderBlock = MenuRenderGroup | MenuRenderSingle;
2753
2794
 
2754
2795
  declare class Menu {
2755
2796
  private static _counter;
@@ -2758,6 +2799,7 @@ declare class Menu {
2758
2799
  private readonly _panelRef;
2759
2800
  protected readonly _customItems: i0.Signal<readonly MenuItemComponent[]>;
2760
2801
  protected readonly customTemplates: i0.Signal<Map<string, TemplateRef<unknown>>>;
2802
+ /** Content of every action item, rendered inside the menu-managed interactive wrapper. */
2761
2803
  protected readonly itemTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
2762
2804
  protected readonly labelTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
2763
2805
  protected readonly dividerTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
@@ -2769,6 +2811,7 @@ declare class Menu {
2769
2811
  readonly ariaLabel: InputSignal<string | undefined>;
2770
2812
  readonly inline: InputSignalWithTransform<boolean, unknown>;
2771
2813
  private readonly _positions;
2814
+ protected readonly blocks: i0.Signal<MenuRenderBlock[]>;
2772
2815
  readonly isOpen: i0.Signal<boolean>;
2773
2816
  constructor();
2774
2817
  open(trigger: MouseEvent | HTMLElement): void;
@@ -2776,6 +2819,14 @@ declare class Menu {
2776
2819
  close(): void;
2777
2820
  toggle(trigger: MouseEvent | HTMLElement): void;
2778
2821
  protected onItemClick(item: MenuActionItem): void;
2822
+ /** Whether the item carries a checked state (`menuitemradio` / `menuitemcheckbox`). */
2823
+ protected isCheckable(item: MenuActionItem): boolean;
2824
+ /** Id of the item's label element, referenced by `aria-labelledby`. */
2825
+ protected itemLabelId(index: number): string;
2826
+ /** Id of the item's description element, referenced by `aria-describedby`. */
2827
+ protected itemDescriptionId(index: number): string;
2828
+ /** Content template for the item: its keyed slot first, the shared `#itemTemplate` otherwise. */
2829
+ protected itemContentTemplate(item: MenuActionItem): TemplateRef<unknown> | undefined;
2779
2830
  static ɵfac: i0.ɵɵFactoryDeclaration<Menu, never>;
2780
2831
  static ɵcmp: i0.ɵɵComponentDeclaration<Menu, "tls-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; }, {}, ["_customItems", "itemTemplate", "labelTemplate", "dividerTemplate", "iconTemplate"], never, true, never>;
2781
2832
  }
@@ -4277,4 +4328,4 @@ declare abstract class QuerySyncDirective {
4277
4328
  declare const provideThalassicUIConfig: (config?: tlsUiConfigProvider) => EnvironmentProviders;
4278
4329
 
4279
4330
  export { ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, AUTOCOMPLETE_CONFIG, ActivityHeatmap, Alert, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RadioButton, Rating, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastOutlet, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, provideThalassicIcons, provideThalassicUIConfig, resolveActivityLevel };
4280
- export type { ActivityHeatmapConfig, ActivityHeatmapDay, ActivityHeatmapEntry, ActivityHeatmapLabels, ActivityHeatmapMonth, ActivityHeatmapRow, ActivityHeatmapTotal, AlertConfig, AutocompleteConfig, BadgeConfig, BreadcrumbItem, BreadcrumbItemContext, BreadcrumbsConfig, ButtonConfig, CalendarConfig, CalendarDayContext, CalendarEvent, CalendarEventContext, CalendarLabels, CalendarRange, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipGroupConfig, ChipInputConfig, ConfirmConfig, ConfirmOptions, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, DrawerConfig, DrawerOpenConfig, FileInputConfig, FileInputDropZoneContext, FileInputFileContext, FormControlConfig, FormControlGroupConfig, FormItemConfig, HighlightConfig, HighlightSegment, IconConfig, ImageCompareConfig, InputConfig, InputNumberConfig, KbdConfig, LoaderConfig, MarkConfig, MaskResult, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, MultiSelectConfig, OdometerConfig, OdometerToken, OverlayArrowPosition, PaginationConfig, PaginationLabels, PaginationQuerySyncConfig, PasswordConfig, PinInputConfig, PopoverConfig, ProgressConfig, RadioButtonConfig, RatingConfig, RatingLabels, RatingStarContext, SelectConfig, SkeletonConfig, SliderConfig, SplitterConfig, StepConfig, StepperConfig, StepperLabels, StepperSelectEvent, SwitchConfig, TabNavConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TabsQuerySyncConfig, TextareaConfig, ToastConfig, ToastOptions, ToastRef, ToastState, ToggleButtonConfig, ToggleGroupConfig, TooltipConfig, TrackBy, VirtualScrollConfig, VirtualScrollContext, acceptInput, alertColor, autocompleteFilterMode, badgeColor, badgePosition, badgeVariant, buttonColor, buttonType, buttonVariant, calendarCompact, calendarView, chipColor, chipSize, chipTemplateContext, chipVariant, color, confirmActionsAlign, confirmButton, confirmSize, controlSize, dateTimePickerMode, dialogFooterAlign, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, drawerSide, drawerSize, errorTrigger, fileInputDragState, fileInputVariant, iconRegistry, iconRenderer, imageCompareOrientation, labelPosition, loaderSize, menuItemType, menuPosition, orientation, overlayArrowAlignment, overlayArrowSide, overlayPosition, paginationItem, pinInputType, progressActiveSegment, progressColor, radius, radiusValue, ratingColor, resolvedConfirmButton, size, sliderColor, splitterOrientation, stepperColor, stepperLabelPosition, stepperOrientation, stepperValue, switchColor, systemIcon, tabValue, tableColumnAlignment, tableColumnCollapse, tabsHeaderAlign, tabsHeaderPosition, tabsItemsAlign, tabsOrientation, tabsVariant, textareaResize, tlsUiConfigProvider, toastAction, toastColor, toastPosition, toastSeverity, toastStacking, toggleButtonColor, toggleButtonVariant, toggleGroupVariant, tooltipColor, tooltipOrigin, tooltipPosition };
4331
+ export type { ActivityHeatmapConfig, ActivityHeatmapDay, ActivityHeatmapEntry, ActivityHeatmapLabels, ActivityHeatmapMonth, ActivityHeatmapRow, ActivityHeatmapTotal, AlertConfig, AutocompleteConfig, BadgeConfig, BreadcrumbItem, BreadcrumbItemContext, BreadcrumbsConfig, ButtonConfig, CalendarConfig, CalendarDayContext, CalendarEvent, CalendarEventContext, CalendarLabels, CalendarRange, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipGroupConfig, ChipInputConfig, ConfirmConfig, ConfirmOptions, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, DrawerConfig, DrawerOpenConfig, FileInputConfig, FileInputDropZoneContext, FileInputFileContext, FormControlConfig, FormControlGroupConfig, FormItemConfig, HighlightConfig, HighlightSegment, IconConfig, ImageCompareConfig, InputConfig, InputNumberConfig, KbdConfig, LoaderConfig, MarkConfig, MaskResult, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, MenuRenderBlock, MenuRenderEntry, MenuRenderGroup, MenuRenderSingle, MultiSelectConfig, OdometerConfig, OdometerToken, OverlayArrowPosition, PaginationConfig, PaginationLabels, PaginationQuerySyncConfig, PasswordConfig, PinInputConfig, PopoverConfig, ProgressConfig, RadioButtonConfig, RatingConfig, RatingLabels, RatingStarContext, SelectConfig, SkeletonConfig, SliderConfig, SplitterConfig, StepConfig, StepperConfig, StepperLabels, StepperSelectEvent, SwitchConfig, TabNavConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TabsQuerySyncConfig, TextareaConfig, ToastConfig, ToastOptions, ToastRef, ToastState, ToggleButtonConfig, ToggleGroupConfig, TooltipConfig, TrackBy, VirtualScrollConfig, VirtualScrollContext, acceptInput, alertColor, autocompleteFilterMode, badgeColor, badgePosition, badgeVariant, buttonColor, buttonType, buttonVariant, calendarCompact, calendarView, chipColor, chipSize, chipTemplateContext, chipVariant, color, confirmActionsAlign, confirmButton, confirmSize, controlSize, dateTimePickerMode, dialogFooterAlign, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, drawerSide, drawerSize, errorTrigger, fileInputDragState, fileInputVariant, iconRegistry, iconRenderer, imageCompareOrientation, labelPosition, loaderSize, menuItemRole, menuItemType, menuPosition, orientation, overlayArrowAlignment, overlayArrowSide, overlayPosition, paginationItem, pinInputType, progressActiveSegment, progressColor, radius, radiusValue, ratingColor, resolvedConfirmButton, size, sliderColor, splitterOrientation, stepperColor, stepperLabelPosition, stepperOrientation, stepperValue, switchColor, systemIcon, tabValue, tableColumnAlignment, tableColumnCollapse, tabsHeaderAlign, tabsHeaderPosition, tabsItemsAlign, tabsOrientation, tabsVariant, textareaResize, tlsUiConfigProvider, toastAction, toastColor, toastPosition, toastSeverity, toastStacking, toggleButtonColor, toggleButtonVariant, toggleGroupVariant, tooltipColor, tooltipOrigin, tooltipPosition };