@koobiq/components 21.0.1 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/_badge-theme.scss +31 -0
- package/breadcrumbs/breadcrumbs.scss +5 -1
- package/checkbox/_checkbox-theme.scss +0 -17
- package/checkbox/checkbox-tokens.scss +0 -4
- package/code-block/_code-block-theme.scss +7 -6
- package/code-block/code-block-tokens.scss +8 -4
- package/code-block/code-block.scss +54 -32
- package/content-panel/content-panel-header.scss +2 -3
- package/content-panel/content-panel.scss +3 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox-tokens.scss +0 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -2
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -2
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +2 -2
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +18 -8
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +78 -10
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +63 -379
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +4 -4
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +300 -37
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +151 -60
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +3 -3
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +3 -3
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +17 -8
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +115 -36
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +3 -3
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +90 -27
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +19 -2
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +76 -17
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +1 -1
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +3 -3
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +86 -25
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +4 -4
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +116 -38
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +86 -7
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +41 -19
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +29 -17
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +49 -12
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +198 -186
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +49 -25
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +30 -11
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +28 -11
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +2 -2
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +71 -16
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +2 -2
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +25 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +90 -17
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +27 -7
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +4 -4
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +71 -27
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +0 -12
- package/file-upload/file-upload-tokens.scss +0 -1
- package/file-upload/file-upload.scss +0 -1
- package/filter-bar/_filter-bar-theme.scss +7 -8
- package/filter-bar/filter-bar.scss +0 -1
- package/filter-bar/pipes/base-pipe.scss +36 -2
- package/filter-bar/pipes/pipe-multi-tree-select.scss +27 -0
- package/form-field/_fieldset-theme.scss +2 -7
- package/form-field/_form-field-theme.scss +9 -22
- package/form-field/_hint-theme.scss +20 -0
- package/form-field/fieldset-tokens.scss +0 -1
- package/form-field/fieldset.scss +0 -3
- package/form-field/form-field-tokens.scss +1 -1
- package/form-field/form-field.scss +9 -0
- package/form-field/hint-tokens.scss +3 -0
- package/modal/modal.scss +2 -0
- package/navbar/_navbar-item_vertical.scss +48 -2
- package/navbar/_navbar-theme.scss +11 -3
- package/navbar/navbar-item.scss +17 -0
- package/navbar/navbar-tokens.scss +3 -0
- package/package.json +4 -4
- package/popover/popover.scss +1 -1
- package/radio/_radio-theme.scss +0 -30
- package/radio/radio-tokens.scss +0 -2
- package/schematics/migrations/deprecated-icons/README.md +21 -5
- package/schematics/migrations/deprecated-icons/index.cjs +8 -22
- package/schematics/migrations/deprecated-icons/schema.json +1 -1
- package/schematics/migrations/icons-replacement/README.md +16 -2
- package/schematics/migrations/icons-replacement/index.cjs +18 -16
- package/schematics/migrations/icons-replacement/schema.json +12 -3
- package/schematics/migrations/new-icons-pack/README.md +37 -25
- package/schematics/migrations/new-icons-pack/index.cjs +22 -32
- package/schematics/migrations/new-icons-pack/replacement.json +2 -14
- package/schematics/migrations/new-icons-pack/schema.json +3 -3
- package/schematics/ng-add/index.cjs +4 -4
- package/schematics/utils/custom-data.cjs +64 -0
- package/schematics/utils/icon-migration.cjs +9 -3
- package/schematics/utils/messages.cjs +4 -0
- package/schematics/utils/package-config.cjs +19 -0
- package/select/select.scss +7 -0
- package/tabs/_tabs-common.scss +23 -0
- package/textarea/textarea-tokens.scss +4 -1
- package/toast/toast.component.scss +1 -0
- package/toggle/_toggle-theme.scss +0 -17
- package/tooltip/tooltip.scss +1 -1
- package/top-bar/top-bar-tokens.scss +1 -0
- package/top-bar/top-bar.scss +10 -0
- package/types/koobiq-components-accordion.d.ts +25 -0
- package/types/koobiq-components-button-toggle.d.ts +6 -0
- package/types/koobiq-components-checkbox.d.ts +30 -0
- package/types/koobiq-components-clamped-text.d.ts +16 -3
- package/types/koobiq-components-code-block.d.ts +17 -3
- package/types/koobiq-components-core.d.ts +226 -13
- package/types/koobiq-components-datepicker.d.ts +28 -1
- package/types/koobiq-components-divider.d.ts +28 -10
- package/types/koobiq-components-dropdown.d.ts +19 -0
- package/types/koobiq-components-filter-bar.d.ts +77 -4
- package/types/koobiq-components-flag.d.ts +18 -0
- package/types/koobiq-components-form-field.d.ts +87 -6
- package/types/koobiq-components-icon.d.ts +15 -0
- package/types/koobiq-components-inline-edit.d.ts +8 -1
- package/types/koobiq-components-input.d.ts +22 -3
- package/types/koobiq-components-list.d.ts +6 -0
- package/types/koobiq-components-modal.d.ts +7 -0
- package/types/koobiq-components-navbar.d.ts +71 -7
- package/types/koobiq-components-notification-center.d.ts +13 -0
- package/types/koobiq-components-overflow-items.d.ts +26 -2
- package/types/koobiq-components-popover.d.ts +38 -3
- package/types/koobiq-components-radio.d.ts +30 -0
- package/types/koobiq-components-search-expandable.d.ts +10 -0
- package/types/koobiq-components-select.d.ts +36 -4
- package/types/koobiq-components-sidepanel.d.ts +52 -1
- package/types/koobiq-components-splitter.d.ts +13 -4
- package/types/koobiq-components-tabs.d.ts +4 -0
- package/types/koobiq-components-tags.d.ts +6 -0
- package/types/koobiq-components-textarea.d.ts +9 -2
- package/types/koobiq-components-timepicker.d.ts +15 -0
- package/types/koobiq-components-toggle.d.ts +30 -0
- package/types/koobiq-components-tooltip.d.ts +55 -10
- package/types/koobiq-components-top-bar.d.ts +11 -3
- package/types/koobiq-components-tree-select.d.ts +12 -0
- package/types/koobiq-components-tree.d.ts +37 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-checkbox.mjs","sources":["../../../packages/components/checkbox/checkbox-config.ts","../../../packages/components/checkbox/checkbox.ts","../../../packages/components/checkbox/checkbox.html","../../../packages/components/checkbox/checkbox-required-validator.ts","../../../packages/components/checkbox/checkbox-module.ts","../../../packages/components/checkbox/koobiq-components-checkbox.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { KbqCheckableClickAction } from '@koobiq/components/core';\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type KbqCheckboxClickAction = KbqCheckableClickAction;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const KBQ_CHECKBOX_CLICK_ACTION = new InjectionToken<KbqCheckboxClickAction>('kbq-checkbox-click-action');\n","import { _IdGenerator, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DoCheck,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n output,\n SimpleChanges,\n untracked,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n KbqCheckable,\n KbqCheckedState,\n KbqColorDirective,\n KbqErrorStateTracker,\n kbqOptionalNumberAttribute,\n TransitionCheckState\n} from '@koobiq/components/core';\nimport { KbqError, KbqHint } from '@koobiq/components/form-field';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction } from './checkbox-config';\n\n/** Change event object emitted by KbqCheckbox. */\nexport class KbqCheckboxChange {\n /** The source KbqCheckbox of the event. */\n source: KbqCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n/**\n * A Koobiq checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A KbqCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n *\n * To show a validation error, put its text in a `kbq-error` inside the checkbox bound to a form control.\n */\n@Component({\n selector: 'kbq-checkbox',\n imports: [\n CdkObserveContent\n ],\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.scss', 'checkbox-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-checkbox',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled || null',\n '[class.kbq-checkbox_big]': 'big()',\n '[class.kbq-indeterminate]': 'indeterminate',\n '[class.kbq-checked]': 'checked',\n '[class.kbq-disabled]': 'disabled',\n '[class.kbq-invalid]': 'errorState()',\n '[class.kbq-checkbox_label-before]': 'labelPosition() == \"before\"'\n },\n hostDirectives: [KbqCheckable],\n exportAs: 'kbqCheckbox'\n})\nexport class KbqCheckbox\n extends KbqColorDirective\n implements OnChanges, DoCheck, AfterViewInit, OnDestroy, CanUpdateErrorState\n{\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly checkable = inject(KbqCheckable, { self: true });\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n private readonly errorStateTracker = new KbqErrorStateTracker(\n inject(ErrorStateMatcher),\n this.ngControl,\n inject(FormGroupDirective, { optional: true }),\n inject(NgForm, { optional: true })\n );\n\n private readonly uniqueId = inject(_IdGenerator).getId('kbq-checkbox-');\n\n /** Whether the checkbox is in an error state. */\n readonly errorState = this.errorStateTracker.errorState;\n\n /** An object used to control when the error state is shown. */\n readonly errorStateMatcher = input<ErrorStateMatcher>();\n\n /** Whether the checkbox uses the big size. */\n readonly big = input(false, { transform: booleanAttribute });\n\n /**\n * A unique id for the checkbox input. If none is supplied — or `null` is bound explicitly — it is\n * auto-generated, so a read always yields the id the element actually carries.\n */\n readonly id = input(this.uniqueId, {\n transform: (value: string | null | undefined) => value || this.uniqueId\n });\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n readonly labelPosition = input<'before' | 'after'>('after');\n\n /** Name value will be applied to the input element if present */\n readonly name = input<string | null>(null);\n\n /** Event emitted when the checkbox's `checked` value changes. */\n readonly change = output<KbqCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** The value attribute of the native input element */\n readonly value = input<string>();\n\n /** Defines the behavior when a user clicks on the checkbox. */\n readonly clickAction = input<KbqCheckboxClickAction>(\n inject(KBQ_CHECKBOX_CLICK_ACTION, { optional: true }) || undefined\n );\n\n /** The native `<input type=\"checkbox\">` element */\n protected readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n /**\n * Id of the visually hidden native input.\n *\n * @docs-private\n */\n protected readonly inputId = computed(() => `${this.id()}-input`);\n\n /** Error text projected into the checkbox. */\n private readonly error = contentChild(KbqError, { descendants: false });\n\n /**\n * Whether the projected `kbq-error` is shown. Without one, nothing is rendered under the label.\n *\n * @internal\n */\n protected readonly showError = computed(() => this.errorState() && !!this.error());\n\n /**\n * Id of the element wrapping the projected `kbq-error`.\n *\n * @internal\n */\n protected readonly errorId = computed(() => `${this.id()}-error`);\n\n /**\n * Id of the label text, which alone names the native input.\n *\n * @internal\n */\n protected readonly labelId = computed(() => `${this.id()}-label`);\n\n /** Hints projected into the checkbox. */\n private readonly hints = contentChildren(KbqHint, { descendants: false });\n\n /**\n * Value of `aria-describedby` of the native input: the error, while it is shown, and the hints.\n *\n * @internal\n */\n protected readonly ariaDescribedBy = computed(\n () =>\n [...(this.showError() ? [this.errorId()] : []), ...this.hints().map((hint) => hint.id())].join(' ') || null\n );\n\n /**\n * Value of `aria-invalid` of the native input: set whenever the checkbox is painted as invalid.\n *\n * @internal\n */\n protected readonly ariaInvalid = computed(() => (this.errorState() || this.color() === 'error' ? 'true' : null));\n\n /** Whether the checkbox is required. */\n readonly required = input(false, { transform: booleanAttribute });\n\n /** @docs-private */\n readonly checkedInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'checked',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly disabledInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'disabled',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly tabIndexInput = input<number | undefined, number | string | null | undefined>(undefined, {\n alias: 'tabIndex',\n transform: kbqOptionalNumberAttribute\n });\n\n /** @docs-private */\n readonly indeterminateInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'indeterminate',\n transform: booleanAttribute\n });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member; unbound, it leaves what code wrote.\n if (changes['checkedInput']) {\n const checked = this.checkedInput();\n\n if (checked !== undefined) this.checked = checked;\n }\n\n if (changes['disabledInput']) {\n const disabled = this.disabledInput();\n\n if (disabled !== undefined) this.disabled = disabled;\n }\n\n if (changes['tabIndexInput']) this.tabIndex = this.tabIndexInput() ?? 0;\n\n if (changes['indeterminateInput']) {\n const indeterminate = this.indeterminateInput();\n\n if (indeterminate !== undefined) this.indeterminate = indeterminate;\n }\n }\n\n ngDoCheck(): void {\n // Re-evaluated on every check: a submit of the parent form notifies nothing a signal could follow.\n if (this.ngControl) this.updateErrorState();\n }\n\n /** Updates the error state based on the error state matcher. */\n updateErrorState(): void {\n this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();\n this.errorStateTracker.updateErrorState();\n }\n\n /**\n * Whether the checkbox is checked.\n */\n // `checked` is two-way state: the component writes it on click and the `ControlValueAccessor` writes it\n // through `KbqCheckable`, so the property stays an accessor over the shared signal and `checkedInput` feeds it.\n get checked(): boolean {\n return this.checkable.checked();\n }\n\n set checked(value: boolean) {\n this.checkable.checked.set(value);\n }\n\n /** Whether the checkbox is disabled. */\n get disabled(): boolean {\n return this.checkable.disabled();\n }\n\n set disabled(value: boolean) {\n this.checkable.disabled.set(value);\n }\n\n /** Tab order of the native input. A disabled checkbox is taken out of the tab order regardless. */\n get tabIndex(): number {\n return this.checkable.effectiveTabIndex();\n }\n\n set tabIndex(value: number) {\n this.checkable.tabIndex.set(value);\n }\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n get indeterminate(): boolean {\n return this.checkable.indeterminate();\n }\n\n set indeterminate(value: boolean) {\n // Untracked: an `effect()` that assigns it must not come to depend on the state read on the way.\n untracked(() => this.setIndeterminate(value));\n }\n\n private setIndeterminate(value: boolean): void {\n const changed = value !== this.checkable.indeterminate();\n\n this.checkable.indeterminate.set(value);\n\n if (changed) {\n this.checkable.transitionCheckState(\n this.checkable.indeterminate()\n ? TransitionCheckState.Indeterminate\n : this.checked\n ? TransitionCheckState.Checked\n : TransitionCheckState.Unchecked\n );\n\n this.indeterminateChange.emit(value);\n }\n }\n\n ngAfterViewInit() {\n this.focusMonitor\n .monitor(this.inputElement().nativeElement)\n .subscribe((focusOrigin) => this.onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.inputElement().nativeElement);\n }\n\n /**\n * Method being called whenever the label text changes.\n *\n * @docs-private\n */\n protected onLabelTextChange(): void {\n // Nothing to do here: the template listener itself re-checks the view, which reads the label text.\n }\n\n /** @docs-private */\n protected getAriaChecked(): KbqCheckedState {\n return this.checkable.getAriaChecked();\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checkable.toggle();\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n *\n * @param event Input click event\n *\n * @docs-private\n */\n protected onInputClick(event: Event): void {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n const { shouldToggle, shouldClearIndeterminate } = this.checkable.resolveClick(this.clickAction());\n\n if (shouldToggle) {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (shouldClearIndeterminate) {\n Promise.resolve().then(() => {\n this.checkable.indeterminate.set(false);\n this.indeterminateChange.emit(false);\n });\n }\n\n this.toggle();\n this.checkable.transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked\n );\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this.emitChangeEvent();\n } else if (!this.disabled) {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `kbq-checkbox`.\n this.checkable.resetNativeInput(this.inputElement().nativeElement);\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n /** @docs-private */\n protected onInteractionEvent(event: Event): void {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private emitChangeEvent() {\n // Note: `toggle()` already notifies the ControlValueAccessor change handler via `KbqCheckable.toggle()`.\n const event = new KbqCheckboxChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private onInputFocusChange(focusOrigin: FocusOrigin) {\n // `FocusMonitor` emits the origin on focus and `null` on blur, so the control becomes touched when\n // focus leaves it - marking it on the way in shows a `required` error before any interaction.\n if (!focusOrigin) {\n this.checkable.onTouched();\n }\n }\n}\n","<label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId()\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <!--\n The wrapping label would fold the error and the hint into the accessible name, so the name is\n overridden with an explicit `aria-labelledby` pointing at the label text alone, and the error and\n the hint arrive as a description instead.\n -->\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-labelledby]=\"labelId()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId()\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" [id]=\"labelId()\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <!-- The error comes before the hint, as in a form field. -->\n @if (showError()) {\n <div class=\"kbq-checkbox__error\" [id]=\"errorId()\">\n <ng-content select=\"kbq-error\" />\n </div>\n }\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n","import { booleanAttribute, Directive, forwardRef, Provider } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\nexport const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => KbqCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for koobiq checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `kbq-checkbox`.\n */\n@Directive({\n selector: `kbq-checkbox[required][formControlName],\n kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]`,\n providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'requiredAttribute' }\n})\nexport class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {\n /**\n * The `required` input coerced the way the base validator coerces it, which is what decides\n * whether the validator runs. Binding the raw input instead would strip the attribute for\n * `<kbq-checkbox required>`, where the raw value is the empty string, at the exact moment validation\n * turns on.\n *\n * @docs-private\n */\n protected get requiredAttribute(): string | null {\n return booleanAttribute(this.required) ? '' : null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqCheckbox } from './checkbox';\nimport { KbqCheckboxRequiredValidator } from './checkbox-required-validator';\n\n@NgModule({\n imports: [KbqCheckbox, KbqCheckboxRequiredValidator],\n exports: [KbqCheckbox, KbqCheckboxRequiredValidator]\n})\nexport class KbqCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYA;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAyB,2BAA2B;;ACqB/G;MACa,iBAAiB,CAAA;AAK7B;AAED;;;;;;;;AAQG;AAwBG,MAAO,WACT,SAAQ,iBAAiB,CAAA;AAxB7B,IAAA,WAAA,GAAA;;AA2BqB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACnC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAChD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAE7D,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,oBAAoB,C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E,EAAE,iBAAiB,EAAE,mBAAmB;AACjD,iBAAA;;;MCXY,iBAAiB,CAAA;kIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHhB,WAAW,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACzC,WAAW,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;mIAE1C,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-checkbox.mjs","sources":["../../../packages/components/checkbox/checkbox-config.ts","../../../packages/components/checkbox/checkbox.ts","../../../packages/components/checkbox/checkbox.html","../../../packages/components/checkbox/checkbox-required-validator.ts","../../../packages/components/checkbox/checkbox-module.ts","../../../packages/components/checkbox/koobiq-components-checkbox.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { KbqCheckableClickAction } from '@koobiq/components/core';\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type KbqCheckboxClickAction = KbqCheckableClickAction;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const KBQ_CHECKBOX_CLICK_ACTION = new InjectionToken<KbqCheckboxClickAction>('kbq-checkbox-click-action');\n","import { _IdGenerator, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DoCheck,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n output,\n SimpleChanges,\n untracked,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n KbqCheckable,\n KbqCheckedState,\n KbqColorDirective,\n KbqErrorStateTracker,\n kbqOptionalNumberAttribute,\n TransitionCheckState\n} from '@koobiq/components/core';\nimport { KbqError, KbqHint, kbqHintParentFactoryProvider } from '@koobiq/components/form-field';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction } from './checkbox-config';\n\n/** Change event object emitted by KbqCheckbox. */\nexport class KbqCheckboxChange {\n /** The source KbqCheckbox of the event. */\n source: KbqCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n/**\n * A Koobiq checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A KbqCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n *\n * To show a validation error, put its text in a `kbq-error` inside the checkbox bound to a form control.\n */\n@Component({\n selector: 'kbq-checkbox',\n imports: [\n CdkObserveContent\n ],\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.scss', 'checkbox-tokens.scss'],\n providers: [\n kbqHintParentFactoryProvider(() => {\n const checkbox = inject(KbqCheckbox);\n\n return { compact: computed(() => !checkbox.big()), disabled: computed(() => checkbox.disabled) };\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-checkbox',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled || null',\n '[class.kbq-checkbox_big]': 'big()',\n '[class.kbq-indeterminate]': 'indeterminate',\n '[class.kbq-checked]': 'checked',\n '[class.kbq-disabled]': 'disabled',\n '[class.kbq-invalid]': 'errorState()',\n '[class.kbq-checkbox_label-before]': 'labelPosition() == \"before\"'\n },\n hostDirectives: [KbqCheckable],\n exportAs: 'kbqCheckbox'\n})\nexport class KbqCheckbox\n extends KbqColorDirective\n implements OnChanges, DoCheck, AfterViewInit, OnDestroy, CanUpdateErrorState\n{\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly checkable = inject(KbqCheckable, { self: true });\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n private readonly errorStateTracker = new KbqErrorStateTracker(\n inject(ErrorStateMatcher),\n this.ngControl,\n inject(FormGroupDirective, { optional: true }),\n inject(NgForm, { optional: true })\n );\n\n private readonly uniqueId = inject(_IdGenerator).getId('kbq-checkbox-');\n\n /** Whether the checkbox is in an error state. */\n readonly errorState = this.errorStateTracker.errorState;\n\n /** An object used to control when the error state is shown. */\n readonly errorStateMatcher = input<ErrorStateMatcher>();\n\n /** Whether the checkbox uses the big size. */\n readonly big = input(false, { transform: booleanAttribute });\n\n /**\n * A unique id for the checkbox input. If none is supplied — or `null` is bound explicitly — it is\n * auto-generated, so a read always yields the id the element actually carries.\n */\n readonly id = input(this.uniqueId, {\n transform: (value: string | null | undefined) => value || this.uniqueId\n });\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n readonly labelPosition = input<'before' | 'after'>('after');\n\n /** Name value will be applied to the input element if present */\n readonly name = input<string | null>(null);\n\n /** Event emitted when the checkbox's `checked` value changes. */\n readonly change = output<KbqCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** The value attribute of the native input element */\n readonly value = input<string>();\n\n /** Defines the behavior when a user clicks on the checkbox. */\n readonly clickAction = input<KbqCheckboxClickAction>(\n inject(KBQ_CHECKBOX_CLICK_ACTION, { optional: true }) || undefined\n );\n\n /** The native `<input type=\"checkbox\">` element */\n protected readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n /**\n * Id of the visually hidden native input.\n *\n * @docs-private\n */\n protected readonly inputId = computed(() => `${this.id()}-input`);\n\n /** Error text projected into the checkbox. */\n private readonly error = contentChild(KbqError, { descendants: false });\n\n /**\n * Whether the projected `kbq-error` is shown. Without one, nothing is rendered under the label.\n *\n * @docs-private\n */\n protected readonly showError = computed(() => this.errorState() && !!this.error());\n\n /**\n * Id of the element wrapping the projected `kbq-error`.\n *\n * @docs-private\n */\n protected readonly errorId = computed(() => `${this.id()}-error`);\n\n /**\n * Id of the label text, which alone names the native input.\n *\n * @docs-private\n */\n protected readonly labelId = computed(() => `${this.id()}-label`);\n\n /** Hints projected into the checkbox. */\n private readonly hints = contentChildren(KbqHint, { descendants: false });\n\n /**\n * Value of `aria-describedby` of the native input: the error, while it is shown, and the hints.\n *\n * @docs-private\n */\n protected readonly ariaDescribedBy = computed(\n () =>\n [...(this.showError() ? [this.errorId()] : []), ...this.hints().map((hint) => hint.id())].join(' ') || null\n );\n\n /**\n * Value of `aria-invalid` of the native input: set whenever the checkbox is painted as invalid.\n *\n * @docs-private\n */\n protected readonly ariaInvalid = computed(() => (this.errorState() || this.color() === 'error' ? 'true' : null));\n\n /** Whether the checkbox is required. */\n readonly required = input(false, { transform: booleanAttribute });\n\n /** @docs-private */\n readonly checkedInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'checked',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly disabledInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'disabled',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly tabIndexInput = input<number | undefined, number | string | null | undefined>(undefined, {\n alias: 'tabIndex',\n transform: kbqOptionalNumberAttribute\n });\n\n /** @docs-private */\n readonly indeterminateInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'indeterminate',\n transform: booleanAttribute\n });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member; unbound, it leaves what code wrote.\n if (changes['checkedInput']) {\n const checked = this.checkedInput();\n\n if (checked !== undefined) this.checked = checked;\n }\n\n if (changes['disabledInput']) {\n const disabled = this.disabledInput();\n\n if (disabled !== undefined) this.disabled = disabled;\n }\n\n if (changes['tabIndexInput']) this.tabIndex = this.tabIndexInput() ?? 0;\n\n if (changes['indeterminateInput']) {\n const indeterminate = this.indeterminateInput();\n\n if (indeterminate !== undefined) this.indeterminate = indeterminate;\n }\n }\n\n ngDoCheck(): void {\n // Re-evaluated on every check: a submit of the parent form notifies nothing a signal could follow.\n if (this.ngControl) this.updateErrorState();\n }\n\n /** Updates the error state based on the error state matcher. */\n updateErrorState(): void {\n this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();\n this.errorStateTracker.updateErrorState();\n }\n\n /**\n * Whether the checkbox is checked.\n */\n // `checked` is two-way state: the component writes it on click and the `ControlValueAccessor` writes it\n // through `KbqCheckable`, so the property stays an accessor over the shared signal and `checkedInput` feeds it.\n get checked(): boolean {\n return this.checkable.checked();\n }\n\n set checked(value: boolean) {\n this.checkable.checked.set(value);\n }\n\n /** Whether the checkbox is disabled. */\n get disabled(): boolean {\n return this.checkable.disabled();\n }\n\n set disabled(value: boolean) {\n this.checkable.disabled.set(value);\n }\n\n /** Tab order of the native input. A disabled checkbox is taken out of the tab order regardless. */\n get tabIndex(): number {\n return this.checkable.effectiveTabIndex();\n }\n\n set tabIndex(value: number) {\n this.checkable.tabIndex.set(value);\n }\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n get indeterminate(): boolean {\n return this.checkable.indeterminate();\n }\n\n set indeterminate(value: boolean) {\n // Untracked: an `effect()` that assigns it must not come to depend on the state read on the way.\n untracked(() => this.setIndeterminate(value));\n }\n\n private setIndeterminate(value: boolean): void {\n const changed = value !== this.checkable.indeterminate();\n\n this.checkable.indeterminate.set(value);\n\n if (changed) {\n this.checkable.transitionCheckState(\n this.checkable.indeterminate()\n ? TransitionCheckState.Indeterminate\n : this.checked\n ? TransitionCheckState.Checked\n : TransitionCheckState.Unchecked\n );\n\n this.indeterminateChange.emit(value);\n }\n }\n\n ngAfterViewInit() {\n this.focusMonitor\n .monitor(this.inputElement().nativeElement)\n .subscribe((focusOrigin) => this.onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.inputElement().nativeElement);\n }\n\n /**\n * Method being called whenever the label text changes.\n *\n * @docs-private\n */\n protected onLabelTextChange(): void {\n // Nothing to do here: the template listener itself re-checks the view, which reads the label text.\n }\n\n /** @docs-private */\n protected getAriaChecked(): KbqCheckedState {\n return this.checkable.getAriaChecked();\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checkable.toggle();\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n *\n * @param event Input click event\n *\n * @docs-private\n */\n protected onInputClick(event: Event): void {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n const { shouldToggle, shouldClearIndeterminate } = this.checkable.resolveClick(this.clickAction());\n\n if (shouldToggle) {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (shouldClearIndeterminate) {\n Promise.resolve().then(() => {\n this.checkable.indeterminate.set(false);\n this.indeterminateChange.emit(false);\n });\n }\n\n this.toggle();\n this.checkable.transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked\n );\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this.emitChangeEvent();\n } else if (!this.disabled) {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `kbq-checkbox`.\n this.checkable.resetNativeInput(this.inputElement().nativeElement);\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n /** @docs-private */\n protected onInteractionEvent(event: Event): void {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private emitChangeEvent() {\n // Note: `toggle()` already notifies the ControlValueAccessor change handler via `KbqCheckable.toggle()`.\n const event = new KbqCheckboxChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private onInputFocusChange(focusOrigin: FocusOrigin) {\n // `FocusMonitor` emits the origin on focus and `null` on blur, so the control becomes touched when\n // focus leaves it - marking it on the way in shows a `required` error before any interaction.\n if (!focusOrigin) {\n this.checkable.onTouched();\n }\n }\n}\n","<label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId()\">\n <span\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <!--\n The wrapping label would fold the error and the hint into the accessible name, so the name is\n overridden with an explicit `aria-labelledby` pointing at the label text alone, and the error and\n the hint arrive as a description instead.\n -->\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-labelledby]=\"labelId()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId()\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <span class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </span>\n </span>\n\n <span class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" [id]=\"labelId()\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <!-- The error comes before the hint, as in a form field. -->\n @if (showError()) {\n <span class=\"kbq-checkbox__error\" [id]=\"errorId()\">\n <ng-content select=\"kbq-error\" />\n </span>\n }\n\n <ng-content select=\"kbq-hint\" />\n </span>\n</label>\n","import { booleanAttribute, Directive, forwardRef, Provider } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\nexport const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => KbqCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for koobiq checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `kbq-checkbox`.\n */\n@Directive({\n selector: `kbq-checkbox[required][formControlName],\n kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]`,\n providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'requiredAttribute' }\n})\nexport class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {\n /**\n * The `required` input coerced the way the base validator coerces it, which is what decides\n * whether the validator runs. Binding the raw input instead would strip the attribute for\n * `<kbq-checkbox required>`, where the raw value is the empty string, at the exact moment validation\n * turns on.\n *\n * @docs-private\n */\n protected get requiredAttribute(): string | null {\n return booleanAttribute(this.required) ? '' : null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqCheckbox } from './checkbox';\nimport { KbqCheckboxRequiredValidator } from './checkbox-required-validator';\n\n@NgModule({\n imports: [KbqCheckbox, KbqCheckboxRequiredValidator],\n exports: [KbqCheckbox, KbqCheckboxRequiredValidator]\n})\nexport class KbqCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYA;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAyB,2BAA2B;;ACqB/G;MACa,iBAAiB,CAAA;AAK7B;AAED;;;;;;;;AAQG;AA+BG,MAAO,WACT,SAAQ,iBAAiB,CAAA;AA/B7B,IAAA,WAAA,GAAA;;AAkCqB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACnC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAChD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAE7D,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,oBAAoB,CACzD,MAAM,CAAC,iBAAiB,CAAC,EACzB,IAAI,CAAC,SAAS,EACd,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAC9C,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CACrC;QAEgB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;;AAG9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AE,CAAA;AACoE,iFAAA,CAAA;oBAC9E,SAAS,EAAE,CAAC,+BAA+B,CAAC;AAC5C,oBAAA,IAAI,EAAE,EAAE,iBAAiB,EAAE,mBAAmB;AACjD,iBAAA;;;MCXY,iBAAiB,CAAA;kIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHhB,WAAW,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACzC,WAAW,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;mIAE1C,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, model, input, numberAttribute,
|
|
3
|
+
import { inject, Injector, DestroyRef, runInInjectionContext, afterNextRender, InjectionToken, model, input, numberAttribute, computed, Directive, booleanAttribute, viewChild, signal, ElementRef, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@koobiq/components/core';
|
|
5
|
-
import { ruRULocaleData, kbqLocaleConfigurationOverrideProvider, kbqInjectLocaleConfiguration, kbqInjectNativeElement, KbqLocaleOverridesDirective } from '@koobiq/components/core';
|
|
5
|
+
import { kbqAnimationsDisabled, ruRULocaleData, kbqLocaleConfigurationOverrideProvider, kbqInjectLocaleConfiguration, kbqInjectNativeElement, KbqLocaleOverridesDirective } from '@koobiq/components/core';
|
|
6
6
|
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
7
7
|
import { Platform } from '@angular/cdk/platform';
|
|
8
8
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -10,6 +10,61 @@ import { KbqIcon } from '@koobiq/components/icon';
|
|
|
10
10
|
import { KbqLink, KbqLinkPrefix } from '@koobiq/components/link';
|
|
11
11
|
import { debounce, timer } from 'rxjs';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Creates a runner that animates `block-size` of an element across a state change made by the user
|
|
15
|
+
* and returns a promise that settles when the motion ends or is cancelled. The promise resolves
|
|
16
|
+
* right away when the change is not animated: the Web Animations API is missing, the motion is
|
|
17
|
+
* turned off, the duration is not a non-negative number, or the height did not change.
|
|
18
|
+
*
|
|
19
|
+
* A running animation is cancelled and the next one starts from the visible height; destroying the
|
|
20
|
+
* injector cancels the animation it owns. A fixed `block-size` makes a flex host squeeze its
|
|
21
|
+
* children when it is smaller than the content and spread wrapped lines when it is larger, so the
|
|
22
|
+
* host keeps its children's size and packs the lines to the start.
|
|
23
|
+
*
|
|
24
|
+
* The heights come from `getBoundingClientRect`, which reads the border box, so an element with a
|
|
25
|
+
* padding or a border under a `content-box` box-sizing snaps when the animation ends.
|
|
26
|
+
*
|
|
27
|
+
* Must be called in an injection context.
|
|
28
|
+
*/
|
|
29
|
+
function kbqInjectCollapseAnimation() {
|
|
30
|
+
const injector = inject(Injector);
|
|
31
|
+
const destroyRef = inject(DestroyRef);
|
|
32
|
+
let animations = [];
|
|
33
|
+
destroyRef.onDestroy(() => animations.forEach((animation) => animation.cancel()));
|
|
34
|
+
return (element, duration, change) => {
|
|
35
|
+
if (typeof element.animate !== 'function' ||
|
|
36
|
+
!Number.isFinite(duration) ||
|
|
37
|
+
duration < 0 ||
|
|
38
|
+
runInInjectionContext(injector, kbqAnimationsDisabled)) {
|
|
39
|
+
change();
|
|
40
|
+
return Promise.resolve();
|
|
41
|
+
}
|
|
42
|
+
const from = element.getBoundingClientRect().height;
|
|
43
|
+
animations.forEach((animation) => animation.cancel());
|
|
44
|
+
change();
|
|
45
|
+
return new Promise((resolve) => {
|
|
46
|
+
afterNextRender(() => {
|
|
47
|
+
const to = element.getBoundingClientRect().height;
|
|
48
|
+
if (from === to) {
|
|
49
|
+
resolve();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const timing = { duration, easing: 'ease-in-out' };
|
|
53
|
+
const children = Array.from(element.children).map((child) => child.animate({ flexShrink: [0, 0] }, timing));
|
|
54
|
+
const host = element.animate({
|
|
55
|
+
blockSize: [`${from}px`, `${to}px`],
|
|
56
|
+
overflow: ['clip', 'clip'],
|
|
57
|
+
alignContent: ['flex-start', 'flex-start']
|
|
58
|
+
}, timing);
|
|
59
|
+
animations = [host, ...children];
|
|
60
|
+
// A cancelled animation rejects `finished`; the promise settles either way, so the caller's
|
|
61
|
+
// follow-up still runs.
|
|
62
|
+
host.finished.then(() => resolve(), () => resolve());
|
|
63
|
+
}, { injector });
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
13
68
|
/**
|
|
14
69
|
* `KbqClampedText` and `KbqClampedList` are documented as two components but ship from one entry
|
|
15
70
|
* point on purpose: they share the `KbqClampedRoot` contract below, the `KbqClampedListTrigger`
|
|
@@ -53,6 +108,7 @@ function kbqInjectClampedTextLocaleConfiguration() {
|
|
|
53
108
|
class KbqClampedList {
|
|
54
109
|
constructor() {
|
|
55
110
|
this.nativeElement = kbqInjectNativeElement();
|
|
111
|
+
this.animateCollapse = kbqInjectCollapseAnimation();
|
|
56
112
|
/** Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = expanded. */
|
|
57
113
|
this.isCollapsed = model(true, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
58
114
|
/** The list of items to display. */
|
|
@@ -65,6 +121,12 @@ class KbqClampedList {
|
|
|
65
121
|
* Minimum number of hidden items required to show the toggle trigger. Defaults to `6`.
|
|
66
122
|
*/
|
|
67
123
|
this.hiddenThreshold = input(6, { ...(ngDevMode ? { debugName: "hiddenThreshold" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
124
|
+
/**
|
|
125
|
+
* Duration of the expand and collapse animation in milliseconds.
|
|
126
|
+
* Only state changes made through the disclosure toggle animate: programmatic writes of
|
|
127
|
+
* `isCollapsed` and changes of `items` switch instantly. Defaults to `100`.
|
|
128
|
+
*/
|
|
129
|
+
this.duration = input(100, { ...(ngDevMode ? { debugName: "duration" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
68
130
|
/** Id the trigger points its `aria-controls` at. Keeps an id the host already carries. */
|
|
69
131
|
this.contentId = this.nativeElement.id || inject(_IdGenerator).getId('kbq-clamped-list-');
|
|
70
132
|
/** Number of items hidden when the list is collapsed. */
|
|
@@ -81,10 +143,10 @@ class KbqClampedList {
|
|
|
81
143
|
/** Toggles the collapsed state of the list. Stops event propagation. */
|
|
82
144
|
toggle(event) {
|
|
83
145
|
event.stopPropagation();
|
|
84
|
-
this.isCollapsed.update((state) => !state);
|
|
146
|
+
this.animateCollapse(this.nativeElement, this.duration(), () => this.isCollapsed.update((state) => !state));
|
|
85
147
|
}
|
|
86
148
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqClampedList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
87
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqClampedList, isStandalone: true, selector: "[kbqClampedList]", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, collapsedVisibleCount: { classPropertyName: "collapsedVisibleCount", publicName: "collapsedVisibleCount", isSignal: true, isRequired: false, transformFunction: null }, hiddenThreshold: { classPropertyName: "hiddenThreshold", publicName: "hiddenThreshold", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, host: { properties: { "attr.id": "contentId" }, classAttribute: "kbq-clamped-list" }, providers: [
|
|
149
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqClampedList, isStandalone: true, selector: "[kbqClampedList]", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, collapsedVisibleCount: { classPropertyName: "collapsedVisibleCount", publicName: "collapsedVisibleCount", isSignal: true, isRequired: false, transformFunction: null }, hiddenThreshold: { classPropertyName: "hiddenThreshold", publicName: "hiddenThreshold", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, host: { properties: { "attr.id": "contentId" }, classAttribute: "kbq-clamped-list" }, providers: [
|
|
88
150
|
{ provide: KbqClampedRoot, useExisting: KbqClampedList }
|
|
89
151
|
], exportAs: ["kbqClampedList"], hostDirectives: [{ directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0 }); }
|
|
90
152
|
}
|
|
@@ -104,7 +166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
104
166
|
],
|
|
105
167
|
exportAs: 'kbqClampedList'
|
|
106
168
|
}]
|
|
107
|
-
}], propDecorators: { isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], collapsedVisibleCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedVisibleCount", required: false }] }], hiddenThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenThreshold", required: false }] }] } });
|
|
169
|
+
}], propDecorators: { isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], collapsedVisibleCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedVisibleCount", required: false }] }], hiddenThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenThreshold", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }] } });
|
|
108
170
|
/**
|
|
109
171
|
* Disclosure control for the clamped container it is projected into — `[kbqClampedList]` or
|
|
110
172
|
* `<kbq-clamped-text>`. Supplies the button semantics itself, so a host element does not have to:
|
|
@@ -179,6 +241,12 @@ class KbqClampedText {
|
|
|
179
241
|
* Whether collapsing scrolls the component back into view. Defaults to `true`.
|
|
180
242
|
*/
|
|
181
243
|
this.scrollOnCollapse = input(true, { ...(ngDevMode ? { debugName: "scrollOnCollapse" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
244
|
+
/**
|
|
245
|
+
* Duration of the expand and collapse animation in milliseconds.
|
|
246
|
+
* Only state changes made through the disclosure toggle animate: programmatic writes of
|
|
247
|
+
* `isCollapsed` and re-measurements switch instantly. Defaults to `100`.
|
|
248
|
+
*/
|
|
249
|
+
this.duration = input(100, { ...(ngDevMode ? { debugName: "duration" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
182
250
|
/** Id of the clamped region, published by the toggle as its `aria-controls`. */
|
|
183
251
|
this.contentId = inject(_IdGenerator).getId('kbq-clamped-text-content-');
|
|
184
252
|
/** @docs-private */
|
|
@@ -203,10 +271,10 @@ class KbqClampedText {
|
|
|
203
271
|
return this.measured() ? this.hasToggle() && collapsed : collapsed;
|
|
204
272
|
}, ...(ngDevMode ? [{ debugName: "collapsedState" }] : /* istanbul ignore next */ []));
|
|
205
273
|
this.destroyRef = inject(DestroyRef);
|
|
206
|
-
this.injector = inject(Injector);
|
|
207
274
|
this.elementRef = inject(ElementRef);
|
|
208
275
|
this.resizeObserver = inject(SharedResizeObserver);
|
|
209
276
|
this.platform = inject(Platform);
|
|
277
|
+
this.animateCollapse = kbqInjectCollapseAnimation();
|
|
210
278
|
/**
|
|
211
279
|
* Clamped text locale configuration.
|
|
212
280
|
*
|
|
@@ -230,9 +298,9 @@ class KbqClampedText {
|
|
|
230
298
|
// Untracked: called from a consumer's `effect()`, the collapsed state read here would make the effect toggle
|
|
231
299
|
// again on every change it makes.
|
|
232
300
|
untracked(() => {
|
|
233
|
-
this.isCollapsed.update((state) => !(state ?? true));
|
|
301
|
+
const settled = this.animateCollapse(this.textContainer().nativeElement, this.duration(), () => this.isCollapsed.update((state) => !(state ?? true)));
|
|
234
302
|
if (this.scrollOnCollapse() && this.collapsedState()) {
|
|
235
|
-
|
|
303
|
+
settled.then(() => this.elementRef.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' }));
|
|
236
304
|
}
|
|
237
305
|
});
|
|
238
306
|
}
|
|
@@ -245,7 +313,7 @@ class KbqClampedText {
|
|
|
245
313
|
return [...new Set(rects.map(({ top }) => top))].length;
|
|
246
314
|
}
|
|
247
315
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqClampedText, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqClampedText, isStandalone: true, selector: "kbq-clamped-text", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, scrollOnCollapse: { classPropertyName: "scrollOnCollapse", publicName: "scrollOnCollapse", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, host: { classAttribute: "kbq-clamped-text" }, providers: [
|
|
316
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqClampedText, isStandalone: true, selector: "kbq-clamped-text", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, scrollOnCollapse: { classPropertyName: "scrollOnCollapse", publicName: "scrollOnCollapse", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, host: { classAttribute: "kbq-clamped-text" }, providers: [
|
|
249
317
|
{ provide: KbqClampedRoot, useExisting: KbqClampedText }
|
|
250
318
|
], viewQueries: [{ propertyName: "text", first: true, predicate: ["text"], descendants: true, isSignal: true }, { propertyName: "textContainer", first: true, predicate: ["textContainer"], descendants: true, isSignal: true }], exportAs: ["kbqClampedText"], hostDirectives: [{ directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0, template: `
|
|
251
319
|
<div
|
|
@@ -305,7 +373,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
305
373
|
}, hostDirectives: [
|
|
306
374
|
{ directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
|
|
307
375
|
], exportAs: 'kbqClampedText', styles: [".kbq-clamped-text{display:inline-flex;flex-direction:column}.kbq-clamped-text__content.kbq-clamped-text__content_collapsed{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--kbq-clamped-text-line-clamp);line-clamp:var(--kbq-clamped-text-line-clamp)}.kbq-clamped-text__toggle{margin-top:var(--kbq-clamped-text-size-toggle-margin, var(--kbq-size-xxs));align-self:flex-start}\n"] }]
|
|
308
|
-
}], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], scrollOnCollapse: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollOnCollapse", required: false }] }], text: [{ type: i0.ViewChild, args: ['text', { isSignal: true }] }], textContainer: [{ type: i0.ViewChild, args: ['textContainer', { isSignal: true }] }] } });
|
|
376
|
+
}], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], scrollOnCollapse: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollOnCollapse", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], text: [{ type: i0.ViewChild, args: ['text', { isSignal: true }] }], textContainer: [{ type: i0.ViewChild, args: ['textContainer', { isSignal: true }] }] } });
|
|
309
377
|
|
|
310
378
|
const COMPONENTS = [
|
|
311
379
|
KbqClampedText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-clamped-text.mjs","sources":["../../../packages/components/clamped-text/constants.ts","../../../packages/components/clamped-text/clamped-list.ts","../../../packages/components/clamped-text/clamped-text.ts","../../../packages/components/clamped-text/clamped-text.module.ts","../../../packages/components/clamped-text/koobiq-components-clamped-text.ts"],"sourcesContent":["/**\n * `KbqClampedText` and `KbqClampedList` are documented as two components but ship from one entry\n * point on purpose: they share the `KbqClampedRoot` contract below, the `KbqClampedListTrigger`\n * that drives it and a single `clampedText` locale section. Splitting them would duplicate all\n * three across two packages for no consumer-visible gain.\n */\nimport { InjectionToken, Provider, Signal } from '@angular/core';\nimport {\n KbqClampedTextLocaleConfiguration,\n KbqDeepPartial,\n kbqInjectLocaleConfiguration,\n kbqLocaleConfigurationOverrideProvider,\n ruRULocaleData\n} from '@koobiq/components/core';\n\n/**\n * Default maximum number of visible rows for the clamped text component\n * before truncation and the \"collapse/expand\" toggle is shown.\n */\nexport const kbqClampedTextDefaultMaxRows = 5;\n\n/** Localization configuration provider. */\nexport const KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION = new InjectionToken<KbqClampedTextLocaleConfiguration>(\n 'KbqClampedTextLocaleConfiguration',\n {\n factory: () => ruRULocaleData.clampedText\n }\n);\n\n/**\n * Utility provider of {@link KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION}. Only the strings you pass are overridden;\n * the rest keep following the active locale.\n */\nexport const kbqClampedTextLocaleConfigurationProvider = (\n configuration: KbqDeepPartial<KbqClampedTextLocaleConfiguration>\n): Provider => kbqLocaleConfigurationOverrideProvider('clampedText', configuration);\n\n/**\n * Token the clamped containers of this package provide themselves under, so that\n * `KbqClampedListTrigger` can drive whichever of them it is projected into without naming a\n * concrete class.\n */\nexport const KbqClampedRoot = new InjectionToken<KbqClamped>('KbqClampedRoot');\n\n/** Contract a clamped container exposes to `KbqClampedListTrigger`. */\nexport interface KbqClamped {\n /**\n * Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = auto.\n * Behavior for auto may vary according to clamped-list/clamped-text\n */\n isCollapsed: Signal<boolean | undefined>;\n /** Whether the toggle trigger should be shown. */\n hasToggle: Signal<boolean>;\n /** Id of the region the trigger expands and collapses, published as its `aria-controls`. */\n contentId: string;\n /** Reactive locale strings for open/close labels. */\n localeConfiguration: Signal<KbqClampedTextLocaleConfiguration>;\n /** Toggles the collapsed state of the list. Stops event propagation. */\n toggle(event: Event): void;\n}\n\n/**\n * Injection function that creates a reactive locale configuration signal for {@link KbqClampedText} and\n * {@link KbqClampedList}.\n *\n * @docs-private\n */\nexport function kbqInjectClampedTextLocaleConfiguration(): Signal<KbqClampedTextLocaleConfiguration> {\n return kbqInjectLocaleConfiguration('clampedText', KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION);\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { computed, Directive, inject, input, model, numberAttribute } from '@angular/core';\nimport { kbqInjectNativeElement, KbqLocaleOverridesDirective } from '@koobiq/components/core';\nimport { KbqClamped, KbqClampedRoot, kbqInjectClampedTextLocaleConfiguration } from './constants';\n\n/**\n * Renders a long list compactly: keeps the first `collapsedVisibleCount` items and lets a projected\n * `kbqClampedListTrigger` reveal the rest.\n */\n@Directive({\n selector: '[kbqClampedList]',\n providers: [\n { provide: KbqClampedRoot, useExisting: KbqClampedList }\n ],\n host: {\n class: 'kbq-clamped-list',\n '[attr.id]': 'contentId'\n },\n hostDirectives: [\n { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }\n ],\n exportAs: 'kbqClampedList'\n})\nexport class KbqClampedList<T> implements KbqClamped {\n private readonly nativeElement = kbqInjectNativeElement();\n\n /** Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = expanded. */\n readonly isCollapsed = model<boolean>(true);\n /** The list of items to display. */\n readonly items = input<T[]>([]);\n\n /**\n * Maximum number of items visible in collapsed state. Defaults to `10`.\n */\n readonly collapsedVisibleCount = input(10, { transform: numberAttribute });\n\n /**\n * Minimum number of hidden items required to show the toggle trigger. Defaults to `6`.\n */\n readonly hiddenThreshold = input(6, { transform: numberAttribute });\n\n /** Id the trigger points its `aria-controls` at. Keeps an id the host already carries. */\n readonly contentId: string = this.nativeElement.id || inject(_IdGenerator).getId('kbq-clamped-list-');\n\n /** Number of items hidden when the list is collapsed. */\n readonly exceededItemCount = computed(() => this.items().length - this.collapsedVisibleCount());\n /** Whether the number of hidden items meets the threshold to render the toggle trigger. */\n readonly hasToggle = computed(() => this.exceededItemCount() >= this.hiddenThreshold());\n /** Slice of items currently rendered — truncated to `minVisibleCount` when collapsed, a full list otherwise. */\n readonly visibleItems = computed(() =>\n this.isCollapsed() && this.hasToggle() ? this.items().slice(0, this.collapsedVisibleCount()) : this.items()\n );\n /** Localized \"show more\" label with the exceeded item count interpolated into the `{exceededItemCount}` placeholder. */\n readonly showMoreCountText = computed(() =>\n this.localeConfiguration().showMoreText.replace('{exceededItemCount}', this.exceededItemCount().toString(10))\n );\n\n /** Clamped text locale configuration. */\n readonly localeConfiguration = kbqInjectClampedTextLocaleConfiguration();\n\n /** Toggles the collapsed state of the list. Stops event propagation. */\n toggle(event: Event) {\n event.stopPropagation();\n this.isCollapsed.update((state) => !state);\n }\n}\n\n/**\n * Disclosure control for the clamped container it is projected into — `[kbqClampedList]` or\n * `<kbq-clamped-text>`. Supplies the button semantics itself, so a host element does not have to:\n * `role`, `tabindex`, `aria-expanded` and `aria-controls` all come from here, and a `role` or\n * `tabindex` written on the element wins over the defaults.\n */\n@Directive({\n selector: '[kbqClampedListTrigger]',\n host: {\n class: 'kbq-clamped-list__trigger',\n role: 'button',\n tabindex: '0',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': 'root?.contentId ?? null',\n '(click)': 'root?.toggle($event)',\n '(keydown.enter)': 'onKeydown($any($event))',\n '(keydown.space)': 'onKeydown($any($event))'\n },\n exportAs: 'kbqClampedListTrigger'\n})\nexport class KbqClampedListTrigger {\n protected readonly root = inject(KbqClampedRoot, { optional: true });\n\n /**\n * Disclosure state of the controlled region. The trigger is only rendered while `hasToggle()`\n * holds, so the container's own collapsed state is what the user sees at that point.\n */\n protected readonly expanded = computed(() => {\n const root = this.root;\n\n if (!root) return null;\n\n return !(root.hasToggle() && (root.isCollapsed() ?? true));\n });\n\n /**\n * Activates the trigger from the keyboard. `preventDefault()` keeps Space from scrolling the\n * page on the non-native hosts this directive is meant for, and suppresses the synthetic click\n * a native button would fire on top of this handler.\n */\n protected onKeydown(event: KeyboardEvent): void {\n event.preventDefault();\n this.root?.toggle(event);\n }\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { Platform } from '@angular/cdk/platform';\nimport {\n afterNextRender,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n numberAttribute,\n signal,\n Signal,\n untracked,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqLocaleOverridesDirective } from '@koobiq/components/core';\nimport { KbqIcon } from '@koobiq/components/icon';\nimport { KbqLink, KbqLinkPrefix } from '@koobiq/components/link';\nimport { debounce, timer } from 'rxjs';\nimport { KbqClampedListTrigger } from './clamped-list';\nimport {\n KbqClamped,\n KbqClampedRoot,\n kbqClampedTextDefaultMaxRows,\n kbqInjectClampedTextLocaleConfiguration\n} from './constants';\n\n/**\n * Clamps projected text to `rows` lines and offers a disclosure control that reveals the rest.\n * The control only appears once a measurement has shown the content does not fit.\n */\n@Component({\n selector: 'kbq-clamped-text',\n imports: [\n KbqIcon,\n KbqLink,\n KbqLinkPrefix,\n KbqClampedListTrigger\n ],\n template: `\n <div\n #textContainer\n class=\"kbq-clamped-text__content\"\n [id]=\"contentId\"\n [style.--kbq-clamped-text-line-clamp]=\"rows()\"\n [class.kbq-clamped-text__content_collapsed]=\"collapsedState()\"\n >\n <span #text>\n <ng-content />\n </span>\n </div>\n\n @if (hasToggle()) {\n <span class=\"kbq-clamped-text__toggle\" kbqLink size=\"normal\" kbqClampedListTrigger>\n @let config = localeConfiguration();\n\n <i kbqLinkPrefix [kbq-icon]=\"collapsedState() ? 'kbq-chevron-down_16' : 'kbq-chevron-up_16'\"></i>\n {{ collapsedState() ? config.openText : config.closeText }}\n </span>\n }\n `,\n styleUrls: ['./clamped-text.scss'],\n providers: [\n { provide: KbqClampedRoot, useExisting: KbqClampedText }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-clamped-text'\n },\n hostDirectives: [\n { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }\n ],\n exportAs: 'kbqClampedText'\n})\nexport class KbqClampedText implements KbqClamped, AfterViewInit {\n /**\n * Max rows before text is clamped. Defaults to `kbqClampedTextDefaultMaxRows`.\n */\n readonly rows = input(kbqClampedTextDefaultMaxRows, { transform: numberAttribute });\n\n /**\n * Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = auto.\n * Writable half of the `[(isCollapsed)]` two-way binding — written when the user operates the\n * toggle, never by the component's own measurement.\n */\n readonly isCollapsed = model<boolean | undefined>(undefined);\n\n /**\n * Debounce time on resize observer when recalculating toggle and text visibility. Defaults to `0`.\n */\n readonly debounceTime = input(0, { transform: numberAttribute });\n\n /**\n * Whether collapsing scrolls the component back into view. Defaults to `true`.\n */\n readonly scrollOnCollapse = input(true, { transform: booleanAttribute });\n\n /** Id of the clamped region, published by the toggle as its `aria-controls`. */\n readonly contentId = inject(_IdGenerator).getId('kbq-clamped-text-content-');\n\n /** @docs-private */\n protected readonly text = viewChild.required<ElementRef<HTMLSpanElement>>('text');\n /** @docs-private */\n protected readonly textContainer = viewChild.required<ElementRef<HTMLDivElement>>('textContainer');\n\n private readonly hasToggleState = signal(false);\n /** Whether the content overflows `rows` lines by enough to be worth a toggle. */\n readonly hasToggle: Signal<boolean> = this.hasToggleState.asReadonly();\n\n /** Whether the content has been measured at least once. */\n private readonly measured = signal(false);\n\n /**\n * Rendered collapsed state, which drives the css class and the toggle's `aria-expanded`.\n *\n * Before the first measurement nothing is known about the content, so the requested state is\n * applied as-is: the server and the first paint clamp the text rather than flashing all of it.\n *\n * @docs-private\n */\n protected readonly collapsedState = computed(() => {\n const collapsed = this.isCollapsed() ?? true;\n\n return this.measured() ? this.hasToggle() && collapsed : collapsed;\n });\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly resizeObserver = inject(SharedResizeObserver);\n private readonly platform = inject(Platform);\n\n /**\n * Clamped text locale configuration.\n *\n * @docs-private\n */\n readonly localeConfiguration = kbqInjectClampedTextLocaleConfiguration();\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) return;\n\n const textContainer = this.textContainer().nativeElement;\n\n this.resizeObserver\n .observe(textContainer)\n // `debounce` re-reads the input on every delivery, so a later `[debounceTime]` applies.\n .pipe(\n debounce(() => timer(this.debounceTime())),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.updateToggleVisibilityState());\n }\n\n /** Flips the collapsed state. Stops event propagation. */\n toggle(event: Event): void {\n event.stopPropagation();\n\n // Untracked: called from a consumer's `effect()`, the collapsed state read here would make the effect toggle\n // again on every change it makes.\n untracked(() => {\n this.isCollapsed.update((state) => !(state ?? true));\n\n if (this.scrollOnCollapse() && this.collapsedState()) {\n afterNextRender(\n () => this.elementRef.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' }),\n { injector: this.injector }\n );\n }\n });\n }\n\n private updateToggleVisibilityState(): void {\n this.hasToggleState.set(this.getRowsCount() > this.rows() + 1);\n this.measured.set(true);\n }\n\n private getRowsCount(): number {\n const rects = Array.from(this.text().nativeElement.getClientRects());\n\n return [...new Set(rects.map(({ top }) => top))].length;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqClampedList, KbqClampedListTrigger } from './clamped-list';\nimport { KbqClampedText } from './clamped-text';\n\nconst COMPONENTS = [\n KbqClampedText,\n KbqClampedList,\n KbqClampedListTrigger\n];\n\n/** Re-exports both clamped containers and their shared trigger for `NgModule`-based consumers. */\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS\n})\nexport class KbqClampedTextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;AAUH;;;AAGG;AACI,MAAM,4BAA4B,GAAG;AAE5C;MACa,qCAAqC,GAAG,IAAI,cAAc,CACnE,mCAAmC,EACnC;AACI,IAAA,OAAO,EAAE,MAAM,cAAc,CAAC;AACjC,CAAA;AAGL;;;AAGG;AACI,MAAM,yCAAyC,GAAG,CACrD,aAAgE,KACrD,sCAAsC,CAAC,aAAa,EAAE,aAAa;AAElF;;;;AAIG;MACU,cAAc,GAAG,IAAI,cAAc,CAAa,gBAAgB;AAmB7E;;;;;AAKG;SACa,uCAAuC,GAAA;AACnD,IAAA,OAAO,4BAA4B,CAAC,aAAa,EAAE,qCAAqC,CAAC;AAC7F;;AChEA;;;AAGG;MAeU,cAAc,CAAA;AAd3B,IAAA,WAAA,GAAA;QAeqB,IAAA,CAAA,aAAa,GAAG,sBAAsB,EAAE;;AAGhD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,IAAI,kFAAC;;AAElC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAM,EAAE,4EAAC;AAE/B;;AAEG;QACM,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAC,EAAE,6FAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAE1E;;AAEG;QACM,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,uFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;AAG1D,QAAA,IAAA,CAAA,SAAS,GAAW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
|
1
|
+
{"version":3,"file":"koobiq-components-clamped-text.mjs","sources":["../../../packages/components/clamped-text/collapse-animation.ts","../../../packages/components/clamped-text/constants.ts","../../../packages/components/clamped-text/clamped-list.ts","../../../packages/components/clamped-text/clamped-text.ts","../../../packages/components/clamped-text/clamped-text.module.ts","../../../packages/components/clamped-text/koobiq-components-clamped-text.ts"],"sourcesContent":["import { afterNextRender, DestroyRef, inject, Injector, runInInjectionContext } from '@angular/core';\nimport { kbqAnimationsDisabled } from '@koobiq/components/core';\n\n/**\n * Creates a runner that animates `block-size` of an element across a state change made by the user\n * and returns a promise that settles when the motion ends or is cancelled. The promise resolves\n * right away when the change is not animated: the Web Animations API is missing, the motion is\n * turned off, the duration is not a non-negative number, or the height did not change.\n *\n * A running animation is cancelled and the next one starts from the visible height; destroying the\n * injector cancels the animation it owns. A fixed `block-size` makes a flex host squeeze its\n * children when it is smaller than the content and spread wrapped lines when it is larger, so the\n * host keeps its children's size and packs the lines to the start.\n *\n * The heights come from `getBoundingClientRect`, which reads the border box, so an element with a\n * padding or a border under a `content-box` box-sizing snaps when the animation ends.\n *\n * Must be called in an injection context.\n */\nexport function kbqInjectCollapseAnimation(): (\n element: HTMLElement,\n duration: number,\n change: () => void\n) => Promise<void> {\n const injector = inject(Injector);\n const destroyRef = inject(DestroyRef);\n let animations: Animation[] = [];\n\n destroyRef.onDestroy(() => animations.forEach((animation) => animation.cancel()));\n\n return (element, duration, change) => {\n if (\n typeof element.animate !== 'function' ||\n !Number.isFinite(duration) ||\n duration < 0 ||\n runInInjectionContext(injector, kbqAnimationsDisabled)\n ) {\n change();\n\n return Promise.resolve();\n }\n\n const from = element.getBoundingClientRect().height;\n\n animations.forEach((animation) => animation.cancel());\n change();\n\n return new Promise<void>((resolve) => {\n afterNextRender(\n () => {\n const to = element.getBoundingClientRect().height;\n\n if (from === to) {\n resolve();\n\n return;\n }\n\n const timing = { duration, easing: 'ease-in-out' };\n const children = Array.from(element.children).map((child) =>\n child.animate({ flexShrink: [0, 0] }, timing)\n );\n const host = element.animate(\n {\n blockSize: [`${from}px`, `${to}px`],\n overflow: ['clip', 'clip'],\n alignContent: ['flex-start', 'flex-start']\n },\n timing\n );\n\n animations = [host, ...children];\n // A cancelled animation rejects `finished`; the promise settles either way, so the caller's\n // follow-up still runs.\n host.finished.then(\n () => resolve(),\n () => resolve()\n );\n },\n { injector }\n );\n });\n };\n}\n","/**\n * `KbqClampedText` and `KbqClampedList` are documented as two components but ship from one entry\n * point on purpose: they share the `KbqClampedRoot` contract below, the `KbqClampedListTrigger`\n * that drives it and a single `clampedText` locale section. Splitting them would duplicate all\n * three across two packages for no consumer-visible gain.\n */\nimport { InjectionToken, Provider, Signal } from '@angular/core';\nimport {\n KbqClampedTextLocaleConfiguration,\n KbqDeepPartial,\n kbqInjectLocaleConfiguration,\n kbqLocaleConfigurationOverrideProvider,\n ruRULocaleData\n} from '@koobiq/components/core';\n\n/**\n * Default maximum number of visible rows for the clamped text component\n * before truncation and the \"collapse/expand\" toggle is shown.\n */\nexport const kbqClampedTextDefaultMaxRows = 5;\n\n/** Localization configuration provider. */\nexport const KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION = new InjectionToken<KbqClampedTextLocaleConfiguration>(\n 'KbqClampedTextLocaleConfiguration',\n {\n factory: () => ruRULocaleData.clampedText\n }\n);\n\n/**\n * Utility provider of {@link KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION}. Only the strings you pass are overridden;\n * the rest keep following the active locale.\n */\nexport const kbqClampedTextLocaleConfigurationProvider = (\n configuration: KbqDeepPartial<KbqClampedTextLocaleConfiguration>\n): Provider => kbqLocaleConfigurationOverrideProvider('clampedText', configuration);\n\n/**\n * Token the clamped containers of this package provide themselves under, so that\n * `KbqClampedListTrigger` can drive whichever of them it is projected into without naming a\n * concrete class.\n */\nexport const KbqClampedRoot = new InjectionToken<KbqClamped>('KbqClampedRoot');\n\n/** Contract a clamped container exposes to `KbqClampedListTrigger`. */\nexport interface KbqClamped {\n /**\n * Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = auto.\n * Behavior for auto may vary according to clamped-list/clamped-text\n */\n isCollapsed: Signal<boolean | undefined>;\n /** Whether the toggle trigger should be shown. */\n hasToggle: Signal<boolean>;\n /** Id of the region the trigger expands and collapses, published as its `aria-controls`. */\n contentId: string;\n /** Reactive locale strings for open/close labels. */\n localeConfiguration: Signal<KbqClampedTextLocaleConfiguration>;\n /** Toggles the collapsed state of the list. Stops event propagation. */\n toggle(event: Event): void;\n}\n\n/**\n * Injection function that creates a reactive locale configuration signal for {@link KbqClampedText} and\n * {@link KbqClampedList}.\n *\n * @docs-private\n */\nexport function kbqInjectClampedTextLocaleConfiguration(): Signal<KbqClampedTextLocaleConfiguration> {\n return kbqInjectLocaleConfiguration('clampedText', KBQ_CLAMPED_TEXT_LOCALE_CONFIGURATION);\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { computed, Directive, inject, input, model, numberAttribute } from '@angular/core';\nimport { kbqInjectNativeElement, KbqLocaleOverridesDirective } from '@koobiq/components/core';\nimport { kbqInjectCollapseAnimation } from './collapse-animation';\nimport { KbqClamped, KbqClampedRoot, kbqInjectClampedTextLocaleConfiguration } from './constants';\n\n/**\n * Renders a long list compactly: keeps the first `collapsedVisibleCount` items and lets a projected\n * `kbqClampedListTrigger` reveal the rest.\n */\n@Directive({\n selector: '[kbqClampedList]',\n providers: [\n { provide: KbqClampedRoot, useExisting: KbqClampedList }\n ],\n host: {\n class: 'kbq-clamped-list',\n '[attr.id]': 'contentId'\n },\n hostDirectives: [\n { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }\n ],\n exportAs: 'kbqClampedList'\n})\nexport class KbqClampedList<T> implements KbqClamped {\n private readonly nativeElement = kbqInjectNativeElement();\n private readonly animateCollapse = kbqInjectCollapseAnimation();\n\n /** Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = expanded. */\n readonly isCollapsed = model<boolean>(true);\n /** The list of items to display. */\n readonly items = input<T[]>([]);\n\n /**\n * Maximum number of items visible in collapsed state. Defaults to `10`.\n */\n readonly collapsedVisibleCount = input(10, { transform: numberAttribute });\n\n /**\n * Minimum number of hidden items required to show the toggle trigger. Defaults to `6`.\n */\n readonly hiddenThreshold = input(6, { transform: numberAttribute });\n\n /**\n * Duration of the expand and collapse animation in milliseconds.\n * Only state changes made through the disclosure toggle animate: programmatic writes of\n * `isCollapsed` and changes of `items` switch instantly. Defaults to `100`.\n */\n readonly duration = input<number, number | string | null | undefined>(100, { transform: numberAttribute });\n\n /** Id the trigger points its `aria-controls` at. Keeps an id the host already carries. */\n readonly contentId: string = this.nativeElement.id || inject(_IdGenerator).getId('kbq-clamped-list-');\n\n /** Number of items hidden when the list is collapsed. */\n readonly exceededItemCount = computed(() => this.items().length - this.collapsedVisibleCount());\n /** Whether the number of hidden items meets the threshold to render the toggle trigger. */\n readonly hasToggle = computed(() => this.exceededItemCount() >= this.hiddenThreshold());\n /** Slice of items currently rendered — truncated to `minVisibleCount` when collapsed, a full list otherwise. */\n readonly visibleItems = computed(() =>\n this.isCollapsed() && this.hasToggle() ? this.items().slice(0, this.collapsedVisibleCount()) : this.items()\n );\n /** Localized \"show more\" label with the exceeded item count interpolated into the `{exceededItemCount}` placeholder. */\n readonly showMoreCountText = computed(() =>\n this.localeConfiguration().showMoreText.replace('{exceededItemCount}', this.exceededItemCount().toString(10))\n );\n\n /** Clamped text locale configuration. */\n readonly localeConfiguration = kbqInjectClampedTextLocaleConfiguration();\n\n /** Toggles the collapsed state of the list. Stops event propagation. */\n toggle(event: Event) {\n event.stopPropagation();\n this.animateCollapse(this.nativeElement, this.duration(), () => this.isCollapsed.update((state) => !state));\n }\n}\n\n/**\n * Disclosure control for the clamped container it is projected into — `[kbqClampedList]` or\n * `<kbq-clamped-text>`. Supplies the button semantics itself, so a host element does not have to:\n * `role`, `tabindex`, `aria-expanded` and `aria-controls` all come from here, and a `role` or\n * `tabindex` written on the element wins over the defaults.\n */\n@Directive({\n selector: '[kbqClampedListTrigger]',\n host: {\n class: 'kbq-clamped-list__trigger',\n role: 'button',\n tabindex: '0',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': 'root?.contentId ?? null',\n '(click)': 'root?.toggle($event)',\n '(keydown.enter)': 'onKeydown($any($event))',\n '(keydown.space)': 'onKeydown($any($event))'\n },\n exportAs: 'kbqClampedListTrigger'\n})\nexport class KbqClampedListTrigger {\n protected readonly root = inject(KbqClampedRoot, { optional: true });\n\n /**\n * Disclosure state of the controlled region. The trigger is only rendered while `hasToggle()`\n * holds, so the container's own collapsed state is what the user sees at that point.\n */\n protected readonly expanded = computed(() => {\n const root = this.root;\n\n if (!root) return null;\n\n return !(root.hasToggle() && (root.isCollapsed() ?? true));\n });\n\n /**\n * Activates the trigger from the keyboard. `preventDefault()` keeps Space from scrolling the\n * page on the non-native hosts this directive is meant for, and suppresses the synthetic click\n * a native button would fire on top of this handler.\n */\n protected onKeydown(event: KeyboardEvent): void {\n event.preventDefault();\n this.root?.toggle(event);\n }\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n Signal,\n untracked,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqLocaleOverridesDirective } from '@koobiq/components/core';\nimport { KbqIcon } from '@koobiq/components/icon';\nimport { KbqLink, KbqLinkPrefix } from '@koobiq/components/link';\nimport { debounce, timer } from 'rxjs';\nimport { KbqClampedListTrigger } from './clamped-list';\nimport { kbqInjectCollapseAnimation } from './collapse-animation';\nimport {\n KbqClamped,\n KbqClampedRoot,\n kbqClampedTextDefaultMaxRows,\n kbqInjectClampedTextLocaleConfiguration\n} from './constants';\n\n/**\n * Clamps projected text to `rows` lines and offers a disclosure control that reveals the rest.\n * The control only appears once a measurement has shown the content does not fit.\n */\n@Component({\n selector: 'kbq-clamped-text',\n imports: [\n KbqIcon,\n KbqLink,\n KbqLinkPrefix,\n KbqClampedListTrigger\n ],\n template: `\n <div\n #textContainer\n class=\"kbq-clamped-text__content\"\n [id]=\"contentId\"\n [style.--kbq-clamped-text-line-clamp]=\"rows()\"\n [class.kbq-clamped-text__content_collapsed]=\"collapsedState()\"\n >\n <span #text>\n <ng-content />\n </span>\n </div>\n\n @if (hasToggle()) {\n <span class=\"kbq-clamped-text__toggle\" kbqLink size=\"normal\" kbqClampedListTrigger>\n @let config = localeConfiguration();\n\n <i kbqLinkPrefix [kbq-icon]=\"collapsedState() ? 'kbq-chevron-down_16' : 'kbq-chevron-up_16'\"></i>\n {{ collapsedState() ? config.openText : config.closeText }}\n </span>\n }\n `,\n styleUrls: ['./clamped-text.scss'],\n providers: [\n { provide: KbqClampedRoot, useExisting: KbqClampedText }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-clamped-text'\n },\n hostDirectives: [\n { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }\n ],\n exportAs: 'kbqClampedText'\n})\nexport class KbqClampedText implements KbqClamped, AfterViewInit {\n /**\n * Max rows before text is clamped. Defaults to `kbqClampedTextDefaultMaxRows`.\n */\n readonly rows = input(kbqClampedTextDefaultMaxRows, { transform: numberAttribute });\n\n /**\n * Collapsed state: `true` = collapsed, `false` = expanded, `undefined` = auto.\n * Writable half of the `[(isCollapsed)]` two-way binding — written when the user operates the\n * toggle, never by the component's own measurement.\n */\n readonly isCollapsed = model<boolean | undefined>(undefined);\n\n /**\n * Debounce time on resize observer when recalculating toggle and text visibility. Defaults to `0`.\n */\n readonly debounceTime = input(0, { transform: numberAttribute });\n\n /**\n * Whether collapsing scrolls the component back into view. Defaults to `true`.\n */\n readonly scrollOnCollapse = input(true, { transform: booleanAttribute });\n\n /**\n * Duration of the expand and collapse animation in milliseconds.\n * Only state changes made through the disclosure toggle animate: programmatic writes of\n * `isCollapsed` and re-measurements switch instantly. Defaults to `100`.\n */\n readonly duration = input<number, number | string | null | undefined>(100, { transform: numberAttribute });\n\n /** Id of the clamped region, published by the toggle as its `aria-controls`. */\n readonly contentId = inject(_IdGenerator).getId('kbq-clamped-text-content-');\n\n /** @docs-private */\n protected readonly text = viewChild.required<ElementRef<HTMLSpanElement>>('text');\n /** @docs-private */\n protected readonly textContainer = viewChild.required<ElementRef<HTMLDivElement>>('textContainer');\n\n private readonly hasToggleState = signal(false);\n /** Whether the content overflows `rows` lines by enough to be worth a toggle. */\n readonly hasToggle: Signal<boolean> = this.hasToggleState.asReadonly();\n\n /** Whether the content has been measured at least once. */\n private readonly measured = signal(false);\n\n /**\n * Rendered collapsed state, which drives the css class and the toggle's `aria-expanded`.\n *\n * Before the first measurement nothing is known about the content, so the requested state is\n * applied as-is: the server and the first paint clamp the text rather than flashing all of it.\n *\n * @docs-private\n */\n protected readonly collapsedState = computed(() => {\n const collapsed = this.isCollapsed() ?? true;\n\n return this.measured() ? this.hasToggle() && collapsed : collapsed;\n });\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly resizeObserver = inject(SharedResizeObserver);\n private readonly platform = inject(Platform);\n private readonly animateCollapse = kbqInjectCollapseAnimation();\n\n /**\n * Clamped text locale configuration.\n *\n * @docs-private\n */\n readonly localeConfiguration = kbqInjectClampedTextLocaleConfiguration();\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) return;\n\n const textContainer = this.textContainer().nativeElement;\n\n this.resizeObserver\n .observe(textContainer)\n // `debounce` re-reads the input on every delivery, so a later `[debounceTime]` applies.\n .pipe(\n debounce(() => timer(this.debounceTime())),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.updateToggleVisibilityState());\n }\n\n /** Flips the collapsed state. Stops event propagation. */\n toggle(event: Event): void {\n event.stopPropagation();\n\n // Untracked: called from a consumer's `effect()`, the collapsed state read here would make the effect toggle\n // again on every change it makes.\n untracked(() => {\n const settled = this.animateCollapse(this.textContainer().nativeElement, this.duration(), () =>\n this.isCollapsed.update((state) => !(state ?? true))\n );\n\n if (this.scrollOnCollapse() && this.collapsedState()) {\n settled.then(() =>\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n );\n }\n });\n }\n\n private updateToggleVisibilityState(): void {\n this.hasToggleState.set(this.getRowsCount() > this.rows() + 1);\n this.measured.set(true);\n }\n\n private getRowsCount(): number {\n const rects = Array.from(this.text().nativeElement.getClientRects());\n\n return [...new Set(rects.map(({ top }) => top))].length;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqClampedList, KbqClampedListTrigger } from './clamped-list';\nimport { KbqClampedText } from './clamped-text';\n\nconst COMPONENTS = [\n KbqClampedText,\n KbqClampedList,\n KbqClampedListTrigger\n];\n\n/** Re-exports both clamped containers and their shared trigger for `NgModule`-based consumers. */\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS\n})\nexport class KbqClampedTextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;;;;;;;;;;;;;;AAeG;SACa,0BAA0B,GAAA;AAKtC,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACjC,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACrC,IAAI,UAAU,GAAgB,EAAE;IAEhC,UAAU,CAAC,SAAS,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;AAEjF,IAAA,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAI;AACjC,QAAA,IACI,OAAO,OAAO,CAAC,OAAO,KAAK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