@akcelik/strct 0.10.0 → 0.11.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": "0.10.0",
3
+ "version": "0.11.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",
@@ -667,7 +667,7 @@ declare class StrctTree {
667
667
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTree, "strct-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "nodeMenu": { "alias": "nodeMenu"; "required": false; "isSignal": true; }; }, { "nodeActivated": "nodeActivated"; "nodeMenuSelect": "nodeMenuSelect"; }, never, ["*"], true, never>;
668
668
  }
669
669
 
670
- /** Fixed modal width presets: sm 380 · md 480 · lg 640 · xl 860 (px). */
670
+ /** Fixed modal width presets: sm 480 · md 640 · lg 860 · xl 1080 (px). */
671
671
  type StrctModalSize = 'sm' | 'md' | 'lg' | 'xl';
672
672
  /**
673
673
  * Overlay dialog with two-way `open`:
@@ -685,7 +685,7 @@ declare class StrctModal {
685
685
  readonly open: _angular_core.ModelSignal<boolean>;
686
686
  /** Dialog title. */
687
687
  readonly title: _angular_core.InputSignal<string>;
688
- /** Size variant. */
688
+ /** Size variant (fixed scale; defaults to `sm` = 480px). */
689
689
  readonly size: _angular_core.InputSignal<StrctModalSize>;
690
690
  /** Hide the footer slot. */
691
691
  readonly hideFooter: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -927,6 +927,55 @@ declare class StrctPagination {
927
927
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctPagination, "strct-pagination", never, { "total": { "alias": "total"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
928
928
  }
929
929
 
930
+ /** A leaf entry under a {@link StrctMenuSection}. */
931
+ interface StrctMenuLink {
932
+ /** Stable identity, matched against the menu's `activeId`. */
933
+ id: string;
934
+ label: string;
935
+ /** Optional leading icon name. */
936
+ icon?: string;
937
+ disabled?: boolean;
938
+ }
939
+ /** A category (level 1) that groups {@link StrctMenuLink} items (level 2). */
940
+ interface StrctMenuSection {
941
+ label: string;
942
+ /** Optional category icon (collapsible mode). */
943
+ icon?: string;
944
+ /** Initial expanded state in collapsible mode (defaults to expanded). */
945
+ expanded?: boolean;
946
+ items: StrctMenuLink[];
947
+ }
948
+ /**
949
+ * A two-level navigation menu: categories (level 1) each holding a flat list of
950
+ * items (level 2) — not a tree. Categories can be collapsible (chevrons) or
951
+ * static section labels, and item/category icons can be hidden.
952
+ *
953
+ * <strct-section-menu [sections]="nav" [(activeId)]="active"
954
+ * [collapsible]="true" [showIcons]="true"
955
+ * (select)="go($event)" />
956
+ */
957
+ declare class StrctSectionMenu {
958
+ /** Categories with their items (max two levels). */
959
+ readonly sections: _angular_core.InputSignal<StrctMenuSection[]>;
960
+ /** Active item id (two-way). */
961
+ readonly activeId: _angular_core.ModelSignal<string | null>;
962
+ /** Categories collapse via a chevron; `false` renders static section labels. */
963
+ readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
964
+ /** Show category / item icons. */
965
+ readonly showIcons: _angular_core.InputSignalWithTransform<boolean, unknown>;
966
+ /** Accessible label for the nav landmark. */
967
+ readonly ariaLabel: _angular_core.InputSignal<string>;
968
+ /** Emitted when an item is chosen. */
969
+ readonly select: _angular_core.OutputEmitterRef<StrctMenuLink>;
970
+ /** Per-section open overrides (keyed by label); absent ⇒ use `expanded`. */
971
+ private readonly overrides;
972
+ protected isOpen(sec: StrctMenuSection): boolean;
973
+ protected toggle(sec: StrctMenuSection): void;
974
+ protected pick(item: StrctMenuLink): void;
975
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSectionMenu, never>;
976
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSectionMenu, "strct-section-menu", never, { "sections": { "alias": "sections"; "required": true; "isSignal": true; }; "activeId": { "alias": "activeId"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "activeId": "activeIdChange"; "select": "select"; }, never, never, true, never>;
977
+ }
978
+
930
979
  /**
931
980
  * Form-field wrapper: a label (with optional required marker), the projected
932
981
  * control, and a hint or error message. It auto-links the control via
@@ -2016,5 +2065,5 @@ declare class StrctEmptyState {
2016
2065
  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>;
2017
2066
  }
2018
2067
 
2019
- export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctEmptyState, StrctField, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRating, StrctRowDetailDef, StrctShell, StrctShellService, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon };
2020
- export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartStatus, StrctChartType, StrctColumn, StrctDatagridColumn, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctMenuOpenOptions, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctTagStatus, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn };
2068
+ export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctEmptyState, StrctField, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRating, StrctRowDetailDef, StrctSectionMenu, StrctShell, StrctShellService, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon };
2069
+ export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartStatus, StrctChartType, StrctColumn, StrctDatagridColumn, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctTagStatus, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn };