@akcelik/strct 4.5.0 → 4.6.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": "4.5.0",
3
+ "version": "4.6.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",
@@ -722,9 +722,25 @@ declare class StrctAvatar {
722
722
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctAvatar, "strct-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
723
723
  }
724
724
 
725
- /** Progress bar color variants. */
726
- type StrctProgressStatus = 'accent' | 'success' | 'warning' | 'critical';
727
- /** Horizontal value/usage bar. `<strct-progress [value]="72" status="warning" />`. */
725
+ /** Progress bar color variants. `neutral` is the quiet one: queued, idle, unknown. */
726
+ type StrctProgressStatus = 'neutral' | 'accent' | 'success' | 'warning' | 'critical';
727
+ /** One stacked fill of a multi-value bar (used now, plus what would arrive …). */
728
+ interface StrctProgressSegment {
729
+ value: number;
730
+ status?: StrctProgressStatus;
731
+ /** Names this part in the accessible text ("Used 61%, arriving 22%"). */
732
+ label?: string;
733
+ }
734
+ /**
735
+ * Horizontal value/usage bar. `<strct-progress [value]="72" status="warning" />`.
736
+ *
737
+ * **Meter mode.** A capacity bar says what it measures and how much, next to
738
+ * the bar: `visibleLabel` puts `label` at the start of a row above the track,
739
+ * `showValue` puts `valueText` (default `${value}%`) at its end, and `caption`
740
+ * adds a quiet line under it. `segments` stacks more than one fill, and
741
+ * `indeterminate` is a task that is running but reports no percentage. Every
742
+ * one of these is off by default, so a plain bar renders exactly as before.
743
+ */
728
744
  declare class StrctProgress {
729
745
  /** Current value. */
730
746
  readonly value: _angular_core.InputSignal<number>;
@@ -732,6 +748,18 @@ declare class StrctProgress {
732
748
  readonly label: _angular_core.InputSignal<string>;
733
749
  /** Visual status color. */
734
750
  readonly status: _angular_core.InputSignal<StrctProgressStatus>;
751
+ /** Show `label` above the bar as well as announcing it. */
752
+ readonly visibleLabel: _angular_core.InputSignalWithTransform<boolean, unknown>;
753
+ /** Show the value at the end of the row above the bar. */
754
+ readonly showValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
755
+ /** What `showValue` prints — "293 GB of 512 GB". Defaults to `${value}%`. */
756
+ readonly valueText: _angular_core.InputSignal<string>;
757
+ /** A quiet line under the bar — "219 GB free across 2 nodes". */
758
+ readonly caption: _angular_core.InputSignal<string>;
759
+ /** Running, but with no percentage to report. */
760
+ readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, unknown>;
761
+ /** Stack several fills (used now + what would arrive); clamped to 100 total. */
762
+ readonly segments: _angular_core.InputSignal<StrctProgressSegment[] | null>;
735
763
  /**
736
764
  * Optional value-driven thresholds. When set, the component picks its own
737
765
  * status from the value instead of the caller computing it: `value >= critical`
@@ -741,10 +769,17 @@ declare class StrctProgress {
741
769
  */
742
770
  readonly thresholds: _angular_core.InputSignal<StrctThresholds | null>;
743
771
  protected readonly clamped: _angular_core.Signal<number>;
772
+ /** Segments as widths that together never exceed the track. */
773
+ protected readonly stacked: _angular_core.Signal<{
774
+ width: number;
775
+ status: StrctProgressStatus;
776
+ }[] | null>;
777
+ /** What a screen reader reads instead of the bare number. */
778
+ protected readonly valueDescription: _angular_core.Signal<string | null>;
744
779
  /** Status after applying thresholds (falls back to `status` when none set). */
745
780
  protected readonly resolvedStatus: _angular_core.Signal<StrctProgressStatus>;
746
781
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctProgress, never>;
747
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctProgress, "strct-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "thresholds": { "alias": "thresholds"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
782
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctProgress, "strct-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "visibleLabel": { "alias": "visibleLabel"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "thresholds": { "alias": "thresholds"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
748
783
  }
749
784
 
750
785
  /** Spinner size variants. */
@@ -755,8 +790,14 @@ declare class StrctSpinner {
755
790
  readonly size: _angular_core.InputSignal<StrctSpinnerSize>;
756
791
  /** Accessible label (localizable). */
757
792
  readonly label: _angular_core.InputSignal<string>;
793
+ /**
794
+ * Visible text beside the ring — "Reading…". It becomes the accessible name
795
+ * too, so the spinner is not announced as "Loading" while it says something
796
+ * else on screen.
797
+ */
798
+ readonly caption: _angular_core.InputSignal<string>;
758
799
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSpinner, never>;
759
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSpinner, "strct-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
800
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSpinner, "strct-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
760
801
  }
761
802
 
762
803
  /**
@@ -4652,7 +4693,7 @@ declare class StrctToastOutlet {
4652
4693
  }
4653
4694
 
4654
4695
  /** Preset zero/permission/error states with a sensible icon + tone. */
4655
- type StrctEmptyVariant = 'empty' | 'denied' | 'error' | 'notfound';
4696
+ type StrctEmptyVariant = 'empty' | 'denied' | 'error' | 'notfound' | 'loading';
4656
4697
  /**
4657
4698
  * A centered empty / permission / error state — an icon, a title, an optional
4658
4699
  * description and a slot for call-to-action buttons. Project actions as children.
@@ -4670,11 +4711,16 @@ declare class StrctEmptyState {
4670
4711
  /** Override the preset tone (neutral / warning / critical / accent). */
4671
4712
  readonly tone: _angular_core.InputSignal<string>;
4672
4713
  readonly title: _angular_core.InputSignal<string>;
4714
+ /**
4715
+ * `sm` is the inline row a 240px frame wants: a 16px icon with the title and
4716
+ * description on one line. A page-sized empty state stays `md`.
4717
+ */
4718
+ readonly size: _angular_core.InputSignal<"md" | "sm">;
4673
4719
  readonly description: _angular_core.InputSignal<string>;
4674
4720
  protected readonly resolvedIcon: _angular_core.Signal<string>;
4675
4721
  protected readonly toneClass: _angular_core.Signal<string>;
4676
4722
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctEmptyState, never>;
4677
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctEmptyState, "strct-empty-state", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
4723
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctEmptyState, "strct-empty-state", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
4678
4724
  }
4679
4725
 
4680
4726
  /**
@@ -6076,4 +6122,4 @@ declare class StrctHeatmap {
6076
6122
  }
6077
6123
 
6078
6124
  export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, 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, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
6079
- export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartSummaryInfo, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctConfirmOptions, StrctConfirmTone, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHeatmapCell, StrctHeatmapSummaryInfo, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctNotification, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctStatusDotSize, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeDropEvent, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };
6125
+ export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartSummaryInfo, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctConfirmOptions, StrctConfirmTone, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHeatmapCell, StrctHeatmapSummaryInfo, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctNotification, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressSegment, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctStatusDotSize, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeDropEvent, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };