@akcelik/strct 1.13.0 → 1.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akcelik/strct",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
5
5
  "author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnDestroy, TemplateRef, PipeTransform } from '@angular/core';
2
+ import { OnDestroy, InjectionToken, Provider, TemplateRef, PipeTransform } from '@angular/core';
3
3
  import { SafeHtml, SafeStyle } from '@angular/platform-browser';
4
4
  import { ControlValueAccessor } from '@angular/forms';
5
5
  import * as _akcelik_strct from '@akcelik/strct';
@@ -1309,10 +1309,12 @@ declare class StrctSubmenu {
1309
1309
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSubmenu, "strct-submenu", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, ["[strctSubmenuLabel]", "*"], true, never>;
1310
1310
  }
1311
1311
 
1312
- /** A single wizard step. `label` names it in the step header. */
1312
+ /** A single wizard step. `label` names it in the step header / rail. */
1313
1313
  declare class StrctStep {
1314
1314
  /** Label text. */
1315
1315
  readonly label: _angular_core.InputSignal<string>;
1316
+ /** Rail sublabel (vertical mode; shown while the step is active). */
1317
+ readonly description: _angular_core.InputSignal<string>;
1316
1318
  /** When false, the wizard's Next / Finish is disabled on this step. */
1317
1319
  readonly canAdvance: _angular_core.InputSignalWithTransform<boolean, unknown>;
1318
1320
  private readonly _active;
@@ -1320,17 +1322,73 @@ declare class StrctStep {
1320
1322
  /** @internal */
1321
1323
  setActive(value: boolean): void;
1322
1324
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctStep, never>;
1323
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctStep, "strct-step", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "canAdvance": { "alias": "canAdvance"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1325
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctStep, "strct-step", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "canAdvance": { "alias": "canAdvance"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1326
+ }
1327
+ /** Marks the live-summary column projected beside a vertical wizard. */
1328
+ declare class StrctWizardAside {
1329
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctWizardAside, never>;
1330
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctWizardAside, "[strctWizardAside]", never, {}, {}, never, never, true, never>;
1324
1331
  }
1325
- /** Multi-step flow with a numbered header and Back / Next / Finish controls. */
1332
+ /** App-wide wizard defaults, provided once (see {@link provideStrctWizardDefaults}). */
1333
+ interface StrctWizardDefaults {
1334
+ /** Make every wizard vertical unless an instance opts out. */
1335
+ vertical?: boolean;
1336
+ }
1337
+ declare const STRCT_WIZARD_DEFAULTS: InjectionToken<StrctWizardDefaults>;
1338
+ /**
1339
+ * Flip wizard defaults for the whole app — the way to make a house rule like
1340
+ * "steps are always vertical" hold without repeating the attribute:
1341
+ *
1342
+ * providers: [provideStrctWizardDefaults({ vertical: true })]
1343
+ *
1344
+ * A per-instance binding still wins: `[vertical]="false"` opts one wizard out.
1345
+ */
1346
+ declare function provideStrctWizardDefaults(defaults: StrctWizardDefaults): Provider;
1347
+ /**
1348
+ * Multi-step flow with Back / Next / Finish controls.
1349
+ *
1350
+ * Default: a numbered horizontal header. With `vertical`, steps become a left
1351
+ * rail — dashed-ring states (idle ⊙ / active ●⊙ / done ✓), a progress bar
1352
+ * with an “n/N” counter, and click-back navigation to visited steps — plus an
1353
+ * optional right column projected via `strctWizardAside` (live summaries).
1354
+ * The rail never flips horizontal: under ~720px of component width it
1355
+ * collapses to a compact vertical ring column (container query).
1356
+ *
1357
+ * <strct-wizard vertical title="Create virtual machine">
1358
+ * <strct-step label="Identity" description="Name, environment">…</strct-step>
1359
+ * …
1360
+ * <aside strctWizardAside>…live summary…</aside>
1361
+ * </strct-wizard>
1362
+ */
1326
1363
  declare class StrctWizard {
1364
+ private readonly defaults;
1327
1365
  readonly steps: _angular_core.Signal<readonly StrctStep[]>;
1366
+ protected readonly asideDef: _angular_core.Signal<StrctWizardAside | undefined>;
1328
1367
  readonly current: _angular_core.ModelSignal<number>;
1368
+ /**
1369
+ * Vertical mode: steps become a left rail with dashed-ring states, a
1370
+ * progress bar and click-back navigation; `strctWizardAside` projects a
1371
+ * right column. The rail collapses to a compact vertical ring column under
1372
+ * ~720px of component width — it never flips horizontal.
1373
+ *
1374
+ * The default can be flipped app-wide via `provideStrctWizardDefaults`;
1375
+ * this input always wins when bound.
1376
+ */
1377
+ readonly vertical: _angular_core.InputSignalWithTransform<boolean, unknown>;
1378
+ /** Rail heading shown above the progress bar (vertical mode). */
1379
+ readonly title: _angular_core.InputSignal<string>;
1329
1380
  /** Label for the final-step button (default "Finish"). */
1330
1381
  readonly finishLabel: _angular_core.InputSignal<string>;
1331
- /** Labels for the Back / Next buttons (localizable). */
1382
+ /** Labels for the Back / Next / Cancel buttons (localizable). */
1332
1383
  readonly backLabel: _angular_core.InputSignal<string>;
1333
1384
  readonly nextLabel: _angular_core.InputSignal<string>;
1385
+ readonly cancelLabel: _angular_core.InputSignal<string>;
1386
+ /** Busy label while `submitting` (localizable). */
1387
+ readonly submittingLabel: _angular_core.InputSignal<string>;
1388
+ /** Counter suffix in the rail: "2/5 {progressLabel}". */
1389
+ readonly progressLabel: _angular_core.InputSignal<string>;
1390
+ /** Accessible name of the vertical step rail. */
1391
+ readonly stepsLabel: _angular_core.InputSignal<string>;
1334
1392
  /** Disable Finish and show a busy label while an async submit is in flight. */
1335
1393
  readonly submitting: _angular_core.InputSignalWithTransform<boolean, unknown>;
1336
1394
  /** Show a Cancel button on the left. */
@@ -1339,17 +1397,22 @@ declare class StrctWizard {
1339
1397
  readonly finished: _angular_core.OutputEmitterRef<void>;
1340
1398
  /** Emitted when the user clicks Cancel. */
1341
1399
  readonly cancelled: _angular_core.OutputEmitterRef<void>;
1342
- /** Emits the new step index after a Back / Next move. */
1400
+ /** Emits the new step index after a Back / Next / rail move. */
1343
1401
  readonly stepChange: _angular_core.OutputEmitterRef<number>;
1402
+ /** Furthest step reached — drives the progress bar and rail clickability. */
1403
+ protected readonly maxVisited: _angular_core.WritableSignal<number>;
1404
+ protected readonly progressPct: _angular_core.Signal<number>;
1344
1405
  protected readonly isLast: _angular_core.Signal<boolean>;
1345
1406
  /** Whether the current step permits advancing (its `canAdvance`). */
1346
1407
  protected readonly canAdvance: _angular_core.Signal<boolean>;
1347
1408
  constructor();
1348
1409
  next(): void;
1349
1410
  back(): void;
1411
+ /** Jump to a visited step (rail click). Forward moves still go through Next. */
1412
+ goTo(index: number): void;
1350
1413
  finish(): void;
1351
1414
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctWizard, never>;
1352
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctWizard, "strct-wizard", never, { "current": { "alias": "current"; "required": false; "isSignal": true; }; "finishLabel": { "alias": "finishLabel"; "required": false; "isSignal": true; }; "backLabel": { "alias": "backLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "submitting": { "alias": "submitting"; "required": false; "isSignal": true; }; "cancelable": { "alias": "cancelable"; "required": false; "isSignal": true; }; }, { "current": "currentChange"; "finished": "finished"; "cancelled": "cancelled"; "stepChange": "stepChange"; }, ["steps"], ["*"], true, never>;
1415
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctWizard, "strct-wizard", never, { "current": { "alias": "current"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "finishLabel": { "alias": "finishLabel"; "required": false; "isSignal": true; }; "backLabel": { "alias": "backLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "submittingLabel": { "alias": "submittingLabel"; "required": false; "isSignal": true; }; "progressLabel": { "alias": "progressLabel"; "required": false; "isSignal": true; }; "stepsLabel": { "alias": "stepsLabel"; "required": false; "isSignal": true; }; "submitting": { "alias": "submitting"; "required": false; "isSignal": true; }; "cancelable": { "alias": "cancelable"; "required": false; "isSignal": true; }; }, { "current": "currentChange"; "finished": "finished"; "cancelled": "cancelled"; "stepChange": "stepChange"; }, ["steps", "asideDef"], ["*", "[strctWizardAside]"], true, never>;
1353
1416
  }
1354
1417
 
1355
1418
  /**
@@ -4334,5 +4397,5 @@ declare class StrctReorderItem {
4334
4397
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctReorderItem, "[strctReorderItem]", never, {}, {}, never, never, true, never>;
4335
4398
  }
4336
4399
 
4337
- export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWatermark, StrctWizard, parseAnsi, registerStrctIcon, strctComputeDiff, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone };
4338
- export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus };
4400
+ export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, strctComputeDiff, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone };
4401
+ export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };