@elasticias/ui 1.0.3 → 1.0.4

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.3",
3
+ "version": "1.0.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -800,6 +800,102 @@
800
800
  letter-spacing: -0.005em;
801
801
  }
802
802
 
803
+ /* ──────────── TOOLTIP — COMPTOIR SKIN OVER P-TOOLTIP ────────────
804
+ PrimeNG owns the positioning and the show/hide; these rules own the
805
+ look, so `efTooltip` and `ef-button`'s own tooltip read the same.
806
+ Ink-active ground rather than paper: a tooltip is an overlay on top
807
+ of the surface, not another surface. */
808
+
809
+ .p-tooltip .p-tooltip-text {
810
+ background: var(--ink-active);
811
+ color: var(--paper);
812
+ border-radius: var(--r-md);
813
+ padding: 7px 10px;
814
+ font-size: 12px;
815
+ font-weight: 600;
816
+ line-height: 1.4;
817
+ letter-spacing: -0.005em;
818
+ max-width: 260px;
819
+ box-shadow: var(--shadow-3);
820
+ white-space: normal;
821
+ }
822
+
823
+ /* The arrow is a bordered triangle per side; colour the one that shows. */
824
+ .p-tooltip.p-tooltip-top .p-tooltip-arrow {
825
+ border-top-color: var(--ink-active);
826
+ }
827
+ .p-tooltip.p-tooltip-bottom .p-tooltip-arrow {
828
+ border-bottom-color: var(--ink-active);
829
+ }
830
+ .p-tooltip.p-tooltip-left .p-tooltip-arrow {
831
+ border-left-color: var(--ink-active);
832
+ }
833
+ .p-tooltip.p-tooltip-right .p-tooltip-arrow {
834
+ border-right-color: var(--ink-active);
835
+ }
836
+
837
+ /* ──────────── BUILD STAMP ───────────────────────────────────────
838
+ Footer-weight metadata: mono, muted, never competing with the
839
+ content above it. */
840
+
841
+ .ef-build-stamp {
842
+ display: inline-flex;
843
+ align-items: center;
844
+ gap: 6px;
845
+ font-family: 'JetBrains Mono', ui-monospace, monospace;
846
+ font-size: 11px;
847
+ letter-spacing: 0.02em;
848
+ color: var(--text-soft);
849
+ white-space: nowrap;
850
+ }
851
+
852
+ .ef-build-stamp__sep {
853
+ opacity: 0.6;
854
+ }
855
+
856
+ /* ──────────── APP-BAR ICON ACTIONS ──────────────────────────────
857
+ The theme switch and sign-out sit at the trailing edge of
858
+ ef-app-top. They borrow the row-actions trigger's shape rather
859
+ than inventing a third kind of icon button. */
860
+
861
+ .ef-theme-toggle,
862
+ .ef-app-top__logout {
863
+ appearance: none;
864
+ background: var(--paper-alt);
865
+ border: 1px solid var(--rule);
866
+ width: var(--hit);
867
+ height: var(--hit);
868
+ border-radius: var(--r-pill);
869
+ display: inline-grid;
870
+ place-items: center;
871
+ color: var(--text-mute);
872
+ cursor: pointer;
873
+ transition:
874
+ background var(--t-fast) var(--ease-out),
875
+ border-color var(--t-fast) var(--ease-out),
876
+ color var(--t-fast) var(--ease-out);
877
+ }
878
+
879
+ .ef-theme-toggle:hover,
880
+ .ef-app-top__logout:hover {
881
+ color: var(--text);
882
+ border-color: var(--ink-400);
883
+ }
884
+
885
+ .ef-theme-toggle:focus-visible,
886
+ .ef-app-top__logout:focus-visible {
887
+ outline: 0;
888
+ border-color: var(--tenant-400);
889
+ box-shadow: 0 0 0 4px var(--tenant-100);
890
+ color: var(--text);
891
+ }
892
+
893
+ .ef-theme-toggle i,
894
+ .ef-app-top__logout i {
895
+ font-size: 14px;
896
+ line-height: 1;
897
+ }
898
+
803
899
  /* ──────────── PAGER ─────────────────────────────────────────────── */
804
900
 
