@cdevhub/ngx-tw 0.2.0 → 0.3.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.
- package/README.md +264 -49
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-alert.mjs +43 -29
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs +103 -0
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +56 -31
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +61 -35
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +154 -93
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +35 -22
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +3 -3
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +416 -216
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +152 -81
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +99 -47
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +42 -29
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +46 -29
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +205 -110
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +141 -74
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs +16 -11
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +395 -149
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +305 -150
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +56 -43
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +51 -33
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +905 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +49 -26
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +133 -74
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +28 -17
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +37 -21
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +63 -48
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs +622 -0
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +142 -72
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +101 -46
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +57 -30
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +108 -57
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +46 -26
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +227 -122
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +21 -12
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +58 -44
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +25 -14
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +155 -79
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +47 -25
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs +29 -16
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -42
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +107 -64
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +113 -47
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +61 -32
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +88 -42
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-table.mjs +266 -118
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +102 -52
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +798 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +16 -8
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +22 -14
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +243 -95
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +149 -82
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +100 -55
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +50 -28
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs +1129 -0
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs +554 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw.mjs +7 -0
- package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -1
- package/package.json +45 -17
- package/theme/_dark.css +16 -12
- package/theme/_semantic.css +3 -2
- package/theme/index.css +10 -2
- package/types/cdevhub-ngx-tw-aspect-ratio.d.ts +40 -0
- package/types/cdevhub-ngx-tw-calendar.d.ts +39 -8
- package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
- package/types/cdevhub-ngx-tw-command-palette.d.ts +7 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +36 -10
- package/types/cdevhub-ngx-tw-file-upload.d.ts +250 -0
- package/types/cdevhub-ngx-tw-form-field.d.ts +22 -3
- package/types/cdevhub-ngx-tw-icon-lucide.d.ts +21 -3
- package/types/cdevhub-ngx-tw-number-input.d.ts +130 -0
- package/types/cdevhub-ngx-tw-popover.d.ts +8 -0
- package/types/cdevhub-ngx-tw-select.d.ts +1 -1
- package/types/cdevhub-ngx-tw-stepper.d.ts +30 -2
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +8 -0
- package/types/cdevhub-ngx-tw-table.d.ts +30 -1
- package/types/cdevhub-ngx-tw-tabs.d.ts +8 -0
- package/types/cdevhub-ngx-tw-tags-input.d.ts +217 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +31 -6
- package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
- package/types/cdevhub-ngx-tw-transfer.d.ts +330 -0
- package/types/cdevhub-ngx-tw-tree.d.ts +189 -0
- package/types/cdevhub-ngx-tw.d.ts +7 -0
|
@@ -112,21 +112,29 @@ let nextId = 0;
|
|
|
112
112
|
// ── SwitchComponent ──────────────────────────────────────────────
|
|
113
113
|
class SwitchComponent {
|
|
114
114
|
/** Sets the semantic color for the active (checked) track. Defaults to `'primary'`. */
|
|
115
|
-
color = input('primary',
|
|
115
|
+
color = input('primary', /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
116
117
|
/** Controls the overall scale of the track, thumb, and label typography. Defaults to `'md'`. */
|
|
117
|
-
size = input('md',
|
|
118
|
+
size = input('md', /* @ts-ignore */
|
|
119
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
118
120
|
/** When true, prevents interaction and applies muted styling. Defaults to `false`. */
|
|
119
|
-
disabled = input(false,
|
|
121
|
+
disabled = input(false, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
120
123
|
/** When true, sets `aria-required="true"` so assistive tech announces the control as required. Defaults to `false`. */
|
|
121
|
-
required = input(false,
|
|
124
|
+
required = input(false, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
122
126
|
/** Optional inline label rendered next to the switch. Use default content projection for rich label content instead. */
|
|
123
|
-
label = input(undefined,
|
|
127
|
+
label = input(undefined, /* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
124
129
|
/** Optional secondary description rendered under the label. Use `[slot="description"]` content projection for rich content instead. */
|
|
125
|
-
description = input(undefined,
|
|
130
|
+
description = input(undefined, /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
126
132
|
/** Position of the label/description relative to the switch. Defaults to `'after'`. */
|
|
127
|
-
labelPosition = input('after',
|
|
133
|
+
labelPosition = input('after', /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
128
135
|
/** Optional name attribute, mirrored to the host for form association. */
|
|
129
|
-
name = input(undefined,
|
|
136
|
+
name = input(undefined, /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
130
138
|
/** Accessible name when no visible label is provided. Mirrored to `aria-label`. */
|
|
131
139
|
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
132
140
|
/** ID of an external element that labels the switch. Mirrored to `aria-labelledby`. */
|
|
@@ -134,9 +142,11 @@ class SwitchComponent {
|
|
|
134
142
|
/** ID of an external element that describes the switch. Mirrored to `aria-describedby`. */
|
|
135
143
|
ariaDescribedby = input(undefined, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
136
144
|
/** Two-way bound checked state. Updates when the user toggles via click or Space. */
|
|
137
|
-
checked = model(false,
|
|
145
|
+
checked = model(false, /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
138
147
|
/** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the switch uses the `TW_ERROR_STATE_MATCHER` token's value. */
|
|
139
|
-
errorStateMatcher = input(undefined,
|
|
148
|
+
errorStateMatcher = input(undefined, /* @ts-ignore */
|
|
149
|
+
...(ngDevMode ? [{ debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
|
|
140
150
|
/** Fires after the checked state changes from a user interaction. Does not fire when the value is updated programmatically via `writeValue`. */
|
|
141
151
|
change = output();
|
|
142
152
|
focusMonitor = inject(FocusMonitor);
|
|
@@ -148,9 +158,12 @@ class SwitchComponent {
|
|
|
148
158
|
defaultMatcher = inject(TW_ERROR_STATE_MATCHER);
|
|
149
159
|
onChange = () => { };
|
|
150
160
|
onTouched = () => { };
|
|
151
|
-
cvaDisabled = signal(false,
|
|
152
|
-
|
|
153
|
-
|
|
161
|
+
cvaDisabled = signal(false, /* @ts-ignore */
|
|
162
|
+
...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
163
|
+
_ngControlRev = signal(0, /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "_ngControlRev" }] : /* istanbul ignore next */ []));
|
|
165
|
+
_formSubmitRev = signal(0, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "_formSubmitRev" }] : /* istanbul ignore next */ []));
|
|
154
167
|
uid = nextId++;
|
|
155
168
|
hostId = `tw-switch-${this.uid}`;
|
|
156
169
|
labelId = `${this.hostId}-label`;
|
|
@@ -169,7 +182,8 @@ class SwitchComponent {
|
|
|
169
182
|
}
|
|
170
183
|
});
|
|
171
184
|
}
|
|
172
|
-
isDisabled = computed(() => this.disabled() || this.cvaDisabled(),
|
|
185
|
+
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), /* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
173
187
|
/** Whether the switch is in an error state per the configured `ErrorStateMatcher`. Reads the bound `NgControl.invalid` through the matcher. */
|
|
174
188
|
errorState = computed(() => {
|
|
175
189
|
this._ngControlRev();
|
|
@@ -178,8 +192,10 @@ class SwitchComponent {
|
|
|
178
192
|
const form = this.parentFormGroup ??
|
|
179
193
|
this.parentForm;
|
|
180
194
|
return matcher.isErrorState(this.ngControl?.control ?? null, form);
|
|
181
|
-
},
|
|
182
|
-
|
|
195
|
+
}, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "errorState" }] : /* istanbul ignore next */ []));
|
|
197
|
+
internalChecked = linkedSignal(() => this.checked(), /* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []));
|
|
183
199
|
effectiveAriaLabelledby = computed(() => {
|
|
184
200
|
const external = this.ariaLabelledby();
|
|
185
201
|
if (external)
|
|
@@ -187,42 +203,55 @@ class SwitchComponent {
|
|
|
187
203
|
if (this.ariaLabel())
|
|
188
204
|
return undefined;
|
|
189
205
|
return this.labelId;
|
|
190
|
-
},
|
|
206
|
+
}, /* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [{ debugName: "effectiveAriaLabelledby" }] : /* istanbul ignore next */ []));
|
|
191
208
|
effectiveAriaDescribedby = computed(() => {
|
|
192
209
|
const external = this.ariaDescribedby();
|
|
193
210
|
if (external)
|
|
194
211
|
return external;
|
|
195
212
|
return this.descriptionId;
|
|
196
|
-
},
|
|
213
|
+
}, /* @ts-ignore */
|
|
214
|
+
...(ngDevMode ? [{ debugName: "effectiveAriaDescribedby" }] : /* istanbul ignore next */ []));
|
|
197
215
|
variantResult = computed(() => switchVariants({
|
|
198
216
|
size: this.size(),
|
|
199
217
|
labelPosition: this.labelPosition(),
|
|
200
218
|
checked: this.internalChecked(),
|
|
201
219
|
disabled: this.isDisabled(),
|
|
202
220
|
errorState: this.errorState(),
|
|
203
|
-
}),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
}), /* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
|
|
223
|
+
rootClasses = computed(() => this.variantResult().root(), /* @ts-ignore */
|
|
224
|
+
...(ngDevMode ? [{ debugName: "rootClasses" }] : /* istanbul ignore next */ []));
|
|
225
|
+
switchClasses = computed(() => this.variantResult().switchEl(), /* @ts-ignore */
|
|
226
|
+
...(ngDevMode ? [{ debugName: "switchClasses" }] : /* istanbul ignore next */ []));
|
|
227
|
+
labelWrapClasses = computed(() => this.variantResult().labelWrap(), /* @ts-ignore */
|
|
228
|
+
...(ngDevMode ? [{ debugName: "labelWrapClasses" }] : /* istanbul ignore next */ []));
|
|
229
|
+
labelClasses = computed(() => this.variantResult().label(), /* @ts-ignore */
|
|
230
|
+
...(ngDevMode ? [{ debugName: "labelClasses" }] : /* istanbul ignore next */ []));
|
|
231
|
+
descriptionClasses = computed(() => this.variantResult().description(), /* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "descriptionClasses" }] : /* istanbul ignore next */ []));
|
|
233
|
+
iconWrapClasses = computed(() => this.variantResult().iconWrap(), /* @ts-ignore */
|
|
234
|
+
...(ngDevMode ? [{ debugName: "iconWrapClasses" }] : /* istanbul ignore next */ []));
|
|
235
|
+
thumbClasses = computed(() => this.variantResult().thumb(), /* @ts-ignore */
|
|
236
|
+
...(ngDevMode ? [{ debugName: "thumbClasses" }] : /* istanbul ignore next */ []));
|
|
211
237
|
trackClasses = computed(() => {
|
|
212
238
|
const base = this.variantResult().track();
|
|
213
239
|
return this.internalChecked() ? `${base} ${CHECKED_TRACK[this.color()]}` : base;
|
|
214
|
-
},
|
|
240
|
+
}, /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "trackClasses" }] : /* istanbul ignore next */ []));
|
|
215
242
|
onIconClasses = computed(() => {
|
|
216
243
|
const base = 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none empty:hidden';
|
|
217
244
|
const visibility = this.internalChecked() ? 'opacity-100' : 'opacity-0';
|
|
218
245
|
const color = this.internalChecked() ? CHECKED_ICON_COLOR[this.color()] : 'text-fg-muted';
|
|
219
246
|
return `${base} ${visibility} ${color}`;
|
|
220
|
-
},
|
|
247
|
+
}, /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "onIconClasses" }] : /* istanbul ignore next */ []));
|
|
221
249
|
offIconClasses = computed(() => {
|
|
222
250
|
const base = 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none text-fg-muted empty:hidden';
|
|
223
251
|
const visibility = this.internalChecked() ? 'opacity-0' : 'opacity-100';
|
|
224
252
|
return `${base} ${visibility}`;
|
|
225
|
-
},
|
|
253
|
+
}, /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "offIconClasses" }] : /* istanbul ignore next */ []));
|
|
226
255
|
// ── Interactions ──────────────────────────────────────────
|
|
227
256
|
/** Toggles the checked state. No-op when disabled. */
|
|
228
257
|
toggle() {
|
|
@@ -295,8 +324,8 @@ class SwitchComponent {
|
|
|
295
324
|
const host = this.elementRef.nativeElement;
|
|
296
325
|
return host.textContent !== null && host.textContent.trim().length > 0;
|
|
297
326
|
}
|
|
298
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
299
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SwitchComponent, isStandalone: true, selector: "tw-switch", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", 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 }, 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 }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", change: "change" }, host: { attributes: { "role": "switch" }, listeners: { "click": "toggle()", "keydown": "onKeydown($event)", "blur": "onBlur()" }, properties: { "id": "hostId", "class": "rootClasses()", "attr.data-checked": "internalChecked()", "attr.aria-checked": "internalChecked()", "attr.aria-disabled": "isDisabled() || null", "attr.aria-invalid": "errorState() || null", "attr.aria-required": "required() || 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" } }, ngImport: i0, template: `
|
|
300
329
|
<span [class]="switchClasses()">
|
|
301
330
|
<span [class]="trackClasses()">
|
|
302
331
|
<span [class]="iconWrapClasses()">
|
|
@@ -327,7 +356,7 @@ class SwitchComponent {
|
|
|
327
356
|
</span>
|
|
328
357
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
329
358
|
}
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
331
360
|
type: Component,
|
|
332
361
|
args: [{
|
|
333
362
|
selector: 'tw-switch',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-switch.mjs","sources":["../../../projects/ngx-tw/switch/switch.ts","../../../projects/ngx-tw/switch/cdevhub-ngx-tw-switch.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n type OnInit,\n output,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n type ControlValueAccessor,\n FormGroupDirective,\n NgControl,\n NgForm,\n} from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n TW_ERROR_STATE_MATCHER,\n type TwColor,\n type TwFormSubmitted,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Position of the label relative to the switch control. */\nexport type SwitchLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst switchVariants = tv(\n {\n slots: {\n root: 'inline-flex items-center gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n switchEl: 'relative inline-flex items-center shrink-0',\n track:\n 'relative inline-flex items-center rounded-full border border-transparent transition-colors duration-normal motion-reduce:transition-none',\n thumb:\n 'absolute left-0.5 inline-flex items-center justify-center bg-surface rounded-full shadow-sm transition-transform duration-normal motion-reduce:transition-none',\n iconWrap:\n 'absolute inset-0 flex items-center justify-between px-1 pointer-events-none empty:hidden',\n labelWrap: 'flex flex-col min-w-0 empty:hidden',\n label: 'font-medium text-fg empty:hidden',\n description: 'text-fg-muted empty:hidden',\n },\n variants: {\n size: {\n xs: {\n track: 'h-4 w-7',\n thumb: 'size-3 data-[checked=true]:translate-x-3',\n label: 'text-xs',\n description: 'text-2xs',\n },\n sm: {\n track: 'h-5 w-9',\n thumb: 'size-4 data-[checked=true]:translate-x-4',\n label: 'text-sm',\n description: 'text-xs',\n },\n md: {\n track: 'h-6 w-11',\n thumb: 'size-5 data-[checked=true]:translate-x-5',\n label: 'text-sm',\n description: 'text-xs',\n },\n lg: {\n track: 'h-7 w-12',\n thumb: 'size-6 data-[checked=true]:translate-x-5',\n label: 'text-base',\n description: 'text-sm',\n },\n xl: {\n track: 'h-8 w-14',\n thumb: 'size-7 data-[checked=true]:translate-x-6',\n label: 'text-base',\n description: 'text-sm',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n checked: {\n true: { track: '' },\n false: { track: 'bg-surface-muted' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n errorState: {\n true: { label: 'text-error-700', description: 'text-error-600' },\n false: { label: '', description: '' },\n },\n },\n compoundVariants: [\n // Error state on an off (unchecked) switch repaints the rail with the error color.\n // The on (checked) track is dominated by CHECKED_TRACK[color]; consumers wanting an\n // error appearance on a checked switch should set `color=\"error\"` directly.\n {\n errorState: true,\n checked: false,\n class: { track: 'bg-error-100 ring-1 ring-inset ring-error-300' },\n },\n ],\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n checked: false,\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static checked-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst CHECKED_TRACK: Record<TwColor, string> = {\n primary: 'bg-primary-600',\n secondary: 'bg-secondary-600',\n accent: 'bg-accent-600',\n neutral: 'bg-fg',\n info: 'bg-info-600',\n success: 'bg-success-600',\n warning: 'bg-warning-500',\n error: 'bg-error-600',\n};\n\nconst CHECKED_ICON_COLOR: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\nlet nextId = 0;\n\n// ── SwitchComponent ──────────────────────────────────────────────\n\n@Component({\n selector: 'tw-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span [class]=\"switchClasses()\">\n <span [class]=\"trackClasses()\">\n <span [class]=\"iconWrapClasses()\">\n <span [class]=\"offIconClasses()\">\n <ng-content select=\"[slot='off-icon']\" />\n </span>\n <span [class]=\"onIconClasses()\">\n <ng-content select=\"[slot='on-icon']\" />\n </span>\n </span>\n <span [class]=\"thumbClasses()\" [attr.data-checked]=\"internalChecked()\"></span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelId\" [class]=\"labelClasses()\">\n <ng-content />\n @if (label()) {\n {{ label() }}\n }\n </span>\n <span [id]=\"descriptionId\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\" />\n @if (description()) {\n {{ description() }}\n }\n </span>\n </span>\n `,\n host: {\n 'role': 'switch',\n '[id]': 'hostId',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.aria-checked]': 'internalChecked()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'effectiveAriaLabelledby() || null',\n '[attr.aria-describedby]': 'effectiveAriaDescribedby() || null',\n '[attr.tabindex]': 'isDisabled() ? -1 : 0',\n '[attr.name]': 'name() || null',\n '(click)': 'toggle()',\n '(keydown)': 'onKeydown($event)',\n '(blur)': 'onBlur()',\n },\n})\nexport class SwitchComponent implements ControlValueAccessor, OnInit {\n /** Sets the semantic color for the active (checked) track. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the track, thumb, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, prevents interaction and applies muted styling. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** When true, sets `aria-required=\"true\"` so assistive tech announces the control as required. Defaults to `false`. */\n readonly required = input(false);\n\n /** Optional inline label rendered next to the switch. Use default content projection for rich label content instead. */\n readonly label = input<string | undefined>(undefined);\n\n /** Optional secondary description rendered under the label. Use `[slot=\"description\"]` content projection for rich content instead. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the switch. Defaults to `'after'`. */\n readonly labelPosition = input<SwitchLabelPosition>('after');\n\n /** Optional name attribute, mirrored to the host for form association. */\n readonly name = input<string | undefined>(undefined);\n\n /** Accessible name when no visible label is provided. Mirrored to `aria-label`. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** ID of an external element that labels the switch. Mirrored to `aria-labelledby`. */\n readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** ID of an external element that describes the switch. Mirrored to `aria-describedby`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Two-way bound checked state. Updates when the user toggles via click or Space. */\n readonly checked = model(false);\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the switch uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /** Fires after the checked state changes from a user interaction. Does not fire when the value is updated programmatically via `writeValue`. */\n readonly change = output<boolean>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n private readonly parentForm = inject(NgForm, { optional: true });\n private readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n private readonly defaultMatcher = inject(TW_ERROR_STATE_MATCHER);\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n private readonly cvaDisabled = signal(false);\n private readonly _ngControlRev = signal(0);\n private readonly _formSubmitRev = signal(0);\n\n private readonly uid = nextId++;\n readonly hostId = `tw-switch-${this.uid}`;\n readonly labelId = `${this.hostId}-label`;\n readonly descriptionId = `${this.hostId}-description`;\n\n constructor() {\n // Material-style CVA wiring: declare ourselves as the value accessor on any\n // host-level `NgControl` (FormControlDirective, NgModel, etc.). This avoids\n // the circular-DI that a static `NG_VALUE_ACCESSOR` provider would create\n // because `NgControl` is injected with `self: true` on the same element.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-switch] The switch has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /** Whether the switch is in an error state per the configured `ErrorStateMatcher`. Reads the bound `NgControl.invalid` through the matcher. */\n readonly errorState: Signal<boolean> = computed(() => {\n this._ngControlRev();\n this._formSubmitRev();\n const matcher = this.errorStateMatcher() ?? this.defaultMatcher;\n const form: TwFormSubmitted | null =\n (this.parentFormGroup as TwFormSubmitted | null) ??\n (this.parentForm as TwFormSubmitted | null);\n return matcher.isErrorState(this.ngControl?.control ?? null, form);\n });\n\n readonly internalChecked = linkedSignal(() => this.checked());\n\n readonly effectiveAriaLabelledby = computed(() => {\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelId;\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const external = this.ariaDescribedby();\n if (external) return external;\n return this.descriptionId;\n });\n\n private readonly variantResult = computed(() =>\n switchVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n checked: this.internalChecked(),\n disabled: this.isDisabled(),\n errorState: this.errorState(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly switchClasses = computed(() => this.variantResult().switchEl());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n readonly iconWrapClasses = computed(() => this.variantResult().iconWrap());\n readonly thumbClasses = computed(() => this.variantResult().thumb());\n\n readonly trackClasses = computed(() => {\n const base = this.variantResult().track();\n return this.internalChecked() ? `${base} ${CHECKED_TRACK[this.color()]}` : base;\n });\n\n readonly onIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-100' : 'opacity-0';\n const color = this.internalChecked() ? CHECKED_ICON_COLOR[this.color()] : 'text-fg-muted';\n return `${base} ${visibility} ${color}`;\n });\n\n readonly offIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none text-fg-muted empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-0' : 'opacity-100';\n return `${base} ${visibility}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const next = !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\n this.onChange(next);\n this.onTouched();\n this.change.emit(next);\n }\n\n /** Handles keyboard activation. Space toggles the switch — matches the ARIA `switch` role pattern (Enter is intentionally NOT handled, mirroring `<tw-checkbox>`). */\n onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n /** @internal Called on host blur to notify forms the control has been touched and recompute errorState. */\n onBlur(): void {\n this.onTouched();\n this._ngControlRev.update((n) => n + 1);\n }\n\n // ── ControlValueAccessor ──────────────────────────────────\n\n writeValue(value: boolean | null | undefined): void {\n const next = !!value;\n this.internalChecked.set(next);\n this.checked.set(next);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n this.focusMonitor.monitor(this.elementRef);\n this.destroyRef.onDestroy(() => {\n this.focusMonitor.stopMonitoring(this.elementRef);\n });\n\n // NgControl's `control` is set by the parent FormControl* directive before\n // children's `ngOnInit`. Subscribe here so errorState reacts to status/value\n // changes on the bound control.\n const ctrl = this.ngControl?.control;\n if (ctrl) {\n const streams = [ctrl.statusChanges, ctrl.valueChanges].filter(\n (s): s is NonNullable<typeof s> => !!s,\n );\n if (streams.length) {\n merge(...streams)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this._ngControlRev.update((n) => n + 1));\n }\n }\n\n const submit = this.parentFormGroup?.ngSubmit ?? this.parentForm?.ngSubmit;\n if (submit) {\n submit\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this._formSubmitRev.update((n) => n + 1));\n }\n }\n\n private hasAccessibleNameHint(): boolean {\n if (this.label() || this.ariaLabel() || this.ariaLabelledby()) return true;\n const host = this.elementRef.nativeElement;\n return host.textContent !== null && host.textContent.trim().length > 0;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsCA;AAEA,MAAM,cAAc,GAAG,EAAE,CACvB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,+JAA+J;AACrK,QAAA,QAAQ,EAAE,4CAA4C;AACtD,QAAA,KAAK,EACH,0IAA0I;AAC5I,QAAA,KAAK,EACH,gKAAgK;AAClK,QAAA,QAAQ,EACN,0FAA0F;AAC5F,QAAA,SAAS,EAAE,oCAAoC;AAC/C,QAAA,KAAK,EAAE,kCAAkC;AACzC,QAAA,WAAW,EAAE,4BAA4B;AAC1C,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE;AACF,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,KAAK,EAAE,0CAA0C;AACjD,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,WAAW,EAAE,UAAU;AACxB,aAAA;AACD,YAAA,EAAE,EAAE;AACF,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,KAAK,EAAE,0CAA0C;AACjD,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,WAAW,EAAE,SAAS;AACvB,aAAA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AAA,SAAS,EAAE,UAAU;AACrB,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,QAAQ,EAAE,UAAU;AACrB,qBAAA;AACF,iBAAA;;;AC7MD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-switch.mjs","sources":["../../../projects/ngx-tw/switch/switch.ts","../../../projects/ngx-tw/switch/cdevhub-ngx-tw-switch.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n type OnInit,\n output,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n type ControlValueAccessor,\n FormGroupDirective,\n NgControl,\n NgForm,\n} from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n TW_ERROR_STATE_MATCHER,\n type TwColor,\n type TwFormSubmitted,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Position of the label relative to the switch control. */\nexport type SwitchLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst switchVariants = tv(\n {\n slots: {\n root: 'inline-flex items-center gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n switchEl: 'relative inline-flex items-center shrink-0',\n track:\n 'relative inline-flex items-center rounded-full border border-transparent transition-colors duration-normal motion-reduce:transition-none',\n thumb:\n 'absolute left-0.5 inline-flex items-center justify-center bg-surface rounded-full shadow-sm transition-transform duration-normal motion-reduce:transition-none',\n iconWrap:\n 'absolute inset-0 flex items-center justify-between px-1 pointer-events-none empty:hidden',\n labelWrap: 'flex flex-col min-w-0 empty:hidden',\n label: 'font-medium text-fg empty:hidden',\n description: 'text-fg-muted empty:hidden',\n },\n variants: {\n size: {\n xs: {\n track: 'h-4 w-7',\n thumb: 'size-3 data-[checked=true]:translate-x-3',\n label: 'text-xs',\n description: 'text-2xs',\n },\n sm: {\n track: 'h-5 w-9',\n thumb: 'size-4 data-[checked=true]:translate-x-4',\n label: 'text-sm',\n description: 'text-xs',\n },\n md: {\n track: 'h-6 w-11',\n thumb: 'size-5 data-[checked=true]:translate-x-5',\n label: 'text-sm',\n description: 'text-xs',\n },\n lg: {\n track: 'h-7 w-12',\n thumb: 'size-6 data-[checked=true]:translate-x-5',\n label: 'text-base',\n description: 'text-sm',\n },\n xl: {\n track: 'h-8 w-14',\n thumb: 'size-7 data-[checked=true]:translate-x-6',\n label: 'text-base',\n description: 'text-sm',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n checked: {\n true: { track: '' },\n false: { track: 'bg-surface-muted' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n errorState: {\n true: { label: 'text-error-700', description: 'text-error-600' },\n false: { label: '', description: '' },\n },\n },\n compoundVariants: [\n // Error state on an off (unchecked) switch repaints the rail with the error color.\n // The on (checked) track is dominated by CHECKED_TRACK[color]; consumers wanting an\n // error appearance on a checked switch should set `color=\"error\"` directly.\n {\n errorState: true,\n checked: false,\n class: { track: 'bg-error-100 ring-1 ring-inset ring-error-300' },\n },\n ],\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n checked: false,\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static checked-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst CHECKED_TRACK: Record<TwColor, string> = {\n primary: 'bg-primary-600',\n secondary: 'bg-secondary-600',\n accent: 'bg-accent-600',\n neutral: 'bg-fg',\n info: 'bg-info-600',\n success: 'bg-success-600',\n warning: 'bg-warning-500',\n error: 'bg-error-600',\n};\n\nconst CHECKED_ICON_COLOR: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\nlet nextId = 0;\n\n// ── SwitchComponent ──────────────────────────────────────────────\n\n@Component({\n selector: 'tw-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span [class]=\"switchClasses()\">\n <span [class]=\"trackClasses()\">\n <span [class]=\"iconWrapClasses()\">\n <span [class]=\"offIconClasses()\">\n <ng-content select=\"[slot='off-icon']\" />\n </span>\n <span [class]=\"onIconClasses()\">\n <ng-content select=\"[slot='on-icon']\" />\n </span>\n </span>\n <span [class]=\"thumbClasses()\" [attr.data-checked]=\"internalChecked()\"></span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelId\" [class]=\"labelClasses()\">\n <ng-content />\n @if (label()) {\n {{ label() }}\n }\n </span>\n <span [id]=\"descriptionId\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\" />\n @if (description()) {\n {{ description() }}\n }\n </span>\n </span>\n `,\n host: {\n 'role': 'switch',\n '[id]': 'hostId',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.aria-checked]': 'internalChecked()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'effectiveAriaLabelledby() || null',\n '[attr.aria-describedby]': 'effectiveAriaDescribedby() || null',\n '[attr.tabindex]': 'isDisabled() ? -1 : 0',\n '[attr.name]': 'name() || null',\n '(click)': 'toggle()',\n '(keydown)': 'onKeydown($event)',\n '(blur)': 'onBlur()',\n },\n})\nexport class SwitchComponent implements ControlValueAccessor, OnInit {\n /** Sets the semantic color for the active (checked) track. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the track, thumb, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, prevents interaction and applies muted styling. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** When true, sets `aria-required=\"true\"` so assistive tech announces the control as required. Defaults to `false`. */\n readonly required = input(false);\n\n /** Optional inline label rendered next to the switch. Use default content projection for rich label content instead. */\n readonly label = input<string | undefined>(undefined);\n\n /** Optional secondary description rendered under the label. Use `[slot=\"description\"]` content projection for rich content instead. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the switch. Defaults to `'after'`. */\n readonly labelPosition = input<SwitchLabelPosition>('after');\n\n /** Optional name attribute, mirrored to the host for form association. */\n readonly name = input<string | undefined>(undefined);\n\n /** Accessible name when no visible label is provided. Mirrored to `aria-label`. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** ID of an external element that labels the switch. Mirrored to `aria-labelledby`. */\n readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** ID of an external element that describes the switch. Mirrored to `aria-describedby`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Two-way bound checked state. Updates when the user toggles via click or Space. */\n readonly checked = model(false);\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the switch uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /** Fires after the checked state changes from a user interaction. Does not fire when the value is updated programmatically via `writeValue`. */\n readonly change = output<boolean>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n private readonly parentForm = inject(NgForm, { optional: true });\n private readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n private readonly defaultMatcher = inject(TW_ERROR_STATE_MATCHER);\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n private readonly cvaDisabled = signal(false);\n private readonly _ngControlRev = signal(0);\n private readonly _formSubmitRev = signal(0);\n\n private readonly uid = nextId++;\n readonly hostId = `tw-switch-${this.uid}`;\n readonly labelId = `${this.hostId}-label`;\n readonly descriptionId = `${this.hostId}-description`;\n\n constructor() {\n // Material-style CVA wiring: declare ourselves as the value accessor on any\n // host-level `NgControl` (FormControlDirective, NgModel, etc.). This avoids\n // the circular-DI that a static `NG_VALUE_ACCESSOR` provider would create\n // because `NgControl` is injected with `self: true` on the same element.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-switch] The switch has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /** Whether the switch is in an error state per the configured `ErrorStateMatcher`. Reads the bound `NgControl.invalid` through the matcher. */\n readonly errorState: Signal<boolean> = computed(() => {\n this._ngControlRev();\n this._formSubmitRev();\n const matcher = this.errorStateMatcher() ?? this.defaultMatcher;\n const form: TwFormSubmitted | null =\n (this.parentFormGroup as TwFormSubmitted | null) ??\n (this.parentForm as TwFormSubmitted | null);\n return matcher.isErrorState(this.ngControl?.control ?? null, form);\n });\n\n readonly internalChecked = linkedSignal(() => this.checked());\n\n readonly effectiveAriaLabelledby = computed(() => {\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelId;\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const external = this.ariaDescribedby();\n if (external) return external;\n return this.descriptionId;\n });\n\n private readonly variantResult = computed(() =>\n switchVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n checked: this.internalChecked(),\n disabled: this.isDisabled(),\n errorState: this.errorState(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly switchClasses = computed(() => this.variantResult().switchEl());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n readonly iconWrapClasses = computed(() => this.variantResult().iconWrap());\n readonly thumbClasses = computed(() => this.variantResult().thumb());\n\n readonly trackClasses = computed(() => {\n const base = this.variantResult().track();\n return this.internalChecked() ? `${base} ${CHECKED_TRACK[this.color()]}` : base;\n });\n\n readonly onIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-100' : 'opacity-0';\n const color = this.internalChecked() ? CHECKED_ICON_COLOR[this.color()] : 'text-fg-muted';\n return `${base} ${visibility} ${color}`;\n });\n\n readonly offIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none text-fg-muted empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-0' : 'opacity-100';\n return `${base} ${visibility}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const next = !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\n this.onChange(next);\n this.onTouched();\n this.change.emit(next);\n }\n\n /** Handles keyboard activation. Space toggles the switch — matches the ARIA `switch` role pattern (Enter is intentionally NOT handled, mirroring `<tw-checkbox>`). */\n onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n /** @internal Called on host blur to notify forms the control has been touched and recompute errorState. */\n onBlur(): void {\n this.onTouched();\n this._ngControlRev.update((n) => n + 1);\n }\n\n // ── ControlValueAccessor ──────────────────────────────────\n\n writeValue(value: boolean | null | undefined): void {\n const next = !!value;\n this.internalChecked.set(next);\n this.checked.set(next);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n this.focusMonitor.monitor(this.elementRef);\n this.destroyRef.onDestroy(() => {\n this.focusMonitor.stopMonitoring(this.elementRef);\n });\n\n // NgControl's `control` is set by the parent FormControl* directive before\n // children's `ngOnInit`. Subscribe here so errorState reacts to status/value\n // changes on the bound control.\n const ctrl = this.ngControl?.control;\n if (ctrl) {\n const streams = [ctrl.statusChanges, ctrl.valueChanges].filter(\n (s): s is NonNullable<typeof s> => !!s,\n );\n if (streams.length) {\n merge(...streams)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this._ngControlRev.update((n) => n + 1));\n }\n }\n\n const submit = this.parentFormGroup?.ngSubmit ?? this.parentForm?.ngSubmit;\n if (submit) {\n submit\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this._formSubmitRev.update((n) => n + 1));\n }\n }\n\n private hasAccessibleNameHint(): boolean {\n if (this.label() || this.ariaLabel() || this.ariaLabelledby()) return true;\n const host = this.elementRef.nativeElement;\n return host.textContent !== null && host.textContent.trim().length > 0;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsCA;AAEA,MAAM,cAAc,GAAG,EAAE,CACvB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,+JAA+J;AACrK,QAAA,QAAQ,EAAE,4CAA4C;AACtD,QAAA,KAAK,EACH,0IAA0I;AAC5I,QAAA,KAAK,EACH,gKAAgK;AAClK,QAAA,QAAQ,EACN,0FAA0F;AAC5F,QAAA,SAAS,EAAE,oCAAoC;AAC/C,QAAA,KAAK,EAAE,kCAAkC;AACzC,QAAA,WAAW,EAAE,4BAA4B;AAC1C,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IA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