@sentropic/design-system-angular 0.36.58 → 0.36.60

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.
@@ -2,29 +2,130 @@ import * as i0 from "@angular/core";
2
2
  export type AppShellVariant = "site" | "workspace";
3
3
  export type AppShellUtilityMode = "reserve" | "overlay" | "floating";
4
4
  export type AppShellUtilitySide = "left" | "right" | "bottom";
5
+ export type AppShellPanelCollapse = "stack" | "accordion";
6
+ export type AppShellPanelKey = "navigationPanel" | "contextPanel" | "utilityPanel";
5
7
  export type AppShellProps = {
6
8
  variant?: AppShellVariant;
9
+ /** Presence flags for named panels — pair with a projected `[slot=x]` element. */
10
+ topChrome?: unknown;
11
+ primaryRail?: unknown;
12
+ navigationPanel?: unknown;
13
+ contextPanel?: unknown;
14
+ utilityPanel?: unknown;
15
+ bottomPanel?: unknown;
7
16
  mainId?: string;
8
17
  navigationLabel?: string;
9
18
  contextLabel?: string;
10
19
  utilityLabel?: string;
11
20
  utilityMode?: AppShellUtilityMode;
12
21
  utilitySide?: AppShellUtilitySide;
22
+ /**
23
+ * Below the 48rem breakpoint, `"stack"` (default) keeps today's behaviour —
24
+ * panels stack full-width in document order, always expanded. `"accordion"`
25
+ * degrades each present panel to a keyboard-accessible disclosure (collapsed
26
+ * by default) instead of squeezing the main content. Desktop (>48rem)
27
+ * rendering is IDENTICAL in both modes. Panel content is mounted once
28
+ * regardless of mode/breakpoint; collapsing hides/sizes the region via CSS
29
+ * rather than destroying it, so a stateful widget projected into a panel
30
+ * never remounts.
31
+ */
32
+ panelCollapse?: AppShellPanelCollapse;
33
+ /** Disclosure label for `primaryRail` when `panelCollapse="accordion"`. */
34
+ primaryRailLabel?: string;
35
+ /** Disclosure label for `navigationPanel` when `panelCollapse="accordion"`. Defaults to `navigationLabel`. */
36
+ navigationPanelLabel?: string;
37
+ /** Disclosure label for `contextPanel` when `panelCollapse="accordion"`. Defaults to `contextLabel`. */
38
+ contextPanelLabel?: string;
39
+ /** Disclosure label for `utilityPanel` when `panelCollapse="accordion"`. Defaults to `utilityLabel`. */
40
+ utilityPanelLabel?: string;
41
+ /** Enables drag-to-resize handles on side panels above 48rem. Default false — zero regression. */
42
+ panelResize?: boolean;
43
+ /** Controlled panel widths in px. When provided the component never mutates width itself. */
44
+ panelWidths?: Partial<Record<AppShellPanelKey, number>>;
45
+ /** Seeds uncontrolled widths in px. */
46
+ defaultPanelWidths?: Partial<Record<AppShellPanelKey, number>>;
47
+ /** Fired on every committed resize. Persistence is the CONSUMER's job — the DS stays presentational. */
48
+ onPanelResize?: (key: AppShellPanelKey, width: number) => void;
49
+ /** Lower clamp in px. Default 180. */
50
+ panelMinWidth?: number;
51
+ /** Upper clamp in px. Default 640. */
52
+ panelMaxWidth?: number;
13
53
  class?: string;
14
54
  };
