ng-primitives 0.89.0 → 0.91.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/a11y/index.d.ts +98 -3
- package/accordion/index.d.ts +361 -7
- package/ai/index.d.ts +238 -16
- package/autofill/index.d.ts +62 -1
- package/avatar/index.d.ts +155 -5
- package/breadcrumbs/index.d.ts +200 -7
- package/button/index.d.ts +39 -3
- package/checkbox/index.d.ts +137 -2
- package/combobox/index.d.ts +414 -8
- package/common/index.d.ts +31 -4
- package/date-picker/index.d.ts +714 -18
- package/date-time/index.d.ts +289 -3
- package/date-time-luxon/index.d.ts +31 -1
- package/dialog/index.d.ts +253 -9
- package/fesm2022/ng-primitives-a11y.mjs +42 -58
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +249 -225
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +61 -58
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +55 -38
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +105 -145
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +106 -49
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +20 -42
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +110 -84
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +82 -78
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +5 -5
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +119 -112
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +48 -47
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +56 -48
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +9 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +97 -64
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +44 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +38 -54
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +59 -54
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +14 -14
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +52 -50
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +86 -72
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +38 -35
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +83 -74
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +67 -60
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +11 -12
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +43 -40
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +35 -33
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +4 -4
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +264 -237
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +73 -69
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +7 -7
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +287 -253
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +173 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +105 -101
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +48 -43
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +33 -41
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +19 -19
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +160 -159
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +81 -68
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +31 -40
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +68 -60
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +50 -37
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/file-upload/index.d.ts +148 -4
- package/focus-trap/index.d.ts +98 -2
- package/form-field/index.d.ts +266 -7
- package/index.d.ts +2 -2
- package/input/index.d.ts +84 -2
- package/input-otp/index.d.ts +247 -4
- package/interactions/index.d.ts +295 -16
- package/internal/index.d.ts +201 -10
- package/listbox/index.d.ts +209 -6
- package/menu/index.d.ts +297 -8
- package/meter/index.d.ts +67 -6
- package/package.json +28 -28
- package/pagination/index.d.ts +211 -7
- package/popover/index.d.ts +224 -5
- package/portal/index.d.ts +389 -6
- package/progress/index.d.ts +124 -6
- package/radio/index.d.ts +140 -5
- package/resize/index.d.ts +29 -1
- package/roving-focus/index.d.ts +154 -4
- package/schematics/ng-add/schema.d.ts +0 -1
- package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +1 -1
- package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +6 -3
- package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toggle/toggle.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toggle-group/toggle-group.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +1 -1
- package/search/index.d.ts +66 -3
- package/select/index.d.ts +341 -8
- package/separator/index.d.ts +30 -2
- package/slider/index.d.ts +471 -10
- package/state/index.d.ts +68 -11
- package/switch/index.d.ts +151 -3
- package/tabs/index.d.ts +222 -7
- package/textarea/index.d.ts +87 -2
- package/toast/index.d.ts +219 -4
- package/toggle/index.d.ts +98 -2
- package/toggle-group/index.d.ts +168 -5
- package/toolbar/index.d.ts +43 -2
- package/tooltip/index.d.ts +214 -5
- package/utils/index.d.ts +170 -9
- package/a11y/active-descendant/active-descendant.d.ts +0 -42
- package/a11y/visually-hidden/visually-hidden-state.d.ts +0 -17
- package/a11y/visually-hidden/visually-hidden.d.ts +0 -50
- package/accordion/accordion/accordion-state.d.ts +0 -17
- package/accordion/accordion/accordion.d.ts +0 -50
- package/accordion/accordion-content/accordion-content.d.ts +0 -40
- package/accordion/accordion-item/accordion-item-state.d.ts +0 -17
- package/accordion/accordion-item/accordion-item.d.ts +0 -50
- package/accordion/accordion-trigger/accordion-trigger.d.ts +0 -31
- package/accordion/config/accordion-config.d.ts +0 -32
- package/ai/prompt-composer/prompt-composer-state.d.ts +0 -17
- package/ai/prompt-composer/prompt-composer.d.ts +0 -23
- package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +0 -17
- package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +0 -29
- package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +0 -17
- package/ai/prompt-composer-input/prompt-composer-input.d.ts +0 -16
- package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +0 -17
- package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +0 -15
- package/ai/thread/thread-state.d.ts +0 -17
- package/ai/thread/thread.d.ts +0 -23
- package/ai/thread-message/thread-message-state.d.ts +0 -17
- package/ai/thread-message/thread-message.d.ts +0 -11
- package/ai/thread-suggestion/thread-suggestion-state.d.ts +0 -17
- package/ai/thread-suggestion/thread-suggestion.d.ts +0 -14
- package/ai/thread-viewport/thread-viewport-state.d.ts +0 -17
- package/ai/thread-viewport/thread-viewport.d.ts +0 -34
- package/autofill/autofill/autofill.d.ts +0 -19
- package/avatar/avatar/avatar-state.d.ts +0 -17
- package/avatar/avatar/avatar.d.ts +0 -29
- package/avatar/avatar-fallback/avatar-fallback.d.ts +0 -37
- package/avatar/avatar-image/avatar-image.d.ts +0 -27
- package/avatar/config/avatar-config.d.ts +0 -21
- package/breadcrumbs/breadcrumb-ellipsis/breadcrumb-ellipsis.d.ts +0 -8
- package/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +0 -8
- package/breadcrumbs/breadcrumb-link/breadcrumb-link.d.ts +0 -9
- package/breadcrumbs/breadcrumb-list/breadcrumb-list.d.ts +0 -8
- package/breadcrumbs/breadcrumb-page/breadcrumb-page.d.ts +0 -8
- package/breadcrumbs/breadcrumb-separator/breadcrumb-separator.d.ts +0 -8
- package/breadcrumbs/breadcrumbs/breadcrumbs.d.ts +0 -8
- package/button/button/button-state.d.ts +0 -17
- package/button/button/button.d.ts +0 -15
- package/button/button/setup-button.d.ts +0 -15
- package/checkbox/checkbox/checkbox-state.d.ts +0 -17
- package/checkbox/checkbox/checkbox.d.ts +0 -45
- package/combobox/combobox/combobox-state.d.ts +0 -17
- package/combobox/combobox/combobox.d.ts +0 -222
- package/combobox/combobox-button/combobox-button.d.ts +0 -18
- package/combobox/combobox-dropdown/combobox-dropdown.d.ts +0 -21
- package/combobox/combobox-input/combobox-input.d.ts +0 -36
- package/combobox/combobox-option/combobox-option.d.ts +0 -51
- package/combobox/combobox-portal/combobox-portal.d.ts +0 -37
- package/combobox/config/combobox-config.d.ts +0 -28
- package/combobox/utils.d.ts +0 -9
- package/common/header/header-token.d.ts +0 -10
- package/common/header/header.d.ts +0 -13
- package/common/types/orientation.d.ts +0 -1
- package/common/types/selection.d.ts +0 -1
- package/date-picker/config/date-picker-config.d.ts +0 -22
- package/date-picker/date-picker/date-picker-first-day-of-week.d.ts +0 -29
- package/date-picker/date-picker/date-picker-state.d.ts +0 -9
- package/date-picker/date-picker/date-picker.d.ts +0 -129
- package/date-picker/date-picker-cell/date-picker-cell.d.ts +0 -20
- package/date-picker/date-picker-cell-render/date-picker-cell-render-token.d.ts +0 -12
- package/date-picker/date-picker-cell-render/date-picker-cell-render.d.ts +0 -39
- package/date-picker/date-picker-date-button/date-picker-date-button-token.d.ts +0 -7
- package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +0 -114
- package/date-picker/date-picker-grid/date-picker-grid.d.ts +0 -16
- package/date-picker/date-picker-label/date-picker-label-token.d.ts +0 -7
- package/date-picker/date-picker-label/date-picker-label.d.ts +0 -20
- package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -34
- package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -34
- package/date-picker/date-picker-row-render/date-picker-row-render-token.d.ts +0 -12
- package/date-picker/date-picker-row-render/date-picker-row-render.d.ts +0 -65
- package/date-picker/date-range-picker/date-range-picker-state.d.ts +0 -19
- package/date-picker/date-range-picker/date-range-picker.d.ts +0 -149
- package/date-time/date-adapter/date-adapter-token.d.ts +0 -11
- package/date-time/date-adapter/date-adapter.d.ts +0 -169
- package/date-time/native-date-adapter/native-date-adapter.d.ts +0 -106
- package/date-time-luxon/luxon-date-adapter/luxon-date-adapter.d.ts +0 -28
- package/dialog/config/dialog-config.d.ts +0 -41
- package/dialog/dialog/dialog-ref.d.ts +0 -45
- package/dialog/dialog/dialog-state.d.ts +0 -17
- package/dialog/dialog/dialog.d.ts +0 -37
- package/dialog/dialog/dialog.service.d.ts +0 -69
- package/dialog/dialog-description/dialog-description.d.ts +0 -12
- package/dialog/dialog-overlay/dialog-overlay.d.ts +0 -16
- package/dialog/dialog-title/dialog-title.d.ts +0 -12
- package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -26
- package/file-upload/file-dropzone/file-drop-filter.d.ts +0 -2
- package/file-upload/file-dropzone/file-dropzone-state.d.ts +0 -17
- package/file-upload/file-dropzone/file-dropzone.d.ts +0 -55
- package/file-upload/file-upload/file-upload-state.d.ts +0 -17
- package/file-upload/file-upload/file-upload.d.ts +0 -72
- package/focus-trap/focus-trap/focus-trap-state.d.ts +0 -17
- package/focus-trap/focus-trap/focus-trap.d.ts +0 -85
- package/form-field/description/description.d.ts +0 -17
- package/form-field/error/error.d.ts +0 -32
- package/form-field/form-control/form-control-state.d.ts +0 -17
- package/form-field/form-control/form-control.d.ts +0 -44
- package/form-field/form-field/form-field-state.d.ts +0 -17
- package/form-field/form-field/form-field.d.ts +0 -119
- package/form-field/label/label.d.ts +0 -30
- package/input/input/input-state.d.ts +0 -17
- package/input/input/input.d.ts +0 -34
- package/input-otp/input-otp/input-otp-state.d.ts +0 -17
- package/input-otp/input-otp/input-otp.d.ts +0 -133
- package/input-otp/input-otp-input/input-otp-input.d.ts +0 -57
- package/input-otp/input-otp-slot/input-otp-slot.d.ts +0 -45
- package/interactions/config/interactions-config.d.ts +0 -30
- package/interactions/focus/focus-interaction.d.ts +0 -14
- package/interactions/focus/focus.d.ts +0 -19
- package/interactions/focus-visible/focus-visible-interaction.d.ts +0 -12
- package/interactions/focus-visible/focus-visible.d.ts +0 -19
- package/interactions/hover/hover-interaction.d.ts +0 -17
- package/interactions/hover/hover.d.ts +0 -31
- package/interactions/interactions/interactions.d.ts +0 -20
- package/interactions/move/move.d.ts +0 -114
- package/interactions/press/press-interaction.d.ts +0 -14
- package/interactions/press/press.d.ts +0 -26
- package/internal/exit-animation/exit-animation-manager.d.ts +0 -17
- package/internal/exit-animation/exit-animation.d.ts +0 -26
- package/internal/signals/explicit-effect.d.ts +0 -19
- package/internal/style-injector/style-injector.d.ts +0 -44
- package/internal/utilities/dom-removal.d.ts +0 -6
- package/internal/utilities/element-ref.d.ts +0 -6
- package/internal/utilities/mutation-observer.d.ts +0 -39
- package/internal/utilities/overflow.d.ts +0 -13
- package/internal/utilities/resize.d.ts +0 -31
- package/internal/utilities/scrolling.d.ts +0 -1
- package/listbox/listbox/listbox-state.d.ts +0 -17
- package/listbox/listbox/listbox.d.ts +0 -101
- package/listbox/listbox-header/listbox-header.d.ts +0 -9
- package/listbox/listbox-option/listbox-option.d.ts +0 -68
- package/listbox/listbox-section/listbox-section.d.ts +0 -9
- package/listbox/listbox-trigger/listbox-trigger.d.ts +0 -13
- package/menu/config/menu-config.d.ts +0 -44
- package/menu/menu/menu-token.d.ts +0 -11
- package/menu/menu/menu.d.ts +0 -22
- package/menu/menu-item/menu-item.d.ts +0 -30
- package/menu/menu-trigger/menu-trigger-state.d.ts +0 -17
- package/menu/menu-trigger/menu-trigger.d.ts +0 -98
- package/menu/submenu-trigger/submenu-trigger-state.d.ts +0 -17
- package/menu/submenu-trigger/submenu-trigger.d.ts +0 -88
- package/meter/meter/meter-state.d.ts +0 -17
- package/meter/meter/meter.d.ts +0 -27
- package/meter/meter-indicator/meter-indicator.d.ts +0 -7
- package/meter/meter-label/meter-label.d.ts +0 -10
- package/meter/meter-track/meter-track.d.ts +0 -5
- package/meter/meter-value/meter-value.d.ts +0 -5
- package/pagination/pagination/pagination-state.d.ts +0 -17
- package/pagination/pagination/pagination.d.ts +0 -45
- package/pagination/pagination-button/pagination-button.d.ts +0 -39
- package/pagination/pagination-first/pagination-first.d.ts +0 -28
- package/pagination/pagination-last/pagination-last.d.ts +0 -28
- package/pagination/pagination-next/pagination-next.d.ts +0 -31
- package/pagination/pagination-previous/pagination-previous.d.ts +0 -31
- package/popover/config/popover-config.d.ts +0 -64
- package/popover/popover/popover.d.ts +0 -18
- package/popover/popover-arrow/popover-arrow.d.ts +0 -6
- package/popover/popover-trigger/popover-trigger-state.d.ts +0 -19
- package/popover/popover-trigger/popover-trigger.d.ts +0 -128
- package/portal/offset.d.ts +0 -39
- package/portal/overlay-arrow.d.ts +0 -1
- package/portal/overlay-token.d.ts +0 -12
- package/portal/overlay.d.ts +0 -214
- package/portal/portal.d.ts +0 -94
- package/portal/scroll-strategy.d.ts +0 -23
- package/progress/progress/progress-state.d.ts +0 -17
- package/progress/progress/progress.d.ts +0 -61
- package/progress/progress-indicator/progress-indicator.d.ts +0 -17
- package/progress/progress-label/progress-label.d.ts +0 -14
- package/progress/progress-track/progress-track.d.ts +0 -9
- package/progress/progress-value/progress-value.d.ts +0 -9
- package/radio/radio-group/radio-group-state.d.ts +0 -18
- package/radio/radio-group/radio-group.d.ts +0 -54
- package/radio/radio-indicator/radio-indicator.d.ts +0 -21
- package/radio/radio-item/radio-item-state.d.ts +0 -18
- package/radio/radio-item/radio-item.d.ts +0 -45
- package/resize/resize/resize.d.ts +0 -26
- package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +0 -17
- package/roving-focus/roving-focus-group/roving-focus-group-token.d.ts +0 -21
- package/roving-focus/roving-focus-group/roving-focus-group.d.ts +0 -94
- package/roving-focus/roving-focus-item/roving-focus-item.d.ts +0 -53
- package/search/search/search-state.d.ts +0 -17
- package/search/search/search.d.ts +0 -36
- package/search/search-clear/search-clear.d.ts +0 -16
- package/select/config/select-config.d.ts +0 -28
- package/select/native-select/native-select-state.d.ts +0 -17
- package/select/native-select/native-select.d.ts +0 -22
- package/select/select/select-state.d.ts +0 -17
- package/select/select/select.d.ts +0 -172
- package/select/select-dropdown/select-dropdown.d.ts +0 -17
- package/select/select-option/select-option.d.ts +0 -51
- package/select/select-portal/select-portal.d.ts +0 -37
- package/separator/config/separator-config.d.ts +0 -22
- package/separator/separator/separator.d.ts +0 -11
- package/slider/range-slider/range-slider/range-slider-state.d.ts +0 -17
- package/slider/range-slider/range-slider/range-slider.d.ts +0 -115
- package/slider/range-slider/range-slider-range/range-slider-range.d.ts +0 -12
- package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +0 -44
- package/slider/range-slider/range-slider-track/range-slider-track.d.ts +0 -22
- package/slider/slider/slider-state.d.ts +0 -17
- package/slider/slider/slider.d.ts +0 -58
- package/slider/slider-range/slider-range.d.ts +0 -12
- package/slider/slider-thumb/slider-thumb.d.ts +0 -29
- package/slider/slider-track/slider-track.d.ts +0 -22
- package/switch/switch/switch-state.d.ts +0 -17
- package/switch/switch/switch.d.ts +0 -49
- package/switch/switch-thumb/switch-thumb.d.ts +0 -13
- package/tabs/config/tabs-config.d.ts +0 -32
- package/tabs/tab-button/tab-button.d.ts +0 -59
- package/tabs/tab-list/tab-list.d.ts +0 -12
- package/tabs/tab-panel/tab-panel-token.d.ts +0 -8
- package/tabs/tab-panel/tab-panel.d.ts +0 -38
- package/tabs/tabset/tabset-state.d.ts +0 -17
- package/tabs/tabset/tabset.d.ts +0 -71
- package/textarea/textarea/textarea-state.d.ts +0 -17
- package/textarea/textarea/textarea.d.ts +0 -19
- package/toast/config/toast-config.d.ts +0 -70
- package/toast/toast/toast-context.d.ts +0 -3
- package/toast/toast/toast-manager.d.ts +0 -49
- package/toast/toast/toast-options.d.ts +0 -34
- package/toast/toast/toast-timer.d.ts +0 -14
- package/toast/toast/toast.d.ts +0 -72
- package/toggle/toggle/toggle-state.d.ts +0 -17
- package/toggle/toggle/toggle.d.ts +0 -44
- package/toggle-group/config/toggle-group-config.d.ts +0 -32
- package/toggle-group/toggle-group/toggle-group-state.d.ts +0 -17
- package/toggle-group/toggle-group/toggle-group.d.ts +0 -64
- package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +0 -17
- package/toggle-group/toggle-group-item/toggle-group-item.d.ts +0 -34
- package/toolbar/toolbar/toolbar-state.d.ts +0 -17
- package/toolbar/toolbar/toolbar.d.ts +0 -20
- package/tooltip/config/tooltip-config.d.ts +0 -59
- package/tooltip/tooltip/tooltip.d.ts +0 -17
- package/tooltip/tooltip-arrow/tooltip-arrow.d.ts +0 -6
- package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +0 -14
- package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +0 -17
- package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +0 -126
- package/utils/forms/providers.d.ts +0 -6
- package/utils/forms/status.d.ts +0 -16
- package/utils/forms/types.d.ts +0 -8
- package/utils/helpers/attributes.d.ts +0 -2
- package/utils/helpers/disposables.d.ts +0 -40
- package/utils/helpers/unique-id.d.ts +0 -6
- package/utils/helpers/validators.d.ts +0 -51
- package/utils/observables/take-until-destroyed.d.ts +0 -10
- package/utils/signals/index.d.ts +0 -22
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, input, booleanAttribute,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { InjectionToken, inject, signal, computed, input, booleanAttribute, Directive, output } from '@angular/core';
|
|
3
|
+
import { ngpRovingFocusItem, provideRovingFocusItemState, ngpRovingFocusGroup, provideRovingFocusGroupState } from 'ng-primitives/roving-focus';
|
|
4
|
+
import { injectElementRef } from 'ng-primitives/internal';
|
|
5
|
+
import { createPrimitive, controlled, attrBinding, dataBinding, deprecatedSetter, listener } from 'ng-primitives/state';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
7
|
|
|
8
8
|
const defaultToggleGroupConfig = {
|
|
9
9
|
orientation: 'horizontal',
|
|
@@ -32,116 +32,155 @@ function injectToggleGroupConfig() {
|
|
|
32
32
|
return inject(NgpToggleGroupConfigToken, { optional: true }) ?? defaultToggleGroupConfig;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
const [NgpToggleGroupStateToken, ngpToggleGroup, injectToggleGroupState, provideToggleGroupState,] = createPrimitive('NgpToggleGroup', ({ rovingFocusGroup, orientation: _orientation = signal('vertical'), allowDeselection = signal(true), type = signal('single'), value: _value = signal([]), disabled: _disabled = signal(false), onValueChange, }) => {
|
|
36
|
+
const element = injectElementRef();
|
|
37
|
+
const disabled = controlled(_disabled);
|
|
38
|
+
const value = controlled(_value);
|
|
39
|
+
const orientation = controlled(_orientation);
|
|
40
|
+
const valueChange = new Subject();
|
|
41
|
+
// Host bindings
|
|
42
|
+
attrBinding(element, 'role', 'group');
|
|
43
|
+
dataBinding(element, 'data-orientation', orientation);
|
|
44
|
+
dataBinding(element, 'data-type', type);
|
|
45
|
+
dataBinding(element, 'data-disabled', disabled);
|
|
46
|
+
/**
|
|
47
|
+
* Select a value in the toggle group.
|
|
48
|
+
*/
|
|
49
|
+
const select = (selection) => {
|
|
50
|
+
if (disabled()) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
let newValue = [];
|
|
54
|
+
if (type() === 'single') {
|
|
55
|
+
newValue = [selection];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
newValue = [...value(), selection];
|
|
59
|
+
}
|
|
60
|
+
setValue(newValue);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* De-select a value in the toggle group.
|
|
64
|
+
*/
|
|
65
|
+
const deselect = (selection) => {
|
|
66
|
+
if (disabled() || !allowDeselection()) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const newValue = value()?.filter(v => v !== selection) || [];
|
|
70
|
+
setValue(newValue);
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Check if a value is selected in the toggle group.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
const isSelected = (itemValue) => {
|
|
77
|
+
return value()?.includes(itemValue) ?? false;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Toggle a value in the toggle group.
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
const toggle = (itemValue) => {
|
|
84
|
+
if (isSelected(itemValue)) {
|
|
85
|
+
deselect(itemValue);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
select(itemValue);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const setValue = (newValue) => {
|
|
92
|
+
value.set(newValue);
|
|
93
|
+
onValueChange?.(newValue);
|
|
94
|
+
valueChange.next(newValue);
|
|
95
|
+
};
|
|
96
|
+
const setDisabled = (isDisabled) => {
|
|
97
|
+
disabled.set(isDisabled);
|
|
98
|
+
};
|
|
99
|
+
function setOrientation(newOrientation) {
|
|
100
|
+
orientation.set(newOrientation);
|
|
101
|
+
rovingFocusGroup.setOrientation(newOrientation);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
select,
|
|
105
|
+
deselect,
|
|
106
|
+
disabled: deprecatedSetter(disabled, 'setDisabled'),
|
|
107
|
+
isSelected,
|
|
108
|
+
toggle,
|
|
109
|
+
value: deprecatedSetter(value, 'setValue'),
|
|
110
|
+
setValue,
|
|
111
|
+
setDisabled,
|
|
112
|
+
setOrientation,
|
|
113
|
+
valueChange,
|
|
114
|
+
};
|
|
115
|
+
});
|
|
51
116
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
117
|
+
const [NgpToggleGroupItemToken, ngpToggleGroupItem, injectToggleGroupItemState, provideToggleGroupItemState,] = createPrimitive('NgpToggleGroupItem', ({ value, disabled = signal(false) }) => {
|
|
118
|
+
const element = injectElementRef();
|
|
119
|
+
const toggleGroup = injectToggleGroupState();
|
|
120
|
+
// Whether the item is selected.
|
|
121
|
+
const selected = computed(() => toggleGroup()?.isSelected(value()) ?? false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
122
|
+
// Host bindings
|
|
123
|
+
attrBinding(element, 'role', 'radio');
|
|
124
|
+
attrBinding(element, 'aria-checked', selected);
|
|
125
|
+
dataBinding(element, 'data-selected', selected);
|
|
126
|
+
attrBinding(element, 'aria-disabled', disabled);
|
|
127
|
+
dataBinding(element, 'data-disabled', disabled);
|
|
128
|
+
// Host listener
|
|
129
|
+
listener(element, 'click', () => toggle());
|
|
130
|
+
// Toggle the item.
|
|
131
|
+
const toggle = () => {
|
|
132
|
+
if (disabled?.()) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
toggleGroup()?.toggle(value());
|
|
136
|
+
};
|
|
137
|
+
return { selected, toggle };
|
|
138
|
+
});
|
|
68
139
|
|
|
69
140
|
class NgpToggleGroupItem {
|
|
70
141
|
constructor() {
|
|
71
|
-
/**
|
|
72
|
-
* Access the group that the item belongs to.
|
|
73
|
-
*/
|
|
74
|
-
this.toggleGroup = injectToggleGroupState();
|
|
75
142
|
/**
|
|
76
143
|
* The value of the item.
|
|
77
144
|
* @required
|
|
78
145
|
*/
|
|
79
|
-
this.value = input(undefined, {
|
|
80
|
-
|
|
81
|
-
|
|
146
|
+
this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value", alias: 'ngpToggleGroupItemValue' }] : [{
|
|
147
|
+
alias: 'ngpToggleGroupItemValue',
|
|
148
|
+
}]));
|
|
82
149
|
/**
|
|
83
150
|
* Whether the item is disabled.
|
|
84
151
|
*/
|
|
85
|
-
this.disabled = input(false, {
|
|
86
|
-
|
|
87
|
-
|
|
152
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpToggleGroupItemDisabled',
|
|
153
|
+
transform: booleanAttribute }] : [{
|
|
154
|
+
alias: 'ngpToggleGroupItemDisabled',
|
|
155
|
+
transform: booleanAttribute,
|
|
156
|
+
}]));
|
|
157
|
+
ngpToggleGroupItem({
|
|
158
|
+
value: this.value,
|
|
159
|
+
disabled: this.disabled,
|
|
88
160
|
});
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*/
|
|
92
|
-
this.selected = computed(() => this.toggleGroup().isSelected(this.state.value()));
|
|
93
|
-
/**
|
|
94
|
-
* The state of the item.
|
|
95
|
-
*/
|
|
96
|
-
this.state = toggleGroupItemState(this);
|
|
161
|
+
// Initialize the roving focus item state
|
|
162
|
+
ngpRovingFocusItem({ disabled: this.disabled });
|
|
97
163
|
}
|
|
98
164
|
ngOnInit() {
|
|
99
165
|
// we can't use a required input for value as it is used in a computed property before the input is set
|
|
100
|
-
if (this.
|
|
166
|
+
if (this.value() === undefined) {
|
|
101
167
|
throw new Error('The value input is required for the toggle group item.');
|
|
102
168
|
}
|
|
103
169
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
toggle() {
|
|
108
|
-
if (this.state.disabled()) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.toggleGroup().toggle(this.state.value());
|
|
112
|
-
}
|
|
113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpToggleGroupItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
114
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpToggleGroupItem, isStandalone: true, selector: "[ngpToggleGroupItem]", inputs: { value: { classPropertyName: "value", publicName: "ngpToggleGroupItemValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpToggleGroupItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-checked": "selected()", "attr.data-selected": "selected() ? \"\" : null", "attr.aria-disabled": "state.disabled()", "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [provideToggleGroupItemState()], exportAs: ["ngpToggleGroupItem"], hostDirectives: [{ directive: i1.NgpRovingFocusItem, inputs: ["ngpRovingFocusItemDisabled", "ngpToggleGroupItemDisabled"] }], ngImport: i0 }); }
|
|
170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpToggleGroupItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
171
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpToggleGroupItem, isStandalone: true, selector: "[ngpToggleGroupItem]", inputs: { value: { classPropertyName: "value", publicName: "ngpToggleGroupItemValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpToggleGroupItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideToggleGroupItemState(), provideRovingFocusItemState()], exportAs: ["ngpToggleGroupItem"], ngImport: i0 }); }
|
|
115
172
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpToggleGroupItem, decorators: [{
|
|
117
174
|
type: Directive,
|
|
118
175
|
args: [{
|
|
119
176
|
selector: '[ngpToggleGroupItem]',
|
|
120
177
|
exportAs: 'ngpToggleGroupItem',
|
|
121
|
-
providers: [provideToggleGroupItemState()],
|
|
122
|
-
hostDirectives: [
|
|
123
|
-
{
|
|
124
|
-
directive: NgpRovingFocusItem,
|
|
125
|
-
inputs: ['ngpRovingFocusItemDisabled: ngpToggleGroupItemDisabled'],
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
host: {
|
|
129
|
-
role: 'radio',
|
|
130
|
-
'[attr.aria-checked]': 'selected()',
|
|
131
|
-
'[attr.data-selected]': 'selected() ? "" : null',
|
|
132
|
-
'[attr.aria-disabled]': 'state.disabled()',
|
|
133
|
-
'[attr.data-disabled]': 'state.disabled() ? "" : null',
|
|
134
|
-
'(click)': 'toggle()',
|
|
135
|
-
},
|
|
178
|
+
providers: [provideToggleGroupItemState(), provideRovingFocusItemState()],
|
|
136
179
|
}]
|
|
137
|
-
}] });
|
|
180
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupItemValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupItemDisabled", required: false }] }] } });
|
|
138
181
|
|
|
139
182
|
class NgpToggleGroup {
|
|
140
183
|
constructor() {
|
|
141
|
-
/**
|
|
142
|
-
* Access the roving focus group state.
|
|
143
|
-
*/
|
|
144
|
-
this.rovingFocusGroupState = injectRovingFocusGroupState();
|
|
145
184
|
/**
|
|
146
185
|
* Access the global toggle group configuration.
|
|
147
186
|
*/
|
|
@@ -149,25 +188,26 @@ class NgpToggleGroup {
|
|
|
149
188
|
/**
|
|
150
189
|
* The orientation of the toggle group.
|
|
151
190
|
*/
|
|
152
|
-
this.orientation = input(this.config.orientation, {
|
|
153
|
-
|
|
154
|
-
|
|
191
|
+
this.orientation = input(this.config.orientation, ...(ngDevMode ? [{ debugName: "orientation", alias: 'ngpToggleGroupOrientation' }] : [{
|
|
192
|
+
alias: 'ngpToggleGroupOrientation',
|
|
193
|
+
}]));
|
|
155
194
|
/**
|
|
156
195
|
* Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.
|
|
157
196
|
* @default true
|
|
158
197
|
*/
|
|
159
|
-
this.allowDeselection = input(this.config.allowDeselection, {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
198
|
+
this.allowDeselection = input(this.config.allowDeselection, ...(ngDevMode ? [{ debugName: "allowDeselection", alias: 'ngpToggleGroupAllowDeselection',
|
|
199
|
+
transform: booleanAttribute }] : [{
|
|
200
|
+
alias: 'ngpToggleGroupAllowDeselection',
|
|
201
|
+
transform: booleanAttribute,
|
|
202
|
+
}]));
|
|
163
203
|
/**
|
|
164
204
|
* The type of the toggle group, whether only one item can be selected or multiple.
|
|
165
205
|
*/
|
|
166
|
-
this.type = input(this.config.type, { alias: 'ngpToggleGroupType' });
|
|
206
|
+
this.type = input(this.config.type, ...(ngDevMode ? [{ debugName: "type", alias: 'ngpToggleGroupType' }] : [{ alias: 'ngpToggleGroupType' }]));
|
|
167
207
|
/**
|
|
168
208
|
* The selected value(s) of the toggle group.
|
|
169
209
|
*/
|
|
170
|
-
this.value = input([], { alias: 'ngpToggleGroupValue' });
|
|
210
|
+
this.value = input([], ...(ngDevMode ? [{ debugName: "value", alias: 'ngpToggleGroupValue' }] : [{ alias: 'ngpToggleGroupValue' }]));
|
|
171
211
|
/**
|
|
172
212
|
* Emits when the value of the toggle group changes.
|
|
173
213
|
*/
|
|
@@ -175,83 +215,44 @@ class NgpToggleGroup {
|
|
|
175
215
|
/**
|
|
176
216
|
* Whether the toggle group is disabled.
|
|
177
217
|
*/
|
|
178
|
-
this.disabled = input(false, {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
218
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpToggleGroupDisabled',
|
|
219
|
+
transform: booleanAttribute }] : [{
|
|
220
|
+
alias: 'ngpToggleGroupDisabled',
|
|
221
|
+
transform: booleanAttribute,
|
|
222
|
+
}]));
|
|
182
223
|
/**
|
|
183
224
|
* The state of the toggle group.
|
|
184
225
|
*/
|
|
185
|
-
this.state =
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
let newValue = [];
|
|
198
|
-
if (this.state.type() === 'single') {
|
|
199
|
-
newValue = [value];
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
newValue = [...this.state.value(), value];
|
|
203
|
-
}
|
|
204
|
-
this.state.value.set(newValue);
|
|
205
|
-
this.valueChange.emit(newValue);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* De-select a value in the toggle group.
|
|
209
|
-
*/
|
|
210
|
-
deselect(value) {
|
|
211
|
-
if (this.state.disabled() || !this.state.allowDeselection()) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
const newValue = this.state.value().filter(v => v !== value);
|
|
215
|
-
this.state.value.set(newValue);
|
|
216
|
-
this.valueChange.emit(newValue);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Check if a value is selected in the toggle group.
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
isSelected(value) {
|
|
223
|
-
return this.state.value()?.includes(value) ?? false;
|
|
226
|
+
this.state = ngpToggleGroup({
|
|
227
|
+
rovingFocusGroup: ngpRovingFocusGroup({
|
|
228
|
+
orientation: this.orientation,
|
|
229
|
+
disabled: this.disabled,
|
|
230
|
+
}),
|
|
231
|
+
orientation: this.orientation,
|
|
232
|
+
allowDeselection: this.allowDeselection,
|
|
233
|
+
type: this.type,
|
|
234
|
+
value: this.value,
|
|
235
|
+
disabled: this.disabled,
|
|
236
|
+
onValueChange: (value) => this.valueChange.emit(value),
|
|
237
|
+
});
|
|
224
238
|
}
|
|
225
239
|
/**
|
|
226
240
|
* Toggle a value in the toggle group.
|
|
227
|
-
* @internal
|
|
228
241
|
*/
|
|
229
242
|
toggle(value) {
|
|
230
|
-
|
|
231
|
-
this.deselect(value);
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
this.select(value);
|
|
235
|
-
}
|
|
243
|
+
this.state.toggle(value);
|
|
236
244
|
}
|
|
237
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
238
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
245
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpToggleGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
246
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpToggleGroup, isStandalone: true, selector: "[ngpToggleGroup]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpToggleGroupOrientation", isSignal: true, isRequired: false, transformFunction: null }, allowDeselection: { classPropertyName: "allowDeselection", publicName: "ngpToggleGroupAllowDeselection", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "ngpToggleGroupType", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpToggleGroupValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpToggleGroupDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpToggleGroupValueChange" }, providers: [provideToggleGroupState(), provideRovingFocusGroupState({ inherit: true })], exportAs: ["ngpToggleGroup"], ngImport: i0 }); }
|
|
239
247
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpToggleGroup, decorators: [{
|
|
241
249
|
type: Directive,
|
|
242
250
|
args: [{
|
|
243
251
|
selector: '[ngpToggleGroup]',
|
|
244
252
|
exportAs: 'ngpToggleGroup',
|
|
245
|
-
providers: [provideToggleGroupState()],
|
|
246
|
-
hostDirectives: [NgpRovingFocusGroup],
|
|
247
|
-
host: {
|
|
248
|
-
role: 'group',
|
|
249
|
-
'[attr.data-orientation]': 'state.orientation()',
|
|
250
|
-
'[attr.data-type]': 'state.type()',
|
|
251
|
-
'[attr.data-disabled]': 'state.disabled() ? "" : null',
|
|
252
|
-
},
|
|
253
|
+
providers: [provideToggleGroupState(), provideRovingFocusGroupState({ inherit: true })],
|
|
253
254
|
}]
|
|
254
|
-
}],
|
|
255
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupOrientation", required: false }] }], allowDeselection: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupAllowDeselection", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupType", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupValue", required: false }] }], valueChange: [{ type: i0.Output, args: ["ngpToggleGroupValueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpToggleGroupDisabled", required: false }] }] } });
|
|
255
256
|
|
|
256
257
|
/**
|
|
257
258
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-toggle-group.mjs","sources":["../../../../packages/ng-primitives/toggle-group/src/config/toggle-group-config.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group/toggle-group-state.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group-item/toggle-group-item-state.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group-item/toggle-group-item.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group/toggle-group.ts","../../../../packages/ng-primitives/toggle-group/src/ng-primitives-toggle-group.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\n\nexport interface NgpToggleGroupConfig {\n /**\n * The orientation of the toggle group.\n * @default 'horizontal'\n */\n orientation: NgpOrientation;\n\n /**\n * The type of the toggle group, whether only one item can be selected or multiple.\n * @default 'single'\n */\n type: 'single' | 'multiple';\n\n /**\n * Whether a toggle button can be deselected.\n * @default true\n */\n allowDeselection: boolean;\n}\n\nexport const defaultToggleGroupConfig: NgpToggleGroupConfig = {\n orientation: 'horizontal',\n type: 'single',\n allowDeselection: true,\n};\n\nexport const NgpToggleGroupConfigToken = new InjectionToken<NgpToggleGroupConfig>(\n 'NgpToggleGroupConfigToken',\n);\n\n/**\n * Provide the default ToggleGroup configuration\n * @param config The ToggleGroup configuration\n * @returns The provider\n */\nexport function provideToggleGroupConfig(config: Partial<NgpToggleGroupConfig>): Provider[] {\n return [\n {\n provide: NgpToggleGroupConfigToken,\n useValue: { ...defaultToggleGroupConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the ToggleGroup configuration\n * @returns The global ToggleGroup configuration\n */\nexport function injectToggleGroupConfig(): NgpToggleGroupConfig {\n return inject(NgpToggleGroupConfigToken, { optional: true }) ?? defaultToggleGroupConfig;\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpToggleGroup } from './toggle-group';\n\n/**\n * The state token for the ToggleGroup primitive.\n */\nexport const NgpToggleGroupStateToken = createStateToken<NgpToggleGroup>('ToggleGroup');\n\n/**\n * Provides the ToggleGroup state.\n */\nexport const provideToggleGroupState = createStateProvider(NgpToggleGroupStateToken);\n\n/**\n * Injects the ToggleGroup state.\n */\nexport const injectToggleGroupState = createStateInjector<NgpToggleGroup>(NgpToggleGroupStateToken);\n\n/**\n * The ToggleGroup state registration function.\n */\nexport const toggleGroupState = createState(NgpToggleGroupStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpToggleGroupItem } from './toggle-group-item';\n\n/**\n * The state token for the ToggleGroupItem primitive.\n */\nexport const NgpToggleGroupItemStateToken = createStateToken<NgpToggleGroupItem>('ToggleGroupItem');\n\n/**\n * Provides the ToggleGroupItem state.\n */\nexport const provideToggleGroupItemState = createStateProvider(NgpToggleGroupItemStateToken);\n\n/**\n * Injects the ToggleGroupItem state.\n */\nexport const injectToggleGroupItemState = createStateInjector<NgpToggleGroupItem>(\n NgpToggleGroupItemStateToken,\n);\n\n/**\n * The ToggleGroupItem state registration function.\n */\nexport const toggleGroupItemState = createState(NgpToggleGroupItemStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, OnInit } from '@angular/core';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectToggleGroupState } from '../toggle-group/toggle-group-state';\nimport { provideToggleGroupItemState, toggleGroupItemState } from './toggle-group-item-state';\n\n@Directive({\n selector: '[ngpToggleGroupItem]',\n exportAs: 'ngpToggleGroupItem',\n providers: [provideToggleGroupItemState()],\n hostDirectives: [\n {\n directive: NgpRovingFocusItem,\n inputs: ['ngpRovingFocusItemDisabled: ngpToggleGroupItemDisabled'],\n },\n ],\n host: {\n role: 'radio',\n '[attr.aria-checked]': 'selected()',\n '[attr.data-selected]': 'selected() ? \"\" : null',\n '[attr.aria-disabled]': 'state.disabled()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '(click)': 'toggle()',\n },\n})\nexport class NgpToggleGroupItem implements OnInit {\n /**\n * Access the group that the item belongs to.\n */\n private readonly toggleGroup = injectToggleGroupState();\n\n /**\n * The value of the item.\n * @required\n */\n readonly value = input<string>(undefined, {\n alias: 'ngpToggleGroupItemValue',\n });\n\n /**\n * Whether the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleGroupItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether the item is selected.\n */\n protected readonly selected = computed(() => this.toggleGroup().isSelected(this.state.value()!));\n\n /**\n * The state of the item.\n */\n protected readonly state = toggleGroupItemState<NgpToggleGroupItem>(this);\n\n ngOnInit(): void {\n // we can't use a required input for value as it is used in a computed property before the input is set\n if (this.state.value() === undefined) {\n throw new Error('The value input is required for the toggle group item.');\n }\n }\n\n /**\n * Toggle the item.\n */\n protected toggle(): void {\n if (this.state.disabled()) {\n return;\n }\n\n this.toggleGroup().toggle(this.state.value()!);\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { explicitEffect } from 'ng-primitives/internal';\nimport { injectRovingFocusGroupState, NgpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { injectToggleGroupConfig } from '../config/toggle-group-config';\nimport { provideToggleGroupState, toggleGroupState } from './toggle-group-state';\n\n@Directive({\n selector: '[ngpToggleGroup]',\n exportAs: 'ngpToggleGroup',\n providers: [provideToggleGroupState()],\n hostDirectives: [NgpRovingFocusGroup],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'state.orientation()',\n '[attr.data-type]': 'state.type()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpToggleGroup {\n /**\n * Access the roving focus group state.\n */\n private readonly rovingFocusGroupState = injectRovingFocusGroupState();\n\n /**\n * Access the global toggle group configuration.\n */\n private readonly config = injectToggleGroupConfig();\n\n /**\n * The orientation of the toggle group.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpToggleGroupOrientation',\n });\n\n /**\n * Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.\n * @default true\n */\n readonly allowDeselection = input<boolean, BooleanInput>(this.config.allowDeselection, {\n alias: 'ngpToggleGroupAllowDeselection',\n transform: booleanAttribute,\n });\n\n /**\n * The type of the toggle group, whether only one item can be selected or multiple.\n */\n readonly type = input<'single' | 'multiple'>(this.config.type, { alias: 'ngpToggleGroupType' });\n\n /**\n * The selected value(s) of the toggle group.\n */\n readonly value = input<string[]>([], { alias: 'ngpToggleGroupValue' });\n\n /**\n * Emits when the value of the toggle group changes.\n */\n readonly valueChange = output<string[]>({ alias: 'ngpToggleGroupValueChange' });\n\n /**\n * Whether the toggle group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The state of the toggle group.\n */\n protected readonly state = toggleGroupState<NgpToggleGroup>(this);\n\n constructor() {\n // the roving focus group defaults to vertical orientation whereas\n // the default for the toggle group may be different if provided via global config\n explicitEffect([this.state.orientation], ([orientation]) =>\n this.rovingFocusGroupState().orientation.set(orientation),\n );\n }\n\n /**\n * Select a value in the toggle group.\n */\n private select(value: string): void {\n if (this.state.disabled()) {\n return;\n }\n\n let newValue: string[] = [];\n\n if (this.state.type() === 'single') {\n newValue = [value];\n } else {\n newValue = [...this.state.value(), value];\n }\n\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n }\n\n /**\n * De-select a value in the toggle group.\n */\n private deselect(value: string): void {\n if (this.state.disabled() || !this.state.allowDeselection()) {\n return;\n }\n\n const newValue = this.state.value().filter(v => v !== value);\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n }\n\n /**\n * Check if a value is selected in the toggle group.\n * @internal\n */\n isSelected(value: string): boolean {\n return this.state.value()?.includes(value) ?? false;\n }\n\n /**\n * Toggle a value in the toggle group.\n * @internal\n */\n toggle(value: string): void {\n if (this.isSelected(value)) {\n this.deselect(value);\n } else {\n this.select(value);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,wBAAwB,GAAyB;AAC5D,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,gBAAgB,EAAE,IAAI;CACvB;AAEM,MAAM,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA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,EAAA,gCAAA,EAAA,EAAA,EAAA,SAAA,EATd,CAAC,uBAAuB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAS3B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,SAAS,EAAE,CAAC,uBAAuB,EAAE,CAAC;oBACtC,cAAc,EAAE,CAAC,mBAAmB,CAAC;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,yBAAyB,EAAE,qBAAqB;AAChD,wBAAA,kBAAkB,EAAE,cAAc;AAClC,wBAAA,sBAAsB,EAAE,8BAA8B;AACvD,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-toggle-group.mjs","sources":["../../../../packages/ng-primitives/toggle-group/src/config/toggle-group-config.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group/toggle-group-state.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group-item/toggle-group-item-state.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group-item/toggle-group-item.ts","../../../../packages/ng-primitives/toggle-group/src/toggle-group/toggle-group.ts","../../../../packages/ng-primitives/toggle-group/src/ng-primitives-toggle-group.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\n\nexport interface NgpToggleGroupConfig {\n /**\n * The orientation of the toggle group.\n * @default 'horizontal'\n */\n orientation: NgpOrientation;\n\n /**\n * The type of the toggle group, whether only one item can be selected or multiple.\n * @default 'single'\n */\n type: 'single' | 'multiple';\n\n /**\n * Whether a toggle button can be deselected.\n * @default true\n */\n allowDeselection: boolean;\n}\n\nexport const defaultToggleGroupConfig: NgpToggleGroupConfig = {\n orientation: 'horizontal',\n type: 'single',\n allowDeselection: true,\n};\n\nexport const NgpToggleGroupConfigToken = new InjectionToken<NgpToggleGroupConfig>(\n 'NgpToggleGroupConfigToken',\n);\n\n/**\n * Provide the default ToggleGroup configuration\n * @param config The ToggleGroup configuration\n * @returns The provider\n */\nexport function provideToggleGroupConfig(config: Partial<NgpToggleGroupConfig>): Provider[] {\n return [\n {\n provide: NgpToggleGroupConfigToken,\n useValue: { ...defaultToggleGroupConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the ToggleGroup configuration\n * @returns The global ToggleGroup configuration\n */\nexport function injectToggleGroupConfig(): NgpToggleGroupConfig {\n return inject(NgpToggleGroupConfigToken, { optional: true }) ?? defaultToggleGroupConfig;\n}\n","import { signal, Signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { NgpRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n} from 'ng-primitives/state';\nimport { Observable, Subject } from 'rxjs';\n\n/**\n * The state interface for the ToggleGroup pattern.\n */\nexport interface NgpToggleGroupState {\n /**\n * The current value(s) of the toggle group.\n */\n readonly value: WritableSignal<string[]>;\n\n /**\n * Emit when the value changes.\n */\n readonly valueChange: Observable<string[]>;\n\n /**\n * Whether the toggle group is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * Select a value in the toggle group.\n */\n select(selection: string): void;\n\n /**\n * De-select a value in the toggle group.\n */\n deselect(selection: string): void;\n\n /**\n * Check if a value is selected in the toggle group.\n */\n isSelected(selection: string): boolean;\n\n /**\n * Toggle a value in the toggle group.\n */\n toggle(selection: string): void;\n\n /**\n * Set the value(s) of the toggle group.\n */\n setValue(newValue: string[]): void;\n\n /**\n * Set the disabled state of the toggle group.\n */\n setDisabled(isDisabled: boolean): void;\n\n /**\n * Set the orientation of the toggle group.\n */\n setOrientation(newOrientation: NgpOrientation): void;\n}\n\n/**\n * The props interface for the ToggleGroup pattern.\n */\nexport interface NgpToggleGroupProps {\n /**\n * The roving focus group state for the toggle-group.\n */\n readonly rovingFocusGroup: NgpRovingFocusGroupState;\n\n /**\n * The orientation of the toggle-group.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether deselection is allowed in the toggle-group.\n */\n readonly allowDeselection?: Signal<boolean>;\n /**\n * The type of the toggle-group (e.g., 'single' or 'multiple').\n */\n readonly type?: Signal<'single' | 'multiple'>;\n /**\n * The value(s) of the toggle-group.\n */\n readonly value?: Signal<string[] | undefined>;\n /**\n * Whether the toggle-group is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Emit when the value changes.\n */\n readonly onValueChange?: (value: string[]) => void;\n}\n\nexport const [\n NgpToggleGroupStateToken,\n ngpToggleGroup,\n injectToggleGroupState,\n provideToggleGroupState,\n] = createPrimitive(\n 'NgpToggleGroup',\n ({\n rovingFocusGroup,\n orientation: _orientation = signal('vertical'),\n allowDeselection = signal(true),\n type = signal<'single' | 'multiple'>('single'),\n value: _value = signal<string[]>([]),\n disabled: _disabled = signal(false),\n onValueChange,\n }: NgpToggleGroupProps): NgpToggleGroupState => {\n const element = injectElementRef();\n const disabled = controlled(_disabled);\n const value = controlled(_value);\n const orientation = controlled(_orientation);\n const valueChange = new Subject<string[]>();\n\n // Host bindings\n attrBinding(element, 'role', 'group');\n dataBinding(element, 'data-orientation', orientation);\n dataBinding(element, 'data-type', type);\n dataBinding(element, 'data-disabled', disabled);\n\n /**\n * Select a value in the toggle group.\n */\n const select = (selection: string): void => {\n if (disabled()) {\n return;\n }\n\n let newValue: string[] = [];\n\n if (type() === 'single') {\n newValue = [selection];\n } else {\n newValue = [...(value() as string[]), selection];\n }\n\n setValue(newValue);\n };\n\n /**\n * De-select a value in the toggle group.\n */\n const deselect = (selection: string): void => {\n if (disabled() || !allowDeselection()) {\n return;\n }\n\n const newValue = value()?.filter(v => v !== selection) || [];\n setValue(newValue);\n };\n\n /**\n * Check if a value is selected in the toggle group.\n * @internal\n */\n const isSelected = (itemValue: string): boolean => {\n return value()?.includes(itemValue) ?? false;\n };\n\n /**\n * Toggle a value in the toggle group.\n * @internal\n */\n const toggle = (itemValue: string): void => {\n if (isSelected(itemValue)) {\n deselect(itemValue);\n } else {\n select(itemValue);\n }\n };\n\n const setValue = (newValue: string[]): void => {\n value.set(newValue);\n onValueChange?.(newValue);\n valueChange.next(newValue);\n };\n\n const setDisabled = (isDisabled: boolean): void => {\n disabled.set(isDisabled);\n };\n\n function setOrientation(newOrientation: NgpOrientation): void {\n orientation.set(newOrientation);\n rovingFocusGroup.setOrientation(newOrientation);\n }\n\n return {\n select,\n deselect,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n isSelected,\n toggle,\n value: deprecatedSetter(value, 'setValue') as WritableSignal<string[]>,\n setValue,\n setDisabled,\n setOrientation,\n valueChange,\n };\n },\n);\n","import { computed, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectToggleGroupState } from '../toggle-group/toggle-group-state';\n\n/**\n * The state interface for the ToggleGroupItem pattern.\n */\nexport interface NgpToggleGroupItemState {\n selected: Signal<boolean>;\n toggle(): void;\n}\n\n/**\n * The props interface for the ToggleGroupItem pattern.\n */\nexport interface NgpToggleGroupItemProps {\n /**\n * The value of the toggle group item.\n */\n value: Signal<string>;\n\n /**\n * Whether the toggle group item is disabled.\n */\n disabled?: Signal<boolean>;\n}\n\nexport const [\n NgpToggleGroupItemToken,\n ngpToggleGroupItem,\n injectToggleGroupItemState,\n provideToggleGroupItemState,\n] = createPrimitive(\n 'NgpToggleGroupItem',\n ({ value, disabled = signal(false) }: NgpToggleGroupItemProps): NgpToggleGroupItemState => {\n const element = injectElementRef();\n const toggleGroup = injectToggleGroupState();\n\n // Whether the item is selected.\n const selected = computed(() => toggleGroup()?.isSelected(value()!) ?? false);\n\n // Host bindings\n attrBinding(element, 'role', 'radio');\n attrBinding(element, 'aria-checked', selected);\n dataBinding(element, 'data-selected', selected);\n attrBinding(element, 'aria-disabled', disabled);\n dataBinding(element, 'data-disabled', disabled);\n\n // Host listener\n listener(element, 'click', () => toggle());\n\n // Toggle the item.\n const toggle = (): void => {\n if (disabled?.()) {\n return;\n }\n toggleGroup()?.toggle(value()!);\n };\n\n return { selected, toggle };\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, OnInit, Signal } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';\nimport { ngpToggleGroupItem, provideToggleGroupItemState } from './toggle-group-item-state';\n\n@Directive({\n selector: '[ngpToggleGroupItem]',\n exportAs: 'ngpToggleGroupItem',\n providers: [provideToggleGroupItemState(), provideRovingFocusItemState()],\n})\nexport class NgpToggleGroupItem implements OnInit {\n /**\n * The value of the item.\n * @required\n */\n readonly value = input<string>(undefined, {\n alias: 'ngpToggleGroupItemValue',\n });\n\n /**\n * Whether the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleGroupItemDisabled',\n transform: booleanAttribute,\n });\n\n constructor() {\n ngpToggleGroupItem({\n value: this.value as Signal<string>,\n disabled: this.disabled,\n });\n // Initialize the roving focus item state\n ngpRovingFocusItem({ disabled: this.disabled });\n }\n\n ngOnInit(): void {\n // we can't use a required input for value as it is used in a computed property before the input is set\n if (this.value() === undefined) {\n throw new Error('The value input is required for the toggle group item.');\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport { injectToggleGroupConfig } from '../config/toggle-group-config';\nimport { ngpToggleGroup, provideToggleGroupState } from './toggle-group-state';\n\n@Directive({\n selector: '[ngpToggleGroup]',\n exportAs: 'ngpToggleGroup',\n providers: [provideToggleGroupState(), provideRovingFocusGroupState({ inherit: true })],\n})\nexport class NgpToggleGroup {\n /**\n * Access the global toggle group configuration.\n */\n private readonly config = injectToggleGroupConfig();\n\n /**\n * The orientation of the toggle group.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpToggleGroupOrientation',\n });\n\n /**\n * Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.\n * @default true\n */\n readonly allowDeselection = input<boolean, BooleanInput>(this.config.allowDeselection, {\n alias: 'ngpToggleGroupAllowDeselection',\n transform: booleanAttribute,\n });\n\n /**\n * The type of the toggle group, whether only one item can be selected or multiple.\n */\n readonly type = input<'single' | 'multiple'>(this.config.type, { alias: 'ngpToggleGroupType' });\n\n /**\n * The selected value(s) of the toggle group.\n */\n readonly value = input<string[]>([], { alias: 'ngpToggleGroupValue' });\n\n /**\n * Emits when the value of the toggle group changes.\n */\n readonly valueChange = output<string[]>({ alias: 'ngpToggleGroupValueChange' });\n\n /**\n * Whether the toggle group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The state of the toggle group.\n */\n protected readonly state = ngpToggleGroup({\n rovingFocusGroup: ngpRovingFocusGroup({\n orientation: this.orientation,\n disabled: this.disabled,\n }),\n orientation: this.orientation,\n allowDeselection: this.allowDeselection,\n type: this.type,\n value: this.value,\n disabled: this.disabled,\n onValueChange: (value: string[]) => this.valueChange.emit(value),\n });\n\n /**\n * Toggle a value in the toggle group.\n */\n toggle(value: string): void {\n this.state.toggle(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,wBAAwB,G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