@besaitech/ng-design-system 0.0.81 → 0.0.82

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/index.d.ts CHANGED
@@ -1664,7 +1664,8 @@ declare class SdsMenu implements OnDestroy {
1664
1664
  /** An action was activated. */
1665
1665
  readonly select: _angular_core.OutputEmitterRef<SdsMenuAction>;
1666
1666
  protected readonly projectedTrigger: _angular_core.Signal<SdsMenuTrigger | undefined>;
1667
- private panelEl;
1667
+ /** Body-appending, positioning, follow-on-scroll and teardown — see SdsOverlayPanel. */
1668
+ private readonly overlay;
1668
1669
  /** Which item gets focus when the panel opens: 'first' | 'last' | 'none'. */
1669
1670
  private focusOnOpen;
1670
1671
  private typeBuffer;
@@ -1691,11 +1692,6 @@ declare class SdsMenu implements OnDestroy {
1691
1692
  private focusItemAt;
1692
1693
  protected activate(entry: SdsMenuAction, event?: Event): void;
1693
1694
  protected onDocumentClick(event: MouseEvent): void;
1694
- private readonly reflow;
1695
- private listening;
1696
- private addReflowListeners;
1697
- private removeReflowListeners;
1698
- private position;
1699
1695
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsMenu, never>;
1700
1696
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsMenu, "sds-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; "isSignal": true; }; "triggerIcon": { "alias": "triggerIcon"; "required": false; "isSignal": true; }; "triggerText": { "alias": "triggerText"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "keepOpen": { "alias": "keepOpen"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "select": "select"; }, ["projectedTrigger"], ["[sdsMenuTrigger]"], true, never>;
1701
1697
  }
@@ -2412,8 +2408,8 @@ declare class SdsDatePicker implements ControlValueAccessor, OnDestroy {
2412
2408
  private readonly cvaDisabled;
2413
2409
  private readonly calendar;
2414
2410
  private readonly trigger;
2415
- /** The overlay panel, relocated to document.body while open. */
2416
- private panelEl;
2411
+ /** Body-appending, positioning, follow-on-scroll and teardown — see SdsOverlayPanel. */
2412
+ private readonly overlay;
2417
2413
  protected readonly isDisabled: _angular_core.Signal<boolean>;
2418
2414
  protected readonly displayValue: _angular_core.Signal<string>;
2419
2415
  /** Whether the clear button is shown (affects the field's right padding). */
@@ -2445,11 +2441,6 @@ declare class SdsDatePicker implements ControlValueAccessor, OnDestroy {
2445
2441
  */
2446
2442
  protected onPanelKeydown(event: KeyboardEvent): void;
2447
2443
  protected onDocumentClick(event: MouseEvent): void;
2448
- private readonly reflow;
2449
- private listening;
2450
- private addReflowListeners;
2451
- private removeReflowListeners;
2452
- private positionPanel;
2453
2444
  ngOnDestroy(): void;
2454
2445
  private setValue;
2455
2446
  private onChange;
@@ -2686,8 +2677,8 @@ declare class SdsDateRangePicker implements OnDestroy {
2686
2677
  protected readonly pendingEnd: _angular_core.WritableSignal<Date | null>;
2687
2678
  private readonly calendar;
2688
2679
  private readonly trigger;
2689
- /** The overlay panel, relocated to document.body while open. */
2690
- private panelEl;
2680
+ /** Body-appending, positioning, follow-on-scroll and teardown — see SdsOverlayPanel. */
2681
+ private readonly overlay;
2691
2682
  /** Id of the preset the current value equals, or `null` (no value, or a custom range). */
2692
2683
  readonly activePresetId: _angular_core.Signal<string | null>;
2693
2684
  protected readonly pendingPresetId: _angular_core.Signal<string | null>;
@@ -2719,11 +2710,6 @@ declare class SdsDateRangePicker implements OnDestroy {
2719
2710
  */
2720
2711
  protected onPanelKeydown(event: KeyboardEvent): void;
2721
2712
  protected onDocumentClick(event: MouseEvent): void;
2722
- private readonly reflow;
2723
- private listening;
2724
- private addReflowListeners;
2725
- private removeReflowListeners;
2726
- private positionPanel;
2727
2713
  ngOnDestroy(): void;
2728
2714
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsDateRangePicker, never>;
2729
2715
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsDateRangePicker, "sds-date-range-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "maxDays": { "alias": "maxDays"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "months": { "alias": "months"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "panelLabel": { "alias": "panelLabel"; "required": false; "isSignal": true; }; "presetsLabel": { "alias": "presetsLabel"; "required": false; "isSignal": true; }; "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "endLabel": { "alias": "endLabel"; "required": false; "isSignal": true; }; "applyLabel": { "alias": "applyLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "calendarLabel": { "alias": "calendarLabel"; "required": false; "isSignal": true; }; "previousLabel": { "alias": "previousLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "presetSelect": "presetSelect"; }, never, never, true, never>;
@@ -3148,6 +3134,17 @@ interface SdsPanelOptions {
3148
3134
  /** Open upwards when there is room, instead of the default "below unless it does not fit". */
3149
3135
  prefer?: SdsPanelDirection;
3150
3136
  }
3137
+ /** What the DOM half takes: the arithmetic's options, plus what only the element can do. */
3138
+ interface SdsOverlayOptions extends SdsPanelOptions {
3139
+ /**
3140
+ * Tie the panel's width to the trigger's.
3141
+ *
3142
+ * <p>`'min'` for a panel that may grow — a select's longest option should not be truncated by
3143
+ * the width of its own field. `'exact'` for one that must not: an address suggestion list wider
3144
+ * than the input it hangs off stops reading as part of the field.
3145
+ */
3146
+ width?: 'min' | 'exact';
3147
+ }
3151
3148
  interface SdsRect {
3152
3149
  top: number;
3153
3150
  bottom: number;
@@ -3188,10 +3185,17 @@ declare class SdsOverlayPanel {
3188
3185
  private listening;
3189
3186
  private readonly reflow;
3190
3187
  /** Attach (or re-attach) the panel to the body and start following the trigger. */
3191
- attach(trigger: HTMLElement, panel: HTMLElement, options?: SdsPanelOptions & {
3192
- matchTriggerWidth?: boolean;
3193
- }): void;
3188
+ attach(trigger: HTMLElement, panel: HTMLElement, options?: SdsOverlayOptions): void;
3194
3189
  reposition(): void;
3190
+ /**
3191
+ * The live panel element, or null while closed.
3192
+ *
3193
+ * <p>Read-only on purpose. A component that needs to reach inside the panel — to focus a row, to
3194
+ * trap Tab, to read its options — asks here rather than keeping its own field. A second
3195
+ * reference is how the autocomplete came to remove the panel through a `viewChild` that Angular
3196
+ * had already cleared, which is the bug this class exists to make unrepeatable.
3197
+ */
3198
+ get element(): HTMLElement | null;
3195
3199
  /** Does the panel contain this node? For "did the click land outside" checks. */
3196
3200
  contains(node: Node | null): boolean;
3197
3201
  /** Stop following, and remove the panel from the body. Safe to call more than once. */
@@ -3723,7 +3727,8 @@ declare class SdsAddressAutocomplete implements ControlValueAccessor, OnDestroy
3723
3727
  private seq;
3724
3728
  private timer?;
3725
3729
  private destroyed;
3726
- private panelEl;
3730
+ /** Body-appending, positioning, follow-on-scroll and teardown — see SdsOverlayPanel. */
3731
+ private readonly overlay;
3727
3732
  protected readonly fieldId: _angular_core.Signal<string>;
3728
3733
  protected readonly isDisabled: _angular_core.Signal<boolean>;
3729
3734
  protected readonly pill: _angular_core.Signal<boolean>;
@@ -3766,13 +3771,15 @@ declare class SdsAddressAutocomplete implements ControlValueAccessor, OnDestroy
3766
3771
  private activate;
3767
3772
  protected onKeydown(event: KeyboardEvent): void;
3768
3773
  private scrollHighlightedIntoView;
3774
+ /**
3775
+ * Keep the body-appended panel in step with whether it should be shown at all.
3776
+ *
3777
+ * <p>Driven from `afterEveryRender`, so it runs on every change and must be cheap and idempotent
3778
+ * — attaching once, then repositioning while it stays open.
3779
+ */
3780
+ private syncPanel;
3769
3781
  /** Close the overlay (a no-op `inline`, where the rows are always shown). */
3770
3782
  close(): void;
3771
- private readonly reflow;
3772
- private listening;
3773
- private syncPanel;
3774
- private detachPanel;
3775
- private positionPanel;
3776
3783
  protected onDocumentClick(event: MouseEvent): void;
3777
3784
  ngOnDestroy(): void;
3778
3785
  private onChange;
@@ -5615,7 +5622,7 @@ interface SdsLanguageOption {
5615
5622
  * disclosure mechanics (closes on outside click, on Escape, and on selection, restoring focus to the trigger),
5616
5623
  * and the same panel styling and open animation — so the three top-bar controls read as one set.
5617
5624
  *
5618
- * The panel is appended to `document.body` while open and positioned against the trigger (like sds-select),
5625
+ * The panel is appended to `document.body` while open and placed by `SdsOverlayPanel` (like sds-select),
5619
5626
  * so a clipping ancestor — a bar with `overflow:hidden`, or a `glass` bar whose `backdrop-filter` is a
5620
5627
  * containing block — can never cut it off or paint over it. It repositions on scroll/resize and is removed
5621
5628
  * on close. Accessibility follows the APG select-only combobox: focus stays on the trigger, and Arrow/Home/
@@ -5656,7 +5663,8 @@ declare class SdsLanguageSwitcher implements OnDestroy {
5656
5663
  readonly openChange: _angular_core.OutputEmitterRef<boolean>;
5657
5664
  protected readonly open: _angular_core.WritableSignal<boolean>;
5658
5665
  protected readonly highlightedIndex: _angular_core.WritableSignal<number>;
5659
- private panelEl;
5666
+ /** Body-appending, positioning, follow-on-scroll and teardown — see SdsOverlayPanel. */
5667
+ private readonly overlay;
5660
5668
  /** Normalise the mixed `languages` input to `{ code, label }`, defaulting the label to the code. */
5661
5669
  protected readonly options: _angular_core.Signal<SdsLanguageOption[]>;
5662
5670
  /**
@@ -5680,11 +5688,6 @@ declare class SdsLanguageSwitcher implements OnDestroy {
5680
5688
  private highlight;
5681
5689
  private chooseHighlighted;
5682
5690
  private scrollHighlightedIntoView;
5683
- private readonly reflow;
5684
- private listening;
5685
- private addReflowListeners;
5686
- private removeReflowListeners;
5687
- private positionPanel;
5688
5691
  ngOnDestroy(): void;
5689
5692
  private readonly onBrand;
5690
5693
  protected readonly triggerClass: _angular_core.Signal<"text-white/85 hover:bg-white/10 hover:text-white focus-visible:ring-white/40" | "bg-muted text-ink-soft hover:bg-brand-50 hover:text-brand-600 focus-visible:ring-brand-500/40">;
@@ -5854,4 +5857,4 @@ declare const SDS_CHART_CONFIG: InjectionToken<SdsChartConfig>;
5854
5857
  declare function provideSdsCharts(config: SdsChartConfig): Provider;
5855
5858
 
5856
5859
  export { SDS_ALLERGENS, SDS_ALLERGEN_ICONS, SDS_ALLERGEN_LABELS_EN, SDS_CHART_CONFIG, SDS_CHART_LABELS_EN, SDS_ICONS, SDS_PHONE_COUNTRIES, SDS_THEME_STORAGE_KEY, SDS_UI_PREF_LANG_PARAM, SDS_UI_PREF_THEME_PARAM, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAddressAutocomplete, SdsAddressExtra, SdsAllergenIcon, SdsAutocomplete, SdsAvatar, SdsBadge, SdsBulkBar, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsChecklistRow, SdsChip, SdsChipGroup, SdsDatePicker, SdsDateRangePicker, SdsEnvBanner, SdsFileDrop, SdsFormActions, SdsIcon, SdsImageCropper, SdsInput, SdsInputNumber, SdsLanguageSwitcher, SdsLocalizedInput, SdsMenu, SdsMenuItem, SdsMenuTrigger, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsOtpInput, SdsOverlayPanel, SdsPaginator, SdsPhoneInput, SdsRadio, SdsRangeCalendar, SdsScore, SdsSearchCommand, SdsSegmented, SdsSelect, SdsSelectEmpty, SdsSelectFooter, SdsSelectOption, SdsSeverity, SdsShell, SdsSidebar, SdsSortableHandle, SdsSortableItem, SdsSortableList, SdsStatusTile, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableEmpty, SdsTableHeader, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsThemeService, SdsThemeToggle, SdsTimeInput, SdsToastHost, SdsToastService, SdsToggleSwitch, SdsTopbar, SdsTriStateChip, SdsUserMenu, SidebarStore, addDays, addMonths, addMonthsKeepDay, appendUiPrefs, diffInDays, formatDateRange, formatDdMmYyyy, formatHhMm, isOutOfRange, isSameDay, isSameRange, isSdsThemeMode, isoDay, pad2, placePanel, provideSdsCharts, readUiPrefs, sdsFileMatchesAccept, sdsFormatBytes, sdsFormatNational, sdsLastDays, sdsLastMonths, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth, stripUiPrefs };
5857
- export type { SdsAccordionActive, SdsAccordionValue, SdsAddressAutocompleteAppearance, SdsAddressAutocompleteShape, SdsAddressAutocompleteSize, SdsAddressExtraContext, SdsAddressExtraPosition, SdsAddressLocateFn, SdsAddressSearchFn, SdsAddressSuggestion, SdsAllergen, SdsAutocompleteDisplay, SdsAutocompleteSearchFn, SdsAutocompleteSize, SdsAvatarShape, SdsAvatarStatus, SdsBadgeSize, SdsBadgeVariant, SdsBulkBarPosition, SdsButtonShape, SdsButtonSize, SdsButtonVariant, SdsCardVariant, SdsChartConfig, SdsChartLabels, SdsCheckboxSize, SdsChecklistStatus, SdsChipOption, SdsChipSize, SdsCropRect, SdsDatePickerSize, SdsDateRange, SdsDateRangePickerSize, SdsDateRangePreset, SdsEnvBannerEnv, SdsFileDropAppearance, SdsFileRejection, SdsFileRejectionReason, SdsFormActionsPosition, SdsIconName, SdsIconSize, SdsImageCropperBlobOptions, SdsImageCropperShape, SdsInputAppearance, SdsInputNumberAppearance, SdsInputNumberButtonLayout, SdsInputNumberCurrencyDisplay, SdsInputNumberMode, SdsInputNumberSize, SdsInputShape, SdsInputSize, SdsInputType, SdsKpiChangeText, SdsLanguageOption, SdsLanguageSwitcherAlign, SdsLanguageSwitcherAppearance, SdsLanguageSwitcherDirection, SdsLocalizedInputSize, SdsLocalizedValue, SdsMenuAction, SdsMenuAlign, SdsMenuEntry, SdsMenuItemTone, SdsMenuSeparator, SdsMultiSelectDisplay, SdsMultiSelectSize, SdsNavItemBadgeTone, SdsOtpInputSize, SdsPaginatorSize, SdsPaginatorState, SdsPanelAlign, SdsPanelDirection, SdsPanelOptions, SdsPhoneCountry, SdsPhoneInputSize, SdsPhoneValue, SdsRadioSize, SdsRect, SdsScoreSize, SdsScoreTier, SdsScoreVariant, SdsSearchAppearance, SdsSearchItem, SdsSegmentedOption, SdsSegmentedSize, SdsSelectAppearance, SdsSelectEmptyContext, SdsSelectFooterContext, SdsSelectOptionContext, SdsSelectSize, SdsSeverityLevel, SdsSeveritySize, SdsSeverityVariant, SdsShellBackground, SdsSidebarAppearance, SdsSize, SdsSortOrder, SdsSortableAppearance, SdsSortableItemContext, SdsSortableReorderEvent, SdsSparklineSummaryText, SdsStatusTileState, SdsTabValue, SdsTableCellCommitEvent, SdsTableCellContext, SdsTableCellErrors, SdsTableColumn, SdsTableEditTrigger, SdsTableEditor, SdsTableEmptyContext, SdsTableHeaderContext, SdsTableLazyEvent, SdsTableRowExpansionContext, SdsTableSelectOption, SdsTableSize, SdsTableSortEvent, SdsTabsVariant, SdsTextareaAppearance, SdsTextareaResize, SdsTextareaSize, SdsTheme, SdsThemeMode, SdsThemeToggleAppearance, SdsTimeInputAppearance, SdsTimeInputSize, SdsToast, SdsToastKind, SdsToggleSwitchSize, SdsTopbarAppearance, SdsTrendDirection, SdsTriState, SdsTriStateChipSize, SdsUiPrefs, SdsUserMenuAlign, SdsUserMenuAppearance };
5860
+ export type { SdsAccordionActive, SdsAccordionValue, SdsAddressAutocompleteAppearance, SdsAddressAutocompleteShape, SdsAddressAutocompleteSize, SdsAddressExtraContext, SdsAddressExtraPosition, SdsAddressLocateFn, SdsAddressSearchFn, SdsAddressSuggestion, SdsAllergen, SdsAutocompleteDisplay, SdsAutocompleteSearchFn, SdsAutocompleteSize, SdsAvatarShape, SdsAvatarStatus, SdsBadgeSize, SdsBadgeVariant, SdsBulkBarPosition, SdsButtonShape, SdsButtonSize, SdsButtonVariant, SdsCardVariant, SdsChartConfig, SdsChartLabels, SdsCheckboxSize, SdsChecklistStatus, SdsChipOption, SdsChipSize, SdsCropRect, SdsDatePickerSize, SdsDateRange, SdsDateRangePickerSize, SdsDateRangePreset, SdsEnvBannerEnv, SdsFileDropAppearance, SdsFileRejection, SdsFileRejectionReason, SdsFormActionsPosition, SdsIconName, SdsIconSize, SdsImageCropperBlobOptions, SdsImageCropperShape, SdsInputAppearance, SdsInputNumberAppearance, SdsInputNumberButtonLayout, SdsInputNumberCurrencyDisplay, SdsInputNumberMode, SdsInputNumberSize, SdsInputShape, SdsInputSize, SdsInputType, SdsKpiChangeText, SdsLanguageOption, SdsLanguageSwitcherAlign, SdsLanguageSwitcherAppearance, SdsLanguageSwitcherDirection, SdsLocalizedInputSize, SdsLocalizedValue, SdsMenuAction, SdsMenuAlign, SdsMenuEntry, SdsMenuItemTone, SdsMenuSeparator, SdsMultiSelectDisplay, SdsMultiSelectSize, SdsNavItemBadgeTone, SdsOtpInputSize, SdsOverlayOptions, SdsPaginatorSize, SdsPaginatorState, SdsPanelAlign, SdsPanelDirection, SdsPanelOptions, SdsPhoneCountry, SdsPhoneInputSize, SdsPhoneValue, SdsRadioSize, SdsRect, SdsScoreSize, SdsScoreTier, SdsScoreVariant, SdsSearchAppearance, SdsSearchItem, SdsSegmentedOption, SdsSegmentedSize, SdsSelectAppearance, SdsSelectEmptyContext, SdsSelectFooterContext, SdsSelectOptionContext, SdsSelectSize, SdsSeverityLevel, SdsSeveritySize, SdsSeverityVariant, SdsShellBackground, SdsSidebarAppearance, SdsSize, SdsSortOrder, SdsSortableAppearance, SdsSortableItemContext, SdsSortableReorderEvent, SdsSparklineSummaryText, SdsStatusTileState, SdsTabValue, SdsTableCellCommitEvent, SdsTableCellContext, SdsTableCellErrors, SdsTableColumn, SdsTableEditTrigger, SdsTableEditor, SdsTableEmptyContext, SdsTableHeaderContext, SdsTableLazyEvent, SdsTableRowExpansionContext, SdsTableSelectOption, SdsTableSize, SdsTableSortEvent, SdsTabsVariant, SdsTextareaAppearance, SdsTextareaResize, SdsTextareaSize, SdsTheme, SdsThemeMode, SdsThemeToggleAppearance, SdsTimeInputAppearance, SdsTimeInputSize, SdsToast, SdsToastKind, SdsToggleSwitchSize, SdsTopbarAppearance, SdsTrendDirection, SdsTriState, SdsTriStateChipSize, SdsUiPrefs, SdsUserMenuAlign, SdsUserMenuAppearance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besaitech/ng-design-system",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"