@elasticias/ui 1.0.44 → 1.0.46

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": "@elasticias/ui",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -115,6 +115,15 @@
115
115
  --hit-touch: 48px; /* POS / mobile primary actions */
116
116
  --hit-pos: 64px; /* POS number pad, big totals */
117
117
 
118
+ /* ── Layers ──────────────────────────────────────────────────── */
119
+ /* Toasts sit above every modal and overlay. PrimeNG numbers its layers
120
+ at runtime (ZIndexUtils): each new layer takes the last one's value
121
+ plus 1, plus the base of its own kind when the kind changes (modal
122
+ 1100, overlay 1000). A dialog is 1101, a select opened inside it
123
+ 2102, a dialog opened over that 3203, so no value near PrimeNG's
124
+ bases stays on top. 100000 is about ninety mixed layers away. */
125
+ --z-toast: 100000;
126
+
118
127
  /* ── Motion ──────────────────────────────────────────────────── */
119
128
  --t-fast: 140ms;
120
129
  --t-base: 260ms;
@@ -1539,11 +1539,17 @@
1539
1539
  }
1540
1540
 
1541
1541
  .row-actions__trigger {
1542
+ /* Read again by the touch tier, which reserves the 48px footprint
1543
+ around this box. */
1544
+ --ef-row-trigger-w: 34px;
1545
+ --ef-row-trigger-h: 28px;
1542
1546
  appearance: none;
1543
1547
  background: var(--paper-alt);
1544
1548
  border: 1px solid var(--rule);
1545
- width: 34px;
1546
- height: 28px;
1549
+ box-sizing: border-box;
1550
+ width: var(--ef-row-trigger-w);
1551
+ height: var(--ef-row-trigger-h);
1552
+ flex-shrink: 0;
1547
1553
  border-radius: var(--r-pill);
1548
1554
  display: inline-grid;
1549
1555
  place-items: center;
@@ -2243,6 +2249,15 @@
2243
2249
  line-height: 1;
2244
2250
  }
2245
2251
 
