@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,593 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, model, output, inject, ElementRef, DestroyRef, signal, computed, afterNextRender, isDevMode, linkedSignal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NgControl, NgForm, FormGroupDirective, Validators } from '@angular/forms';
4
+ import { FocusMonitor } from '@angular/cdk/a11y';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
+ import { isObservable, merge } from 'rxjs';
7
+ import { tv } from 'tailwind-variants';
8
+ import { TW_ERROR_STATE_MATCHER } from '@cdevhub/ngx-tw/core';
9
+ import { FormFieldControl, TW_FORM_FIELD_CONTROL } from '@cdevhub/ngx-tw/form-field';
10
+
11
+ // ── tv() config ──────────────────────────────────────────────────
12
+ const checkboxVariants = tv({
13
+ slots: {
14
+ // `items-start` aligns the boxWrap with the top of the label container; combined with
15
+ // a `min-h-N` matching the label's first-line line-height on boxWrap, the box stays
16
+ // centered on the first line of the label whether it spans one line or many.
17
+ root: 'relative inline-flex items-start gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',
18
+ boxWrap: 'relative inline-flex items-center justify-center shrink-0',
19
+ box: 'inline-flex items-center justify-center rounded-md border transition-colors duration-normal motion-reduce:transition-none',
20
+ icon: 'absolute inset-0 flex items-center justify-center pointer-events-none empty:hidden',
21
+ labelWrap: 'flex flex-col min-w-0 empty:hidden',
22
+ label: 'font-medium text-fg empty:hidden',
23
+ description: 'text-fg-muted empty:hidden',
24
+ },
25
+ variants: {
26
+ size: {
27
+ xs: {
28
+ // `size-3.5` half-step: aligns with text-xs/leading-4. Codified per CLAUDE.md.
29
+ box: 'size-3.5',
30
+ icon: '[&_svg]:size-3',
31
+ boxWrap: 'min-h-4',
32
+ label: 'text-xs leading-4',
33
+ description: 'text-2xs leading-4',
34
+ },
35
+ sm: {
36
+ box: 'size-4',
37
+ icon: '[&_svg]:size-3',
38
+ boxWrap: 'min-h-5',
39
+ label: 'text-sm leading-5',
40
+ description: 'text-xs leading-4',
41
+ },
42
+ md: {
43
+ box: 'size-5',
44
+ // md icon uses `size-3.5` (14px) — proportional inset (70%) of the
45
+ // size-5 (20px) box; the half-step is the only size that fills the
46
+ // checkmark without crowding the box edges.
47
+ icon: '[&_svg]:size-3.5',
48
+ boxWrap: 'min-h-5',
49
+ label: 'text-sm leading-5',
50
+ description: 'text-xs leading-4',
51
+ },
52
+ lg: {
53
+ box: 'size-6',
54
+ icon: '[&_svg]:size-4',
55
+ boxWrap: 'min-h-6',
56
+ label: 'text-base leading-6',
57
+ description: 'text-sm leading-5',
58
+ },
59
+ xl: {
60
+ box: 'size-7',
61
+ icon: '[&_svg]:size-5',
62
+ // xl box (28px) > default text-base line-height (24px); bump leading to leading-7
63
+ // so the first line height matches the box and they align cleanly.
64
+ boxWrap: 'min-h-7',
65
+ label: 'text-base leading-7',
66
+ description: 'text-sm leading-5',
67
+ },
68
+ },
69
+ labelPosition: {
70
+ before: { root: 'flex-row-reverse' },
71
+ after: { root: 'flex-row' },
72
+ },
73
+ active: {
74
+ true: { box: '' },
75
+ false: { box: 'bg-surface border-border hover:border-border-strong' },
76
+ },
77
+ disabled: {
78
+ true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },
79
+ false: { root: '' },
80
+ },
81
+ },
82
+ defaultVariants: {
83
+ size: 'md',
84
+ labelPosition: 'after',
85
+ active: false,
86
+ disabled: false,
87
+ },
88
+ }, { twMerge: true });
89
+ // ── Static active-state color lookups (statically written for Tailwind v4 scanning) ──
90
+ const SOLID_BOX = {
91
+ primary: 'bg-primary-600 border-primary-600',
92
+ secondary: 'bg-secondary-600 border-secondary-600',
93
+ accent: 'bg-accent-600 border-accent-600',
94
+ neutral: 'bg-fg border-fg',
95
+ info: 'bg-info-600 border-info-600',
96
+ success: 'bg-success-600 border-success-600',
97
+ warning: 'bg-warning-500 border-warning-500',
98
+ error: 'bg-error-600 border-error-600',
99
+ };
100
+ const SOLID_ICON = {
101
+ primary: 'text-on-primary',
102
+ secondary: 'text-on-secondary',
103
+ accent: 'text-on-accent',
104
+ neutral: 'text-on-neutral',
105
+ info: 'text-on-info',
106
+ success: 'text-on-success',
107
+ warning: 'text-on-warning',
108
+ error: 'text-on-error',
109
+ };
110
+ const OUTLINE_BOX = {
111
+ primary: 'bg-surface border-primary-600',
112
+ secondary: 'bg-surface border-secondary-600',
113
+ accent: 'bg-surface border-accent-600',
114
+ neutral: 'bg-surface border-fg',
115
+ info: 'bg-surface border-info-600',
116
+ success: 'bg-surface border-success-600',
117
+ warning: 'bg-surface border-warning-500',
118
+ error: 'bg-surface border-error-600',
119
+ };
120
+ const OUTLINE_ICON = {
121
+ primary: 'text-primary-600',
122
+ secondary: 'text-secondary-600',
123
+ accent: 'text-accent-600',
124
+ neutral: 'text-fg',
125
+ info: 'text-info-600',
126
+ success: 'text-success-600',
127
+ warning: 'text-warning-600',
128
+ error: 'text-error-600',
129
+ };
130
+ let nextId = 0;
131
+ // ── CheckboxComponent ────────────────────────────────────────────
132
+ class CheckboxComponent extends FormFieldControl {
133
+ /** Sets the semantic color for the checked and indeterminate box fill/border. Defaults to `'primary'`. */
134
+ color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
135
+ /** Controls the overall scale of the box, check icon, and label typography. Defaults to `'md'`. */
136
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
137
+ /** Visual style when checked or indeterminate. `'solid'` fills the box with the color; `'outline'` keeps a transparent fill with a colored border and check. Defaults to `'solid'`. */
138
+ variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
139
+ /** When true, prevents interaction and applies muted styling. Defaults to `false`. */
140
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
141
+ /** When true, sets `aria-required="true"` so assistive tech announces the control as required. Defaults to `false`. */
142
+ requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required' });
143
+ /** Optional inline label rendered next to the checkbox. Use default content projection for rich label content instead. Projection takes precedence. */
144
+ label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
145
+ /** Optional secondary description rendered under the label. Use `[slot="description"]` content projection for rich content instead. Projection takes precedence. */
146
+ description = input(undefined, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
147
+ /** Position of the label/description relative to the checkbox. Defaults to `'after'`. */
148
+ labelPosition = input('after', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
149
+ /** Optional name attribute, applied to the hidden native `<input type="checkbox">` so native form submission includes the control. */
150
+ name = input(undefined, ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
151
+ /** Id on the host element. Auto-generated as `tw-checkbox-N` when not provided. Used by the form-field's `<label for>` attribute. */
152
+ idInput = input(undefined, { ...(ngDevMode ? { debugName: "idInput" } : /* istanbul ignore next */ {}), alias: 'id' });
153
+ /** Accessible name when no visible label is provided. Mirrored to `aria-label`. */
154
+ ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
155
+ /** ID of an external element that labels the checkbox. Mirrored to `aria-labelledby`. */
156
+ ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
157
+ /** ID of an external element that describes the checkbox. Mirrored to `aria-describedby`. Form-field merges its hint/error ids alongside. */
158
+ ariaDescribedby = input(undefined, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
159
+ /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the directive uses the `TW_ERROR_STATE_MATCHER` token's value. */
160
+ errorStateMatcher = input(undefined, ...(ngDevMode ? [{ debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
161
+ /** Two-way bound checked state. Updates when the user toggles via click or Space. */
162
+ checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
163
+ /** Two-way bound indeterminate state. When true, the box shows a dash and the host exposes `aria-checked="mixed"`. Any user toggle clears indeterminate and sets `checked` to `true`. */
164
+ indeterminate = model(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
165
+ /** Fires after the checked state changes from a user interaction. Does not fire when the value is updated programmatically via `writeValue`. */
166
+ change = output();
167
+ focusMonitor = inject(FocusMonitor);
168
+ elementRef = inject((ElementRef));
169
+ destroyRef = inject(DestroyRef);
170
+ ngControl = inject(NgControl, { optional: true, self: true });
171
+ parentForm = inject(NgForm, { optional: true });
172
+ parentFormGroup = inject(FormGroupDirective, { optional: true });
173
+ defaultMatcher = inject(TW_ERROR_STATE_MATCHER);
174
+ onChange = () => { };
175
+ onTouched = () => { };
176
+ cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
177
+ _focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
178
+ _ngControlRev = signal(0, ...(ngDevMode ? [{ debugName: "_ngControlRev" }] : /* istanbul ignore next */ []));
179
+ _formSubmitRev = signal(0, ...(ngDevMode ? [{ debugName: "_formSubmitRev" }] : /* istanbul ignore next */ []));
180
+ describedByIdsSignal = signal([], ...(ngDevMode ? [{ debugName: "describedByIdsSignal" }] : /* istanbul ignore next */ []));
181
+ uid = nextId++;
182
+ /** @internal Fallback id used when the consumer does not set `[id]`. */
183
+ hostId = `tw-checkbox-${this.uid}`;
184
+ /** @internal Resolved id on the host element. */
185
+ id = computed(() => this.idInput() ?? this.hostId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
186
+ /** @internal Id of the internal label `<span>`, derived from the resolved host id. */
187
+ labelElementId = computed(() => `${this.id()}-label`, ...(ngDevMode ? [{ debugName: "labelElementId" }] : /* istanbul ignore next */ []));
188
+ /** @internal Id of the internal description `<span>`, derived from the resolved host id. */
189
+ descriptionElementId = computed(() => `${this.id()}-description`, ...(ngDevMode ? [{ debugName: "descriptionElementId" }] : /* istanbul ignore next */ []));
190
+ constructor() {
191
+ super();
192
+ // Material-style CVA wiring: declare ourselves as the value accessor on any
193
+ // host-level `NgControl` (FormControlDirective, NgModel, etc.). This avoids
194
+ // the circular-DI that a static `NG_VALUE_ACCESSOR` provider would create
195
+ // because `NgControl` is injected with `self: true` on the same element.
196
+ if (this.ngControl) {
197
+ this.ngControl.valueAccessor = this;
198
+ }
199
+ afterNextRender(() => {
200
+ if (isDevMode() && !this.hasAccessibleNameHint()) {
201
+ console.warn('[tw-checkbox] The checkbox has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.');
202
+ }
203
+ });
204
+ }
205
+ /** @internal */
206
+ isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
207
+ /**
208
+ * @internal Visible-state mirror of the `checked` model. `linkedSignal` keeps it
209
+ * synced with parent updates (including `writeValue` from reactive forms), while
210
+ * also accepting explicit `set()` calls from `toggle()` / `writeValue()` so the
211
+ * DOM reflects the new state synchronously — before `checkedChange` propagates
212
+ * through the host binding round-trip. Reading this signal in host bindings
213
+ * (`aria-checked`, `data-checked`, box classes) decouples render from the
214
+ * model's notification cadence.
215
+ */
216
+ internalChecked = linkedSignal(() => this.checked(), ...(ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []));
217
+ /**
218
+ * @internal Visible-state mirror of the `indeterminate` model. Same rationale as
219
+ * `internalChecked` — `toggle()` and `writeValue()` clear it synchronously so
220
+ * `aria-checked="mixed"` flips off in the same microtask as `aria-checked="true"`.
221
+ */
222
+ internalIndeterminate = linkedSignal(() => this.indeterminate(), ...(ngDevMode ? [{ debugName: "internalIndeterminate" }] : /* istanbul ignore next */ []));
223
+ ariaCheckedValue = computed(() => {
224
+ if (this.internalIndeterminate())
225
+ return 'mixed';
226
+ return this.internalChecked() ? 'true' : 'false';
227
+ }, ...(ngDevMode ? [{ debugName: "ariaCheckedValue" }] : /* istanbul ignore next */ []));
228
+ effectiveAriaLabelledby = computed(() => {
229
+ const external = this.ariaLabelledby();
230
+ if (external)
231
+ return external;
232
+ if (this.ariaLabel())
233
+ return undefined;
234
+ return this.labelElementId();
235
+ }, ...(ngDevMode ? [{ debugName: "effectiveAriaLabelledby" }] : /* istanbul ignore next */ []));
236
+ effectiveAriaDescribedby = computed(() => {
237
+ const merged = [];
238
+ const extra = this.describedByIdsSignal();
239
+ for (const id of extra)
240
+ merged.push(id);
241
+ const external = this.ariaDescribedby();
242
+ if (external) {
243
+ for (const id of external.split(/\s+/).filter(Boolean))
244
+ merged.push(id);
245
+ }
246
+ else if (extra.length === 0) {
247
+ // Only fall back to the internal description id when no external sources are wired.
248
+ merged.push(this.descriptionElementId());
249
+ }
250
+ return merged.length ? merged.join(' ') : undefined;
251
+ }, ...(ngDevMode ? [{ debugName: "effectiveAriaDescribedby" }] : /* istanbul ignore next */ []));
252
+ isActive = computed(() => this.internalChecked() || this.internalIndeterminate(), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
253
+ // ── FormFieldControl signals ──
254
+ /** @internal */
255
+ value = computed(() => this.internalChecked(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
256
+ /** @internal */
257
+ focused = this._focused.asReadonly();
258
+ /** @internal Checkboxes are never empty in the form-field sense — they always have a boolean value. */
259
+ empty = computed(() => false, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
260
+ /** @internal */
261
+ required = computed(() => {
262
+ this._ngControlRev();
263
+ if (this.requiredInput())
264
+ return true;
265
+ const ctrl = this.ngControl?.control;
266
+ if (!ctrl)
267
+ return false;
268
+ return ctrl.hasValidator(Validators.required) || ctrl.hasValidator(Validators.requiredTrue);
269
+ }, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
270
+ /** @internal */
271
+ errorState = computed(() => {
272
+ this._ngControlRev();
273
+ this._formSubmitRev();
274
+ this._focused();
275
+ const matcher = this.errorStateMatcher() ?? this.defaultMatcher;
276
+ const form = this.parentFormGroup ??
277
+ this.parentForm;
278
+ return matcher.isErrorState(this.ngControl?.control ?? null, form);
279
+ }, ...(ngDevMode ? [{ debugName: "errorState" }] : /* istanbul ignore next */ []));
280
+ /** @internal */
281
+ controlType = 'checkbox';
282
+ /** @internal */
283
+ userAriaDescribedBy = computed(() => this.ariaDescribedby(), ...(ngDevMode ? [{ debugName: "userAriaDescribedBy" }] : /* istanbul ignore next */ []));
284
+ variantResult = computed(() => checkboxVariants({
285
+ size: this.size(),
286
+ labelPosition: this.labelPosition(),
287
+ active: this.isActive(),
288
+ disabled: this.isDisabled(),
289
+ }), ...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
290
+ rootClasses = computed(() => this.variantResult().root(), ...(ngDevMode ? [{ debugName: "rootClasses" }] : /* istanbul ignore next */ []));
291
+ boxWrapClasses = computed(() => this.variantResult().boxWrap(), ...(ngDevMode ? [{ debugName: "boxWrapClasses" }] : /* istanbul ignore next */ []));
292
+ iconClasses = computed(() => this.variantResult().icon(), ...(ngDevMode ? [{ debugName: "iconClasses" }] : /* istanbul ignore next */ []));
293
+ labelWrapClasses = computed(() => this.variantResult().labelWrap(), ...(ngDevMode ? [{ debugName: "labelWrapClasses" }] : /* istanbul ignore next */ []));
294
+ labelClasses = computed(() => this.variantResult().label(), ...(ngDevMode ? [{ debugName: "labelClasses" }] : /* istanbul ignore next */ []));
295
+ descriptionClasses = computed(() => this.variantResult().description(), ...(ngDevMode ? [{ debugName: "descriptionClasses" }] : /* istanbul ignore next */ []));
296
+ boxClasses = computed(() => {
297
+ const base = this.variantResult().box();
298
+ const active = this.isActive();
299
+ const error = this.errorState();
300
+ const variant = this.variant();
301
+ const effectiveColor = error ? 'error' : this.color();
302
+ if (!active) {
303
+ if (error)
304
+ return `${base} border-error-500`;
305
+ return base;
306
+ }
307
+ const lookup = variant === 'solid' ? SOLID_BOX : OUTLINE_BOX;
308
+ return `${base} ${lookup[effectiveColor]}`;
309
+ }, ...(ngDevMode ? [{ debugName: "boxClasses" }] : /* istanbul ignore next */ []));
310
+ iconColorClasses = computed(() => {
311
+ const lookup = this.variant() === 'solid' ? SOLID_ICON : OUTLINE_ICON;
312
+ const effectiveColor = this.errorState() ? 'error' : this.color();
313
+ return `inline-flex items-center justify-center ${lookup[effectiveColor]}`;
314
+ }, ...(ngDevMode ? [{ debugName: "iconColorClasses" }] : /* istanbul ignore next */ []));
315
+ // ── Interactions ──────────────────────────────────────────
316
+ /** Toggles the checked state. Clears indeterminate if set. No-op when disabled. */
317
+ toggle() {
318
+ if (this.isDisabled())
319
+ return;
320
+ const wasIndeterminate = this.internalIndeterminate();
321
+ const next = wasIndeterminate ? true : !this.internalChecked();
322
+ this.internalChecked.set(next);
323
+ this.checked.set(next);
324
+ if (wasIndeterminate) {
325
+ this.internalIndeterminate.set(false);
326
+ this.indeterminate.set(false);
327
+ }
328
+ this.onChange(next);
329
+ this.onTouched();
330
+ this.change.emit(next);
331
+ }
332
+ /** Handles keyboard activation. Only Space toggles — matches native checkbox semantics. */
333
+ onKeydown(event) {
334
+ if (this.isDisabled())
335
+ return;
336
+ if (event.key === ' ' || event.key === 'Spacebar') {
337
+ event.preventDefault();
338
+ this.toggle();
339
+ }
340
+ }
341
+ /** @internal Called on host blur to notify forms the control has been touched and recompute errorState. */
342
+ onBlur() {
343
+ this.onTouched();
344
+ this._ngControlRev.update((n) => n + 1);
345
+ }
346
+ // ── ControlValueAccessor ──────────────────────────────────
347
+ writeValue(value) {
348
+ const next = !!value;
349
+ this.internalChecked.set(next);
350
+ this.checked.set(next);
351
+ this.internalIndeterminate.set(false);
352
+ this.indeterminate.set(false);
353
+ }
354
+ registerOnChange(fn) {
355
+ this.onChange = fn;
356
+ }
357
+ registerOnTouched(fn) {
358
+ this.onTouched = fn;
359
+ }
360
+ setDisabledState(isDisabled) {
361
+ this.cvaDisabled.set(isDisabled);
362
+ }
363
+ // ── FormFieldControl methods ──
364
+ /** @internal Called by the form-field once it has computed the merged describedby ids. */
365
+ setDescribedByIds(ids) {
366
+ this.describedByIdsSignal.set([...ids]);
367
+ }
368
+ /** @internal Called when the form-field container is clicked — focus the host without toggling. */
369
+ onContainerClick(event) {
370
+ if (this.isDisabled())
371
+ return;
372
+ if (event.defaultPrevented)
373
+ return;
374
+ const host = this.elementRef.nativeElement;
375
+ if (event.target === host || host.contains(event.target))
376
+ return;
377
+ host.focus();
378
+ }
379
+ // ── Lifecycle ─────────────────────────────────────────────
380
+ ngOnInit() {
381
+ const monitor$ = this.focusMonitor.monitor(this.elementRef);
382
+ if (isObservable(monitor$)) {
383
+ monitor$
384
+ .pipe(takeUntilDestroyed(this.destroyRef))
385
+ .subscribe((origin) => {
386
+ const wasFocused = this._focused();
387
+ this._focused.set(!!origin);
388
+ if (wasFocused && !origin) {
389
+ // Blur often flips `touched` on the bound `NgControl`; notify forms
390
+ // and bump the revision so `errorState` recomputes.
391
+ this.onTouched();
392
+ this._ngControlRev.update((n) => n + 1);
393
+ }
394
+ });
395
+ }
396
+ this.destroyRef.onDestroy(() => {
397
+ this.focusMonitor.stopMonitoring(this.elementRef);
398
+ });
399
+ // NgControl's `control` is set by the parent FormControl* directive before
400
+ // children's `ngOnInit`. Subscribe here so errorState reacts to status/value
401
+ // changes on the bound control.
402
+ const ctrl = this.ngControl?.control;
403
+ if (ctrl) {
404
+ const streams = [ctrl.statusChanges, ctrl.valueChanges].filter((s) => !!s);
405
+ if (streams.length) {
406
+ merge(...streams)
407
+ .pipe(takeUntilDestroyed(this.destroyRef))
408
+ .subscribe(() => this._ngControlRev.update((n) => n + 1));
409
+ }
410
+ }
411
+ const submit = this.parentFormGroup?.ngSubmit ?? this.parentForm?.ngSubmit;
412
+ if (submit) {
413
+ submit
414
+ .pipe(takeUntilDestroyed(this.destroyRef))
415
+ .subscribe(() => this._formSubmitRev.update((n) => n + 1));
416
+ }
417
+ }
418
+ hasAccessibleNameHint() {
419
+ if (this.label() || this.ariaLabel() || this.ariaLabelledby())
420
+ return true;
421
+ const host = this.elementRef.nativeElement;
422
+ return host.textContent !== null && host.textContent.trim().length > 0;
423
+ }
424
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
425
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: CheckboxComponent, isStandalone: true, selector: "tw-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange", change: "change" }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "toggle()", "keydown": "onKeydown($event)", "blur": "onBlur()" }, properties: { "id": "id()", "class": "rootClasses()", "attr.data-checked": "internalChecked()", "attr.data-indeterminate": "internalIndeterminate()", "attr.aria-checked": "ariaCheckedValue()", "attr.aria-disabled": "isDisabled() || null", "attr.aria-required": "required() || null", "attr.aria-invalid": "errorState() || null", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "effectiveAriaLabelledby() || null", "attr.aria-describedby": "effectiveAriaDescribedby() || null", "attr.tabindex": "isDisabled() ? -1 : 0", "attr.name": "name() || null" } }, providers: [
426
+ {
427
+ provide: TW_FORM_FIELD_CONTROL,
428
+ useExisting: forwardRef(() => CheckboxComponent),
429
+ },
430
+ ], usesInheritance: true, ngImport: i0, template: `
431
+ <input
432
+ type="checkbox"
433
+ class="sr-only"
434
+ tabindex="-1"
435
+ aria-hidden="true"
436
+ [name]="name() || null"
437
+ [checked]="internalChecked()"
438
+ [disabled]="isDisabled()"
439
+ />
440
+
441
+ <span [class]="boxWrapClasses()">
442
+ <span [class]="boxClasses()">
443
+ <span [class]="iconClasses()">
444
+ @if (internalIndeterminate()) {
445
+ <span [class]="iconColorClasses()" animate.enter="check-in">
446
+ <ng-content select="[slot='indeterminate-icon']">
447
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true">
448
+ <path
449
+ d="M5 12 h14"
450
+ stroke-width="3"
451
+ stroke-linecap="round"
452
+ stroke-linejoin="round"
453
+ />
454
+ </svg>
455
+ </ng-content>
456
+ </span>
457
+ } @else if (internalChecked()) {
458
+ <span [class]="iconColorClasses()" animate.enter="check-in">
459
+ <ng-content select="[slot='check-icon']">
460
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true">
461
+ <path
462
+ d="M5 12 l5 5 l9 -11"
463
+ stroke-width="3"
464
+ stroke-linecap="round"
465
+ stroke-linejoin="round"
466
+ />
467
+ </svg>
468
+ </ng-content>
469
+ </span>
470
+ }
471
+ </span>
472
+ </span>
473
+ </span>
474
+
475
+ <span [class]="labelWrapClasses()">
476
+ <span [id]="labelElementId()" [class]="labelClasses()">
477
+ <ng-content>
478
+ @if (label()) {
479
+ {{ label() }}
480
+ }
481
+ </ng-content>
482
+ </span>
483
+ <span [id]="descriptionElementId()" [class]="descriptionClasses()">
484
+ <ng-content select="[slot='description']">
485
+ @if (description()) {
486
+ {{ description() }}
487
+ }
488
+ </ng-content>
489
+ </span>
490
+ </span>
491
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
492
+ }
493
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CheckboxComponent, decorators: [{
494
+ type: Component,
495
+ args: [{
496
+ selector: 'tw-checkbox',
497
+ changeDetection: ChangeDetectionStrategy.OnPush,
498
+ providers: [
499
+ {
500
+ provide: TW_FORM_FIELD_CONTROL,
501
+ useExisting: forwardRef(() => CheckboxComponent),
502
+ },
503
+ ],
504
+ template: `
505
+ <input
506
+ type="checkbox"
507
+ class="sr-only"
508
+ tabindex="-1"
509
+ aria-hidden="true"
510
+ [name]="name() || null"
511
+ [checked]="internalChecked()"
512
+ [disabled]="isDisabled()"
513
+ />
514
+
515
+ <span [class]="boxWrapClasses()">
516
+ <span [class]="boxClasses()">
517
+ <span [class]="iconClasses()">
518
+ @if (internalIndeterminate()) {
519
+ <span [class]="iconColorClasses()" animate.enter="check-in">
520
+ <ng-content select="[slot='indeterminate-icon']">
521
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true">
522
+ <path
523
+ d="M5 12 h14"
524
+ stroke-width="3"
525
+ stroke-linecap="round"
526
+ stroke-linejoin="round"
527
+ />
528
+ </svg>
529
+ </ng-content>
530
+ </span>
531
+ } @else if (internalChecked()) {
532
+ <span [class]="iconColorClasses()" animate.enter="check-in">
533
+ <ng-content select="[slot='check-icon']">
534
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true">
535
+ <path
536
+ d="M5 12 l5 5 l9 -11"
537
+ stroke-width="3"
538
+ stroke-linecap="round"
539
+ stroke-linejoin="round"
540
+ />
541
+ </svg>
542
+ </ng-content>
543
+ </span>
544
+ }
545
+ </span>
546
+ </span>
547
+ </span>
548
+
549
+ <span [class]="labelWrapClasses()">
550
+ <span [id]="labelElementId()" [class]="labelClasses()">
551
+ <ng-content>
552
+ @if (label()) {
553
+ {{ label() }}
554
+ }
555
+ </ng-content>
556
+ </span>
557
+ <span [id]="descriptionElementId()" [class]="descriptionClasses()">
558
+ <ng-content select="[slot='description']">
559
+ @if (description()) {
560
+ {{ description() }}
561
+ }
562
+ </ng-content>
563
+ </span>
564
+ </span>
565
+ `,
566
+ host: {
567
+ 'role': 'checkbox',
568
+ '[id]': 'id()',
569
+ '[class]': 'rootClasses()',
570
+ '[attr.data-checked]': 'internalChecked()',
571
+ '[attr.data-indeterminate]': 'internalIndeterminate()',
572
+ '[attr.aria-checked]': 'ariaCheckedValue()',
573
+ '[attr.aria-disabled]': 'isDisabled() || null',
574
+ '[attr.aria-required]': 'required() || null',
575
+ '[attr.aria-invalid]': 'errorState() || null',
576
+ '[attr.aria-label]': 'ariaLabel() || null',
577
+ '[attr.aria-labelledby]': 'effectiveAriaLabelledby() || null',
578
+ '[attr.aria-describedby]': 'effectiveAriaDescribedby() || null',
579
+ '[attr.tabindex]': 'isDisabled() ? -1 : 0',
580
+ '[attr.name]': 'name() || null',
581
+ '(click)': 'toggle()',
582
+ '(keydown)': 'onKeydown($event)',
583
+ '(blur)': 'onBlur()',
584
+ },
585
+ }]
586
+ }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], change: [{ type: i0.Output, args: ["change"] }] } });
587
+
588
+ /**
589
+ * Generated bundle index. Do not edit.
590
+ */
591
+
592
+ export { CheckboxComponent };
593
+ //# sourceMappingURL=cdevhub-ngx-tw-checkbox.mjs.map