@spartan-ng/brain 0.0.1-alpha.707 → 0.0.1-alpha.708
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/fesm2022/spartan-ng-brain-accordion.mjs +30 -30
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +19 -19
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-autocomplete.mjs +89 -102
- package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-avatar.mjs +15 -15
- package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-button.mjs +4 -4
- package/fesm2022/spartan-ng-brain-button.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-calendar.mjs +120 -127
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +24 -24
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +17 -17
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-combobox.mjs +151 -178
- package/fesm2022/spartan-ng-brain-combobox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-command.mjs +43 -52
- package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-core.mjs +5 -5
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time-luxon.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +72 -86
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-field.mjs +38 -43
- package/fesm2022/spartan-ng-brain-field.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-forms.mjs +20 -20
- package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs +24 -32
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +23 -25
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input.mjs +6 -6
- package/fesm2022/spartan-ng-brain-input.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-label.mjs +6 -6
- package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs +49 -53
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-popover.mjs +13 -15
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-progress.mjs +11 -13
- package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +28 -34
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-resizable.mjs +23 -23
- package/fesm2022/spartan-ng-brain-resizable.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +102 -105
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-separator.mjs +7 -7
- package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs +24 -24
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-slider.mjs +52 -76
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sonner.mjs +108 -132
- package/fesm2022/spartan-ng-brain-sonner.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +21 -23
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tabs.mjs +36 -39
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-textarea.mjs +6 -6
- package/fesm2022/spartan-ng-brain-textarea.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +21 -27
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle.mjs +10 -12
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +27 -27
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/hlm-tailwind-preset.css +6 -6
- package/package.json +44 -43
- package/{autocomplete/index.d.ts → types/spartan-ng-brain-autocomplete.d.ts} +10 -10
- package/{calendar/index.d.ts → types/spartan-ng-brain-calendar.d.ts} +2 -2
- package/{combobox/index.d.ts → types/spartan-ng-brain-combobox.d.ts} +10 -10
- package/{dialog/index.d.ts → types/spartan-ng-brain-dialog.d.ts} +1 -1
- package/{hover-card/index.d.ts → types/spartan-ng-brain-hover-card.d.ts} +1 -1
- package/{select/index.d.ts → types/spartan-ng-brain-select.d.ts} +11 -11
- /package/{accordion/index.d.ts → types/spartan-ng-brain-accordion.d.ts} +0 -0
- /package/{alert-dialog/index.d.ts → types/spartan-ng-brain-alert-dialog.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/spartan-ng-brain-avatar.d.ts} +0 -0
- /package/{button/index.d.ts → types/spartan-ng-brain-button.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/spartan-ng-brain-checkbox.d.ts} +0 -0
- /package/{collapsible/index.d.ts → types/spartan-ng-brain-collapsible.d.ts} +0 -0
- /package/{command/index.d.ts → types/spartan-ng-brain-command.d.ts} +0 -0
- /package/{core/index.d.ts → types/spartan-ng-brain-core.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/spartan-ng-brain-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/spartan-ng-brain-date-time.d.ts} +0 -0
- /package/{field/index.d.ts → types/spartan-ng-brain-field.d.ts} +0 -0
- /package/{forms/index.d.ts → types/spartan-ng-brain-forms.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/spartan-ng-brain-input-otp.d.ts} +0 -0
- /package/{input/index.d.ts → types/spartan-ng-brain-input.d.ts} +0 -0
- /package/{label/index.d.ts → types/spartan-ng-brain-label.d.ts} +0 -0
- /package/{navigation-menu/index.d.ts → types/spartan-ng-brain-navigation-menu.d.ts} +0 -0
- /package/{popover/index.d.ts → types/spartan-ng-brain-popover.d.ts} +0 -0
- /package/{progress/index.d.ts → types/spartan-ng-brain-progress.d.ts} +0 -0
- /package/{radio-group/index.d.ts → types/spartan-ng-brain-radio-group.d.ts} +0 -0
- /package/{resizable/index.d.ts → types/spartan-ng-brain-resizable.d.ts} +0 -0
- /package/{separator/index.d.ts → types/spartan-ng-brain-separator.d.ts} +0 -0
- /package/{sheet/index.d.ts → types/spartan-ng-brain-sheet.d.ts} +0 -0
- /package/{slider/index.d.ts → types/spartan-ng-brain-slider.d.ts} +0 -0
- /package/{sonner/index.d.ts → types/spartan-ng-brain-sonner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/spartan-ng-brain-switch.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/spartan-ng-brain-tabs.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/spartan-ng-brain-textarea.d.ts} +0 -0
- /package/{toggle-group/index.d.ts → types/spartan-ng-brain-toggle-group.d.ts} +0 -0
- /package/{toggle/index.d.ts → types/spartan-ng-brain-toggle.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/spartan-ng-brain-tooltip.d.ts} +0 -0
- /package/{index.d.ts → types/spartan-ng-brain.d.ts} +0 -0
|
@@ -23,13 +23,13 @@ class BrnCheckbox {
|
|
|
23
23
|
_fieldControl = inject(BrnFieldControl, { optional: true });
|
|
24
24
|
_document = inject(DOCUMENT);
|
|
25
25
|
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
26
|
-
_focusVisible = signal(false, ...(ngDevMode ? [{ debugName: "_focusVisible" }] : []));
|
|
27
|
-
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : []));
|
|
26
|
+
_focusVisible = signal(false, ...(ngDevMode ? [{ debugName: "_focusVisible" }] : /* istanbul ignore next */ []));
|
|
27
|
+
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
|
|
28
28
|
/**
|
|
29
29
|
* The checked state of the checkbox.
|
|
30
30
|
* Can be bound with [(checked)] for two-way binding.
|
|
31
31
|
*/
|
|
32
|
-
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
32
|
+
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
33
33
|
/** Emits when checked state changes. */
|
|
34
34
|
checkedChange = output();
|
|
35
35
|
/**
|
|
@@ -41,7 +41,7 @@ class BrnCheckbox {
|
|
|
41
41
|
* The indeterminate state of the checkbox.
|
|
42
42
|
* For example, a "select all/deselect all" checkbox may be in the indeterminate state when some but not all of its sub-controls are checked.
|
|
43
43
|
*/
|
|
44
|
-
indeterminate = model(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
44
|
+
indeterminate = model(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
45
45
|
/**
|
|
46
46
|
* Computed data-state attribute value based on checked state.
|
|
47
47
|
* Returns 'checked', 'unchecked', or 'indeterminate'.
|
|
@@ -50,7 +50,7 @@ class BrnCheckbox {
|
|
|
50
50
|
if (this.indeterminate())
|
|
51
51
|
return 'indeterminate';
|
|
52
52
|
return this.checked() ? 'checked' : 'unchecked';
|
|
53
|
-
}, ...(ngDevMode ? [{ debugName: "_dataState" }] : []));
|
|
53
|
+
}, ...(ngDevMode ? [{ debugName: "_dataState" }] : /* istanbul ignore next */ []));
|
|
54
54
|
/**
|
|
55
55
|
* Computed aria-checked attribute value for accessibility.
|
|
56
56
|
* Returns 'true', 'false', or 'mixed' (for indeterminate).
|
|
@@ -59,51 +59,51 @@ class BrnCheckbox {
|
|
|
59
59
|
if (this.indeterminate())
|
|
60
60
|
return 'mixed';
|
|
61
61
|
return this.checked() ? 'true' : 'false';
|
|
62
|
-
}, ...(ngDevMode ? [{ debugName: "_ariaChecked" }] : []));
|
|
62
|
+
}, ...(ngDevMode ? [{ debugName: "_ariaChecked" }] : /* istanbul ignore next */ []));
|
|
63
63
|
/**
|
|
64
64
|
* Unique identifier for checkbox component.
|
|
65
65
|
* When provided, inner button gets ID without '-checkbox' suffix.
|
|
66
66
|
* Auto-generates ID if not provided.
|
|
67
67
|
*/
|
|
68
|
-
id = input(++uniqueIdCounter + '', ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
68
|
+
id = input(++uniqueIdCounter + '', ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
69
69
|
/**
|
|
70
70
|
* Form control name for checkbox.
|
|
71
71
|
* When provided, inner button gets name without '-checkbox' suffix.
|
|
72
72
|
*/
|
|
73
|
-
name = input(null, ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
73
|
+
name = input(null, ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
74
74
|
/**
|
|
75
75
|
* CSS classes applied to inner button element.
|
|
76
76
|
*/
|
|
77
|
-
class = input(null, ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
77
|
+
class = input(null, ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
78
78
|
/**
|
|
79
79
|
* Accessibility label for screen readers.
|
|
80
80
|
* Use when no visible label exists.
|
|
81
81
|
*/
|
|
82
|
-
ariaLabel = input(null, ...(ngDevMode ?
|
|
82
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
83
83
|
/**
|
|
84
84
|
* ID of element that labels this checkbox for accessibility.
|
|
85
85
|
* Auto-set when checkbox is inside label element.
|
|
86
86
|
*/
|
|
87
|
-
ariaLabelledby = input(null, ...(ngDevMode ?
|
|
88
|
-
mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby(), ...(ngDevMode ? [{ debugName: "mutableAriaLabelledby" }] : []));
|
|
87
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
88
|
+
mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby(), ...(ngDevMode ? [{ debugName: "mutableAriaLabelledby" }] : /* istanbul ignore next */ []));
|
|
89
89
|
/**
|
|
90
90
|
* ID of element that describes this checkbox for accessibility.
|
|
91
91
|
*/
|
|
92
|
-
ariaDescribedby = input(null, ...(ngDevMode ?
|
|
92
|
+
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
93
93
|
/**
|
|
94
94
|
* Whether checkbox is required in a form.
|
|
95
95
|
*/
|
|
96
|
-
required = input(false, ...(ngDevMode ?
|
|
96
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
97
|
/**
|
|
98
98
|
* Whether checkbox is disabled.
|
|
99
99
|
* Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.
|
|
100
100
|
*/
|
|
101
|
-
disabled = input(false, ...(ngDevMode ?
|
|
101
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
102
102
|
/**
|
|
103
103
|
* Whether to force the field into an invalid state, regardless of the form control's state.
|
|
104
104
|
* Overrides both the `data-invalid` and `data-matches-spartan-invalid` attributes.
|
|
105
105
|
*/
|
|
106
|
-
forceInvalid = input(false, ...(ngDevMode ?
|
|
106
|
+
forceInvalid = input(false, { ...(ngDevMode ? { debugName: "forceInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
107
107
|
/**
|
|
108
108
|
* Computed state for checkbox container and accessibility.
|
|
109
109
|
* Manages ID, name, and disabled state.
|
|
@@ -116,13 +116,13 @@ class BrnCheckbox {
|
|
|
116
116
|
name: name ? name + CONTAINER_POST_FIX : null,
|
|
117
117
|
id: id ? id + CONTAINER_POST_FIX : null,
|
|
118
118
|
};
|
|
119
|
-
}, ...(ngDevMode ? [{ debugName: "_state" }] : []));
|
|
120
|
-
_buttonId = computed(() => this._getCheckboxButtonId(this._state().id), ...(ngDevMode ? [{ debugName: "_buttonId" }] : []));
|
|
121
|
-
_buttonName = computed(() => this._getCheckboxButtonId(this._state().name), ...(ngDevMode ? [{ debugName: "_buttonName" }] : []));
|
|
119
|
+
}, ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
120
|
+
_buttonId = computed(() => this._getCheckboxButtonId(this._state().id), ...(ngDevMode ? [{ debugName: "_buttonId" }] : /* istanbul ignore next */ []));
|
|
121
|
+
_buttonName = computed(() => this._getCheckboxButtonId(this._state().name), ...(ngDevMode ? [{ debugName: "_buttonName" }] : /* istanbul ignore next */ []));
|
|
122
122
|
labelableId = this._buttonId;
|
|
123
123
|
_dirty = this._fieldControl?.dirty;
|
|
124
|
-
_invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null), ...(ngDevMode ? [{ debugName: "_invalid" }] : []));
|
|
125
|
-
spartanInvalid = computed(() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null), ...(ngDevMode ? [{ debugName: "spartanInvalid" }] : []));
|
|
124
|
+
_invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null), ...(ngDevMode ? [{ debugName: "_invalid" }] : /* istanbul ignore next */ []));
|
|
125
|
+
spartanInvalid = computed(() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null), ...(ngDevMode ? [{ debugName: "spartanInvalid" }] : /* istanbul ignore next */ []));
|
|
126
126
|
_controlTouched = this._fieldControl?.touched;
|
|
127
127
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
128
128
|
_onChange = () => { };
|
|
@@ -251,8 +251,8 @@ class BrnCheckbox {
|
|
|
251
251
|
this._state().disabled.set(isDisabled);
|
|
252
252
|
this._cdr.markForCheck();
|
|
253
253
|
}
|
|
254
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
255
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
254
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
255
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnCheckbox, isStandalone: true, selector: "brn-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, forceInvalid: { classPropertyName: "forceInvalid", publicName: "forceInvalid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", checkedChange: "checkedChange", indeterminate: "indeterminateChange", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.aria-invalid": "_invalid?.() ? \"true\" : null", "attr.data-invalid": "_invalid?.() ? \"true\" : null", "attr.data-matches-spartan-invalid": "spartanInvalid?.() ? \"true\" : null", "attr.data-touched": "_controlTouched?.() ? \"true\" : null", "attr.data-dirty": "_dirty?.() ? \"true\" : null", "attr.data-state": "_dataState()", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0, template: `
|
|
256
256
|
<button
|
|
257
257
|
#checkBox
|
|
258
258
|
role="checkbox"
|
|
@@ -276,7 +276,7 @@ class BrnCheckbox {
|
|
|
276
276
|
</button>
|
|
277
277
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
278
278
|
}
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCheckbox, decorators: [{
|
|
280
280
|
type: Component,
|
|
281
281
|
args: [{
|
|
282
282
|
selector: 'brn-checkbox',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport { type ChangeFn, type TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckbox),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': 'spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_controlTouched?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\" : null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.id]=\"_buttonId()\"\n\t\t\t[attr.name]=\"_buttonName()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n})\nexport class BrnCheckbox implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * The checked state of the checkbox.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<boolean>(false);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/*\n\t * The indeterminate state of the checkbox.\n\t * For example, a \"select all/deselect all\" checkbox may be in the indeterminate state when some but not all of its sub-controls are checked.\n\t */\n\tpublic readonly indeterminate = model<boolean>(false);\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tif (this.indeterminate()) return 'indeterminate';\n\t\treturn this.checked() ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tif (this.indeterminate()) return 'mixed';\n\t\treturn this.checked() ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to force the field into an invalid state, regardless of the form control's state.\n\t * Overrides both the `data-invalid` and `data-matches-spartan-invalid` attributes.\n\t */\n\tpublic readonly forceInvalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tprotected readonly _buttonId = computed(() => this._getCheckboxButtonId(this._state().id));\n\n\tprotected readonly _buttonName = computed(() => this._getCheckboxButtonId(this._state().name));\n\n\tpublic readonly labelableId = this._buttonId;\n\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null));\n\tpublic readonly spartanInvalid = computed(\n\t\t() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null),\n\t);\n\tprotected readonly _controlTouched = this._fieldControl?.touched;\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this._getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst newChecked = this.indeterminate() ? true : !this.checked();\n\t\tthis.indeterminate.set(false);\n\t\tthis.checkedChange.emit(newChecked);\n\t\tthis.checked.set(newChecked);\n\t\tthis._onChange(newChecked);\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected _getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: boolean): void {\n\t\tthis.checked.set(value);\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { BrnCheckbox } from './lib/brn-checkbox';\n\nexport * from './lib/brn-checkbox';\n\nexport const BrnCheckboxImports = [BrnCheckbox] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BO,MAAM,2BAA2B,GAAG;AAC1C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,eAAe,GAAG,CAAC;AAEvB,MAAM,kBAAkB,GAAG,WAAW;MAgDzB,WAAW,CAAA;AACN,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAChC,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC3D,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5B,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEjD,IAAA,aAA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AyB,EAAE,MAAM;AACjC,wBAAA,qBAAqB,EAAE,8BAA8B;AACrD,wBAAA,qBAAqB,EAAE,8BAA8B;AACrD,wBAAA,qCAAqC,EAAE,oCAAoC;AAC3E,wBAAA,qBAAqB,EAAE,qCAAqC;AAC5D,wBAAA,mBAAmB,EAAE,4BAA4B;AACjD,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,2BAA2B,EAAE,iBAAiB;AAC9C,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;AAsBT,CAAA,CAAA;AACD,iBAAA;szCA6I6E,UAAU,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/NjF,MAAM,kBAAkB,GAAG,CAAC,WAAW;;ACJ9C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport { type ChangeFn, type TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckbox),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': 'spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_controlTouched?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\" : null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.id]=\"_buttonId()\"\n\t\t\t[attr.name]=\"_buttonName()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n})\nexport class BrnCheckbox implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * The checked state of the checkbox.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<boolean>(false);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/*\n\t * The indeterminate state of the checkbox.\n\t * For example, a \"select all/deselect all\" checkbox may be in the indeterminate state when some but not all of its sub-controls are checked.\n\t */\n\tpublic readonly indeterminate = model<boolean>(false);\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tif (this.indeterminate()) return 'indeterminate';\n\t\treturn this.checked() ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tif (this.indeterminate()) return 'mixed';\n\t\treturn this.checked() ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to force the field into an invalid state, regardless of the form control's state.\n\t * Overrides both the `data-invalid` and `data-matches-spartan-invalid` attributes.\n\t */\n\tpublic readonly forceInvalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tprotected readonly _buttonId = computed(() => this._getCheckboxButtonId(this._state().id));\n\n\tprotected readonly _buttonName = computed(() => this._getCheckboxButtonId(this._state().name));\n\n\tpublic readonly labelableId = this._buttonId;\n\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null));\n\tpublic readonly spartanInvalid = computed(\n\t\t() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null),\n\t);\n\tprotected readonly _controlTouched = this._fieldControl?.touched;\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this._getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst newChecked = this.indeterminate() ? true : !this.checked();\n\t\tthis.indeterminate.set(false);\n\t\tthis.checkedChange.emit(newChecked);\n\t\tthis.checked.set(newChecked);\n\t\tthis._onChange(newChecked);\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected _getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: boolean): void {\n\t\tthis.checked.set(value);\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { BrnCheckbox } from './lib/brn-checkbox';\n\nexport * from './lib/brn-checkbox';\n\nexport const BrnCheckboxImports = [BrnCheckbox] as const;\n","/**\n * Gener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ollapsibleConfig() {
|
|
|
23
23
|
|
|
24
24
|
let collapsibleContentIdSequence = 0;
|
|
25
25
|
class BrnCollapsible {
|
|
26
|
-
contentId = signal(`brn-collapsible-content-${++collapsibleContentIdSequence}`, ...(ngDevMode ? [{ debugName: "contentId" }] : []));
|
|
26
|
+
contentId = signal(`brn-collapsible-content-${++collapsibleContentIdSequence}`, ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
27
27
|
/**
|
|
28
28
|
* The expanded or collapsed state of the collapsible component.
|
|
29
29
|
*/
|
|
30
|
-
expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
30
|
+
expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
31
31
|
/**
|
|
32
32
|
* The current state of the collapsible component as 'open' or 'closed'.
|
|
33
33
|
*/
|
|
34
|
-
state = computed(() => (this.expanded() ? 'open' : 'closed'), ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
34
|
+
state = computed(() => (this.expanded() ? 'open' : 'closed'), ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
35
35
|
/**
|
|
36
36
|
* The disabled state of the collapsible component.
|
|
37
37
|
*/
|
|
38
|
-
disabled = input(false, ...(ngDevMode ?
|
|
38
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
39
39
|
/**
|
|
40
40
|
* Toggles the expanded state of the collapsible component.
|
|
41
41
|
*/
|
|
@@ -45,10 +45,10 @@ class BrnCollapsible {
|
|
|
45
45
|
}
|
|
46
46
|
this.expanded.update((expanded) => !expanded);
|
|
47
47
|
}
|
|
48
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
48
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsible, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
49
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnCollapsible, isStandalone: true, selector: "[brnCollapsible],brn-collapsible", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "attr.data-state": "state()", "attr.disabled": "disabled() ? true : undefined" } }, providers: [provideBrnCollapsible(BrnCollapsible)], ngImport: i0 });
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsible, decorators: [{
|
|
52
52
|
type: Directive,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: '[brnCollapsible],brn-collapsible',
|
|
@@ -67,12 +67,12 @@ class BrnCollapsibleContent {
|
|
|
67
67
|
_ngZone = inject(NgZone);
|
|
68
68
|
_platformId = inject(PLATFORM_ID);
|
|
69
69
|
_collapsible = injectBrnCollapsible();
|
|
70
|
-
_width = signal(null, ...(ngDevMode ? [{ debugName: "_width" }] : []));
|
|
71
|
-
_height = signal(null, ...(ngDevMode ? [{ debugName: "_height" }] : []));
|
|
70
|
+
_width = signal(null, ...(ngDevMode ? [{ debugName: "_width" }] : /* istanbul ignore next */ []));
|
|
71
|
+
_height = signal(null, ...(ngDevMode ? [{ debugName: "_height" }] : /* istanbul ignore next */ []));
|
|
72
72
|
/**
|
|
73
73
|
* The id of the collapsible content element.
|
|
74
74
|
*/
|
|
75
|
-
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
75
|
+
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
76
76
|
constructor() {
|
|
77
77
|
if (!this._collapsible) {
|
|
78
78
|
throw Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');
|
|
@@ -116,10 +116,10 @@ class BrnCollapsibleContent {
|
|
|
116
116
|
this._destroyRef.onDestroy(() => observer.disconnect());
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
120
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
119
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsibleContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
120
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnCollapsibleContent, isStandalone: true, selector: "[brnCollapsibleContent],brn-collapsible-content", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.inert": "_collapsible?.state() === 'closed' ? true : undefined", "attr.data-state": "_collapsible?.state()", "id": "_collapsible?.contentId()", "style.--brn-collapsible-content-width.px": "_width()", "style.--brn-collapsible-content-height.px": "_height()" } }, ngImport: i0 });
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsibleContent, decorators: [{
|
|
123
123
|
type: Directive,
|
|
124
124
|
args: [{
|
|
125
125
|
selector: '[brnCollapsibleContent],brn-collapsible-content',
|
|
@@ -135,7 +135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
135
135
|
|
|
136
136
|
class BrnCollapsibleTrigger {
|
|
137
137
|
_collapsible = injectBrnCollapsible();
|
|
138
|
-
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
138
|
+
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
139
139
|
constructor() {
|
|
140
140
|
if (!this._collapsible) {
|
|
141
141
|
throw Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');
|
|
@@ -144,10 +144,10 @@ class BrnCollapsibleTrigger {
|
|
|
144
144
|
toggle() {
|
|
145
145
|
this._collapsible?.toggle();
|
|
146
146
|
}
|
|
147
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
148
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
147
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsibleTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
148
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnCollapsibleTrigger, isStandalone: true, selector: "button[brnCollapsibleTrigger]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggle()" }, properties: { "attr.data-state": "_collapsible?.state()", "attr.disabled": "_collapsible?.disabled() ? true : undefined", "attr.aria-expanded": "_collapsible?.expanded()", "attr.aria-controls": "_collapsible?.contentId()", "type": "type()" } }, ngImport: i0 });
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCollapsibleTrigger, decorators: [{
|
|
151
151
|
type: Directive,
|
|
152
152
|
args: [{
|
|
153
153
|
selector: 'button[brnCollapsibleTrigger]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-collapsible.mjs","sources":["../../../../libs/brain/collapsible/src/lib/brn-collapsible-token.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-content.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-trigger.ts","../../../../libs/brain/collapsible/src/index.ts","../../../../libs/brain/collapsible/src/spartan-ng-brain-collapsible.ts"],"sourcesContent":["import type { ValueProvider } from '@angular/core';\nimport { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { MeasurementDisplay } from '@spartan-ng/brain/core';\nimport type { BrnCollapsible } from './brn-collapsible';\n\nexport const BrnCollapsibleToken = new InjectionToken<BrnCollapsible>('BrnCollapsibleToken');\n\nexport function injectBrnCollapsible() {\n\treturn inject(BrnCollapsibleToken, { optional: true });\n}\n\nexport function provideBrnCollapsible(collapsible: Type<BrnCollapsible>): ExistingProvider {\n\treturn { provide: BrnCollapsibleToken, useExisting: collapsible };\n}\n\nexport interface BrCollapsibleConfig {\n\t/**\n\t * The display style to use when measuring element dimensions.\n\t * @default 'block'\n\t */\n\tmeasurementDisplay: MeasurementDisplay;\n}\n\nconst defaultConfig: BrCollapsibleConfig = {\n\tmeasurementDisplay: 'block',\n};\n\nconst BrnCollapsibleConfigToken = new InjectionToken<BrCollapsibleConfig>('BrnCollapsibleConfig');\n\nexport function provideBrnCollapsibleConfig(config: Partial<BrCollapsibleConfig>): ValueProvider {\n\treturn { provide: BrnCollapsibleConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectBrnCollapsibleConfig(): BrCollapsibleConfig {\n\treturn inject(BrnCollapsibleConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, model, signal } from '@angular/core';\nimport { provideBrnCollapsible } from './brn-collapsible-token';\n\nlet collapsibleContentIdSequence = 0;\n\nexport type BrnCollapsibleState = 'open' | 'closed';\n\n@Directive({\n\tselector: '[brnCollapsible],brn-collapsible',\n\tproviders: [provideBrnCollapsible(BrnCollapsible)],\n\thost: {\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.disabled]': 'disabled() ? true : undefined',\n\t},\n})\nexport class BrnCollapsible {\n\tpublic readonly contentId = signal(`brn-collapsible-content-${++collapsibleContentIdSequence}`);\n\n\t/**\n\t * The expanded or collapsed state of the collapsible component.\n\t */\n\tpublic readonly expanded = model<boolean>(false);\n\n\t/**\n\t * The current state of the collapsible component as 'open' or 'closed'.\n\t */\n\tpublic readonly state = computed<BrnCollapsibleState>(() => (this.expanded() ? 'open' : 'closed'));\n\n\t/**\n\t * The disabled state of the collapsible component.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Toggles the expanded state of the collapsible component.\n\t */\n\tpublic toggle(): void {\n\t\tif (this.disabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.expanded.update((expanded) => !expanded);\n\t}\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tNgZone,\n\tPLATFORM_ID,\n\tafterNextRender,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n\tuntracked,\n} from '@angular/core';\nimport { measureDimensions } from '@spartan-ng/brain/core';\nimport { injectBrnCollapsible, injectBrnCollapsibleConfig } from './brn-collapsible-token';\n\n@Directive({\n\tselector: '[brnCollapsibleContent],brn-collapsible-content',\n\thost: {\n\t\t'[attr.inert]': \"_collapsible?.state() === 'closed' ? true : undefined\",\n\t\t'[attr.data-state]': '_collapsible?.state()',\n\t\t'[id]': '_collapsible?.contentId()',\n\t\t'[style.--brn-collapsible-content-width.px]': '_width()',\n\t\t'[style.--brn-collapsible-content-height.px]': '_height()',\n\t},\n})\nexport class BrnCollapsibleContent {\n\tprivate readonly _config = injectBrnCollapsibleConfig();\n\tprivate readonly _elementRef = inject<ElementRef>(ElementRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\tprotected readonly _collapsible = injectBrnCollapsible();\n\n\tprotected readonly _width = signal<number | null>(null);\n\tprotected readonly _height = signal<number | null>(null);\n\n\t/**\n\t * The id of the collapsible content element.\n\t */\n\tpublic readonly id = input<string | null | undefined>();\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\n\t\teffect(() => {\n\t\t\tconst id = this.id();\n\t\t\tconst collapsible = this._collapsible;\n\t\t\tif (!id || !collapsible) return;\n\t\t\tuntracked(() => collapsible.contentId.set(id));\n\t\t});\n\n\t\tafterNextRender(() => {\n\t\t\tconst hasValidDimensions = this._measureAndSetDimensions();\n\t\t\tif (!hasValidDimensions) {\n\t\t\t\tthis._setupVisibilityObserver();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _measureAndSetDimensions(): boolean {\n\t\tconst { width, height } = measureDimensions(this._elementRef.nativeElement, this._config.measurementDisplay);\n\t\tthis._width.set(width);\n\t\tthis._height.set(height);\n\n\t\treturn width > 0 && height > 0;\n\t}\n\n\tprivate _setupVisibilityObserver(): void {\n\t\tif (!isPlatformBrowser(this._platformId)) return;\n\t\tif (typeof IntersectionObserver === 'undefined') return;\n\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\t\t\tif (this._measureAndSetDimensions()) {\n\t\t\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ root: null, threshold: 0 },\n\t\t\t);\n\n\t\t\tobserver.observe(this._elementRef.nativeElement);\n\t\t\tthis._destroyRef.onDestroy(() => observer.disconnect());\n\t\t});\n\t}\n}\n","import { Directive, input } from '@angular/core';\nimport { injectBrnCollapsible } from './brn-collapsible-token';\n\n@Directive({\n\tselector: 'button[brnCollapsibleTrigger]',\n\thost: {\n\t\t'[attr.data-state]': '_collapsible?.state()',\n\t\t'[attr.disabled]': '_collapsible?.disabled() ? true : undefined',\n\t\t'[attr.aria-expanded]': '_collapsible?.expanded()',\n\t\t'[attr.aria-controls]': '_collapsible?.contentId()',\n\t\t'[type]': 'type()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnCollapsibleTrigger {\n\tprotected readonly _collapsible = injectBrnCollapsible();\n\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\t}\n\n\ttoggle(): void {\n\t\tthis._collapsible?.toggle();\n\t}\n}\n","import { BrnCollapsible } from './lib/brn-collapsible';\nimport { BrnCollapsibleContent } from './lib/brn-collapsible-content';\nimport { BrnCollapsibleTrigger } from './lib/brn-collapsible-trigger';\n\nexport * from './lib/brn-collapsible';\nexport * from './lib/brn-collapsible-content';\nexport * from './lib/brn-collapsible-token';\nexport * from './lib/brn-collapsible-trigger';\n\nexport const BrnCollapsibleImports = [BrnCollapsible, BrnCollapsibleTrigger, BrnCollapsibleContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB;SAE3E,oBAAoB,GAAA;IACnC,OAAO,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACvD;AAEM,SAAU,qBAAqB,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AA;;;ACJM,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,qBAAqB,EAAE,qBAAqB;;ACTlG;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-collapsible.mjs","sources":["../../../../libs/brain/collapsible/src/lib/brn-collapsible-token.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-content.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-trigger.ts","../../../../libs/brain/collapsible/src/index.ts","../../../../libs/brain/collapsible/src/spartan-ng-brain-collapsible.ts"],"sourcesContent":["import type { ValueProvider } from '@angular/core';\nimport { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { MeasurementDisplay } from '@spartan-ng/brain/core';\nimport type { BrnCollapsible } from './brn-collapsible';\n\nexport const BrnCollapsibleToken = new InjectionToken<BrnCollapsible>('BrnCollapsibleToken');\n\nexport function injectBrnCollapsible() {\n\treturn inject(BrnCollapsibleToken, { optional: true });\n}\n\nexport function provideBrnCollapsible(collapsible: Type<BrnCollapsible>): ExistingProvider {\n\treturn { provide: BrnCollapsibleToken, useExisting: collapsible };\n}\n\nexport interface BrCollapsibleConfig {\n\t/**\n\t * The display style to use when measuring element dimensions.\n\t * @default 'block'\n\t */\n\tmeasurementDisplay: MeasurementDisplay;\n}\n\nconst defaultConfig: BrCollapsibleConfig = {\n\tmeasurementDisplay: 'block',\n};\n\nconst BrnCollapsibleConfigToken = new InjectionToken<BrCollapsibleConfig>('BrnCollapsibleConfig');\n\nexport function provideBrnCollapsibleConfig(config: Partial<BrCollapsibleConfig>): ValueProvider {\n\treturn { provide: BrnCollapsibleConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectBrnCollapsibleConfig(): BrCollapsibleConfig {\n\treturn inject(BrnCollapsibleConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, model, signal } from '@angular/core';\nimport { provideBrnCollapsible } from './brn-collapsible-token';\n\nlet collapsibleContentIdSequence = 0;\n\nexport type BrnCollapsibleState = 'open' | 'closed';\n\n@Directive({\n\tselector: '[brnCollapsible],brn-collapsible',\n\tproviders: [provideBrnCollapsible(BrnCollapsible)],\n\thost: {\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.disabled]': 'disabled() ? true : undefined',\n\t},\n})\nexport class BrnCollapsible {\n\tpublic readonly contentId = signal(`brn-collapsible-content-${++collapsibleContentIdSequence}`);\n\n\t/**\n\t * The expanded or collapsed state of the collapsible component.\n\t */\n\tpublic readonly expanded = model<boolean>(false);\n\n\t/**\n\t * The current state of the collapsible component as 'open' or 'closed'.\n\t */\n\tpublic readonly state = computed<BrnCollapsibleState>(() => (this.expanded() ? 'open' : 'closed'));\n\n\t/**\n\t * The disabled state of the collapsible component.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Toggles the expanded state of the collapsible component.\n\t */\n\tpublic toggle(): void {\n\t\tif (this.disabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.expanded.update((expanded) => !expanded);\n\t}\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tNgZone,\n\tPLATFORM_ID,\n\tafterNextRender,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n\tuntracked,\n} from '@angular/core';\nimport { measureDimensions } from '@spartan-ng/brain/core';\nimport { injectBrnCollapsible, injectBrnCollapsibleConfig } from './brn-collapsible-token';\n\n@Directive({\n\tselector: '[brnCollapsibleContent],brn-collapsible-content',\n\thost: {\n\t\t'[attr.inert]': \"_collapsible?.state() === 'closed' ? true : undefined\",\n\t\t'[attr.data-state]': '_collapsible?.state()',\n\t\t'[id]': '_collapsible?.contentId()',\n\t\t'[style.--brn-collapsible-content-width.px]': '_width()',\n\t\t'[style.--brn-collapsible-content-height.px]': '_height()',\n\t},\n})\nexport class BrnCollapsibleContent {\n\tprivate readonly _config = injectBrnCollapsibleConfig();\n\tprivate readonly _elementRef = inject<ElementRef>(ElementRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\tprotected readonly _collapsible = injectBrnCollapsible();\n\n\tprotected readonly _width = signal<number | null>(null);\n\tprotected readonly _height = signal<number | null>(null);\n\n\t/**\n\t * The id of the collapsible content element.\n\t */\n\tpublic readonly id = input<string | null | undefined>();\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\n\t\teffect(() => {\n\t\t\tconst id = this.id();\n\t\t\tconst collapsible = this._collapsible;\n\t\t\tif (!id || !collapsible) return;\n\t\t\tuntracked(() => collapsible.contentId.set(id));\n\t\t});\n\n\t\tafterNextRender(() => {\n\t\t\tconst hasValidDimensions = this._measureAndSetDimensions();\n\t\t\tif (!hasValidDimensions) {\n\t\t\t\tthis._setupVisibilityObserver();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _measureAndSetDimensions(): boolean {\n\t\tconst { width, height } = measureDimensions(this._elementRef.nativeElement, this._config.measurementDisplay);\n\t\tthis._width.set(width);\n\t\tthis._height.set(height);\n\n\t\treturn width > 0 && height > 0;\n\t}\n\n\tprivate _setupVisibilityObserver(): void {\n\t\tif (!isPlatformBrowser(this._platformId)) return;\n\t\tif (typeof IntersectionObserver === 'undefined') return;\n\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\t\t\tif (this._measureAndSetDimensions()) {\n\t\t\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ root: null, threshold: 0 },\n\t\t\t);\n\n\t\t\tobserver.observe(this._elementRef.nativeElement);\n\t\t\tthis._destroyRef.onDestroy(() => observer.disconnect());\n\t\t});\n\t}\n}\n","import { Directive, input } from '@angular/core';\nimport { injectBrnCollapsible } from './brn-collapsible-token';\n\n@Directive({\n\tselector: 'button[brnCollapsibleTrigger]',\n\thost: {\n\t\t'[attr.data-state]': '_collapsible?.state()',\n\t\t'[attr.disabled]': '_collapsible?.disabled() ? true : undefined',\n\t\t'[attr.aria-expanded]': '_collapsible?.expanded()',\n\t\t'[attr.aria-controls]': '_collapsible?.contentId()',\n\t\t'[type]': 'type()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnCollapsibleTrigger {\n\tprotected readonly _collapsible = injectBrnCollapsible();\n\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\t}\n\n\ttoggle(): void {\n\t\tthis._collapsible?.toggle();\n\t}\n}\n","import { BrnCollapsible } from './lib/brn-collapsible';\nimport { BrnCollapsibleContent } from './lib/brn-collapsible-content';\nimport { BrnCollapsibleTrigger } from './lib/brn-collapsible-trigger';\n\nexport * from './lib/brn-collapsible';\nexport * from './lib/brn-collapsible-content';\nexport * from './lib/brn-collapsible-token';\nexport * from './lib/brn-collapsible-trigger';\n\nexport const BrnCollapsibleImports = [BrnCollapsible, BrnCollapsibleTrigger, BrnCollapsibleContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB;SAE3E,oBAAoB,GAAA;IACnC,OAAO,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACvD;AAEM,SAAU,qBAAqB,CAAC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