15
55
  export declare class AppShell {
16
56
  static readonly stComponentName = "AppShell";
17
57
  readonly componentName = "AppShell";
18
58
  variant: AppShellVariant;
59
+ topChrome?: unknown;
60
+ primaryRail?: unknown;
61
+ navigationPanel?: unknown;
62
+ contextPanel?: unknown;
63
+ utilityPanel?: unknown;
64
+ bottomPanel?: unknown;
19
65
  mainId: string;
20
66
  navigationLabel: string;
21
67
  contextLabel: string;
22
68
  utilityLabel: string;
23
69
  utilityMode: AppShellUtilityMode;
24
70
  utilitySide: AppShellUtilitySide;
71
+ panelCollapse: AppShellPanelCollapse;
72
+ primaryRailLabel: string;
73
+ navigationPanelLabel?: string;
74
+ contextPanelLabel?: string;
75
+ utilityPanelLabel?: string;
25
76
  classInput?: string;
77
+ panelResize: boolean;
78
+ panelWidths?: Partial<Record<AppShellPanelKey, number>>;
79
+ defaultPanelWidths?: Partial<Record<AppShellPanelKey, number>>;
80
+ onPanelResize?: (key: AppShellPanelKey, width: number) => void;
81
+ panelMinWidth: number;
82
+ panelMaxWidth: number;
83
+ private navigationPanelRef?;
84
+ private contextPanelRef?;
85
+ private utilityPanelRef?;
86
+ private internalWidths?;
87
+ private dragKey;
88
+ private dragPositive;
89
+ private dragStartX;
90
+ private dragStartWidth;
91
+ primaryRailPanelOpen: boolean;
92
+ navigationPanelOpen: boolean;
93
+ contextPanelOpen: boolean;
94
+ utilityPanelOpen: boolean;
95
+ readonly primaryRailTriggerId = "st-appShell-primaryRail-trigger";
96
+ readonly primaryRailRegionId = "st-appShell-primaryRail-region";
97
+ readonly navigationPanelTriggerId = "st-appShell-navigationPanel-trigger";
98
+ readonly navigationPanelRegionId = "st-appShell-navigationPanel-region";
99
+ readonly contextPanelTriggerId = "st-appShell-contextPanel-trigger";
100
+ readonly contextPanelRegionId = "st-appShell-contextPanel-region";
101
+ readonly utilityPanelTriggerId = "st-appShell-utilityPanel-trigger";
102
+ readonly utilityPanelRegionId = "st-appShell-utilityPanel-region";
26
103
  get hostClass(): string;
104
+ get navigationPanelLabelResolved(): string;
105
+ get contextPanelLabelResolved(): string;
106
+ get utilityPanelLabelResolved(): string;
107
+ get primaryRailRegionCollapsed(): boolean;
108
+ get navigationPanelRegionCollapsed(): boolean;
109
+ get contextPanelRegionCollapsed(): boolean;
110
+ get utilityPanelRegionCollapsed(): boolean;
111
+ togglePrimaryRailPanel(): void;
112
+ toggleNavigationPanel(): void;
113
+ toggleContextPanel(): void;
114
+ toggleUtilityPanel(): void;
115
+ private get isWidthControlled();
116
+ private ensureInternalWidths;
117
+ widthFor(key: AppShellPanelKey): number | undefined;
118
+ clampWidth(n: number): number;
119
+ displayWidth(key: AppShellPanelKey): number;
120
+ private panelElFor;
121
+ get utilityPositive(): boolean;
122
+ get panelStyle(): string | null;
123
+ private commitWidth;
124
+ onHandlePointerDown(event: PointerEvent, key: AppShellPanelKey, positive: boolean): void;
125
+ onHandlePointerMove(event: PointerEvent): void;
126
+ onHandlePointerUp(event: PointerEvent): void;
127
+ onHandleKeydown(event: KeyboardEvent, key: AppShellPanelKey, positive: boolean): void;
27
128
  static ɵfac: i0.ɵɵFactoryDeclaration<AppShell, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<AppShell, "st-app-shell", never, { "variant": { "alias": "variant"; "required": false; }; "mainId": { "alias": "mainId"; "required": false; }; "navigationLabel": { "alias": "navigationLabel"; "required": false; }; "contextLabel": { "alias": "contextLabel"; "required": false; }; "utilityLabel": { "alias": "utilityLabel"; "required": false; }; "utilityMode": { "alias": "utilityMode"; "required": false; }; "utilitySide": { "alias": "utilitySide"; "required": false; }; "classInput": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
129
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppShell, "st-app-shell", never, { "variant": { "alias": "variant"; "required": false; }; "topChrome": { "alias": "topChrome"; "required": false; }; "primaryRail": { "alias": "primaryRail"; "required": false; }; "navigationPanel": { "alias": "navigationPanel"; "required": false; }; "contextPanel": { "alias": "contextPanel"; "required": false; }; "utilityPanel": { "alias": "utilityPanel"; "required": false; }; "bottomPanel": { "alias": "bottomPanel"; "required": false; }; "mainId": { "alias": "mainId"; "required": false; }; "navigationLabel": { "alias": "navigationLabel"; "required": false; }; "contextLabel": { "alias": "contextLabel"; "required": false; }; "utilityLabel": { "alias": "utilityLabel"; "required": false; }; "utilityMode": { "alias": "utilityMode"; "required": false; }; "utilitySide": { "alias": "utilitySide"; "required": false; }; "panelCollapse": { "alias": "panelCollapse"; "required": false; }; "primaryRailLabel": { "alias": "primaryRailLabel"; "required": false; }; "navigationPanelLabel": { "alias": "navigationPanelLabel"; "required": false; }; "contextPanelLabel": { "alias": "contextPanelLabel"; "required": false; }; "utilityPanelLabel": { "alias": "utilityPanelLabel"; "required": false; }; "classInput": { "alias": "class"; "required": false; }; "panelResize": { "alias": "panelResize"; "required": false; }; "panelWidths": { "alias": "panelWidths"; "required": false; }; "defaultPanelWidths": { "alias": "defaultPanelWidths"; "required": false; }; "onPanelResize": { "alias": "onPanelResize"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; }; }, {}, never, ["*", "[slot=topChrome]", "[slot=primaryRail]", "[slot=navigationPanel]", "[slot=main]", "[slot=contextPanel]", "[slot=utilityPanel]", "[slot=bottomPanel]"], true, never>;
29
130
  }
30
131
  //# sourceMappingURL=AppShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../src/AppShell.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qBASa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,eAAe,cAAc;IAC7C,QAAQ,CAAC,aAAa,cAAc;IACzB,OAAO,EAAE,eAAe,CAAe;IACvC,MAAM,SAAU;IAChB,eAAe,SAA0B;IACzC,YAAY,SAAmB;IAC/B,YAAY,SAAmB;IAC/B,WAAW,EAAE,mBAAmB,CAAa;IAC7C,WAAW,EAAE,mBAAmB,CAAW;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEtC,IAAI,SAAS,IAAI,MAAM,CAEtB;yCAdU,QAAQ;2CAAR,QAAQ;CAepB"}
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../src/AppShell.ts"],"names":[],"mappings":";AAKA,MAAM,MAAM,eAAe,GAAG,MA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