@4sh/ui-kit 0.1.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.
Files changed (202) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +7 -0
  3. package/README.md +229 -0
  4. package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
  5. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
  6. package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
  7. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
  8. package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
  9. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
  10. package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
  11. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
  12. package/fesm2022/4sh-ui-kit-types.mjs +12 -0
  13. package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
  14. package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
  15. package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
  16. package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
  17. package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
  18. package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
  19. package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
  20. package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
  21. package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
  22. package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
  23. package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
  24. package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
  25. package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
  26. package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
  27. package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
  28. package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
  29. package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
  30. package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
  31. package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
  32. package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
  33. package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
  34. package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
  35. package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
  36. package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
  37. package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
  38. package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
  39. package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
  40. package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
  41. package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
  42. package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
  43. package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
  44. package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
  45. package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
  46. package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
  47. package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
  48. package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
  49. package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
  50. package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
  51. package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
  52. package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
  53. package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
  54. package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
  55. package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
  56. package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
  57. package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
  58. package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
  59. package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
  61. package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
  62. package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
  63. package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
  64. package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
  65. package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
  66. package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
  67. package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
  68. package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
  69. package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
  70. package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
  71. package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
  72. package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
  73. package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
  74. package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
  75. package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
  76. package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
  77. package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
  78. package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
  79. package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
  80. package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
  81. package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
  82. package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
  83. package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
  84. package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
  85. package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
  86. package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
  87. package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
  88. package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
  89. package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
  90. package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
  91. package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
  92. package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
  93. package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
  94. package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
  95. package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
  96. package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
  97. package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
  99. package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
  100. package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
  101. package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
  102. package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
  103. package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
  104. package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
  105. package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
  106. package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
  107. package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
  108. package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
  109. package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
  110. package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
  111. package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
  112. package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
  113. package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
  114. package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
  115. package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
  116. package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
  117. package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
  118. package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
  119. package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
  120. package/fesm2022/4sh-ui-kit.mjs +16 -0
  121. package/fesm2022/4sh-ui-kit.mjs.map +1 -0
  122. package/package.json +287 -0
  123. package/styles/base/_base.scss +19 -0
  124. package/styles/base/_motion.scss +144 -0
  125. package/styles/base/_typography.scss +99 -0
  126. package/styles/generated/_tokens-breakpoint.scss +8 -0
  127. package/styles/generated/_tokens-metrics.scss +37 -0
  128. package/styles/generated/_tokens-primitives.scss +284 -0
  129. package/styles/generated/_tokens-responsive.scss +99 -0
  130. package/styles/generated/_tokens-semantics.scss +1274 -0
  131. package/styles/generated/_tokens-styles.scss +35 -0
  132. package/styles/generated/_tokens-transitions.scss +11 -0
  133. package/styles/generated/_tokens-typography.scss +14 -0
  134. package/styles/generated/_tokens.scss +10 -0
  135. package/styles/index.scss +25 -0
  136. package/styles/settings/_ui-config.scss +67 -0
  137. package/styles/utils/_functions.scss +67 -0
  138. package/styles/utils/_helpers.scss +129 -0
  139. package/styles/utils/_mixins.scss +186 -0
  140. package/styles/utils/_motion.scss +47 -0
  141. package/styles/utils/_overlay.scss +26 -0
  142. package/styles/utils.scss +15 -0
  143. package/styles.css +1 -0
  144. package/types/4sh-ui-kit-forms.d.ts +259 -0
  145. package/types/4sh-ui-kit-motion.d.ts +111 -0
  146. package/types/4sh-ui-kit-overlay.d.ts +31 -0
  147. package/types/4sh-ui-kit-theming.d.ts +54 -0
  148. package/types/4sh-ui-kit-types.d.ts +13 -0
  149. package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
  150. package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
  151. package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
  152. package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
  153. package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
  154. package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
  155. package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
  156. package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
  157. package/types/4sh-ui-kit-ui-button.d.ts +91 -0
  158. package/types/4sh-ui-kit-ui-card.d.ts +102 -0
  159. package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
  160. package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
  161. package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
  162. package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
  163. package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
  164. package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
  165. package/types/4sh-ui-kit-ui-field.d.ts +53 -0
  166. package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
  167. package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
  168. package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
  169. package/types/4sh-ui-kit-ui-image.d.ts +88 -0
  170. package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
  171. package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
  172. package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
  173. package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
  174. package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
  175. package/types/4sh-ui-kit-ui-input.d.ts +78 -0
  176. package/types/4sh-ui-kit-ui-label.d.ts +36 -0
  177. package/types/4sh-ui-kit-ui-link.d.ts +72 -0
  178. package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
  179. package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
  180. package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
  181. package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
  182. package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
  183. package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
  184. package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
  185. package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
  186. package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
  187. package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
  188. package/types/4sh-ui-kit-ui-select.d.ts +392 -0
  189. package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
  190. package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
  191. package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
  192. package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
  193. package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
  194. package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
  195. package/types/4sh-ui-kit-ui-table.d.ts +570 -0
  196. package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
  197. package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
  198. package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
  199. package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
  200. package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
  201. package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
  202. package/types/4sh-ui-kit.d.ts +4 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Auto-dismiss shared by every floating panel of the kit (menu, context menu,
3
+ * popover, select, autocomplete, input-tags, datepicker, tooltip).
4
+ *
5
+ * A CDK overlay lives in `body`, outside the routed view: it only disappears
6
+ * when its host component is destroyed. A panel whose host survives the
7
+ * navigation — declared in an app shell (header, sidebar, layout) — therefore
8
+ * stays on screen over the next page, and lands in the top-left corner as soon
9
+ * as it is re-positioned, because its anchor left the DOM with the previous
10
+ * page (a detached element measures 0×0 at the viewport origin).
11
+ *
12
+ * Call it from the component's constructor (injection context); the
13
+ * subscription is torn down with the component.
14
+ *
15
+ * ```ts
16
+ * constructor() {
17
+ * closeOnNavigation(() => this.close(false));
18
+ * }
19
+ * ```
20
+ *
21
+ * Only **page** changes dismiss the panel: a navigation that merely rewrites
22
+ * the query string or the fragment (filters, pagination, deep-link state
23
+ * pushed by the panel itself) leaves it open. Without a `Router` in the
24
+ * injector (kit used outside a routed app), this is a no-op.
25
+ *
26
+ * @param close Closing callback — must be idempotent (it may fire on a panel
27
+ * that is already closed) and must not steal focus, the navigation owns it.
28
+ */
29
+ declare function closeOnNavigation(close: () => void): void;
30
+
31
+ export { closeOnNavigation };
@@ -0,0 +1,54 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Provider } from '@angular/core';
3
+
4
+ type ThemeMode = 'light' | 'dark';
5
+ /**
6
+ * Manages light/dark mode via the `[data-theme]` attribute on <html>,
7
+ * aligned with the generated tokens (semantics: modeLight → :root, modeDark → [data-theme='dark']).
8
+ */
9
+ declare class ThemeService {
10
+ private document;
11
+ readonly currentMode: i0.WritableSignal<ThemeMode>;
12
+ constructor();
13
+ toggle(): void;
14
+ get isDark(): boolean;
15
+ private getStoredMode;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
18
+ }
19
+
20
+ type Brand = 'brand1' | 'brand2' | 'brand3';
21
+ /**
22
+ * Brand the application starts on. Optional — defaults to `brand1`.
23
+ *
24
+ * The kit deliberately does NOT detect the brand itself: how a project picks
25
+ * its brand (subdomain, user setting, backend config…) is an application
26
+ * concern. Provide it with `provideUiKitBrand()`.
27
+ */
28
+ declare const UI_KIT_INITIAL_BRAND: InjectionToken<Brand>;
29
+ /** Maps a subdomain segment (e.g. "themetwo") to a brand — `brand1` when unknown. */
30
+ declare function brandFromSubdomain(subdomain: string): Brand;
31
+ /**
32
+ * Sets the initial brand of the application.
33
+ *
34
+ * ```ts
35
+ * providers: [provideUiKitBrand(brandFromSubdomain(subdomain))]
36
+ * ```
37
+ */
38
+ declare function provideUiKitBrand(brand: Brand): Provider;
39
+ /**
40
+ * Manages the active brand via the `[data-brand]` attribute on <html>.
41
+ * brand1 = default (:root, no attribute). brand2/brand3 override the
42
+ * `--primitives-*` variables, which propagates to the semantics (which reference them).
43
+ */
44
+ declare class BrandService {
45
+ private document;
46
+ readonly currentBrand: i0.WritableSignal<Brand>;
47
+ constructor();
48
+ set(brand: Brand): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrandService, never>;
50
+ static ɵprov: i0.ɵɵInjectableDeclaration<BrandService>;
51
+ }
52
+
53
+ export { BrandService, ThemeService, UI_KIT_INITIAL_BRAND, brandFromSubdomain, provideUiKitBrand };
54
+ export type { Brand, ThemeMode };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Semantic level shared by the `ui-*` components.
3
+ * Mapped to the design system's `--actions-{level}-*` / `--token-*` tokens.
4
+ */
5
+ type UiLevel = 'high' | 'low' | 'success' | 'warning' | 'error';
6
+ /** Hierarchical sub-level (intensity). */
7
+ type UiSubLevel = 'high' | 'low';
8
+ /**
9
+ * Level of informative feedback
10
+ */
11
+ type UiFeedbackLevel = 'default' | 'highlight' | Extract<UiLevel, 'success' | 'warning' | 'error'>;
12
+
13
+ export type { UiFeedbackLevel, UiLevel, UiSubLevel };
@@ -0,0 +1,140 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ElementRef } from '@angular/core';
3
+
4
+ /** Identifier of a panel within an accordion (its `value`). */
5
+ type UiAccordionValue = string | number;
6
+ /** Active value(s): a single value (single mode) or an array (multiple mode). */
7
+ type UiAccordionActiveValue = UiAccordionValue | UiAccordionValue[] | null | undefined;
8
+ /** Payload of the accordion open/close outputs. */
9
+ interface UiAccordionChangeEvent {
10
+ /** Value of the panel that opened or closed. */
11
+ value: UiAccordionValue;
12
+ /** Originating DOM event (click / keyboard / focus). */
13
+ originalEvent: Event;
14
+ }
15
+ /**
16
+ * Header slot marker — apply it (attribute or element form) on the content that
17
+ * should sit in a panel's header. Optional: the `header` string input is a
18
+ * shorthand for a plain-text title.
19
+ *
20
+ * <ui-accordion-panel value="0">
21
+ * <span uiAccordionHeader>Rich <b>title</b></span>
22
+ * Body content (default slot)…
23
+ * </ui-accordion-panel>
24
+ */
25
+ declare class UiAccordionHeader {
26
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAccordionHeader, never>;
27
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiAccordionHeader, "[uiAccordionHeader], ui-accordion-header", never, {}, {}, never, never, true, never>;
28
+ }
29
+ /**
30
+ * Content slot marker (optional) — the panel body is the **default** projection,
31
+ * so this is only needed to disambiguate. Kept for symmetry with the header slot.
32
+ */
33
+ declare class UiAccordionContent {
34
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAccordionContent, never>;
35
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiAccordionContent, "[uiAccordionContent], ui-accordion-content", never, {}, {}, never, never, true, never>;
36
+ }
37
+ /**
38
+ * ui-accordion-panel — a single collapsible section of a {@link UiAccordion}.
39
+ *
40
+ * The whole header is a native `<button>` (WAI-ARIA accordion pattern): clicking
41
+ * anywhere on it toggles the panel; the chevron is a decorative affordance styled
42
+ * as the Figma control. The body region stays in the DOM but is `inert` and
43
+ * height-collapsed when closed (form state preserved, hidden from AT).
44
+ *
45
+ * Declared before {@link UiAccordion} so the container's content query can
46
+ * reference it without a temporal-dead-zone error at class-definition time.
47
+ */
48
+ declare class UiAccordionPanel {
49
+ /** Unique identifier of the panel (matched against the accordion `value`). */
50
+ value: _angular_core.InputSignal<UiAccordionValue>;
51
+ /** Plain-text header shorthand (use the `uiAccordionHeader` slot for rich content). */
52
+ header: _angular_core.InputSignal<string | undefined>;
53
+ /** Disable the panel (not toggleable, skipped by keyboard navigation). */
54
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
55
+ /** Per-panel override for the header divider (falls back to the group default). */
56
+ separator: _angular_core.InputSignal<boolean | undefined>;
57
+ /** Per-panel override for the chevron control (falls back to the group default). */
58
+ control: _angular_core.InputSignal<boolean | undefined>;
59
+ /** @ignore Parent accordion (owns the open state + group defaults). */
60
+ protected readonly accordion: UiAccordion;
61
+ /** @ignore */
62
+ readonly headerButton: _angular_core.Signal<ElementRef<HTMLButtonElement>>;
63
+ /** @ignore */
64
+ private readonly uid;
65
+ /** @ignore */
66
+ protected readonly headerId: string;
67
+ /** @ignore */
68
+ protected readonly contentId: string;
69
+ /** @ignore */
70
+ protected readonly active: _angular_core.Signal<boolean>;
71
+ /** @ignore */
72
+ protected readonly icon: _angular_core.Signal<string>;
73
+ /** @ignore */
74
+ protected readonly showSeparator: _angular_core.Signal<boolean>;
75
+ /** @ignore */
76
+ protected readonly showControl: _angular_core.Signal<boolean>;
77
+ /** Move focus to this panel's header. */
78
+ focus(): void;
79
+ /** @ignore */
80
+ protected toggle(event: Event): void;
81
+ /** @ignore */
82
+ protected onFocus(event: FocusEvent): void;
83
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAccordionPanel, never>;
84
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiAccordionPanel, "ui-accordion-panel", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; }, {}, never, ["[uiAccordionHeader], ui-accordion-header", "*"], true, never>;
85
+ }
86
+ /**
87
+ * ui-accordion — container grouping a set of collapsible {@link UiAccordionPanel}s.
88
+ *
89
+ * Headless (composition API inspired by PrimeNG `p-accordion`): it owns the open
90
+ * state (`value` two-way model, `single` or `multiple`), roving-focus keyboard
91
+ * navigation across headers (Up/Down/Home/End), and the group-level defaults
92
+ * (`separator`, `control`, expand/collapse icons, `motion`).
93
+ *
94
+ * @example
95
+ * ```html
96
+ * <ui-accordion [(value)]="open" [multiple]="true">
97
+ * <ui-accordion-panel value="a" header="Section A">Contenu A…</ui-accordion-panel>
98
+ * <ui-accordion-panel value="b" header="Section B">Contenu B…</ui-accordion-panel>
99
+ * </ui-accordion>
100
+ * ```
101
+ */
102
+ declare class UiAccordion {
103
+ /** Active panel value(s). Single mode: one value; `multiple`: an array. */
104
+ value: _angular_core.ModelSignal<UiAccordionActiveValue>;
105
+ /** Allow several panels open at once (value becomes an array). */
106
+ multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
107
+ /** Open a panel as soon as its header receives focus. */
108
+ selectOnFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
109
+ /** Group default: render the divider under each header. Overridable per panel. */
110
+ separator: _angular_core.InputSignalWithTransform<boolean, unknown>;
111
+ /** Group default: render the chevron control on each header. Overridable per panel. */
112
+ control: _angular_core.InputSignalWithTransform<boolean, unknown>;
113
+ /** Icon shown on a collapsed panel. */
114
+ expandIcon: _angular_core.InputSignal<string>;
115
+ /** Icon shown on an expanded panel. */
116
+ collapseIcon: _angular_core.InputSignal<string>;
117
+ /** Animate the expand/collapse transition (honours reduced-motion regardless). */
118
+ motion: _angular_core.InputSignalWithTransform<boolean, unknown>;
119
+ /** Fired when a panel is expanded. */
120
+ opened: _angular_core.OutputEmitterRef<UiAccordionChangeEvent>;
121
+ /** Fired when a panel is collapsed. */
122
+ closed: _angular_core.OutputEmitterRef<UiAccordionChangeEvent>;
123
+ /** @ignore Projected panels (for keyboard roving focus). */
124
+ private readonly panels;
125
+ /** @ignore Whether the given panel value is currently active. */
126
+ isActive(value: UiAccordionValue): boolean;
127
+ /** @ignore Toggle a panel (single mode allows closing the active one). */
128
+ toggle(value: UiAccordionValue, event: Event): void;
129
+ /** @ignore Open a panel if it is not already open (used by `selectOnFocus`). */
130
+ open(value: UiAccordionValue, event: Event): void;
131
+ /** @ignore */
132
+ private setActive;
133
+ /** @ignore Roving focus across enabled headers (WAI-ARIA accordion pattern). */
134
+ protected onKeydown(event: KeyboardEvent): void;
135
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAccordion, never>;
136
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiAccordion, "ui-accordion", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "selectOnFocus": { "alias": "selectOnFocus"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "expandIcon": { "alias": "expandIcon"; "required": false; "isSignal": true; }; "collapseIcon": { "alias": "collapseIcon"; "required": false; "isSignal": true; }; "motion": { "alias": "motion"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "opened": "opened"; "closed": "closed"; }, ["panels"], ["*"], true, never>;
137
+ }
138
+
139
+ export { UiAccordion, UiAccordionContent, UiAccordionHeader, UiAccordionPanel };
140
+ export type { UiAccordionActiveValue, UiAccordionChangeEvent, UiAccordionValue };
@@ -0,0 +1,89 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';
3
+
4
+ /** Rendered scale of an alert. `default` = base, `large` = comfortable. */
5
+ type UiAlertSize = 'default' | 'large';
6
+ /**
7
+ * Default leading icon per semantic level (FontAwesome names, from the Figma
8
+ * source). Overridable per instance through the `icon` input.
9
+ */
10
+ declare const UI_ALERT_DEFAULT_ICONS: Record<UiFeedbackLevel, string>;
11
+
12
+ /**
13
+ * ui-alert — inline message for informational, success, warning or error feedback.
14
+ *
15
+ * Headless & fully token-driven (the `informative` category): surface, content
16
+ * and stroke all come from `--informative-{level}{sub}-*`. It renders the Figma
17
+ * anatomy (leading icon · title/text · dismiss button) and projects `<ng-content>`
18
+ * in the content region for custom bodies or action buttons.
19
+ *
20
+ * The root carries `role="alert"` (implicit `aria-live="assertive"` +
21
+ * `aria-atomic="true"`), so screen readers announce it as soon as it appears —
22
+ * ideal for form validation summaries or transient status banners. Set `life`
23
+ * to auto-dismiss after a delay; the alert hides itself and emits `closed`.
24
+ *
25
+ * Unlike {@link UiToast} (a floating, service-driven notification), `ui-alert`
26
+ * is a plain inline block — drop it in the page flow, a form, or a `@for` loop.
27
+ *
28
+ * @example
29
+ * ```html
30
+ * <ui-alert level="error" title="Erreur" text="Le formulaire est invalide." />
31
+ * <ui-alert level="success" text="Enregistré." [life]="4000" (closed)="onClose()" />
32
+ * ```
33
+ */
34
+ declare class UiAlert {
35
+ private readonly destroyRef;
36
+ /** Bold heading line. */
37
+ title: _angular_core.InputSignal<string | undefined>;
38
+ /** Supporting body line. */
39
+ text: _angular_core.InputSignal<string | undefined>;
40
+ /** Semantic level — colours + default icon. */
41
+ level: _angular_core.InputSignal<UiFeedbackLevel>;
42
+ /** Hierarchical intensity (`high` = solid, `low` = subtle). */
43
+ subLevel: _angular_core.InputSignal<UiSubLevel>;
44
+ /** Rendered scale (`default` | `large`). */
45
+ size: _angular_core.InputSignal<UiAlertSize>;
46
+ /**
47
+ * Leading icon: a FontAwesome name to override the level default, `false`
48
+ * to hide it, or `true` (default) for the level's default icon.
49
+ */
50
+ icon: _angular_core.InputSignal<string | boolean>;
51
+ /** Show the dismiss button (default `true`). */
52
+ closable: _angular_core.InputSignalWithTransform<boolean, unknown>;
53
+ /** FontAwesome name of the dismiss icon. */
54
+ closeIcon: _angular_core.InputSignal<string>;
55
+ /** Accessible label of the dismiss button. */
56
+ closeAriaLabel: _angular_core.InputSignal<string>;
57
+ /** Auto-dismiss delay in ms. `0` (default) never auto-dismisses. */
58
+ life: _angular_core.InputSignalWithTransform<number, unknown>;
59
+ /** Accessible label of the alert region (screen readers). */
60
+ ariaLabel: _angular_core.InputSignal<string | undefined>;
61
+ /** id of the element labelling the alert region. */
62
+ ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
63
+ /** Extra class(es) merged onto the alert root. */
64
+ styleClass: _angular_core.InputSignal<string | undefined>;
65
+ /** Emitted when the alert is dismissed (close button or `life` expiry). */
66
+ closed: _angular_core.OutputEmitterRef<void>;
67
+ /** @ignore Hidden after a dismiss so the close button works standalone. */
68
+ protected readonly dismissed: _angular_core.WritableSignal<boolean>;
69
+ /** @ignore Resolved leading icon name (null when hidden). */
70
+ protected readonly iconName: _angular_core.Signal<string | null>;
71
+ /** @ignore Leading icon size follows the alert size (Figma). */
72
+ protected readonly iconSize: _angular_core.Signal<"default" | "md">;
73
+ /** @ignore Dismiss icon size follows the alert size (Figma). */
74
+ protected readonly closeIconSize: _angular_core.Signal<"md" | "sm">;
75
+ /** @ignore Alert has only a title (no text, no projected content). */
76
+ protected readonly isTitleOnly: _angular_core.Signal<boolean>;
77
+ /** @ignore */
78
+ protected readonly classes: _angular_core.Signal<string>;
79
+ constructor();
80
+ /** @ignore */
81
+ protected onClose(): void;
82
+ /** @ignore Hide the alert and notify the parent. */
83
+ private dismiss;
84
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAlert, never>;
85
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiAlert, "ui-alert", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "subLevel": { "alias": "subLevel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeIcon": { "alias": "closeIcon"; "required": false; "isSignal": true; }; "closeAriaLabel": { "alias": "closeAriaLabel"; "required": false; "isSignal": true; }; "life": { "alias": "life"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
86
+ }
87
+
88
+ export { UI_ALERT_DEFAULT_ICONS, UiAlert };
89
+ export type { UiAlertSize };