805
901
  .pager {
@@ -1,11 +1,12 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { PipeTransform, OnInit, OnChanges, TemplateRef, EventEmitter, AfterContentInit, OnDestroy, SimpleChanges, AfterViewInit } from '@angular/core';
3
3
  import { Menu } from 'primeng/menu';
4
+ import * as _elasticias_core from '@elasticias/core';
5
+ import { EfModule, EfModuleId, EfNavSection, EfNavItem, EfToast, EfToastAction, EfThemeConfigService } from '@elasticias/core';
6
+ import * as i1 from 'primeng/tooltip';
4
7
  import * as _elasticias_screens from '@elasticias/screens';
5
8
  import { ScreenContext, EfDetailToolbarAction, EfSearchToolbarAction, EfDataCardColumn, EfDataCardSort, EfDateRange, EfDatePresetKey } from '@elasticias/screens';
6
9
  export { EfDataCardColumn, EfDataCardColumnAlign, EfDataCardColumnType, EfDataCardSort, EfDataCardSortDirection, EfDatePresetKey, EfDateRange, EfDetailToolbarAction, EfSearchToolbarAction } from '@elasticias/screens';
7
- import * as _elasticias_core from '@elasticias/core';
8
- import { EfModule, EfModuleId, EfNavSection, EfNavItem, EfToast, EfToastAction, EfThemeConfigService } from '@elasticias/core';
9
10
  import { BlockableUI } from 'primeng/api';
10
11
  import { SafeResourceUrl } from '@angular/platform-browser';
11
12
  import { ChartConfiguration } from 'chart.js';
@@ -917,6 +918,80 @@ declare class EfConfirmDialogComponent {
917
918
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfConfirmDialogComponent, "ef-confirm-dialog", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
918
919
  }
919
920
 
921
+ /**
922
+ * Light / dark switch.
923
+ *
924
+ * All of the machinery already exists in `EfThemeConfigService`: it holds
925
+ * `darkTheme` in the persisted app state, puts `.p-dark` on `<html>`, and
926
+ * runs the swap through a view transition where the browser supports one.
927
+ * This is the control that was missing, so the preference had no way to be
928
+ * expressed.
929
+ *
930
+ * The icon shows the theme you would move to, not the one you are in, which
931
+ * is what makes a single-button toggle readable: a moon means "go dark".
932
+ *
933
+ * ```html
934
+ * <ef-theme-toggle />
935
+ * ```
936
+ */
937
+ declare class EfThemeToggleComponent {
938
+ private readonly themeConfig;
939
+ /** Icon shown while light is active (i.e. "switch to dark"). */
940
+ readonly darkIcon: _angular_core.InputSignal<string>;
941
+ /** Icon shown while dark is active (i.e. "switch to light"). */
942
+ readonly lightIcon: _angular_core.InputSignal<string>;
943
+ /** Translation key for the accessible name. */
944
+ readonly ariaLabelKey: _angular_core.InputSignal<string>;
945
+ readonly isDark: _angular_core.Signal<boolean>;
946
+ protected readonly labelKey: _angular_core.Signal<string>;
947
+ toggle(): void;
948
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfThemeToggleComponent, never>;
949
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfThemeToggleComponent, "ef-theme-toggle", never, { "darkIcon": { "alias": "darkIcon"; "required": false; "isSignal": true; }; "lightIcon": { "alias": "lightIcon"; "required": false; "isSignal": true; }; "ariaLabelKey": { "alias": "ariaLabelKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
950
+ }
951
+
952
+ /**
953
+ * Which build is running, for a footer or an about box.
954
+ *
955
+ * Reads `EF_BUILD_INFO` optionally and renders nothing when the app has not
956
+ * provided it, so a consumer that never wired a build stamp shows no empty
957
+ * line. The commit and branch go in the tooltip rather than the label: the
958
+ * date is what a person recognises, the hash is what you paste into an issue.
959
+ *
960
+ * ```html
961
+ * <ef-build-stamp owner="Elasticias" />
962
+ * ```
963
+ */
964
+ declare class EfBuildStampComponent {
965
+ /** Copyright holder shown before the build. Omit for the build alone. */
966
+ readonly owner: _angular_core.InputSignal<string>;
967
+ protected readonly info: _elasticias_core.EfBuildInfo;
968
+ protected readonly year: number;
969
+ protected readonly detail: _angular_core.Signal<string>;
970
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfBuildStampComponent, never>;
971
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfBuildStampComponent, "ef-build-stamp", never, { "owner": { "alias": "owner"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
972
+ }
973
+
974
+ /**
975
+ * Comptoir-skinned tooltip.
976
+ *
977
+ * `ef-button` already drives PrimeNG's tooltip through its `tooltipKey`
978
+ * input, so this composes the same directive rather than introducing a
979
+ * second tooltip with its own positioning and its own bugs. It contributes
980
+ * the `ef-*` name the house style asks for and nothing else; the look comes
981
+ * from the `.p-tooltip` rules in `_patterns.scss`, which means every tooltip
982
+ * in the app — this one and `ef-button`'s — reads the same.
983
+ *
984
+ * Text is a plain input, so translate at the call site:
985
+ *
986
+ * ```html
987
+ * <span [efTooltip]="'module_sales_hint' | translate" efTooltipPosition="top"></span>
988
+ * ```
989
+ */
990
+ declare class EfTooltipDirective {
991
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfTooltipDirective, never>;
992
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EfTooltipDirective, "[efTooltip]", never, {}, {}, never, never, true, [{ directive: typeof i1.Tooltip; inputs: { "pTooltip": "efTooltip"; "tooltipPosition": "efTooltipPosition"; "tooltipDisabled": "efTooltipDisabled"; "tooltipStyleClass": "efTooltipStyleClass"; "tooltipEvent": "efTooltipEvent"; "showDelay": "efTooltipShowDelay"; "hideDelay": "efTooltipHideDelay"; "appendTo": "efTooltipAppendTo"; "autoHide": "efTooltipAutoHide"; "escape": "efTooltipEscape"; "life": "efTooltipLife"; }; outputs: {}; }]>;
993
+ }
994
+
920
995
  declare class EfFieldsetComponent {
921
996
  /** Direct legend text (not translated) */
922
997
  legend?: string;
@@ -1364,12 +1439,30 @@ declare class EfAppMainComponent {
1364
1439
  * breadcrumb can still project their own content into `[breadcrumb]`.
1365
1440
  */
1366
1441
  declare class EfAppTopComponent {
1442
+ /**
1443
+ * Show the light/dark switch at the trailing edge of the bar.
1444
+ *
1445
+ * It lives here rather than being projected through `[actions]`
1446
+ * because that slot is declared once per viewport branch in
1447
+ * `ef-app-shell` and only the mobile one receives content — so
1448
+ * anything an app projects there never appears on desktop.
1449
+ */
1450
+ readonly themeToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
1451
+ /**
1452
+ * Show the sign-out button. It only renders when the app has provided
1453
+ * `EF_SESSION`, so this input turns off a control the app opted into
1454
+ * rather than being the thing that enables it.
1455
+ */
1456
+ readonly logout: _angular_core.InputSignalWithTransform<boolean, unknown>;
1457
+ /** Present only when the app provides `EF_SESSION`. */
1458
+ protected readonly session: _elasticias_core.EfSession;
1459
+ protected signOut(): void;
1367
1460
  private readonly active;
1368
1461
  readonly module: _angular_core.Signal<_elasticias_core.EfModule>;
1369
1462
  readonly navItem: _angular_core.Signal<_elasticias_core.EfNavItem>;
1370
1463
  readonly hasBreadcrumb: _angular_core.Signal<boolean>;
1371
1464
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfAppTopComponent, never>;
1372
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfAppTopComponent, "ef-app-top", never, {}, {}, never, ["[breadcrumb]", "[actions]"], true, never>;
1465
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfAppTopComponent, "ef-app-top", never, { "themeToggle": { "alias": "themeToggle"; "required": false; "isSignal": true; }; "logout": { "alias": "logout"; "required": false; "isSignal": true; }; }, {}, never, ["[breadcrumb]", "[actions]"], true, never>;
1373
1466
  }
1374
1467
 
1375
1468
  /**
@@ -5024,5 +5117,5 @@ declare class EfEmailMetricsCardComponent {
5024
5117
  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>;
5025
5118
  }
5026
5119
 
5027
- 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_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, 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, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRankListComponent, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
5120
+ 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_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, 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, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRankListComponent, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
5028
5121
  export type { CatalogueProduct, CatalogueProductVariant, CategoryAssignment, CategoryGroup, CategoryItem, DatatableSearchEntity, DocumentConfig, EfBadgeColor, EfBadgeConfig, EfBadgeSize, EfBadgeVariant, EfButtonComptoirSeverity, EfButtonPrimeNGSeverity, EfButtonSeverity, EfChangeHistoryEntry, EfChangeHistoryFieldChange, EfChartSeries, EfChartType, EfDataCardRowAction, EfDatatableActions, EfDatatableColumn, EfDatatableColumnAlign, EfDatatableColumnType, EfDatatableConfig, EfDateFieldValue, EfDatePreset, EfDialogAction, EfDialogSeverity, EfDialogSize, EfFabPosition, EfKpiDeltaTone, EfKpiSparkline, EfPillItem, EfPresetItem, 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 };