2252
+ /* The back and month arrows are icon-font glyphs, which bidi never
2253
+ mirrors. In Arabic the header runs right to left, so "previous" sits on
2254
+ the right and must point right. (Text arrows such as the pager's
2255
+ ‹ › « » are Bidi_Mirrored and already flip on their own.) */
2256
+ [dir='rtl'] .dp__back i,
2257
+ [dir='rtl'] .dp__cal-nav i {
2258
+ transform: scaleX(-1);
2259
+ }
2260
+
2246
2261
  .dp__cal-title {
2247
2262
  display: inline-flex;
2248
2263
  align-items: center;
@@ -2519,7 +2534,10 @@
2519
2534
  position: fixed;
2520
2535
  top: var(--s-4);
2521
2536
  inset-inline-end: var(--s-4);
2522
- z-index: 1000;
2537
+ /* Above every PrimeNG modal mask and overlay, so an error raised by a
2538
+ dialog's save is readable and its ✕ clickable while the dialog is
2539
+ open. The token explains the number. */
2540
+ z-index: var(--z-toast);
2523
2541
  display: grid;
2524
2542
  gap: var(--s-2);
2525
2543
  align-content: start;
@@ -3593,6 +3611,9 @@ input.ef-input[type='number'] {
3593
3611
 
3594
3612
  .es.p-select,
3595
3613
  .es.p-multiselect {
3614
+ /* The gap between label, clear ✕ and caret. The touch tier reads it to
3615
+ keep the ✕'s 48px target between the label and the caret. */
3616
+ --es-gap: 10px;
3596
3617
  width: 100%;
3597
3618
  min-width: 200px;
3598
3619
  background: var(--paper-alt);
@@ -3602,7 +3623,7 @@ input.ef-input[type='number'] {
3602
3623
  padding: 0 10px 0 14px;
3603
3624
  display: inline-flex;
3604
3625
  align-items: center;
3605
- gap: 10px;
3626
+ gap: var(--es-gap);
3606
3627
  color: var(--text);
3607
3628
  font-size: 14px;
3608
3629
  cursor: pointer;
@@ -3686,11 +3707,14 @@ input.ef-input[type='number'] {
3686
3707
  clearable control (input, number, select, typeahead) is identical. */
3687
3708
  .ef-clear,
3688
3709
  .es .es-clear {
3710
+ /* One size, read again by the touch tier below to size the target and
3711
+ the space it reserves, so the two cannot drift apart. */
3712
+ --ef-clear-size: 22px;
3689
3713
  display: inline-grid;
3690
3714
  place-items: center;
3691
3715
  box-sizing: border-box;
3692
- width: 22px;
3693
- height: 22px;
3716
+ width: var(--ef-clear-size);
3717
+ height: var(--ef-clear-size);
3694
3718
  border: 0;
3695
3719
  padding: 0;
3696
3720
  background: transparent;
@@ -4621,32 +4645,55 @@ input.ef-input[type='number'] {
4621
4645
  made room for. The trigger's overhang adds its 1px border, since an
4622
4646
  absolute box is measured from the padding edge. */
4623
4647
  .row-actions__trigger,
4624
- .ef-clear {
4648
+ .ef-clear,
4649
+ .es .es-clear {
4625
4650
  position: relative;
4626
4651
  }
4627
4652
 
4628
4653
  .row-actions__trigger {
4629
- margin-block: calc((var(--hit-touch) - 28px) / 2);
4630
- margin-inline: calc((var(--hit-touch) - 34px) / 2);
4654
+ margin-block: calc((var(--hit-touch) - var(--ef-row-trigger-h)) / 2);
4655
+ margin-inline: calc((var(--hit-touch) - var(--ef-row-trigger-w)) / 2);
4631
4656
  }
4632
4657
 
4633
4658
  .ef-clear {
4634
- margin: calc((var(--hit-touch) - 22px) / 2);
4659
+ margin: calc((var(--hit-touch) - var(--ef-clear-size)) / 2);
4660
+ }
4661
+
4662
+ /* The select / multiselect ✕ sits in the trigger's flex row, between the
4663
+ label and the caret, 10px (--es-gap) from each. It reserves only the
4664
+ inline room its 48px target still lacks after that gap, so the target
4665
+ ends exactly at the label's edge and at the caret's, and a tap on the
4666
+ caret opens the panel instead of clearing the value. No block margin:
4667
+ the trigger is 40px whether it holds a value or not, and the target's
4668
+ extra 4px above and below overhangs the trigger the way the input ✕
4669
+ does. */
4670
+ .es .es-clear {
4671
+ margin-inline: calc((var(--hit-touch) - var(--ef-clear-size)) / 2 - var(--es-gap));
4635
4672
  }
4636
4673
 
4637
4674
  .row-actions__trigger::after,
4638
- .ef-clear::after {
4675
+ .ef-clear::after,
4676
+ .es .es-clear::after {
4639
4677
  content: '';
4640
4678
  position: absolute;
4641
4679
  }
4642
4680
 
4681
+ /* A fixed 48px box centred on the trigger, not an inset derived from
4682
+ its size. The inset version measured from the padding edge and from
4683
+ whatever size the row laid the trigger out at, and a phone row drew a
4684
+ 47.75px-wide target. The centred box is 48x48 whatever the painted
4685
+ size, border or sub-pixel layout. */
4643
4686
  .row-actions__trigger::after {
4644
- inset-block: calc((var(--hit-touch) - 28px) / -2 - 1px);
4645
- inset-inline: calc((var(--hit-touch) - 34px) / -2 - 1px);
4687
+ top: 50%;
4688
+ left: 50%;
4689
+ width: max(var(--hit-touch), 100%);
4690
+ height: max(var(--hit-touch), 100%);
4691
+ transform: translate(-50%, -50%);
4646
4692
  }
4647
4693
 
4648
- .ef-clear::after {
4649
- inset: calc((var(--hit-touch) - 22px) / -2);
4694
+ .ef-clear::after,
4695
+ .es .es-clear::after {
4696
+ inset: calc((var(--hit-touch) - var(--ef-clear-size)) / -2);
4650
4697
  }
4651
4698
 
4652
4699
  /* Written as `.pager .pg` to match the base rule's specificity: a bare
@@ -5,7 +5,7 @@ import { EfDataCardColumn, ScreenContext, EfDetailToolbarAction, EfSearchToolbar
5
5
  export { EfBoundedDateRange, EfDataCardColumn, EfDataCardColumnAlign, EfDataCardColumnMobileRole, EfDataCardColumnType, EfDataCardSort, EfDataCardSortDirection, EfDatePresetKey, EfDateRange, EfDetailToolbarAction, EfSearchToolbarAction } from '@elasticias/screens';
6
6
  import { Menu } from 'primeng/menu';
7
7
  import * as _elasticias_core from '@elasticias/core';
8
- import { EfBuildPackage, EfModule, EfNavSection, EfNavItem, EfModuleId, EfToast, EfToastAction, EfThemeConfigService } from '@elasticias/core';
8
+ import { EfBuildPackage, EfSessionIdleService, EfModule, EfNavSection, EfNavItem, EfModuleId, EfToast, EfToastAction, EfThemeConfigService } from '@elasticias/core';
9
9
  import * as i1 from 'primeng/tooltip';
10
10
  import { BlockableUI } from 'primeng/api';
11
11
  import { SafeResourceUrl } from '@angular/platform-browser';
@@ -760,7 +760,8 @@ declare class EfProductCatalogueComponent implements OnChanges {
760
760
  /**
761
761
  * Dynamic action descriptor for `ef-dialog`. The dialog renders one
762
762
  * `<button class="btn …">` per entry, in array order (left → right);
763
- * the rightmost entry is the focused / "primary" by convention.
763
+ * the rightmost entry is the "primary" by convention. Focus goes to the
764
+ * first focusable element unless an entry sets `autofocus`.
764
765
  *
765
766
  * When `command` returns a `Promise`, the button auto-toggles
766
767
  * `.is-loading` for the duration and the dialog closes when it
@@ -786,6 +787,14 @@ interface EfDialogAction {
786
787
  dismiss?: boolean;
787
788
  /** Render the button as disabled. */
788
789
  disabled?: boolean;
790
+ /**
791
+ * Focus this button when the dialog opens, instead of PrimeNG's first
792
+ * focusable element. For a dialog whose first button is the destructive
793
+ * one ("sign out" before "stay"), so Enter does the safe thing. Opt-in:
794
+ * focusing the rightmost button everywhere would put Enter on "delete" in
795
+ * every confirmation.
796
+ */
797
+ autofocus?: boolean;
789
798
  /** Render the button as loading (in-flight). Mutated automatically
790
799
  * by the dialog when the command returns a Promise. */
791
800
  loading?: boolean;
@@ -907,6 +916,7 @@ declare class EfDialogComponent {
907
916
  /** ViewChild ref to the default-action footer template — used in the
908
917
  * `'primeng'` variant via [footerTemplate] input. */
909
918
  defaultFooterTpl?: TemplateRef<void>;
919
+ private dialog?;
910
920
  /** Severity → default header icon. Override per-instance with `[icon]`. */
911
921
  private static readonly SEV_ICONS;
912
922
  get effectiveStyleClass(): string;
@@ -921,6 +931,8 @@ declare class EfDialogComponent {
921
931
  actionClass(a: EfDialogAction): string;
922
932
  handleActionClick(a: EfDialogAction, index: number): void;
923
933
  handleVisibleChange(value: boolean): void;
934
+ /** True when an action takes focus on open, so PrimeNG must not. */
935
+ get hasAutofocusAction(): boolean;
924
936
  handleShow(): void;
925
937
  handleHide(): void;
926
938
  /** Default cancel — emits and closes. */
@@ -1190,6 +1202,32 @@ declare class EfShortcutsDialogComponent {
1190
1202
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfShortcutsDialogComponent, "ef-shortcuts-dialog", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
1191
1203
  }
1192
1204
 
1205
+ /**
1206
+ * The last minute before an idle sign-out. Host it once at the app root; it
1207
+ * opens only while `EfSessionIdleService` counts down, which only happens
1208
+ * for a session the app started.
1209
+ *
1210
+ * Closing it any way other than "sign out" (the close button, Escape) counts
1211
+ * as "still here": whoever closed it is at the screen. "Stay" takes focus on
1212
+ * open, so Enter from someone just back at the keyboard keeps the session.
1213
+ *
1214
+ * Sign-out goes through `EF_SESSION`, like `ef-app-top`'s. Without it the
1215
+ * button is not offered, and the countdown still ends the session through
1216
+ * the app's idle callback.
1217
+ *
1218
+ * Translation keys the app provides: `session_idle_warning_title`,
1219
+ * `session_idle_warning_body` (with `{{seconds}}`), `session_idle_stay`,
1220
+ * `common_logout`.
1221
+ */
1222
+ declare class EfSessionIdleDialogComponent {
1223
+ protected readonly idle: EfSessionIdleService;
1224
+ private readonly session;
1225
+ protected readonly secondsLeft: _angular_core.Signal<number>;
1226
+ protected readonly actions: EfDialogAction[];
1227
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfSessionIdleDialogComponent, never>;
1228
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfSessionIdleDialogComponent, "ef-session-idle-dialog", never, {}, {}, never, never, true, never>;
1229
+ }
1230
+
1193
1231
  declare class EfFieldsetComponent {
1194
1232
  /** Direct legend text (not translated) */
1195
1233
  legend?: string;
@@ -6237,5 +6275,5 @@ declare class EfEmailMetricsCardComponent {
6237
6275
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfEmailMetricsCardComponent, "ef-email-metrics-card", never, { "metrics": { "alias": "metrics"; "required": false; "isSignal": true; }; "recentEvents": { "alias": "recentEvents"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "rangeChange": "rangeChange"; }, never, never, true, never>;
6238
6276
  }
6239
6277
 
6240
- export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRadioComponent, EfRankListComponent, EfReadOnlyDirective, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
6278
+ export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRadioComponent, EfRankListComponent, EfReadOnlyDirective, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfSessionIdleDialogComponent, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
6241
6279
  export type { CatalogueProduct, CatalogueProductVariant, CategoryAssignment, CategoryGroup, CategoryItem, DatatableSearchEntity, DocumentConfig, EfAboutServer, EfBadgeColor, EfBadgeConfig, EfBadgeSize, EfBadgeVariant, EfButtonComptoirSeverity, EfButtonPrimeNGSeverity, EfButtonSeverity, EfChangeHistoryEntry, EfChangeHistoryFieldChange, EfChangePasswordSubmit, EfChartSeries, EfChartType, EfDataCardMobileLayout, EfDataCardRowAction, EfDatatableActions, EfDatatableColumn, EfDatatableColumnAlign, EfDatatableColumnType, EfDatatableConfig, EfDateFieldValue, EfDatePreset, EfDialogAction, EfDialogSeverity, EfDialogSize, EfFabPosition, EfKpiDeltaTone, EfKpiSparkline, EfPillItem, EfPresetItem, EfProfileMenuItem, EfRankRow, EfRowAction, EfSkeletonVariant, EfStatsRow, EfStatusColor, EfStatusReferenceItem, EfTabItem, EfTabsModule, EfTabsVariant, EfTimelineItem, EfTimelineState, EfToastRegionPosition, EfTotalsGrand, EfTotalsRow, HighlightSegment, OrderChangeInfo, OrderEntity, OrderLineItem, OrderProductsSummary, OrderSummaryItem, ProductCountGroup, ProductCountGroupLabel, ProductTypeaheadRow, ProductTypeaheadSelection, ProductWithCountGroup, SelectedFilter, ValidationResult };