@cdevhub/ngx-tw 0.2.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 (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/fesm2022/cdevhub-ngx-tw-accordion.mjs +108 -0
  4. package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -0
  5. package/fesm2022/cdevhub-ngx-tw-alert.mjs +240 -0
  6. package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -0
  7. package/fesm2022/cdevhub-ngx-tw-avatar.mjs +287 -0
  8. package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -0
  9. package/fesm2022/cdevhub-ngx-tw-badge.mjs +332 -0
  10. package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -0
  11. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +452 -0
  12. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -0
  13. package/fesm2022/cdevhub-ngx-tw-button.mjs +227 -0
  14. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -0
  15. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +417 -0
  16. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -0
  17. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +232 -0
  18. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -0
  19. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +4482 -0
  20. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -0
  21. package/fesm2022/cdevhub-ngx-tw-card.mjs +157 -0
  22. package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -0
  23. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +1454 -0
  24. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -0
  25. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +593 -0
  26. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -0
  27. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +228 -0
  28. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -0
  29. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +510 -0
  30. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -0
  31. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +1721 -0
  32. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -0
  33. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +721 -0
  34. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -0
  35. package/fesm2022/cdevhub-ngx-tw-core.mjs +861 -0
  36. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -0
  37. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +1558 -0
  38. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -0
  39. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +1833 -0
  40. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -0
  41. package/fesm2022/cdevhub-ngx-tw-dialog.mjs +693 -0
  42. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -0
  43. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +331 -0
  44. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -0
  45. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +289 -0
  46. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -0
  47. package/fesm2022/cdevhub-ngx-tw-form-field.mjs +572 -0
  48. package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -0
  49. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +36 -0
  50. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -0
  51. package/fesm2022/cdevhub-ngx-tw-icon.mjs +278 -0
  52. package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -0
  53. package/fesm2022/cdevhub-ngx-tw-input.mjs +355 -0
  54. package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -0
  55. package/fesm2022/cdevhub-ngx-tw-item.mjs +241 -0
  56. package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -0
  57. package/fesm2022/cdevhub-ngx-tw-menu.mjs +433 -0
  58. package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -0
  59. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +691 -0
  60. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -0
  61. package/fesm2022/cdevhub-ngx-tw-popover.mjs +678 -0
  62. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -0
  63. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +335 -0
  64. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -0
  65. package/fesm2022/cdevhub-ngx-tw-radio.mjs +708 -0
  66. package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -0
  67. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +319 -0
  68. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -0
  69. package/fesm2022/cdevhub-ngx-tw-select.mjs +1722 -0
  70. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -0
  71. package/fesm2022/cdevhub-ngx-tw-separator.mjs +115 -0
  72. package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -0
  73. package/fesm2022/cdevhub-ngx-tw-sheet.mjs +768 -0
  74. package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -0
  75. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +149 -0
  76. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -0
  77. package/fesm2022/cdevhub-ngx-tw-slider.mjs +1147 -0
  78. package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -0
  79. package/fesm2022/cdevhub-ngx-tw-sort.mjs +346 -0
  80. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -0
  81. package/fesm2022/cdevhub-ngx-tw-spinner.mjs +186 -0
  82. package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -0
  83. package/fesm2022/cdevhub-ngx-tw-split.mjs +1082 -0
  84. package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -0
  85. package/fesm2022/cdevhub-ngx-tw-stat.mjs +579 -0
  86. package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -0
  87. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +443 -0
  88. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -0
  89. package/fesm2022/cdevhub-ngx-tw-switch.mjs +391 -0
  90. package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -0
  91. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +315 -0
  92. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -0
  93. package/fesm2022/cdevhub-ngx-tw-table.mjs +994 -0
  94. package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -0
  95. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +508 -0
  96. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -0
  97. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +147 -0
  98. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -0
  99. package/fesm2022/cdevhub-ngx-tw-theme.mjs +178 -0
  100. package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -0
  101. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +1344 -0
  102. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -0
  103. package/fesm2022/cdevhub-ngx-tw-timeline.mjs +1136 -0
  104. package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -0
  105. package/fesm2022/cdevhub-ngx-tw-toast.mjs +1311 -0
  106. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -0
  107. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +533 -0
  108. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -0
  109. package/fesm2022/cdevhub-ngx-tw.mjs +61 -0
  110. package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -0
  111. package/package.json +265 -0
  112. package/theme/_base.css +394 -0
  113. package/theme/_dark.css +510 -0
  114. package/theme/_high-contrast.css +290 -0
  115. package/theme/_semantic.css +317 -0
  116. package/theme/_typography.css +9 -0
  117. package/theme/index.css +54 -0
  118. package/types/cdevhub-ngx-tw-accordion.d.ts +48 -0
  119. package/types/cdevhub-ngx-tw-alert.d.ts +67 -0
  120. package/types/cdevhub-ngx-tw-avatar.d.ts +79 -0
  121. package/types/cdevhub-ngx-tw-badge.d.ts +94 -0
  122. package/types/cdevhub-ngx-tw-breadcrumbs.d.ts +227 -0
  123. package/types/cdevhub-ngx-tw-button.d.ts +74 -0
  124. package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +200 -0
  125. package/types/cdevhub-ngx-tw-calendar-testing.d.ts +113 -0
  126. package/types/cdevhub-ngx-tw-calendar.d.ts +1704 -0
  127. package/types/cdevhub-ngx-tw-card.d.ts +48 -0
  128. package/types/cdevhub-ngx-tw-carousel.d.ts +406 -0
  129. package/types/cdevhub-ngx-tw-checkbox.d.ts +136 -0
  130. package/types/cdevhub-ngx-tw-code-block.d.ts +93 -0
  131. package/types/cdevhub-ngx-tw-collapsible.d.ts +151 -0
  132. package/types/cdevhub-ngx-tw-combobox.d.ts +389 -0
  133. package/types/cdevhub-ngx-tw-command-palette.d.ts +215 -0
  134. package/types/cdevhub-ngx-tw-core.d.ts +719 -0
  135. package/types/cdevhub-ngx-tw-date-picker.d.ts +317 -0
  136. package/types/cdevhub-ngx-tw-date-range-picker.d.ts +313 -0
  137. package/types/cdevhub-ngx-tw-dialog.d.ts +303 -0
  138. package/types/cdevhub-ngx-tw-empty-state.d.ts +104 -0
  139. package/types/cdevhub-ngx-tw-flip-card.d.ts +95 -0
  140. package/types/cdevhub-ngx-tw-form-field.d.ts +210 -0
  141. package/types/cdevhub-ngx-tw-icon-lucide.d.ts +29 -0
  142. package/types/cdevhub-ngx-tw-icon.d.ts +134 -0
  143. package/types/cdevhub-ngx-tw-input.d.ts +110 -0
  144. package/types/cdevhub-ngx-tw-item.d.ts +70 -0
  145. package/types/cdevhub-ngx-tw-menu.d.ts +99 -0
  146. package/types/cdevhub-ngx-tw-paginator.d.ts +305 -0
  147. package/types/cdevhub-ngx-tw-popover.d.ts +157 -0
  148. package/types/cdevhub-ngx-tw-progress-bar.d.ts +100 -0
  149. package/types/cdevhub-ngx-tw-radio.d.ts +174 -0
  150. package/types/cdevhub-ngx-tw-segmented-control.d.ts +66 -0
  151. package/types/cdevhub-ngx-tw-select.d.ts +384 -0
  152. package/types/cdevhub-ngx-tw-separator.d.ts +28 -0
  153. package/types/cdevhub-ngx-tw-sheet.d.ts +335 -0
  154. package/types/cdevhub-ngx-tw-skeleton.d.ts +52 -0
  155. package/types/cdevhub-ngx-tw-slider.d.ts +258 -0
  156. package/types/cdevhub-ngx-tw-sort.d.ts +136 -0
  157. package/types/cdevhub-ngx-tw-spinner.d.ts +50 -0
  158. package/types/cdevhub-ngx-tw-split.d.ts +265 -0
  159. package/types/cdevhub-ngx-tw-stat.d.ts +140 -0
  160. package/types/cdevhub-ngx-tw-stepper.d.ts +127 -0
  161. package/types/cdevhub-ngx-tw-switch.d.ts +88 -0
  162. package/types/cdevhub-ngx-tw-tab-nav.d.ts +107 -0
  163. package/types/cdevhub-ngx-tw-table.d.ts +479 -0
  164. package/types/cdevhub-ngx-tw-tabs.d.ts +121 -0
  165. package/types/cdevhub-ngx-tw-textarea.d.ts +62 -0
  166. package/types/cdevhub-ngx-tw-theme.d.ts +106 -0
  167. package/types/cdevhub-ngx-tw-time-picker.d.ts +303 -0
  168. package/types/cdevhub-ngx-tw-timeline.d.ts +278 -0
  169. package/types/cdevhub-ngx-tw-toast.d.ts +388 -0
  170. package/types/cdevhub-ngx-tw-tooltip.d.ts +95 -0
  171. package/types/cdevhub-ngx-tw.d.ts +49 -0
@@ -0,0 +1,48 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { CollapsibleGroupComponent } from '@cdevhub/ngx-tw/collapsible';
3
+
4
+ /** Open mode of the accordion. */
5
+ type AccordionType = 'single' | 'multiple';
6
+ /** Visual style of the accordion container. */
7
+ type AccordionVariant = 'default' | 'bordered' | 'ghost';
8
+ /**
9
+ * Accordion — single- or multiple-open-panel group built on top of
10
+ * `<tw-collapsible>` children. Extends `CollapsibleGroupComponent` to inherit
11
+ * the keyboard navigation, value-sync, and toggle wiring; overrides the
12
+ * virtual `isAccordionMode()` / `canCollapseSingleMode()` hooks so the
13
+ * single-mode behaviour is driven from the local `type` + `collapsible`
14
+ * inputs instead of the parent's `accordion` input. The `hostRole` and
15
+ * `hostClasses` signals are also overridden so the accordion drops APG's
16
+ * `role="group"` and renders the variant-driven container classes.
17
+ *
18
+ * The `providers` block exposes the accordion instance to its descendant
19
+ * collapsibles via the `CollapsibleGroupComponent` DI token — Angular DI
20
+ * uses class identity rather than the prototype chain, so the explicit
21
+ * `useExisting` is required even though `AccordionComponent extends
22
+ * CollapsibleGroupComponent`.
23
+ */
24
+ declare class AccordionComponent extends CollapsibleGroupComponent {
25
+ /** Open mode. `'single'` allows one panel open at a time; `'multiple'` allows many. Defaults to `'single'`. */
26
+ readonly type: _angular_core.InputSignal<AccordionType>;
27
+ /** Visual style of the accordion container. Defaults to `'default'`. */
28
+ readonly variant: _angular_core.InputSignal<AccordionVariant>;
29
+ /** In `'single'` mode, whether re-clicking the open panel closes it. Defaults to `true` — accordions are collapsible by definition; opt-out only. */
30
+ readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
31
+ /** Accessible name for the accordion. Use when surrounding context doesn't make the purpose obvious. */
32
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
33
+ /** ID(s) of element(s) that label the accordion. Use instead of `aria-label` when a visible heading is available. */
34
+ readonly ariaLabelledby: _angular_core.InputSignal<string | undefined>;
35
+ /** @internal APG: accordions don't carry `role="group"`. */
36
+ readonly hostRole: _angular_core.Signal<string | null>;
37
+ /** @internal Variant-driven container classes; replaces the parent's default group string. */
38
+ readonly hostClasses: _angular_core.Signal<string>;
39
+ /** @internal Drive single-open-panel behaviour from `type`, ignoring the inherited `accordion` input. */
40
+ protected isAccordionMode(): boolean;
41
+ /** @internal Honour the `collapsible` opt-out in single mode. */
42
+ protected canCollapseSingleMode(): boolean;
43
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionComponent, never>;
44
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionComponent, "tw-accordion", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
45
+ }
46
+
47
+ export { AccordionComponent };
48
+ export type { AccordionType, AccordionVariant };
@@ -0,0 +1,67 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TwColor } from '@cdevhub/ngx-tw/core';
3
+
4
+ /** Visual style of the alert container. */
5
+ type AlertVariant = 'solid' | 'outline' | 'soft';
6
+ /** ARIA live-region politeness for the alert. Maps to the host `role`. */
7
+ type AlertPoliteness = 'polite' | 'assertive' | 'off';
8
+ declare class AlertIconDirective {
9
+ private readonly alert;
10
+ readonly classes: _angular_core.Signal<string>;
11
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertIconDirective, never>;
12
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AlertIconDirective, "[twAlertIcon]", never, {}, {}, never, never, true, never>;
13
+ }
14
+ declare class AlertTitleDirective {
15
+ private readonly alert;
16
+ readonly classes: _angular_core.Signal<string>;
17
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertTitleDirective, never>;
18
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AlertTitleDirective, "[twAlertTitle]", never, {}, {}, never, never, true, never>;
19
+ }
20
+ declare class AlertContentDirective {
21
+ private readonly alert;
22
+ readonly classes: _angular_core.Signal<string>;
23
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertContentDirective, never>;
24
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AlertContentDirective, "[twAlertContent]", never, {}, {}, never, never, true, never>;
25
+ }
26
+ declare class AlertActionsDirective {
27
+ private readonly alert;
28
+ readonly classes: _angular_core.Signal<string>;
29
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertActionsDirective, never>;
30
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AlertActionsDirective, "[twAlertActions]", never, {}, {}, never, never, true, never>;
31
+ }
32
+ declare class AlertComponent {
33
+ /** Controls the visual style of the alert. Defaults to `'soft'`. */
34
+ readonly variant: _angular_core.InputSignal<AlertVariant>;
35
+ /** Sets the semantic color palette. Defaults to `'info'`. */
36
+ readonly color: _angular_core.InputSignal<TwColor>;
37
+ /** When true, renders a dismiss button. Defaults to `false`. */
38
+ readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
39
+ /**
40
+ * Sets the ARIA live-region politeness. Maps to the host `role`:
41
+ * `'assertive'` → `role="alert"`, `'polite'` → `role="status"`,
42
+ * `'off'` → no role. Use `'off'` to suppress re-announcement when the
43
+ * alert content updates after initial render — assistive tech treats the
44
+ * alert as a static region rather than a live region. Defaults to `'polite'`.
45
+ */
46
+ readonly politeness: _angular_core.InputSignal<AlertPoliteness>;
47
+ /** Accessible label for the dismiss button. Override for localization. Defaults to `'Dismiss'`. */
48
+ readonly dismissLabel: _angular_core.InputSignal<string>;
49
+ /** Fires when the dismiss button is clicked. */
50
+ readonly dismissed: _angular_core.OutputEmitterRef<void>;
51
+ /** @internal */
52
+ readonly iconDirective: _angular_core.Signal<AlertIconDirective | undefined>;
53
+ readonly hasIcon: _angular_core.Signal<boolean>;
54
+ readonly computedRole: _angular_core.Signal<"alert" | "status" | null>;
55
+ private readonly variantResult;
56
+ readonly rootClasses: _angular_core.Signal<string>;
57
+ readonly iconClasses: _angular_core.Signal<string>;
58
+ readonly titleClasses: _angular_core.Signal<string>;
59
+ readonly contentClasses: _angular_core.Signal<string>;
60
+ readonly actionsClasses: _angular_core.Signal<string>;
61
+ readonly dismissClasses: _angular_core.Signal<string>;
62
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertComponent, never>;
63
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertComponent, "tw-alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "politeness": { "alias": "politeness"; "required": false; "isSignal": true; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; }, ["iconDirective"], ["[twAlertIcon]", "[twAlertTitle]", "[twAlertContent]", "*", "[twAlertActions]"], true, never>;
64
+ }
65
+
66
+ export { AlertActionsDirective, AlertComponent, AlertContentDirective, AlertIconDirective, AlertTitleDirective };
67
+ export type { AlertPoliteness, AlertVariant };
@@ -0,0 +1,79 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, ElementRef } from '@angular/core';
3
+ import { TwSize, TwColor } from '@cdevhub/ngx-tw/core';
4
+
5
+ /** Status indicator for the avatar. */
6
+ type AvatarStatus = 'online' | 'busy' | 'away' | 'offline';
7
+ /** Border radius shape for the avatar. */
8
+ type AvatarRounded = 'full' | 'lg' | 'none';
9
+ /** Decorative axes bundled into a single avatar input. */
10
+ interface AvatarAppearance {
11
+ /** Border-radius shape. Defaults to `'full'`. */
12
+ rounded?: AvatarRounded;
13
+ /** Status indicator dot. Defaults to `null` (no indicator). */
14
+ status?: AvatarStatus | null;
15
+ }
16
+ /**
17
+ * Injection token used by `AvatarGroupComponent` to propagate its size
18
+ * to child avatars. When present, overrides the individual avatar's `size` input.
19
+ */
20
+ declare const AVATAR_GROUP_SIZE: InjectionToken<() => TwSize>;
21
+ declare class AvatarComponent {
22
+ /** URL of the avatar image. When set, renders an `<img>`. Falls back to initials or projected content on load error. Defaults to `null`. */
23
+ readonly src: _angular_core.InputSignal<string | null>;
24
+ /** Alt text for the avatar image. Also used as `aria-label` for non-image avatars. Defaults to `''`. */
25
+ readonly alt: _angular_core.InputSignal<string>;
26
+ /** Text initials displayed when no image is available (1-2 characters). Rendered uppercase regardless of input casing. Defaults to `null`. */
27
+ readonly initials: _angular_core.InputSignal<string | null>;
28
+ /** Semantic color for the initials/icon background. Only applies when no image is shown. Defaults to `'neutral'`. */
29
+ readonly color: _angular_core.InputSignal<TwColor>;
30
+ /** Controls the avatar dimensions. Defaults to `'md'`. */
31
+ readonly size: _angular_core.InputSignal<TwSize>;
32
+ /** Bundles decorative axes: `rounded` (shape) and `status` (indicator dot). Defaults to `{ rounded: 'full', status: null }`. */
33
+ readonly appearance: _angular_core.InputSignal<AvatarAppearance>;
34
+ /** Fires when the avatar image fails to load. Payload is the native `Event` from the `<img>` `error` event. */
35
+ readonly imageError: _angular_core.OutputEmitterRef<Event>;
36
+ /** @internal */
37
+ readonly elementRef: ElementRef<any>;
38
+ /**
39
+ * @internal
40
+ * Toggled by `AvatarGroupComponent` to hide overflow avatars. Drives the
41
+ * host `[attr.hidden]` binding so the group's effect stays declarative
42
+ * (no direct `style.display` mutation).
43
+ */
44
+ readonly groupHidden: _angular_core.WritableSignal<boolean>;
45
+ private readonly groupSize;
46
+ constructor();
47
+ readonly resolvedSize: _angular_core.Signal<TwSize>;
48
+ readonly resolvedRounded: _angular_core.Signal<AvatarRounded>;
49
+ readonly resolvedStatus: _angular_core.Signal<AvatarStatus | null>;
50
+ readonly imageLoaded: _angular_core.WritableSignal<boolean | null>;
51
+ readonly displayMode: _angular_core.Signal<"initials" | "fallback" | "image">;
52
+ private readonly variantResult;
53
+ readonly rootClasses: _angular_core.Signal<string>;
54
+ readonly imgClasses: _angular_core.Signal<string>;
55
+ readonly initialsClasses: _angular_core.Signal<string>;
56
+ readonly fallbackClasses: _angular_core.Signal<string>;
57
+ readonly statusClasses: _angular_core.Signal<string>;
58
+ protected onImageError(event: Event): void;
59
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarComponent, never>;
60
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarComponent, "tw-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; }, { "imageError": "imageError"; }, never, ["*"], true, never>;
61
+ }
62
+ declare class AvatarGroupComponent {
63
+ /** Sets the size for all child avatars. Individual avatar size inputs are ignored when inside a group. Defaults to `'md'`. */
64
+ readonly size: _angular_core.InputSignal<TwSize>;
65
+ /** Maximum number of avatars to display. Remaining count is shown as a "+N" overflow indicator. Defaults to `null` (show all). */
66
+ readonly max: _angular_core.InputSignal<number | null>;
67
+ /** Accessible label for the avatar group. Defaults to `'Avatar group'` (English) — override for localisation. */
68
+ readonly ariaLabel: _angular_core.InputSignal<string>;
69
+ private readonly avatars;
70
+ readonly overflowCount: _angular_core.Signal<number>;
71
+ readonly hostClasses: _angular_core.Signal<string>;
72
+ readonly overflowClasses: _angular_core.Signal<string>;
73
+ private readonly visibilityEffect;
74
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarGroupComponent, never>;
75
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroupComponent, "tw-avatar-group", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, ["avatars"], ["*"], true, never>;
76
+ }
77
+
78
+ export { AVATAR_GROUP_SIZE, AvatarComponent, AvatarGroupComponent };
79
+ export type { AvatarAppearance, AvatarRounded, AvatarStatus };
@@ -0,0 +1,94 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TwColor, TwSize } from '@cdevhub/ngx-tw/core';
3
+ import { AvatarComponent } from '@cdevhub/ngx-tw/avatar';
4
+ import { IconComponent } from '@cdevhub/ngx-tw/icon';
5
+
6
+ /** Visual style of the badge. */
7
+ type BadgeVariant = 'solid' | 'outline' | 'soft';
8
+ /**
9
+ * Compact status label, tag, or count attached to any host element.
10
+ *
11
+ * Uses an attribute selector (`[twBadge]`) rather than the library's canonical
12
+ * element selector so consumers can apply the badge styling to any inline
13
+ * element — `<span>`, `<a>`, `<div>` — without an extra wrapper. The trade-off
14
+ * is intentional: badges most often live inside an existing text flow or list
15
+ * item where wrapping in a `<tw-badge>` element would add structural noise.
16
+ *
17
+ * For dot-only presence indicators (no text, no padding), use the sibling
18
+ * `[twBadgeDot]` directive — its rendering shape (no children, no dismiss,
19
+ * no leading slot) is structurally distinct from the labelled badge.
20
+ */
21
+ declare class BadgeComponent {
22
+ /** Sets the semantic color palette. Defaults to `'neutral'`. */
23
+ readonly color: _angular_core.InputSignal<TwColor>;
24
+ /** Controls the visual style. Defaults to `'soft'`. */
25
+ readonly variant: _angular_core.InputSignal<BadgeVariant>;
26
+ /** Controls badge size (padding, font, icon size). Defaults to `'md'`. */
27
+ readonly size: _angular_core.InputSignal<TwSize>;
28
+ /** When true, uses fully rounded corners instead of default `rounded-md`. Defaults to `false`. */
29
+ readonly pill: _angular_core.InputSignal<boolean>;
30
+ /** When true, renders a dismiss button inside the badge. Defaults to `false`. */
31
+ readonly dismissible: _angular_core.InputSignal<boolean>;
32
+ /**
33
+ * When true, exposes the badge as an ARIA live region (`role="status"`)
34
+ * so assistive technology announces content changes. Defaults to `false`
35
+ * because most badges are decorative tags or labels — opt in only when
36
+ * the badge represents a value that actually updates in place.
37
+ */
38
+ readonly live: _angular_core.InputSignal<boolean>;
39
+ /** Accessible label for the dismiss button. Override for localization. Defaults to `'Dismiss'`. */
40
+ readonly dismissLabel: _angular_core.InputSignal<string>;
41
+ /** Fires when the dismiss button is clicked. */
42
+ readonly dismissed: _angular_core.OutputEmitterRef<void>;
43
+ /** @internal */
44
+ readonly avatarChild: _angular_core.Signal<AvatarComponent | undefined>;
45
+ /** @internal */
46
+ readonly iconChild: _angular_core.Signal<IconComponent | undefined>;
47
+ readonly hasLeadingAvatar: _angular_core.Signal<boolean>;
48
+ readonly hasLeadingIcon: _angular_core.Signal<boolean>;
49
+ private readonly variantResult;
50
+ readonly rootClasses: _angular_core.Signal<string>;
51
+ readonly contentClasses: _angular_core.Signal<string>;
52
+ readonly dismissClasses: _angular_core.Signal<string>;
53
+ readonly dismissIconClasses: _angular_core.Signal<string>;
54
+ readonly leadingAvatarClasses: _angular_core.Signal<string>;
55
+ readonly leadingIconClasses: _angular_core.Signal<string>;
56
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BadgeComponent, never>;
57
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BadgeComponent, "[twBadge]", ["twBadge"], { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "pill": { "alias": "pill"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; }, ["avatarChild", "iconChild"], ["tw-avatar", "tw-icon", "*"], true, never>;
58
+ }
59
+
60
+ /**
61
+ * Compact colored dot used as a presence indicator, unread marker, or status
62
+ * pip. Applies as an attribute selector so the host element controls the
63
+ * structure — wrap in a `<span>`, `<div>`, list item, or any inline element.
64
+ *
65
+ * The dot has no text content; pair it with a visible label adjacent in the
66
+ * DOM, or set `aria-label` on the host so assistive technology can announce
67
+ * the state. Opt in to `live` to expose the dot as an ARIA live region when
68
+ * the indicator state actually changes (e.g. "new messages received").
69
+ *
70
+ * @example
71
+ * ```html
72
+ * <span twBadgeDot color="success" size="sm"></span>
73
+ * <span twBadgeDot color="error" [live]="true" aria-label="3 unread"></span>
74
+ * ```
75
+ */
76
+ declare class BadgeDotDirective {
77
+ /** Sets the semantic color palette. Defaults to `'neutral'`. */
78
+ readonly color: _angular_core.InputSignal<TwColor>;
79
+ /** Controls dot dimensions. Defaults to `'md'`. */
80
+ readonly size: _angular_core.InputSignal<TwSize>;
81
+ /**
82
+ * When true, exposes the dot as an ARIA live region (`role="status"`) so
83
+ * assistive technology announces state changes (e.g. an unread indicator
84
+ * appearing). Defaults to `false` because most dots are decorative pips
85
+ * paired with a visible label.
86
+ */
87
+ readonly live: _angular_core.InputSignal<boolean>;
88
+ readonly classes: _angular_core.Signal<string>;
89
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BadgeDotDirective, never>;
90
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BadgeDotDirective, "[twBadgeDot]", ["twBadgeDot"], { "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
91
+ }
92
+
93
+ export { BadgeComponent, BadgeDotDirective };
94
+ export type { BadgeVariant };
@@ -0,0 +1,227 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+ import * as _angular_core from '@angular/core';
4
+ import { TemplateRef } from '@angular/core';
5
+ import { TwSize } from '@cdevhub/ngx-tw/core';
6
+
7
+ /**
8
+ * Describes a single hop in a breadcrumb trail. The last entry in `items` is
9
+ * always treated as the current page (rendered with `aria-current="page"`,
10
+ * never as an anchor).
11
+ *
12
+ * The generic `T` types the optional `data` payload — useful for forwarding
13
+ * routerLink commands or any other consumer-defined metadata to the custom
14
+ * item template without unsafe casts.
15
+ */
16
+ interface TwBreadcrumbsItem<T = unknown> {
17
+ /** Visible label shown for this hop. */
18
+ label: string;
19
+ /**
20
+ * Optional href used to render the default anchor. Omit on the current item
21
+ * (the last entry). Ignored when a custom `*twBreadcrumbsItem` template is
22
+ * projected — the consumer owns the anchor in that case.
23
+ */
24
+ href?: string;
25
+ /**
26
+ * Opaque payload forwarded to the consumer's `*twBreadcrumbsItem` template
27
+ * via the template context. Use this to carry router commands or any other
28
+ * data your template needs.
29
+ */
30
+ data?: T;
31
+ /**
32
+ * When true, the item renders as muted text without an anchor (even if
33
+ * `href` is set). Receives `aria-disabled="true"`.
34
+ */
35
+ disabled?: boolean;
36
+ }
37
+ /**
38
+ * Template context passed to `*twBreadcrumbsItem` for each rendered item.
39
+ */
40
+ interface TwBreadcrumbsItemContext<T = unknown> {
41
+ /** The item record (also exposed via `let-item="$implicit"`). */
42
+ $implicit: TwBreadcrumbsItem<T>;
43
+ /** Same as `$implicit`. Available via `let-item="item"` for readability. */
44
+ item: TwBreadcrumbsItem<T>;
45
+ /** Zero-based index of this item in the original `items` input. */
46
+ index: number;
47
+ /** `true` only for the last entry — the current page. */
48
+ isCurrent: boolean;
49
+ }
50
+ /**
51
+ * Structural directive applied to an `<ng-template>` projected into
52
+ * `tw-breadcrumbs`. Replaces the default per-item rendering so consumers can
53
+ * wire their own anchors (typically `routerLink`-bound). The template receives
54
+ * `$implicit` (the item), `item`, `index`, and `isCurrent` in its context.
55
+ */
56
+ declare class BreadcrumbsItemTemplateDirective<T = unknown> {
57
+ /** @internal */
58
+ readonly templateRef: TemplateRef<TwBreadcrumbsItemContext<T>>;
59
+ /** Type-narrows the template context for `let-` destructuring in templates. */
60
+ static ngTemplateContextGuard<T>(_dir: BreadcrumbsItemTemplateDirective<T>, _ctx: unknown): _ctx is TwBreadcrumbsItemContext<T>;
61
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbsItemTemplateDirective<any>, never>;
62
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BreadcrumbsItemTemplateDirective<any>, "[twBreadcrumbsItem]", never, {}, {}, never, never, true, never>;
63
+ }
64
+ /**
65
+ * Structural directive applied to an `<ng-template>` projected into
66
+ * `tw-breadcrumbs`. Replaces the default chevron separator with custom
67
+ * content (any element — icon, text, dot, etc.).
68
+ */
69
+ declare class BreadcrumbsSeparatorTemplateDirective {
70
+ /** @internal */
71
+ readonly templateRef: TemplateRef<unknown>;
72
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbsSeparatorTemplateDirective, never>;
73
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BreadcrumbsSeparatorTemplateDirective, "[twBreadcrumbsSeparator]", never, {}, {}, never, never, true, never>;
74
+ }
75
+ /**
76
+ * Applies the parent `tw-breadcrumbs` link / current / disabled styling to a
77
+ * consumer-projected anchor (or span) inside `*twBreadcrumbsItem`. Without
78
+ * this directive, projected content renders unstyled — only the layout `<li>`
79
+ * is provided by the component.
80
+ *
81
+ * The directive sets `aria-current="page"` when `current` is true. It does
82
+ * NOT itself swap the element tag; the consumer should still pick `<a>` for
83
+ * link items and `<span>` for the current item.
84
+ */
85
+ declare class BreadcrumbsLinkDirective {
86
+ /** When true, this element is the current page: styled bold and gets `aria-current="page"`. Defaults to `false`. */
87
+ readonly current: _angular_core.InputSignal<boolean>;
88
+ /** When true, applies disabled styling (muted, not-allowed cursor). Defaults to `false`. */
89
+ readonly disabled: _angular_core.InputSignal<boolean>;
90
+ private readonly parent;
91
+ /** @internal Combined classes pulled from the parent component's slot tokens. */
92
+ readonly classes: _angular_core.Signal<string>;
93
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbsLinkDirective, never>;
94
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BreadcrumbsLinkDirective, "[twBreadcrumbsLink]", never, { "current": { "alias": "current"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
95
+ }
96
+ interface RenderedItem<T> {
97
+ readonly kind: 'item';
98
+ readonly item: TwBreadcrumbsItem<T>;
99
+ readonly index: number;
100
+ readonly isCurrent: boolean;
101
+ readonly key: string;
102
+ }
103
+ interface RenderedSeparator {
104
+ readonly kind: 'separator';
105
+ readonly key: string;
106
+ }
107
+ interface RenderedOverflow {
108
+ readonly kind: 'overflow';
109
+ readonly key: string;
110
+ }
111
+ type RenderedEntry<T> = RenderedItem<T> | RenderedSeparator | RenderedOverflow;
112
+ /**
113
+ * Breadcrumb trail rendered as a `<nav>` landmark with an ordered list of
114
+ * navigation hops. The last entry in `items` is the current page (gets
115
+ * `aria-current="page"`, never an anchor). Items beyond `maxItems` are
116
+ * collapsed behind an ellipsis trigger that opens an overflow menu.
117
+ *
118
+ * Customize per-item rendering with `*twBreadcrumbsItem` (consumer projects
119
+ * router-aware anchors), and the separator with `*twBreadcrumbsSeparator` or
120
+ * the `separator` input (Lucide icon name).
121
+ *
122
+ * @example
123
+ * ```html
124
+ * <tw-breadcrumbs [items]="trail" />
125
+ *
126
+ * <tw-breadcrumbs [items]="trail" [maxItems]="3" separator="slash">
127
+ * <ng-template twBreadcrumbsItem let-item let-isCurrent="isCurrent">
128
+ * @if (isCurrent) {
129
+ * <span twBreadcrumbsLink [current]="true">{{ item.label }}</span>
130
+ * } @else {
131
+ * <a twBreadcrumbsLink [routerLink]="item.data?.routerLink">{{ item.label }}</a>
132
+ * }
133
+ * </ng-template>
134
+ * </tw-breadcrumbs>
135
+ * ```
136
+ */
137
+ declare class BreadcrumbsComponent<T = unknown> {
138
+ /** The full breadcrumb trail. The last entry is treated as the current page. Defaults to `[]`. */
139
+ readonly items: _angular_core.InputSignal<readonly TwBreadcrumbsItem<T>[]>;
140
+ /** Density of the trail — drives font size, gap, icon size, and the overflow-button square. Defaults to `'md'`. */
141
+ readonly size: _angular_core.InputSignal<TwSize>;
142
+ /**
143
+ * When greater than `0`, the trail collapses any middle items past this
144
+ * threshold behind an overflow menu. The first item and the current (last)
145
+ * item are always visible. Values `< 2` are clamped to `2`. Defaults to `0`
146
+ * (no collapsing).
147
+ */
148
+ readonly maxItems: _angular_core.InputSignal<number>;
149
+ /**
150
+ * Lucide icon name used for the default separator between items. Ignored
151
+ * when a `*twBreadcrumbsSeparator` template is projected. Defaults to
152
+ * `'chevron-right'`. Requires the consumer to register the icon via
153
+ * `provideTwLucideIcons({ ChevronRight, ... })`.
154
+ */
155
+ readonly separator: _angular_core.InputSignal<string>;
156
+ /** Accessible label applied to the `<nav>` landmark. Defaults to `'Breadcrumb'`. Aliased as `aria-label`. */
157
+ readonly ariaLabel: _angular_core.InputSignal<string>;
158
+ /** Custom per-item template projected via `*twBreadcrumbsItem`. */
159
+ readonly itemTemplate: _angular_core.Signal<BreadcrumbsItemTemplateDirective<any> | undefined>;
160
+ /** Custom separator template projected via `*twBreadcrumbsSeparator`. */
161
+ readonly separatorTemplate: _angular_core.Signal<BreadcrumbsSeparatorTemplateDirective | undefined>;
162
+ /** @internal Materialised tv() slot result; exposed so `BreadcrumbsLinkDirective` can pull link/current/disabled classes. */
163
+ readonly slotResult: _angular_core.Signal<{
164
+ list: (slotProps?: ({
165
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
166
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
167
+ item: (slotProps?: ({
168
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
169
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
170
+ link: (slotProps?: ({
171
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
172
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
173
+ current: (slotProps?: ({
174
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
175
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
176
+ disabled: (slotProps?: ({
177
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
178
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
179
+ separator: (slotProps?: ({
180
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
181
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
182
+ overflowTrigger: (slotProps?: ({
183
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
184
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
185
+ } & {
186
+ list: (slotProps?: ({
187
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
188
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
189
+ item: (slotProps?: ({
190
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
191
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
192
+ link: (slotProps?: ({
193
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
194
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
195
+ current: (slotProps?: ({
196
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
197
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
198
+ disabled: (slotProps?: ({
199
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
200
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
201
+ separator: (slotProps?: ({
202
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
203
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
204
+ overflowTrigger: (slotProps?: ({
205
+ size?: "md" | "xs" | "sm" | "lg" | "xl" | undefined;
206
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
207
+ } & {}>;
208
+ /** @internal Icon size for the default chevron separator. */
209
+ readonly iconSize: _angular_core.Signal<TwSize>;
210
+ /** @internal Class strings per slot, memoised. */
211
+ readonly listClasses: _angular_core.Signal<string>;
212
+ readonly itemClasses: _angular_core.Signal<string>;
213
+ readonly linkClasses: _angular_core.Signal<string>;
214
+ readonly currentClasses: _angular_core.Signal<string>;
215
+ readonly disabledClasses: _angular_core.Signal<string>;
216
+ readonly separatorClasses: _angular_core.Signal<string>;
217
+ readonly overflowTriggerClasses: _angular_core.Signal<string>;
218
+ /** @internal Items hidden behind the overflow menu. Empty when no collapsing is active. */
219
+ readonly collapsedItems: _angular_core.Signal<readonly TwBreadcrumbsItem<T>[]>;
220
+ /** @internal Flat sequence of items + separators + overflow used by the template's @for. */
221
+ readonly renderedEntries: _angular_core.Signal<RenderedEntry<T>[]>;
222
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbsComponent<any>, never>;
223
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbsComponent<any>, "tw-breadcrumbs", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "maxItems": { "alias": "maxItems"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, ["itemTemplate", "separatorTemplate"], never, true, never>;
224
+ }
225
+
226
+ export { BreadcrumbsComponent, BreadcrumbsItemTemplateDirective, BreadcrumbsLinkDirective, BreadcrumbsSeparatorTemplateDirective };
227
+ export type { TwBreadcrumbsItem, TwBreadcrumbsItemContext };
@@ -0,0 +1,74 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
+ import { TwColor, TwSize } from '@cdevhub/ngx-tw/core';
4
+
5
+ /** Visual style of the button. */
6
+ type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'soft' | 'link';
7
+ /**
8
+ * Enhances a native `<button>` or `<a>` element with library styling, semantic
9
+ * color/size variants, and disabled/loading states. The directive does not
10
+ * expose a `clicked` output — bind `(click)` directly on the host element. When
11
+ * `disabled` or `loading` is true, the directive intercepts clicks with
12
+ * `preventDefault()` + `stopImmediatePropagation()` so the host handler does
13
+ * not run.
14
+ *
15
+ * The directive owns no template, so visual loading affordances (spinner,
16
+ * status text) are composed by the consumer — see the `loading` input.
17
+ */
18
+ declare class ButtonDirective implements OnInit {
19
+ /** Controls the visual style. Defaults to `'solid'`. */
20
+ readonly variant: _angular_core.InputSignal<ButtonVariant>;
21
+ /** Sets the semantic color palette. Defaults to `'primary'`. */
22
+ readonly color: _angular_core.InputSignal<TwColor>;
23
+ /** Controls the size (padding, font size, icon size). Defaults to `'md'`. */
24
+ readonly size: _angular_core.InputSignal<TwSize>;
25
+ /** When true, prevents interaction and applies muted styling. Defaults to `false`. */
26
+ readonly disabled: _angular_core.InputSignal<boolean>;
27
+ /**
28
+ * When true, blocks clicks and sets `aria-busy="true"`. Defaults to `false`.
29
+ * The directive does not render a spinner or status text — compose them in
30
+ * the projected content:
31
+ *
32
+ * ```html
33
+ * <button twButton [loading]="saving()">
34
+ * @if (saving()) {
35
+ * <tw-spinner twButtonIcon size="sm" />
36
+ * <span class="sr-only">Saving…</span>
37
+ * }
38
+ * Save
39
+ * </button>
40
+ * ```
41
+ *
42
+ * The `sr-only` text gives assistive tech an explicit status announcement
43
+ * to pair with the `aria-busy` attribute.
44
+ */
45
+ readonly loading: _angular_core.InputSignal<boolean>;
46
+ private readonly elementRef;
47
+ private readonly focusMonitor;
48
+ private readonly destroyRef;
49
+ readonly isNativeButton: _angular_core.Signal<boolean>;
50
+ readonly classes: _angular_core.Signal<string>;
51
+ ngOnInit(): void;
52
+ handleClick(event: MouseEvent): void;
53
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonDirective, never>;
54
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "[twButton]", ["twButton"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
55
+ }
56
+ declare class ButtonIconDirective {
57
+ /**
58
+ * Position of the icon relative to the button label. Defaults to `'leading'`.
59
+ *
60
+ * The empty-string member of the union is load-bearing: Angular binds `''` to
61
+ * the input when the selector is used as a bare attribute (`<svg twButtonIcon>`),
62
+ * which is the canonical "leading" usage. Templates that omit a value still
63
+ * have the directive attached and resolve to leading placement at runtime via
64
+ * the `=== 'trailing'` check below.
65
+ */
66
+ readonly twButtonIcon: _angular_core.InputSignal<"" | "leading" | "trailing">;
67
+ private readonly button;
68
+ readonly classes: _angular_core.Signal<string>;
69
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonIconDirective, never>;
70
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonIconDirective, "[twButtonIcon]", never, { "twButtonIcon": { "alias": "twButtonIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
71
+ }
72
+
73
+ export { ButtonDirective, ButtonIconDirective };
74
+ export type { ButtonVariant };