@besaitech/ng-design-system 0.0.11 → 0.0.26

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/index.d.ts CHANGED
@@ -10,6 +10,15 @@ import * as _besaitech_ng_design_system from '@besaitech/ng-design-system';
10
10
  * Add new icons here and they become available everywhere via name="...".
11
11
  */
12
12
  declare const SDS_ICONS: {
13
+ readonly 'chart-column': "<path d=\"M3 3v16a2 2 0 0 0 2 2h16\"/><path d=\"M18 17V9\"/><path d=\"M13 17V5\"/><path d=\"M8 17v-3\"/>";
14
+ readonly 'clipboard-list': "<rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"/><path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"/><path d=\"M12 11h4\"/><path d=\"M12 16h4\"/><path d=\"M8 11h.01\"/><path d=\"M8 16h.01\"/>";
15
+ readonly 'credit-card': "<rect width=\"20\" height=\"14\" x=\"2\" y=\"5\" rx=\"2\"/><line x1=\"2\" x2=\"22\" y1=\"10\" y2=\"10\"/>";
16
+ readonly 'external-link': "<path d=\"M15 3h6v6\"/><path d=\"M10 14 21 3\"/><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/>";
17
+ readonly languages: "<path d=\"m5 8 6 6\"/><path d=\"m4 14 6-6 2-3\"/><path d=\"M2 5h12\"/><path d=\"M7 2h1\"/><path d=\"m22 22-5-10-5 10\"/><path d=\"M14 18h6\"/>";
18
+ readonly megaphone: "<path d=\"m3 11 18-5v12L3 14v-3z\"/><path d=\"M11.6 16.8a3 3 0 1 1-5.8-1.6\"/>";
19
+ readonly monitor: "<rect width=\"20\" height=\"14\" x=\"2\" y=\"3\" rx=\"2\"/><line x1=\"8\" x2=\"16\" y1=\"21\" y2=\"21\"/><line x1=\"12\" x2=\"12\" y1=\"17\" y2=\"21\"/>";
20
+ readonly store: "<path d=\"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7\"/><path d=\"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8\"/><path d=\"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4\"/><path d=\"M2 7h20\"/><path d=\"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7\"/>";
21
+ readonly 'user-round': "<circle cx=\"12\" cy=\"8\" r=\"5\"/><path d=\"M20 21a8 8 0 0 0-16 0\"/>";
13
22
  readonly home: "<path d=\"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/><polyline points=\"9 22 9 12 15 12 15 22\"/>";
14
23
  readonly 'user-plus': "<path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><line x1=\"19\" x2=\"19\" y1=\"8\" y2=\"14\"/><line x1=\"22\" x2=\"16\" y1=\"11\" y2=\"11\"/>";
15
24
  readonly hand: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-hand-icon lucide-hand\"><path d=\"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2\"/><path d=\"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2\"/><path d=\"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8\"/><path d=\"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15\"/></svg>";
@@ -57,6 +66,7 @@ declare const SDS_ICONS: {
57
66
  readonly filter: "<polygon points=\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\"/>";
58
67
  readonly table: "<path d=\"M12 3v18\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/><path d=\"M3 15h18\"/>";
59
68
  readonly eye: "<path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>";
69
+ readonly 'eye-off': "<path d=\"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\"/><path d=\"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\"/><path d=\"m2 2 20 20\"/><path d=\"M14.12 14.12a3 3 0 1 1-4.24-4.24\"/>";
60
70
  readonly user: "<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>";
61
71
  readonly 'check-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12 2 2 4-4\"/>";
62
72
  readonly 'arrows-clockwise': "<path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/><path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M3 21v-5h5\"/>";
@@ -82,7 +92,7 @@ type SdsIconSize = 'sm' | 'md' | 'lg' | 'xl';
82
92
  declare class SdsIcon {
83
93
  private readonly sanitizer;
84
94
  /** Icon identifier from the registry. */
85
- readonly name: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle">;
95
+ readonly name: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle">;
86
96
  /** Square size: a pixel number, a numeric string, or a keyword (sm·md·lg·xl). */
87
97
  readonly size: _angular_core.InputSignalWithTransform<number, string | number>;
88
98
  /** Stroke width of the line icon. */
@@ -143,8 +153,23 @@ declare class SdsInput implements ControlValueAccessor {
143
153
  readonly appearance: _angular_core.InputSignal<SdsInputAppearance>;
144
154
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
145
155
  readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
146
- readonly leadingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
147
- readonly trailingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
156
+ readonly leadingIcon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
157
+ readonly trailingIcon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
158
+ /**
159
+ * A CLICKABLE trailing icon, for the affordances that belong to the field itself — password reveal
160
+ * above all. Distinct from {@link trailingIcon}, which is decorative and explicitly
161
+ * `pointer-events-none`; a consumer who needed a working control previously had to abandon
162
+ * `sds-input` and rebuild the whole field, losing the label/error/aria wiring with it.
163
+ *
164
+ * Always pair it with {@link trailingActionLabel} — an icon-only button with no accessible name is
165
+ * unusable by a screen reader. For a toggle, also bind {@link trailingActionPressed}.
166
+ */
167
+ readonly trailingAction: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
168
+ /** Accessible name for {@link trailingAction}. Translate it in the consuming app. */
169
+ readonly trailingActionLabel: _angular_core.InputSignal<string>;
170
+ /** `aria-pressed` for a toggling action (e.g. show/hide password). Null renders no attribute. */
171
+ readonly trailingActionPressed: _angular_core.InputSignal<boolean | null>;
172
+ readonly trailingActionClick: _angular_core.OutputEmitterRef<void>;
148
173
  /** Current value (driven by CVA + user input). */
149
174
  protected readonly value: _angular_core.WritableSignal<string>;
150
175
  private readonly cvaDisabled;
@@ -162,7 +187,7 @@ declare class SdsInput implements ControlValueAccessor {
162
187
  protected onInput(event: Event): void;
163
188
  protected clear(): void;
164
189
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsInput, never>;
165
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsInput, "sds-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
190
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsInput, "sds-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "trailingAction": { "alias": "trailingAction"; "required": false; "isSignal": true; }; "trailingActionLabel": { "alias": "trailingActionLabel"; "required": false; "isSignal": true; }; "trailingActionPressed": { "alias": "trailingActionPressed"; "required": false; "isSignal": true; }; }, { "trailingActionClick": "trailingActionClick"; }, never, never, true, never>;
166
191
  }
167
192
 
168
193
  type SdsTextareaSize = 'sm' | 'md' | 'lg';
@@ -247,9 +272,9 @@ declare class SdsToggleSwitch implements ControlValueAccessor {
247
272
  /** Value emitted/stored when the switch is off. */
248
273
  readonly falseValue: _angular_core.InputSignal<unknown>;
249
274
  /** Icon shown on the knob when checked. */
250
- readonly onIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
275
+ readonly onIcon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
251
276
  /** Icon shown on the knob when unchecked. */
252
- readonly offIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
277
+ readonly offIcon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
253
278
  readonly hint: _angular_core.InputSignal<string>;
254
279
  readonly error: _angular_core.InputSignal<string>;
255
280
  /**
@@ -1441,30 +1466,61 @@ declare class SidebarStore {
1441
1466
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<SidebarStore>;
1442
1467
  }
1443
1468
 
1444
- interface SdsTopbarUser {
1445
- name: string;
1446
- initials?: string;
1447
- status?: SdsAvatarStatus;
1448
- }
1469
+ type SdsTopbarAppearance = 'brand' | 'surface';
1449
1470
  /**
1450
- * Application top bar: brand gradient with a decorative wave, a logo slot,
1451
- * the app name, and the signed-in user with a logout action.
1471
+ * Application top bar: a logo slot, the app name, and three slots the app fills.
1472
+ *
1473
+ * Two appearances. `brand` is the gradient-and-wave bar an internal tool wants. `surface` is white on
1474
+ * a hairline border, for a bar that has to sit under a customer-facing page without dominating it —
1475
+ * a storefront header is a bar, but it is not a banner. The slots and the layout are identical in
1476
+ * both; only the paint differs, so a consumer app gets the same structure without the brand fill.
1477
+ *
1478
+ * It deliberately owns NO account UI. It used to render the signed-in user and a logout button, which
1479
+ * forced every consumer into one shape — no dropdown, no email, no menu, no busy state, and an
1480
+ * icon-only button whose accessible name the library had to guess a language for. What an app needs
1481
+ * beside its own brand bar differs per app, so the bar supplies the surface and the app supplies the
1482
+ * contents: project them into `[sdsActions]`.
1483
+ *
1484
+ * Slots, left to right: `[sdsLogo]`, `[sdsLead]` (beside the name — a location or workspace picker),
1485
+ * `[sdsCenter]` (the flexible middle — a search field), `[sdsActions]` (the right edge).
1452
1486
  *
1453
1487
  * @example
1454
- * <sds-topbar appName="WebApp" [user]="user" (logout)="signOut()">
1488
+ * <sds-topbar appName="WebApp">
1455
1489
  * <img sdsLogo src="logo.svg" alt="" />
1490
+ * <my-address-picker sdsLead />
1491
+ * <my-search sdsCenter />
1492
+ * <my-account-menu sdsActions />
1456
1493
  * </sds-topbar>
1457
1494
  */
1458
1495
  declare class SdsTopbar {
1459
1496
  protected readonly store: SidebarStore;
1460
1497
  readonly appName: _angular_core.InputSignal<string>;
1461
- readonly user: _angular_core.InputSignal<SdsTopbarUser | null>;
1462
- readonly showLogout: _angular_core.InputSignalWithTransform<boolean, unknown>;
1498
+ /**
1499
+ * Width of the bar's CONTENTS, as Tailwind width utilities — e.g. `"w-full max-w-7xl"`.
1500
+ *
1501
+ * The coloured band always spans the viewport; this constrains only what sits on it, so the logo and
1502
+ * the actions line up with a page whose own content is centred at the same width. Default is empty,
1503
+ * i.e. contents run edge to edge, which is right for a full-bleed dashboard shell.
1504
+ *
1505
+ * A class string rather than an enum on purpose: apps already state their content width as a Tailwind
1506
+ * utility, and this way the bar is given the SAME string rather than a name that has to be kept in
1507
+ * sync with it.
1508
+ */
1509
+ readonly contentWidth: _angular_core.InputSignal<string>;
1463
1510
  /** Show the mobile hamburger that toggles the sidebar drawer (< lg). */
1464
1511
  readonly menuButton: _angular_core.InputSignalWithTransform<boolean, unknown>;
1465
- readonly logout: _angular_core.OutputEmitterRef<void>;
1512
+ /**
1513
+ * Accessible name for the hamburger. Defaults to French so nothing changes for existing consumers,
1514
+ * but any app serving more than one language MUST pass a translated value — an icon-only control's
1515
+ * aria-label is its only name, and a hardcoded one is simply wrong in every other locale.
1516
+ */
1517
+ readonly menuLabel: _angular_core.InputSignal<string>;
1518
+ /** `brand` (default) paints the gradient and the wave; `surface` is white on a hairline border. */
1519
+ readonly appearance: _angular_core.InputSignal<SdsTopbarAppearance>;
1520
+ protected readonly shellClasses: _angular_core.Signal<"bg-linear-to-r from-brand-800 via-brand-700 to-brand-600 text-white" | "border-b border-border bg-surface text-ink">;
1521
+ protected readonly menuButtonClasses: _angular_core.Signal<"text-white/85 hover:bg-white/10 hover:text-white focus-visible:ring-white/40" | "text-ink-soft hover:bg-muted hover:text-ink focus-visible:ring-brand-500/40">;
1466
1522
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsTopbar, never>;
1467
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsTopbar, "sds-topbar", never, { "appName": { "alias": "appName"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; "showLogout": { "alias": "showLogout"; "required": false; "isSignal": true; }; "menuButton": { "alias": "menuButton"; "required": false; "isSignal": true; }; }, { "logout": "logout"; }, never, ["[sdsLogo]", "[sdsActions]"], true, never>;
1523
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsTopbar, "sds-topbar", never, { "appName": { "alias": "appName"; "required": false; "isSignal": true; }; "contentWidth": { "alias": "contentWidth"; "required": false; "isSignal": true; }; "menuButton": { "alias": "menuButton"; "required": false; "isSignal": true; }; "menuLabel": { "alias": "menuLabel"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; }, {}, never, ["[sdsLogo]", "[sdsLead]", "[sdsCenter]", "[sdsActions]"], true, never>;
1468
1524
  }
1469
1525
 
1470
1526
  /**
@@ -1499,24 +1555,85 @@ declare class SdsShell {
1499
1555
  */
1500
1556
  declare class SdsSidebar {
1501
1557
  protected readonly store: SidebarStore;
1558
+ /**
1559
+ * Accessible names for the rail's three icon-only controls. French defaults keep existing consumers
1560
+ * unchanged; a multilingual app must pass translated values, since an icon-only button's aria-label
1561
+ * is its only name.
1562
+ */
1563
+ readonly collapseLabel: _angular_core.InputSignal<string>;
1564
+ readonly expandLabel: _angular_core.InputSignal<string>;
1565
+ readonly closeLabel: _angular_core.InputSignal<string>;
1502
1566
  protected readonly collapsed: _angular_core.WritableSignal<boolean>;
1503
1567
  protected readonly mobileOpen: _angular_core.WritableSignal<boolean>;
1504
1568
  /** Desktop rail width (full vs. collapsed); mobile always uses full width. */
1505
1569
  protected readonly railWidth: _angular_core.Signal<"var(--sds-sidebar-w-collapsed)" | "var(--sds-sidebar-w)">;
1506
1570
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsSidebar, never>;
1507
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsSidebar, "sds-sidebar", never, {}, {}, never, ["*", "[sdsFooter]"], true, never>;
1571
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsSidebar, "sds-sidebar", never, { "collapseLabel": { "alias": "collapseLabel"; "required": false; "isSignal": true; }; "expandLabel": { "alias": "expandLabel"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[sdsFooter]"], true, never>;
1508
1572
  }
1509
1573
 
1510
1574
  /**
1511
- * Groups nav items under an optional uppercase section label. The label is
1512
- * hidden (replaced by a divider) when the sidebar is collapsed.
1575
+ * Groups nav items under an optional uppercase section label.
1576
+ *
1577
+ * Two modes:
1578
+ * - **Section** (default) — a static label over its items. The label is replaced by a divider when
1579
+ * the rail is collapsed.
1580
+ * - **Collapsible** (`[collapsible]`) — the label becomes a button that expands and collapses the
1581
+ * group. Set `[basePath]` and the group opens itself whenever the active route is inside it, so a
1582
+ * deep link or a browser Back lands with the right section already open instead of the person
1583
+ * having to find and re-open it.
1584
+ *
1585
+ * Collapsible mode exists because a flat rail stops scaling somewhere around a dozen destinations,
1586
+ * and the alternative — showing every child of every section at once — buries the ones in use.
1587
+ *
1588
+ * On the collapsed desktop rail there is nowhere to put a header, so a collapsible group renders
1589
+ * exactly like a section: divider, children visible. Hiding them there would leave the rail with
1590
+ * unreachable destinations and no affordance to reveal them.
1513
1591
  */
1514
1592
  declare class SdsNavGroup {
1515
1593
  private readonly store;
1594
+ private readonly router;
1516
1595
  readonly label: _angular_core.InputSignal<string>;
1596
+ /** Turn the label into an expand/collapse control. */
1597
+ readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
1598
+ /** Icon for a collapsible header, so it reads at the same weight as the items it sits among. */
1599
+ readonly icon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
1600
+ /**
1601
+ * URL prefix owned by this group, e.g. `/payments`. While the active route starts with it the
1602
+ * group counts as active and opens itself — unless the person has explicitly toggled it since.
1603
+ */
1604
+ readonly basePath: _angular_core.InputSignal<string | null>;
1605
+ /** Emits the new state on every manual toggle. Not emitted for route-driven auto-expansion. */
1606
+ readonly expandedChange: _angular_core.OutputEmitterRef<boolean>;
1607
+ /** Explicit user choice; null means "follow the route". */
1608
+ private readonly manual;
1609
+ private readonly url;
1610
+ /** True while the active route lives inside this group. */
1611
+ protected readonly routeActive: _angular_core.Signal<boolean>;
1612
+ protected readonly expanded: _angular_core.Signal<boolean>;
1517
1613
  protected readonly collapsed: _angular_core.WritableSignal<boolean>;
1614
+ /**
1615
+ * A plain section always shows its items — they carry their own icons, so they survive the collapsed
1616
+ * rail. A collapsible group hides its children there instead: its children are sub-destinations and
1617
+ * typically have no icon, which on an icon-only rail is a row with nothing in it.
1618
+ */
1619
+ protected readonly childrenVisible: _angular_core.Signal<boolean>;
1620
+ /**
1621
+ * One binding rather than `[class]` alongside `[class.hidden]` — mixing a whole-list binding with a
1622
+ * single-class toggle on the same element depends on Angular's styling precedence to resolve, which
1623
+ * is a subtlety no template should rest on.
1624
+ *
1625
+ * The indent rule appears only on an expanded collapsible group on the full-width rail: it is what
1626
+ * shows the children belong to the header above them.
1627
+ */
1628
+ protected readonly childrenClass: _angular_core.Signal<string>;
1629
+ /**
1630
+ * On the collapsed rail there is nothing to expand into, so the toggle always reports "opening" —
1631
+ * the app's handler takes that as the cue to navigate into the section, which is the only useful
1632
+ * meaning the control can have there.
1633
+ */
1634
+ protected toggle(): void;
1518
1635
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsNavGroup, never>;
1519
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsNavGroup, "sds-nav-group", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1636
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsNavGroup, "sds-nav-group", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "basePath": { "alias": "basePath"; "required": false; "isSignal": true; }; }, { "expandedChange": "expandedChange"; }, never, ["*"], true, never>;
1520
1637
  }
1521
1638
 
1522
1639
  /**
@@ -1531,7 +1648,7 @@ declare class SdsNavGroup {
1531
1648
  */
1532
1649
  declare class SdsNavItem {
1533
1650
  protected readonly store: SidebarStore;
1534
- readonly icon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
1651
+ readonly icon: _angular_core.InputSignal<"chart-column" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
1535
1652
  readonly label: _angular_core.InputSignal<string>;
1536
1653
  /** Router link target; when null, the item behaves as a button. */
1537
1654
  readonly link: _angular_core.InputSignal<string | unknown[] | null>;
@@ -1546,4 +1663,4 @@ declare class SdsNavItem {
1546
1663
  }
1547
1664
 
1548
1665
  export { SDS_ICONS, SDS_PHONE_COUNTRIES, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAvatar, SdsBadge, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsDatePicker, SdsIcon, SdsInput, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsPaginator, SdsPhoneInput, SdsSelect, SdsShell, SdsSidebar, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsToggleSwitch, SdsTopbar, SidebarStore, addDays, addMonths, addMonthsKeepDay, formatDdMmYyyy, isOutOfRange, isSameDay, isoDay, sdsFormatNational, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth };
1549
- export type { SdsAccordionActive, SdsAccordionValue, SdsAvatarStatus, SdsBadgeSize, SdsBadgeVariant, SdsButtonSize, SdsButtonVariant, SdsCardVariant, SdsCheckboxSize, SdsDatePickerSize, SdsIconName, SdsIconSize, SdsInputAppearance, SdsInputSize, SdsInputType, SdsMultiSelectDisplay, SdsMultiSelectSize, SdsPaginatorSize, SdsPaginatorState, SdsPhoneCountry, SdsPhoneInputSize, SdsPhoneValue, SdsSelectSize, SdsSortOrder, SdsTabValue, SdsTableCellContext, SdsTableColumn, SdsTableLazyEvent, SdsTableRowExpansionContext, SdsTableSize, SdsTableSortEvent, SdsTextareaResize, SdsTextareaSize, SdsToggleSwitchSize, SdsTopbarUser };
1666
+ export type { SdsAccordionActive, SdsAccordionValue, SdsAvatarStatus, SdsBadgeSize, SdsBadgeVariant, SdsButtonSize, SdsButtonVariant, SdsCardVariant, SdsCheckboxSize, SdsDatePickerSize, SdsIconName, SdsIconSize, SdsInputAppearance, SdsInputSize, SdsInputType, SdsMultiSelectDisplay, SdsMultiSelectSize, SdsPaginatorSize, SdsPaginatorState, SdsPhoneCountry, SdsPhoneInputSize, SdsPhoneValue, SdsSelectSize, SdsSortOrder, SdsTabValue, SdsTableCellContext, SdsTableColumn, SdsTableLazyEvent, SdsTableRowExpansionContext, SdsTableSize, SdsTableSortEvent, SdsTextareaResize, SdsTextareaSize, SdsToggleSwitchSize, SdsTopbarAppearance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besaitech/ng-design-system",
3
- "version": "0.0.11",
3
+ "version": "0.0.26",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -17,9 +17,6 @@
17
17
  },
18
18
  "sideEffects": false,
19
19
  "exports": {
20
- "./preflight.css": {
21
- "default": "./preflight.css"
22
- },
23
20
  "./themes/*": {
24
21
  "default": "./themes/*"
25
22
  },
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Base tokens — everything a component needs that is NOT the brand ramp.
3
+ *
4
+ * WHY THIS FILE EXISTS: the brand preset is only 11 of the library's 26 tokens. The other 15 are
5
+ * surfaces, ink, accents, status and radius, and the components reference them constantly
6
+ * (sds-card is "bg-surface border-border rounded-card", sds-button secondary is
7
+ * "bg-white text-ink border-border hover:bg-muted"). Before this file, every consuming app was told
8
+ * by the README to paste that block by hand — and an app that imported only a brand preset got a
9
+ * page where the brand-coloured things rendered and everything else silently emitted no CSS at all.
10
+ * That failure is invisible in a build log: Tailwind does not warn about a utility whose token is
11
+ * undefined, it just produces nothing.
12
+ *
13
+ * Import it BEFORE the brand preset, and both after `@import "tailwindcss"`:
14
+ *
15
+ * @import "tailwindcss";
16
+ * @source "../node_modules/@besaitech/ng-design-system";
17
+ * @import "@besaitech/ng-design-system/themes/base.css";
18
+ * @import "@besaitech/ng-design-system/themes/belvigo.css";
19
+ *
20
+ * Every value here is a default an app may override in its own `@theme` afterwards — the typeface
21
+ * especially, which is the one token most apps do change.
22
+ */
23
+ @theme {
24
+ /* Neutrals / surfaces */
25
+ --color-canvas: #f5f6f8;
26
+ --color-surface: #ffffff;
27
+ --color-muted: #f8f9fb;
28
+ --color-border: #e6e9f0;
29
+ --color-ink: #1b2440;
30
+ --color-ink-soft: #5b6577;
31
+ --color-ink-faint: #8a93a6;
32
+
33
+ /* Accent icon-tiles (foreground + soft background) */
34
+ --color-accent-blue: #2f6bd4;
35
+ --color-accent-blue-soft: #e8effb;
36
+ --color-accent-green: #1f9d57;
37
+ --color-accent-green-soft: #e6f5ec;
38
+ --color-accent-amber: #e0902a;
39
+ --color-accent-amber-soft: #fdf0dd;
40
+ --color-accent-red: #df4f6b;
41
+ --color-accent-red-soft: #fde7ec;
42
+ --color-accent-indigo: #6c5ce7;
43
+ --color-accent-indigo-soft: #ece9fb;
44
+
45
+ /* Status */
46
+ --color-success: #27c06b;
47
+ --color-warning: #f3b73c;
48
+ --color-danger: #df4f6b;
49
+
50
+ /* Radius */
51
+ --radius-control: 0.5rem;
52
+ --radius-card: 0.75rem;
53
+
54
+ /* Typography — override in your app's own @theme if your brand uses a different face. */
55
+ --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
56
+ }
57
+
58
+ @layer base {
59
+ :root {
60
+ /* Layout dimensions consumed by sds-shell / sds-sidebar. Plain CSS vars, not @theme tokens —
61
+ they are lengths the layout reads, never Tailwind utilities. */
62
+ --sds-topbar-h: 64px;
63
+ --sds-sidebar-w: 256px;
64
+ --sds-sidebar-w-collapsed: 76px;
65
+ }
66
+ }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Saitech theme — the library's original brand blues (StaffKit / Cliniques universitaires Saint-Luc).
2
+ * Saitech theme — the library's original brand blues, and its default.
3
3
  *
4
4
  * This file is the DEFAULT look every consumer got before themes existed, extracted verbatim so that
5
5
  * adding a second brand could not change the first one. If you are looking for the values that used to
package/preflight.css DELETED
@@ -1,113 +0,0 @@
1
- /*
2
- * @besaitech/ng-design-system — scoped Preflight
3
- * ------------------------------------------------------------------
4
- * The library's components are authored against Tailwind's Preflight
5
- * (its base reset). Apps that don't load Preflight — e.g. because they
6
- * also use another global design system (@stlucdesign/saint-luc-design-system)
7
- * and only import `tailwindcss/utilities` — leave the components exposed to
8
- * that other system's bare-element rules (button fonts, `ul{list-style}`,
9
- * `li{margin}`, heading styles, …).
10
- *
11
- * Import this file into a cascade layer that sits ABOVE the legacy design
12
- * system but BELOW Tailwind's `utilities` layer, e.g.:
13
- *
14
- * @layer legacy, ng-design-system-base, theme, utilities;
15
- * @import '@stlucdesign/saint-luc-design-system/style.css' layer(legacy);
16
- * @import '@besaitech/ng-design-system/preflight.css' layer(ng-design-system-base);
17
- * @import 'tailwindcss/theme' layer(theme);
18
- * @import 'tailwindcss/utilities' layer(utilities);
19
- *
20
- * Every rule is scoped to the `sds-*` component subtree, so it never touches
21
- * the host app's own elements. Because it lives below `utilities`, the
22
- * components' own utility classes always win — this only neutralises styles
23
- * the components don't set themselves.
24
- */
25
-
26
- :where(
27
- sds-icon, sds-button, sds-input, sds-textarea, sds-toggle-switch, sds-avatar,
28
- sds-badge, sds-card, sds-calendar, sds-date-picker, sds-select, sds-multi-select,
29
- sds-phone-input, sds-paginator, sds-tabs, sds-tab-list, sds-tab, sds-tab-panels,
30
- sds-tab-panel, sds-accordion, sds-accordion-panel, sds-accordion-header,
31
- sds-accordion-content, sds-table, sds-table-cell, sds-table-row-expansion,
32
- sds-topbar, sds-shell, sds-sidebar, sds-nav-group, sds-nav-item,
33
- /*
34
- * Overlay panels (dropdown lists, country picker) are relocated to
35
- * <body> while open, so they're no longer inside an sds-* element. Scope
36
- * them by their markers so the reset still reaches their <ul>/<li>/buttons.
37
- * The date-picker overlay wraps <sds-calendar> (already covered above).
38
- */
39
- [data-sds-select-panel], [data-sds-phone-panel]
40
- ) {
41
- /* Box model + typography baseline for everything inside a component.
42
- `border: 0 solid` mirrors Tailwind Preflight: components add borders via
43
- utilities, so this strips the legacy `input{border:…}` from native controls. */
44
- & :where(*, *::before, *::after) {
45
- box-sizing: border-box;
46
- border: 0 solid;
47
- font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, sans-serif);
48
- }
49
-
50
- /* Headings: neutralise size/weight/spacing so component utilities define them. */
51
- & :where(h1, h2, h3, h4, h5, h6) {
52
- font-size: inherit;
53
- font-weight: inherit;
54
- line-height: inherit;
55
- margin: 0;
56
- }
57
-
58
- /* Block text. */
59
- & :where(p, figure, blockquote, dl, dd) {
60
- margin: 0;
61
- }
62
-
63
- /* Lists: strip bullets and default spacing (counters ul{list-style:disc}, li{margin}). */
64
- & :where(ul, ol) {
65
- list-style: none;
66
- margin: 0;
67
- padding: 0;
68
- }
69
- & :where(li) {
70
- margin: 0;
71
- }
72
-
73
- /* Form controls: inherit typography instead of the host's button/input rules. */
74
- & :where(button, input, optgroup, select, textarea) {
75
- font: inherit;
76
- color: inherit;
77
- letter-spacing: inherit;
78
- }
79
- & :where(button) {
80
- background: none;
81
- border: 0;
82
- margin: 0;
83
- padding: 0;
84
- cursor: pointer;
85
- }
86
-
87
- /* Links. */
88
- & :where(a) {
89
- color: inherit;
90
- text-decoration: inherit;
91
- }
92
-
93
- /* Media. */
94
- & :where(img, svg, video, canvas) {
95
- display: block;
96
- vertical-align: middle;
97
- }
98
- }
99
-
100
- /*
101
- * sds-icon renders line icons as inline SVG with `fill="none"` and
102
- * `stroke="currentColor"` set as *attributes*. A host `svg { fill: currentColor }`
103
- * rule (e.g. from @stlucdesign/saint-luc-design-system) overrides those attributes
104
- * and flood-fills every icon. Re-assert them here. Anchored on `sds-icon` so it also
105
- * covers icons inside body-relocated overlay panels. Inner shapes that opt into a
106
- * fill via their own `fill="currentColor"` attribute (e.g. dots) are unaffected.
107
- */
108
- :where(sds-icon) svg {
109
- width: 100%;
110
- height: 100%;
111
- fill: none;
112
- stroke: currentColor;
113
- }