ng-primitives 0.89.0 → 0.90.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 +106 -3
- package/accordion/index.d.ts +213 -7
- package/ai/index.d.ts +238 -16
- package/autofill/index.d.ts +22 -1
- package/avatar/index.d.ts +120 -5
- package/breadcrumbs/index.d.ts +60 -7
- package/button/index.d.ts +44 -3
- package/checkbox/index.d.ts +58 -2
- package/combobox/index.d.ts +414 -8
- package/common/index.d.ts +31 -4
- package/date-picker/index.d.ts +713 -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 +9 -9
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +51 -48
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +57 -54
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +5 -5
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +18 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -7
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +25 -21
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +76 -72
- 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 +114 -108
- 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 +49 -48
- 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 +8 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +55 -50
- 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 +75 -68
- 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 +77 -68
- 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 +42 -39
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +32 -30
- 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 +34 -30
- 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 +66 -62
- 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 +99 -88
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +1 -1
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +18 -16
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +44 -42
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +8 -8
- 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 +32 -29
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +14 -12
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +7 -7
- 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 +2 -2
- 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 +262 -7
- package/index.d.ts +2 -2
- package/input/index.d.ts +47 -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 +296 -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 +178 -4
- package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +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 +332 -10
- package/state/index.d.ts +14 -11
- package/switch/index.d.ts +76 -3
- package/tabs/index.d.ts +222 -7
- package/textarea/index.d.ts +32 -2
- package/toast/index.d.ts +219 -4
- package/toggle/index.d.ts +57 -2
- package/toggle-group/index.d.ts +143 -5
- package/toolbar/index.d.ts +33 -2
- package/tooltip/index.d.ts +214 -5
- package/utils/index.d.ts +169 -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
package/toggle-group/index.d.ts
CHANGED
|
@@ -1,5 +1,143 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Provider, OnInit } from '@angular/core';
|
|
3
|
+
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
5
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
|
+
import * as i1 from 'ng-primitives/roving-focus';
|
|
7
|
+
|
|
8
|
+
interface NgpToggleGroupConfig {
|
|
9
|
+
/**
|
|
10
|
+
* The orientation of the toggle group.
|
|
11
|
+
* @default 'horizontal'
|
|
12
|
+
*/
|
|
13
|
+
orientation: NgpOrientation;
|
|
14
|
+
/**
|
|
15
|
+
* The type of the toggle group, whether only one item can be selected or multiple.
|
|
16
|
+
* @default 'single'
|
|
17
|
+
*/
|
|
18
|
+
type: 'single' | 'multiple';
|
|
19
|
+
/**
|
|
20
|
+
* Whether a toggle button can be deselected.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
allowDeselection: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Provide the default ToggleGroup configuration
|
|
27
|
+
* @param config The ToggleGroup configuration
|
|
28
|
+
* @returns The provider
|
|
29
|
+
*/
|
|
30
|
+
declare function provideToggleGroupConfig(config: Partial<NgpToggleGroupConfig>): Provider[];
|
|
31
|
+
|
|
32
|
+
declare class NgpToggleGroupItem implements OnInit {
|
|
33
|
+
/**
|
|
34
|
+
* Access the group that the item belongs to.
|
|
35
|
+
*/
|
|
36
|
+
private readonly toggleGroup;
|
|
37
|
+
/**
|
|
38
|
+
* The value of the item.
|
|
39
|
+
* @required
|
|
40
|
+
*/
|
|
41
|
+
readonly value: _angular_core.InputSignal<string | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the item is disabled.
|
|
44
|
+
*/
|
|
45
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the item is selected.
|
|
48
|
+
*/
|
|
49
|
+
protected readonly selected: _angular_core.Signal<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* The state of the item.
|
|
52
|
+
*/
|
|
53
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpToggleGroupItem>;
|
|
54
|
+
ngOnInit(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Toggle the item.
|
|
57
|
+
*/
|
|
58
|
+
protected toggle(): void;
|
|
59
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToggleGroupItem, never>;
|
|
60
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToggleGroupItem, "[ngpToggleGroupItem]", ["ngpToggleGroupItem"], { "value": { "alias": "ngpToggleGroupItemValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpToggleGroupItemDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgpRovingFocusItem; inputs: { "ngpRovingFocusItemDisabled": "ngpToggleGroupItemDisabled"; }; outputs: {}; }]>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Provides the ToggleGroupItem state.
|
|
65
|
+
*/
|
|
66
|
+
declare const provideToggleGroupItemState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
67
|
+
/**
|
|
68
|
+
* Injects the ToggleGroupItem state.
|
|
69
|
+
*/
|
|
70
|
+
declare const injectToggleGroupItemState: <U = NgpToggleGroupItem>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
71
|
+
|
|
72
|
+
declare class NgpToggleGroup {
|
|
73
|
+
/**
|
|
74
|
+
* Access the roving focus group state.
|
|
75
|
+
*/
|
|
76
|
+
private readonly rovingFocusGroupState;
|
|
77
|
+
/**
|
|
78
|
+
* Access the global toggle group configuration.
|
|
79
|
+
*/
|
|
80
|
+
private readonly config;
|
|
81
|
+
/**
|
|
82
|
+
* The orientation of the toggle group.
|
|
83
|
+
*/
|
|
84
|
+
readonly orientation: _angular_core.InputSignal<NgpOrientation>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
readonly allowDeselection: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
90
|
+
/**
|
|
91
|
+
* The type of the toggle group, whether only one item can be selected or multiple.
|
|
92
|
+
*/
|
|
93
|
+
readonly type: _angular_core.InputSignal<"single" | "multiple">;
|
|
94
|
+
/**
|
|
95
|
+
* The selected value(s) of the toggle group.
|
|
96
|
+
*/
|
|
97
|
+
readonly value: _angular_core.InputSignal<string[]>;
|
|
98
|
+
/**
|
|
99
|
+
* Emits when the value of the toggle group changes.
|
|
100
|
+
*/
|
|
101
|
+
readonly valueChange: _angular_core.OutputEmitterRef<string[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the toggle group is disabled.
|
|
104
|
+
*/
|
|
105
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
106
|
+
/**
|
|
107
|
+
* The state of the toggle group.
|
|
108
|
+
*/
|
|
109
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpToggleGroup>;
|
|
110
|
+
constructor();
|
|
111
|
+
/**
|
|
112
|
+
* Select a value in the toggle group.
|
|
113
|
+
*/
|
|
114
|
+
private select;
|
|
115
|
+
/**
|
|
116
|
+
* De-select a value in the toggle group.
|
|
117
|
+
*/
|
|
118
|
+
private deselect;
|
|
119
|
+
/**
|
|
120
|
+
* Check if a value is selected in the toggle group.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
isSelected(value: string): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Toggle a value in the toggle group.
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
toggle(value: string): void;
|
|
129
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToggleGroup, never>;
|
|
130
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToggleGroup, "[ngpToggleGroup]", ["ngpToggleGroup"], { "orientation": { "alias": "ngpToggleGroupOrientation"; "required": false; "isSignal": true; }; "allowDeselection": { "alias": "ngpToggleGroupAllowDeselection"; "required": false; "isSignal": true; }; "type": { "alias": "ngpToggleGroupType"; "required": false; "isSignal": true; }; "value": { "alias": "ngpToggleGroupValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpToggleGroupDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpToggleGroupValueChange"; }, never, never, true, [{ directive: typeof i1.NgpRovingFocusGroup; inputs: {}; outputs: {}; }]>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Provides the ToggleGroup state.
|
|
135
|
+
*/
|
|
136
|
+
declare const provideToggleGroupState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
137
|
+
/**
|
|
138
|
+
* Injects the ToggleGroup state.
|
|
139
|
+
*/
|
|
140
|
+
declare const injectToggleGroupState: <U = NgpToggleGroup>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
141
|
+
|
|
142
|
+
export { NgpToggleGroup, NgpToggleGroupItem, injectToggleGroupItemState, injectToggleGroupState, provideToggleGroupConfig, provideToggleGroupItemState, provideToggleGroupState };
|
|
143
|
+
export type { NgpToggleGroupConfig };
|
package/toolbar/index.d.ts
CHANGED
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
|
+
import * as i1 from 'ng-primitives/roving-focus';
|
|
5
|
+
|
|
6
|
+
declare class NgpToolbar {
|
|
7
|
+
/**
|
|
8
|
+
* Access the roving focus group state.
|
|
9
|
+
*/
|
|
10
|
+
private readonly rovingFocusGroup;
|
|
11
|
+
/**
|
|
12
|
+
* The orientation of the toolbar.
|
|
13
|
+
*/
|
|
14
|
+
readonly orientation: _angular_core.InputSignal<NgpOrientation>;
|
|
15
|
+
/**
|
|
16
|
+
* The toolbar state.
|
|
17
|
+
*/
|
|
18
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpToolbar>;
|
|
19
|
+
constructor();
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToolbar, never>;
|
|
21
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToolbar, "[ngpToolbar]", ["ngpToolbar"], { "orientation": { "alias": "ngpToolbarOrientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgpRovingFocusGroup; inputs: {}; outputs: {}; }]>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Provides the Toolbar state.
|
|
26
|
+
*/
|
|
27
|
+
declare const provideToolbarState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
28
|
+
/**
|
|
29
|
+
* Injects the Toolbar state.
|
|
30
|
+
*/
|
|
31
|
+
declare const injectToolbarState: <U = NgpToolbar>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
32
|
+
|
|
33
|
+
export { NgpToolbar, injectToolbarState, provideToolbarState };
|
package/tooltip/index.d.ts
CHANGED
|
@@ -1,6 +1,215 @@
|
|
|
1
|
+
import * as ng_primitives_portal from 'ng-primitives/portal';
|
|
2
|
+
import { NgpOffset, NgpOverlayContent, NgpOffsetInput, NgpOverlay } from 'ng-primitives/portal';
|
|
1
3
|
export { injectOverlayContext as injectTooltipContext } from 'ng-primitives/portal';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { Provider, OnDestroy, Signal } from '@angular/core';
|
|
6
|
+
import { Placement } from '@floating-ui/dom';
|
|
7
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
8
|
+
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
9
|
+
|
|
10
|
+
interface NgpTooltipConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Define the offset of the tooltip relative to the trigger.
|
|
13
|
+
* Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
|
|
14
|
+
* @default 4
|
|
15
|
+
*/
|
|
16
|
+
offset: NgpOffset;
|
|
17
|
+
/**
|
|
18
|
+
* Define the placement of the tooltip relative to the trigger.
|
|
19
|
+
* @default 'top'
|
|
20
|
+
*/
|
|
21
|
+
placement: Placement;
|
|
22
|
+
/**
|
|
23
|
+
* Define the delay before the tooltip is shown.
|
|
24
|
+
* @default 0
|
|
25
|
+
*/
|
|
26
|
+
showDelay: number;
|
|
27
|
+
/**
|
|
28
|
+
* Define the delay before the tooltip is hidden.
|
|
29
|
+
* @default 500
|
|
30
|
+
*/
|
|
31
|
+
hideDelay: number;
|
|
32
|
+
/**
|
|
33
|
+
* Define whether the tooltip should flip when there is not enough space for the tooltip.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
flip: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Define the container element or selector in to which the tooltip should be attached.
|
|
39
|
+
* @default 'body'
|
|
40
|
+
*/
|
|
41
|
+
container: HTMLElement | string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the tooltip should only show when the trigger element overflows.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
showOnOverflow: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to use the text content of the trigger element as the tooltip content.
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
useTextContent: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Provide the default Tooltip configuration
|
|
55
|
+
* @param config The Tooltip configuration
|
|
56
|
+
* @returns The provider
|
|
57
|
+
*/
|
|
58
|
+
declare function provideTooltipConfig(config: Partial<NgpTooltipConfig>): Provider[];
|
|
59
|
+
|
|
60
|
+
declare class NgpTooltipArrow {
|
|
61
|
+
constructor();
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTooltipArrow, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTooltipArrow, "[ngpTooltipArrow]", ["ngpTooltipArrow"], {}, {}, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type TooltipInput<T> = NgpOverlayContent<T> | string | null | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Apply the `ngpTooltipTrigger` directive to an element that triggers the tooltip to show.
|
|
69
|
+
*/
|
|
70
|
+
declare class NgpTooltipTrigger<T = null> implements OnDestroy {
|
|
71
|
+
/**
|
|
72
|
+
* Access the trigger element
|
|
73
|
+
*/
|
|
74
|
+
private readonly trigger;
|
|
75
|
+
/**
|
|
76
|
+
* Access the injector.
|
|
77
|
+
*/
|
|
78
|
+
private readonly injector;
|
|
79
|
+
/**
|
|
80
|
+
* Access the view container reference.
|
|
81
|
+
*/
|
|
82
|
+
private readonly viewContainerRef;
|
|
83
|
+
/**
|
|
84
|
+
* Access the global tooltip configuration.
|
|
85
|
+
*/
|
|
86
|
+
private readonly config;
|
|
87
|
+
/**
|
|
88
|
+
* Access the tooltip template ref.
|
|
89
|
+
*/
|
|
90
|
+
readonly tooltip: _angular_core.InputSignalWithTransform<string | NgpOverlayContent<T> | null, TooltipInput<T>>;
|
|
91
|
+
/**
|
|
92
|
+
* Define if the trigger should be disabled.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
96
|
+
/**
|
|
97
|
+
* Define the placement of the tooltip relative to the trigger.
|
|
98
|
+
* @default 'top'
|
|
99
|
+
*/
|
|
100
|
+
readonly placement: _angular_core.InputSignal<NgpTooltipPlacement>;
|
|
101
|
+
/**
|
|
102
|
+
* Define the offset of the tooltip relative to the trigger.
|
|
103
|
+
* Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
|
|
104
|
+
* @default 0
|
|
105
|
+
*/
|
|
106
|
+
readonly offset: _angular_core.InputSignalWithTransform<NgpOffset, NgpOffsetInput>;
|
|
107
|
+
/**
|
|
108
|
+
* Define the delay before the tooltip is displayed.
|
|
109
|
+
* @default 500
|
|
110
|
+
*/
|
|
111
|
+
readonly showDelay: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
112
|
+
/**
|
|
113
|
+
* Define the delay before the tooltip is hidden.
|
|
114
|
+
* @default 0
|
|
115
|
+
*/
|
|
116
|
+
readonly hideDelay: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
117
|
+
/**
|
|
118
|
+
* Define whether the tooltip should flip when there is not enough space for the tooltip.
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
121
|
+
readonly flip: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
122
|
+
/**
|
|
123
|
+
* Define the container in which the tooltip should be attached.
|
|
124
|
+
* @default document.body
|
|
125
|
+
*/
|
|
126
|
+
readonly container: _angular_core.InputSignal<string | HTMLElement | null>;
|
|
127
|
+
/**
|
|
128
|
+
* Define whether the tooltip should only show when the trigger element overflows.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
readonly showOnOverflow: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
132
|
+
/**
|
|
133
|
+
* Provide context to the tooltip. This can be used to pass data to the tooltip content.
|
|
134
|
+
*/
|
|
135
|
+
readonly context: _angular_core.InputSignal<T | undefined>;
|
|
136
|
+
/**
|
|
137
|
+
* Define whether to use the text content of the trigger element as the tooltip content.
|
|
138
|
+
* When enabled, the tooltip will display the text content of the trigger element.
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
readonly useTextContent: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
142
|
+
/**
|
|
143
|
+
* The overlay that manages the tooltip
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
readonly overlay: _angular_core.WritableSignal<NgpOverlay<string | T> | null>;
|
|
147
|
+
/**
|
|
148
|
+
* The unique id of the tooltip.
|
|
149
|
+
*/
|
|
150
|
+
readonly tooltipId: _angular_core.WritableSignal<string | undefined>;
|
|
151
|
+
/**
|
|
152
|
+
* The open state of the tooltip.
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
readonly open: Signal<boolean>;
|
|
156
|
+
/**
|
|
157
|
+
* Determine if the trigger element has overflow.
|
|
158
|
+
*/
|
|
159
|
+
private readonly hasOverflow;
|
|
160
|
+
/**
|
|
161
|
+
* Store the state of the tooltip.
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
readonly state: ng_primitives_state.CreatedState<NgpTooltipTrigger<T>>;
|
|
165
|
+
constructor();
|
|
166
|
+
ngOnDestroy(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Show the tooltip.
|
|
169
|
+
*/
|
|
170
|
+
show(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Hide the tooltip.
|
|
173
|
+
*/
|
|
174
|
+
hide(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Create the overlay that will contain the tooltip
|
|
177
|
+
*/
|
|
178
|
+
private createOverlay;
|
|
179
|
+
/**
|
|
180
|
+
* Set the tooltip id.
|
|
181
|
+
*/
|
|
182
|
+
setTooltipId(id: string): void;
|
|
183
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTooltipTrigger<any>, never>;
|
|
184
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTooltipTrigger<any>, "[ngpTooltipTrigger]", ["ngpTooltipTrigger"], { "tooltip": { "alias": "ngpTooltipTrigger"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpTooltipTriggerDisabled"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpTooltipTriggerPlacement"; "required": false; "isSignal": true; }; "offset": { "alias": "ngpTooltipTriggerOffset"; "required": false; "isSignal": true; }; "showDelay": { "alias": "ngpTooltipTriggerShowDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "ngpTooltipTriggerHideDelay"; "required": false; "isSignal": true; }; "flip": { "alias": "ngpTooltipTriggerFlip"; "required": false; "isSignal": true; }; "container": { "alias": "ngpTooltipTriggerContainer"; "required": false; "isSignal": true; }; "showOnOverflow": { "alias": "ngpTooltipTriggerShowOnOverflow"; "required": false; "isSignal": true; }; "context": { "alias": "ngpTooltipTriggerContext"; "required": false; "isSignal": true; }; "useTextContent": { "alias": "ngpTooltipTriggerUseTextContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
185
|
+
}
|
|
186
|
+
type NgpTooltipPlacement = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Provides the TooltipTrigger state.
|
|
190
|
+
*/
|
|
191
|
+
declare const provideTooltipTriggerState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
192
|
+
/**
|
|
193
|
+
* Injects the TooltipTrigger state.
|
|
194
|
+
*/
|
|
195
|
+
declare const injectTooltipTriggerState: <U = NgpTooltipTrigger<unknown>>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Apply the `ngpTooltip` directive to an element that represents the tooltip. This typically would be a `div` inside an `ng-template`.
|
|
199
|
+
*/
|
|
200
|
+
declare class NgpTooltip {
|
|
201
|
+
/**
|
|
202
|
+
* Access the overlay.
|
|
203
|
+
*/
|
|
204
|
+
protected readonly overlay: ng_primitives_portal.NgpOverlay<unknown>;
|
|
205
|
+
/**
|
|
206
|
+
* The unique id of the tooltip.
|
|
207
|
+
*/
|
|
208
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
209
|
+
constructor();
|
|
210
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTooltip, never>;
|
|
211
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTooltip, "[ngpTooltip]", ["ngpTooltip"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export { NgpTooltip, NgpTooltipArrow, NgpTooltipTrigger, injectTooltipTriggerState, provideTooltipConfig, provideTooltipTriggerState };
|
|
215
|
+
export type { NgpTooltipConfig, NgpTooltipPlacement };
|
package/utils/index.d.ts
CHANGED
|
@@ -1,9 +1,169 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Type, ExistingProvider, Signal, DestroyRef, Injector } from '@angular/core';
|
|
2
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A simple helper function to provide a value accessor for a given type.
|
|
6
|
+
* @param type The type to provide the value accessor for
|
|
7
|
+
*/
|
|
8
|
+
declare function provideValueAccessor<T>(type: Type<T>): ExistingProvider;
|
|
9
|
+
|
|
10
|
+
interface NgpControlStatus {
|
|
11
|
+
valid: boolean | null;
|
|
12
|
+
invalid: boolean | null;
|
|
13
|
+
pristine: boolean | null;
|
|
14
|
+
dirty: boolean | null;
|
|
15
|
+
touched: boolean | null;
|
|
16
|
+
pending: boolean | null;
|
|
17
|
+
disabled: boolean | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A utility function to get the status of an Angular form control as a reactive signal.
|
|
21
|
+
* This function injects the NgControl and returns a signal that reflects the control's status.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
declare function controlStatus(): Signal<NgpControlStatus>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A utility type for Angular's onChange function.
|
|
28
|
+
*/
|
|
29
|
+
type ChangeFn<T> = (value: T) => void;
|
|
30
|
+
/**
|
|
31
|
+
* A utility type for Angular's onTouched function.
|
|
32
|
+
*/
|
|
33
|
+
type TouchedFn = () => void;
|
|
34
|
+
|
|
35
|
+
declare function booleanAttributeBinding(element: HTMLElement, attribute: string, value: Signal<boolean> | undefined): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Disposable functions are a way to manage timers, intervals, and event listeners
|
|
39
|
+
* that should be cleared when a component is destroyed.
|
|
40
|
+
*
|
|
41
|
+
* This is heavily inspired by Headless UI disposables:
|
|
42
|
+
* https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts
|
|
43
|
+
*/
|
|
44
|
+
declare function injectDisposables(): {
|
|
45
|
+
/**
|
|
46
|
+
* Set a timeout that will be cleared when the component is destroyed.
|
|
47
|
+
* @param callback The callback to execute
|
|
48
|
+
* @param delay The delay before the callback is executed
|
|
49
|
+
* @returns A function to clear the timeout
|
|
50
|
+
*/
|
|
51
|
+
setTimeout: (callback: () => void, delay: number) => () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Set an interval that will be cleared when the component is destroyed.
|
|
54
|
+
* @param callback The callback to execute
|
|
55
|
+
* @param delay The delay before the callback is executed
|
|
56
|
+
* @param target
|
|
57
|
+
* @param type
|
|
58
|
+
* @param listener
|
|
59
|
+
* @param options
|
|
60
|
+
* @returns A function to clear the interval
|
|
61
|
+
*/
|
|
62
|
+
addEventListener: <K extends keyof HTMLElementEventMap>(target: EventTarget, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions) => () => void;
|
|
63
|
+
/**
|
|
64
|
+
* Set an interval that will be cleared when the component is destroyed.
|
|
65
|
+
* @param callback The callback to execute
|
|
66
|
+
* @param delay The delay before the callback is executed
|
|
67
|
+
* @returns A function to clear the interval
|
|
68
|
+
*/
|
|
69
|
+
setInterval: (callback: () => void, delay: number) => () => void;
|
|
70
|
+
/**
|
|
71
|
+
* Set a requestAnimationFrame that will be cleared when the component is destroyed.
|
|
72
|
+
* @param callback The callback to execute
|
|
73
|
+
* @returns A function to clear the requestAnimationFrame
|
|
74
|
+
*/
|
|
75
|
+
requestAnimationFrame: (callback: FrameRequestCallback) => () => void;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Generate a unique id for an element
|
|
80
|
+
* @param prefix - The prefix to use for the id
|
|
81
|
+
* @returns The generated id
|
|
82
|
+
*/
|
|
83
|
+
declare function uniqueId(prefix: string): string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Type validation utilities
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Checks if a value is a string
|
|
90
|
+
* @param value - The value to check
|
|
91
|
+
* @returns true if the value is a string, false otherwise
|
|
92
|
+
*/
|
|
93
|
+
declare function isString(value: unknown): value is string;
|
|
94
|
+
/**
|
|
95
|
+
* Checks if a value is a number
|
|
96
|
+
* @param value - The value to check
|
|
97
|
+
* @returns true if the value is a number, false otherwise
|
|
98
|
+
*/
|
|
99
|
+
declare function isNumber(value: unknown): value is number;
|
|
100
|
+
/**
|
|
101
|
+
* Checks if a value is a boolean
|
|
102
|
+
* @param value - The value to check
|
|
103
|
+
* @returns true if the value is a boolean, false otherwise
|
|
104
|
+
*/
|
|
105
|
+
declare function isBoolean(value: unknown): value is boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Checks if a value is a function
|
|
108
|
+
* @param value - The value to check
|
|
109
|
+
* @returns true if the value is a function, false otherwise
|
|
110
|
+
*/
|
|
111
|
+
declare function isFunction(value: unknown): value is CallableFunction;
|
|
112
|
+
/**
|
|
113
|
+
* Checks if a value is a plain object (but not null or array)
|
|
114
|
+
* @param value - The value to check
|
|
115
|
+
* @returns true if the value is a plain object, false otherwise
|
|
116
|
+
*/
|
|
117
|
+
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Checks if a value is undefined
|
|
120
|
+
* @param value - The value to check
|
|
121
|
+
* @returns true if the value is undefined, false otherwise
|
|
122
|
+
*/
|
|
123
|
+
declare function isUndefined(value: unknown): value is undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Checks if a value is null or undefined
|
|
126
|
+
* @param value - The value to check
|
|
127
|
+
* @returns true if the value is null or undefined, false otherwise
|
|
128
|
+
*/
|
|
129
|
+
declare function isNil(value: unknown): value is null | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Checks if a value is not null and not undefined
|
|
132
|
+
* @param value - The value to check
|
|
133
|
+
* @returns true if the value is not null and not undefined, false otherwise
|
|
134
|
+
*/
|
|
135
|
+
declare function notNil<T>(value: T | null | undefined): value is T;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The built-in `takeUntilDestroyed` operator does not handle the case when the component is destroyed before the source observable emits.
|
|
139
|
+
* This operator ensures that the source observable completes gracefully without throwing an error.
|
|
140
|
+
* https://github.com/angular/angular/issues/54527#issuecomment-2098254508
|
|
141
|
+
*
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
declare function safeTakeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Listen for changes to a signal and call a function when the signal changes.
|
|
148
|
+
* @param source
|
|
149
|
+
* @param fn
|
|
150
|
+
* @param options
|
|
151
|
+
* @param options.injector
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
declare function onChange<T>(source: Signal<T | null | undefined>, fn: (value: T | null | undefined, previousValue: T | null | undefined) => void, options?: {
|
|
155
|
+
injector: Injector;
|
|
156
|
+
}): void;
|
|
157
|
+
/**
|
|
158
|
+
* Listen for changes to a boolean signal and call one of two functions when the signal changes.
|
|
159
|
+
* @param source
|
|
160
|
+
* @param onTrue
|
|
161
|
+
* @param onFalse
|
|
162
|
+
* @param options
|
|
163
|
+
*/
|
|
164
|
+
declare function onBooleanChange(source: Signal<boolean>, onTrue?: () => void, onFalse?: () => void, options?: {
|
|
165
|
+
injector: Injector;
|
|
166
|
+
}): void;
|
|
167
|
+
|
|
168
|
+
export { booleanAttributeBinding, controlStatus, injectDisposables, isBoolean, isFunction, isNil, isNumber, isObject, isString, isUndefined, notNil, onBooleanChange, onChange, provideValueAccessor, safeTakeUntilDestroyed, uniqueId };
|
|
169
|
+
export type { ChangeFn, NgpControlStatus, TouchedFn };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ElementRef, Signal } from '@angular/core';
|
|
2
|
-
interface ActiveDescendantManagerOptions<T extends NgpActivatable> {
|
|
3
|
-
/**
|
|
4
|
-
* The disabled state of the active descendant group.
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
disabled?: Signal<boolean>;
|
|
8
|
-
/**
|
|
9
|
-
* The items in the active descendant group.
|
|
10
|
-
*/
|
|
11
|
-
items: Signal<T[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Whether active descendant should wrap around.
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
wrap?: Signal<boolean>;
|
|
17
|
-
}
|
|
18
|
-
export interface NgpActivatable {
|
|
19
|
-
/**
|
|
20
|
-
* The id of the item.
|
|
21
|
-
*/
|
|
22
|
-
id: Signal<string>;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the item is disabled.
|
|
25
|
-
*/
|
|
26
|
-
disabled?: Signal<boolean>;
|
|
27
|
-
/**
|
|
28
|
-
* The element that represents the item.
|
|
29
|
-
*/
|
|
30
|
-
elementRef: ElementRef<HTMLElement>;
|
|
31
|
-
}
|
|
32
|
-
export declare function activeDescendantManager<T extends NgpActivatable>(options: ActiveDescendantManagerOptions<T>): {
|
|
33
|
-
activeDescendant: Signal<string | undefined>;
|
|
34
|
-
activeItem: Signal<T | undefined>;
|
|
35
|
-
activate: (item: T | undefined) => void;
|
|
36
|
-
first: () => void;
|
|
37
|
-
last: () => void;
|
|
38
|
-
next: () => void;
|
|
39
|
-
previous: () => void;
|
|
40
|
-
reset: () => void;
|
|
41
|
-
};
|
|
42
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NgpVisuallyHidden } from './visually-hidden';
|
|
2
|
-
/**
|
|
3
|
-
* The state token for the VisuallyHidden primitive.
|
|
4
|
-
*/
|
|
5
|
-
export declare const NgpVisuallyHiddenStateToken: import("@angular/core").InjectionToken<NgpVisuallyHidden>;
|
|
6
|
-
/**
|
|
7
|
-
* Provides the VisuallyHidden state.
|
|
8
|
-
*/
|
|
9
|
-
export declare const provideVisuallyHiddenState: (options?: import("ng-primitives/state").CreateStateProviderOptions) => import("@angular/core").FactoryProvider;
|
|
10
|
-
/**
|
|
11
|
-
* Injects the VisuallyHidden state.
|
|
12
|
-
*/
|
|
13
|
-
export declare const injectVisuallyHiddenState: <U = NgpVisuallyHidden>(injectOptions?: import("@angular/core").InjectOptions) => import("@angular/core").Signal<import("ng-primitives/state").State<U>>;
|
|
14
|
-
/**
|
|
15
|
-
* The VisuallyHidden state registration function.
|
|
16
|
-
*/
|
|
17
|
-
export declare const visuallyHiddenState: <U>(state: U) => import("ng-primitives/state").CreatedState<U>;
|