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
package/file-upload/index.d.ts
CHANGED
|
@@ -1,4 +1,148 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
3
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Capture files dropped on the element.
|
|
7
|
+
*/
|
|
8
|
+
declare class NgpFileDropzone {
|
|
9
|
+
/**
|
|
10
|
+
* Access the host element.
|
|
11
|
+
*/
|
|
12
|
+
private readonly elementRef;
|
|
13
|
+
/**
|
|
14
|
+
* The accepted file types. This can be an array of strings or a comma-separated string.
|
|
15
|
+
* Accepted types can either be file extensions (e.g. `.jpg`) or MIME types (e.g. `image/jpeg`).
|
|
16
|
+
*/
|
|
17
|
+
readonly fileTypes: _angular_core.InputSignalWithTransform<string[] | undefined, string | string[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to allow multiple files to be selected.
|
|
20
|
+
*/
|
|
21
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to allow the user to select directories.
|
|
24
|
+
*/
|
|
25
|
+
readonly directory: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the file upload is disabled.
|
|
28
|
+
*/
|
|
29
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
30
|
+
/**
|
|
31
|
+
* Emits when the user selects files.
|
|
32
|
+
*/
|
|
33
|
+
readonly selected: _angular_core.OutputEmitterRef<FileList | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Emits when uploaded files are rejected because they do not match the allowed {@link fileTypes}.
|
|
36
|
+
*/
|
|
37
|
+
readonly rejected: _angular_core.OutputEmitterRef<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Emits when the user drags a file over the file upload.
|
|
40
|
+
*/
|
|
41
|
+
readonly dragOver: _angular_core.OutputEmitterRef<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the user is currently dragging a file over the file upload.
|
|
44
|
+
*/
|
|
45
|
+
protected readonly isDragOver: _angular_core.WritableSignal<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* The file upload state.
|
|
48
|
+
*/
|
|
49
|
+
private readonly state;
|
|
50
|
+
constructor();
|
|
51
|
+
protected onDragEnter(event: DragEvent): void;
|
|
52
|
+
protected onDragOver(event: DragEvent): void;
|
|
53
|
+
protected onDragLeave(event: DragEvent): void;
|
|
54
|
+
protected onDrop(event: DragEvent): void;
|
|
55
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpFileDropzone, never>;
|
|
56
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFileDropzone, "[ngpFileDropzone]", ["ngpFileDropzone"], { "fileTypes": { "alias": "ngpFileDropzoneFileTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpFileDropzoneMultiple"; "required": false; "isSignal": true; }; "directory": { "alias": "ngpFileDropzoneDirectory"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpFileDropzoneDisabled"; "required": false; "isSignal": true; }; }, { "selected": "ngpFileDropzoneSelected"; "rejected": "ngpFileDropzoneRejected"; "dragOver": "ngpFileDropzoneDragOver"; }, never, never, true, never>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Provides the FileDropzone state.
|
|
61
|
+
*/
|
|
62
|
+
declare const provideFileDropzoneState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
63
|
+
/**
|
|
64
|
+
* Injects the FileDropzone state.
|
|
65
|
+
*/
|
|
66
|
+
declare const injectFileDropzoneState: <U = NgpFileDropzone>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A directive that allows you to turn any element into a file upload trigger.
|
|
70
|
+
*/
|
|
71
|
+
declare class NgpFileUpload {
|
|
72
|
+
/**
|
|
73
|
+
* Access the document
|
|
74
|
+
*/
|
|
75
|
+
private readonly document;
|
|
76
|
+
/**
|
|
77
|
+
* Access the host element.
|
|
78
|
+
*/
|
|
79
|
+
private readonly elementRef;
|
|
80
|
+
/**
|
|
81
|
+
* The accepted file types. This can be an array of strings or a comma-separated string.
|
|
82
|
+
* Accepted types can either be file extensions (e.g. `.jpg`) or MIME types (e.g. `image/jpeg`).
|
|
83
|
+
*/
|
|
84
|
+
readonly fileTypes: _angular_core.InputSignalWithTransform<string[] | undefined, string | string[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to allow multiple files to be selected.
|
|
87
|
+
*/
|
|
88
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
89
|
+
/**
|
|
90
|
+
* Whether to allow the user to select directories.
|
|
91
|
+
*/
|
|
92
|
+
readonly directory: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
93
|
+
/**
|
|
94
|
+
* Whether drag-and-drop is enabled.
|
|
95
|
+
*/
|
|
96
|
+
readonly dragAndDrop: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the file upload is disabled.
|
|
99
|
+
*/
|
|
100
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
101
|
+
/**
|
|
102
|
+
* Emits when the user selects files.
|
|
103
|
+
*/
|
|
104
|
+
readonly selected: _angular_core.OutputEmitterRef<FileList | null>;
|
|
105
|
+
/**
|
|
106
|
+
* Emits when the user cancel the file selection.
|
|
107
|
+
*/
|
|
108
|
+
readonly canceled: _angular_core.OutputEmitterRef<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Emits when uploaded files are rejected because they do not match the allowed {@link fileTypes}.
|
|
111
|
+
*/
|
|
112
|
+
readonly rejected: _angular_core.OutputEmitterRef<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Emits when the user drags a file over the file upload.
|
|
115
|
+
*/
|
|
116
|
+
readonly dragOver: _angular_core.OutputEmitterRef<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the user is currently dragging a file over the file upload.
|
|
119
|
+
*/
|
|
120
|
+
protected readonly isDragOver: _angular_core.WritableSignal<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Store the file input element.
|
|
123
|
+
*/
|
|
124
|
+
private input;
|
|
125
|
+
/**
|
|
126
|
+
* The file upload state.
|
|
127
|
+
*/
|
|
128
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpFileUpload>;
|
|
129
|
+
constructor();
|
|
130
|
+
protected showFileDialog(): void;
|
|
131
|
+
protected onDragEnter(event: DragEvent): void;
|
|
132
|
+
protected onDragOver(event: DragEvent): void;
|
|
133
|
+
protected onDragLeave(event: DragEvent): void;
|
|
134
|
+
protected onDrop(event: DragEvent): void;
|
|
135
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpFileUpload, never>;
|
|
136
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFileUpload, "[ngpFileUpload]", ["ngpFileUpload"], { "fileTypes": { "alias": "ngpFileUploadFileTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpFileUploadMultiple"; "required": false; "isSignal": true; }; "directory": { "alias": "ngpFileUploadDirectory"; "required": false; "isSignal": true; }; "dragAndDrop": { "alias": "ngpFileUploadDragDrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpFileUploadDisabled"; "required": false; "isSignal": true; }; }, { "selected": "ngpFileUploadSelected"; "canceled": "ngpFileUploadCanceled"; "rejected": "ngpFileUploadRejected"; "dragOver": "ngpFileUploadDragOver"; }, never, never, true, never>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Provides the FileUpload state.
|
|
141
|
+
*/
|
|
142
|
+
declare const provideFileUploadState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
143
|
+
/**
|
|
144
|
+
* Injects the FileUpload state.
|
|
145
|
+
*/
|
|
146
|
+
declare const injectFileUploadState: <U = NgpFileUpload>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
147
|
+
|
|
148
|
+
export { NgpFileDropzone, NgpFileUpload, injectFileDropzoneState, injectFileUploadState, provideFileDropzoneState, provideFileUploadState };
|
package/focus-trap/index.d.ts
CHANGED
|
@@ -1,2 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
4
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `NgpFocusTrap` directive traps focus within the host element.
|
|
8
|
+
*/
|
|
9
|
+
declare class NgpFocusTrap implements OnInit, OnDestroy {
|
|
10
|
+
/**
|
|
11
|
+
* Access any parent overlay.
|
|
12
|
+
*/
|
|
13
|
+
private readonly overlay;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new focus trap.
|
|
16
|
+
*/
|
|
17
|
+
private readonly focusTrap;
|
|
18
|
+
/**
|
|
19
|
+
* Access the injector.
|
|
20
|
+
*/
|
|
21
|
+
private readonly injector;
|
|
22
|
+
/**
|
|
23
|
+
* Access the focus monitor.
|
|
24
|
+
*/
|
|
25
|
+
private readonly focusMonitor;
|
|
26
|
+
/**
|
|
27
|
+
* Access the interactivity checker.
|
|
28
|
+
*/
|
|
29
|
+
private readonly interactivityChecker;
|
|
30
|
+
/**
|
|
31
|
+
* Get the focus trap container element.
|
|
32
|
+
*/
|
|
33
|
+
private readonly elementRef;
|
|
34
|
+
/**
|
|
35
|
+
* Access NgZone to run the focus trap events outside of Angular's zone.
|
|
36
|
+
*/
|
|
37
|
+
private readonly ngZone;
|
|
38
|
+
/**
|
|
39
|
+
* Store the mutation observer.
|
|
40
|
+
*/
|
|
41
|
+
private mutationObserver;
|
|
42
|
+
/**
|
|
43
|
+
* Store the last focused element.
|
|
44
|
+
*/
|
|
45
|
+
private lastFocusedElement;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the focus trap is disabled.
|
|
48
|
+
*/
|
|
49
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
50
|
+
/**
|
|
51
|
+
* The focus trap state.
|
|
52
|
+
*/
|
|
53
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpFocusTrap>;
|
|
54
|
+
constructor();
|
|
55
|
+
ngOnInit(): void;
|
|
56
|
+
ngOnDestroy(): void;
|
|
57
|
+
private handleFocusIn;
|
|
58
|
+
/**
|
|
59
|
+
* Handles the `focusout` event.
|
|
60
|
+
*/
|
|
61
|
+
private handleFocusOut;
|
|
62
|
+
/**
|
|
63
|
+
* If the focused element gets removed from the DOM, browsers move focus back to the document.body.
|
|
64
|
+
* We move focus to the container to keep focus trapped correctly.
|
|
65
|
+
*/
|
|
66
|
+
private handleMutations;
|
|
67
|
+
/**
|
|
68
|
+
* Handles the `keydown` event.
|
|
69
|
+
*/
|
|
70
|
+
protected handleKeyDown(event: KeyboardEvent): void;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the first and last tabbable elements inside a container.
|
|
73
|
+
*/
|
|
74
|
+
private getTabbableEdges;
|
|
75
|
+
/**
|
|
76
|
+
* Returns a list of potential focusable elements inside a container.
|
|
77
|
+
*/
|
|
78
|
+
private getTabbableCandidates;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the first visible element in a list..
|
|
81
|
+
*/
|
|
82
|
+
private findVisible;
|
|
83
|
+
private focus;
|
|
84
|
+
private focusFirst;
|
|
85
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpFocusTrap, never>;
|
|
86
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFocusTrap, "[ngpFocusTrap]", ["ngpFocusTrap"], { "disabled": { "alias": "ngpFocusTrapDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Provides the FocusTrap state.
|
|
91
|
+
*/
|
|
92
|
+
declare const provideFocusTrapState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
93
|
+
/**
|
|
94
|
+
* Injects the FocusTrap state.
|
|
95
|
+
*/
|
|
96
|
+
declare const injectFocusTrapState: <U = NgpFocusTrap>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
97
|
+
|
|
98
|
+
export { NgpFocusTrap, injectFocusTrapState, provideFocusTrapState };
|
package/form-field/index.d.ts
CHANGED
|
@@ -1,7 +1,266 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
2
|
+
import * as ng_primitives_form_field from 'ng-primitives/form-field';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { OnChanges, OnDestroy, SimpleChanges, Signal } from '@angular/core';
|
|
5
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
|
+
import { NgpControlStatus } from 'ng-primitives/utils';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The `NgpDescription` directive is used to mark a description element within a form field. There may be multiple descriptions associated with a form control.
|
|
10
|
+
*/
|
|
11
|
+
declare class NgpDescription {
|
|
12
|
+
/**
|
|
13
|
+
* The id of the description. If not provided, a unique id will be generated.
|
|
14
|
+
*/
|
|
15
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Access the form field that the description is associated with.
|
|
18
|
+
*/
|
|
19
|
+
protected readonly formField: _angular_core.Signal<ng_primitives_state.State<ng_primitives_form_field.NgpFormField>>;
|
|
20
|
+
constructor();
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpDescription, never>;
|
|
22
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpDescription, "[ngpDescription]", ["ngpDescription"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The `NgpError` directive is used to mark an error message element within a form field. There may be multiple error messages associated with a form control.
|
|
27
|
+
*/
|
|
28
|
+
declare class NgpError implements OnChanges, OnDestroy {
|
|
29
|
+
/**
|
|
30
|
+
* Access the form field that the description is associated with.
|
|
31
|
+
*/
|
|
32
|
+
protected readonly formField: _angular_core.Signal<ng_primitives_state.State<ng_primitives_form_field.NgpFormField>>;
|
|
33
|
+
/**
|
|
34
|
+
* The id of the error message. If not provided, a unique id will be generated.
|
|
35
|
+
*/
|
|
36
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
37
|
+
/**
|
|
38
|
+
* The validator associated with the error message.
|
|
39
|
+
*/
|
|
40
|
+
readonly validator: _angular_core.InputSignal<string | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Determine if there is an error message.
|
|
43
|
+
*/
|
|
44
|
+
protected readonly hasError: _angular_core.Signal<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Determine whether the validator associated with this error is failing.
|
|
47
|
+
*/
|
|
48
|
+
protected readonly state: _angular_core.Signal<"fail" | "pass">;
|
|
49
|
+
constructor();
|
|
50
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpError, never>;
|
|
53
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpError, "[ngpError]", ["ngpError"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "validator": { "alias": "ngpErrorValidator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Typically this primitive would be not be used directly, but instead a more specific form control primitive would be used (e.g. `ngpInput`). All of our form control primitives use `ngpFormControl` internally so they will have the same accessibility features as described below.
|
|
58
|
+
*
|
|
59
|
+
* The `NgpFormControl` directive is used to mark a form control element within a form field. This element will have an `aria-labelledby` attribute set to the ID of the label element within the form field and an `aria-describedby` attribute set to the ID of the description elements within the form field.
|
|
60
|
+
*/
|
|
61
|
+
declare class NgpFormControl {
|
|
62
|
+
/**
|
|
63
|
+
* The id of the form control. If not provided, a unique id will be generated.
|
|
64
|
+
*/
|
|
65
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the form control is disabled by a parent.
|
|
68
|
+
*/
|
|
69
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
70
|
+
/**
|
|
71
|
+
* The status of the form control.
|
|
72
|
+
*/
|
|
73
|
+
readonly status: Signal<NgpControlStatus>;
|
|
74
|
+
/**
|
|
75
|
+
* The element reference.
|
|
76
|
+
*/
|
|
77
|
+
private readonly elementRef;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the element supports the disabled attribute.
|
|
80
|
+
*/
|
|
81
|
+
protected readonly supportsDisabledAttribute: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The state of the form control.
|
|
84
|
+
*/
|
|
85
|
+
private readonly state;
|
|
86
|
+
constructor();
|
|
87
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpFormControl, never>;
|
|
88
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFormControl, "[ngpFormControl]", ["ngpFormControl"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpFormControlDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
89
|
+
}
|
|
90
|
+
interface NgpFormControlProps {
|
|
91
|
+
id: Signal<string>;
|
|
92
|
+
disabled?: Signal<boolean>;
|
|
93
|
+
}
|
|
94
|
+
declare function ngpFormControl({ id, disabled, }: NgpFormControlProps): Signal<NgpControlStatus>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Provides the FormControl state.
|
|
98
|
+
*/
|
|
99
|
+
declare const provideFormControlState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
100
|
+
/**
|
|
101
|
+
* Injects the FormControl state.
|
|
102
|
+
*/
|
|
103
|
+
declare const injectFormControlState: <U = NgpFormControl>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The `NgpFormField` directive is a container for form field elements. Any labels, form controls, or descriptions should be placed within this directive.
|
|
107
|
+
*/
|
|
108
|
+
declare class NgpFormField implements OnDestroy {
|
|
109
|
+
/**
|
|
110
|
+
* Store the form label.
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
readonly labels: _angular_core.WritableSignal<string[]>;
|
|
114
|
+
/**
|
|
115
|
+
* Store the form descriptions.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
readonly descriptions: _angular_core.WritableSignal<string[]>;
|
|
119
|
+
/**
|
|
120
|
+
* Store the id of the associated form control.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
readonly formControl: _angular_core.WritableSignal<string | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Find any NgControl within the form field.
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
private readonly ngControl;
|
|
129
|
+
/**
|
|
130
|
+
* Store the validation error messages.
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
readonly errors: _angular_core.WritableSignal<string[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the control is pristine.
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
readonly pristine: _angular_core.WritableSignal<boolean | null>;
|
|
139
|
+
/**
|
|
140
|
+
* Whether the control is touched.
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
readonly touched: _angular_core.WritableSignal<boolean | null>;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the control is dirty.
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
readonly dirty: _angular_core.WritableSignal<boolean | null>;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the control is valid.
|
|
151
|
+
*/
|
|
152
|
+
readonly valid: _angular_core.WritableSignal<boolean | null>;
|
|
153
|
+
/**
|
|
154
|
+
* Whether the control is invalid.
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
readonly invalid: _angular_core.WritableSignal<boolean | null>;
|
|
158
|
+
/**
|
|
159
|
+
* Whether the control is pending.
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
readonly pending: _angular_core.WritableSignal<boolean | null>;
|
|
163
|
+
/**
|
|
164
|
+
* Whether the control is disabled.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
readonly disabled: _angular_core.WritableSignal<boolean | null>;
|
|
168
|
+
/**
|
|
169
|
+
* Store the current status subscription.
|
|
170
|
+
*/
|
|
171
|
+
private subscription?;
|
|
172
|
+
/**
|
|
173
|
+
* Injector for creating effects outside the constructor.
|
|
174
|
+
*/
|
|
175
|
+
private readonly injector;
|
|
176
|
+
/**
|
|
177
|
+
* The form field state.
|
|
178
|
+
*/
|
|
179
|
+
protected readonly state: ng_primitives_state.CreatedState<NgpFormField>;
|
|
180
|
+
constructor();
|
|
181
|
+
ngOnDestroy(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Setup a listener for the form control status.
|
|
184
|
+
* @param control
|
|
185
|
+
*/
|
|
186
|
+
private setupSubscriptions;
|
|
187
|
+
private updateStatus;
|
|
188
|
+
/**
|
|
189
|
+
* Register the id of the associated form control.
|
|
190
|
+
* @param id
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
setFormControl(id: string): void;
|
|
194
|
+
/**
|
|
195
|
+
* Register a label with the form field.
|
|
196
|
+
* @param label
|
|
197
|
+
* @internal
|
|
198
|
+
*/
|
|
199
|
+
addLabel(label: string): void;
|
|
200
|
+
/**
|
|
201
|
+
* Register a description with the form field.
|
|
202
|
+
* @param description
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
addDescription(description: string): void;
|
|
206
|
+
/**
|
|
207
|
+
* Remove the associated form control.
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
removeFormControl(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Remove a label from the form field.
|
|
213
|
+
* @param label
|
|
214
|
+
* @internal
|
|
215
|
+
*/
|
|
216
|
+
removeLabel(label: string): void;
|
|
217
|
+
/**
|
|
218
|
+
* Remove a description from the form field.
|
|
219
|
+
* @param description
|
|
220
|
+
* @internal
|
|
221
|
+
*/
|
|
222
|
+
removeDescription(description: string): void;
|
|
223
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpFormField, never>;
|
|
224
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFormField, "[ngpFormField]", ["ngpFormField"], {}, {}, ["ngControl"], never, true, never>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Provides the FormField state.
|
|
229
|
+
*/
|
|
230
|
+
declare const provideFormFieldState: (options?: ng_primitives_state.CreateStateProviderOptions) => _angular_core.FactoryProvider;
|
|
231
|
+
/**
|
|
232
|
+
* Injects the FormField state.
|
|
233
|
+
*/
|
|
234
|
+
declare const injectFormFieldState: <U = NgpFormField>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The `NgpLabel` directive is used to mark a label element within a form field. Preferably, there should use an HTML `<label>` element.
|
|
238
|
+
*/
|
|
239
|
+
declare class NgpLabel {
|
|
240
|
+
/**
|
|
241
|
+
* The id of the label. If not provided, a unique id will be generated.
|
|
242
|
+
*/
|
|
243
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
244
|
+
/**
|
|
245
|
+
* Access the form field that the label is associated with.
|
|
246
|
+
*/
|
|
247
|
+
protected readonly formField: _angular_core.Signal<ng_primitives_state.State<ng_primitives_form_field.NgpFormField>>;
|
|
248
|
+
/**
|
|
249
|
+
* Derive the for attribute value if the label is an HTML label element.
|
|
250
|
+
*/
|
|
251
|
+
protected readonly htmlFor: _angular_core.Signal<string | null>;
|
|
252
|
+
/**
|
|
253
|
+
* Access the element that the label is associated with.
|
|
254
|
+
*/
|
|
255
|
+
private readonly elementRef;
|
|
256
|
+
/**
|
|
257
|
+
* Determine if the label is an HTML label element.
|
|
258
|
+
*/
|
|
259
|
+
protected readonly isLabel: boolean;
|
|
260
|
+
constructor();
|
|
261
|
+
protected onClick(event: MouseEvent): void;
|
|
262
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpLabel, never>;
|
|
263
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpLabel, "[ngpLabel]", ["ngpLabel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export { NgpDescription, NgpError, NgpFormControl, NgpFormField, NgpLabel, injectFormControlState, injectFormFieldState, ngpFormControl, provideFormControlState, provideFormFieldState };
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
|
|
2
|
+
export { };
|
package/input/index.d.ts
CHANGED
|
@@ -1,2 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as ng_primitives_utils from 'ng-primitives/utils';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { Signal, WritableSignal } from '@angular/core';
|
|
4
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
|
|
6
|
+
declare class NgpInput {
|
|
7
|
+
/**
|
|
8
|
+
* The id of the input.
|
|
9
|
+
*/
|
|
10
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the element is disabled.
|
|
13
|
+
*/
|
|
14
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
15
|
+
/**
|
|
16
|
+
* The input state.
|
|
17
|
+
*/
|
|
18
|
+
protected readonly state: {
|
|
19
|
+
id: _angular_core.Signal<string>;
|
|
20
|
+
disabled: _angular_core.WritableSignal<boolean>;
|
|
21
|
+
status: _angular_core.Signal<ng_primitives_utils.NgpControlStatus>;
|
|
22
|
+
};
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpInput, never>;
|
|
24
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpInput, "input[ngpInput]", ["ngpInput"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Public state surface for the Input primitive.
|
|
29
|
+
*/
|
|
30
|
+
interface NgpInputState {
|
|
31
|
+
/**
|
|
32
|
+
* The id of the input.
|
|
33
|
+
*/
|
|
34
|
+
readonly id: Signal<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the input is disabled.
|
|
37
|
+
*/
|
|
38
|
+
readonly disabled: WritableSignal<boolean>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Inputs for configuring the Input primitive.
|
|
42
|
+
*/
|
|
43
|
+
interface NgpInputProps {
|
|
44
|
+
/**
|
|
45
|
+
* The id of the input.
|
|
46
|
+
*/
|
|
47
|
+
readonly id?: Signal<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the input is disabled.
|
|
50
|
+
*/
|
|
51
|
+
readonly disabled?: Signal<boolean>;
|
|
52
|
+
}
|
|
53
|
+
declare const ngpInput: ({ id, disabled: _disabled }: NgpInputProps) => {
|
|
54
|
+
id: Signal<string>;
|
|
55
|
+
disabled: WritableSignal<boolean>;
|
|
56
|
+
status: Signal<ng_primitives_utils.NgpControlStatus>;
|
|
57
|
+
};
|
|
58
|
+
declare const injectInputState: {
|
|
59
|
+
(): Signal<{
|
|
60
|
+
id: Signal<string>;
|
|
61
|
+
disabled: WritableSignal<boolean>;
|
|
62
|
+
status: Signal<ng_primitives_utils.NgpControlStatus>;
|
|
63
|
+
}>;
|
|
64
|
+
(options: {
|
|
65
|
+
hoisted: true;
|
|
66
|
+
}): Signal<{
|
|
67
|
+
id: Signal<string>;
|
|
68
|
+
disabled: WritableSignal<boolean>;
|
|
69
|
+
status: Signal<ng_primitives_utils.NgpControlStatus>;
|
|
70
|
+
} | null>;
|
|
71
|
+
(options?: {
|
|
72
|
+
hoisted?: boolean;
|
|
73
|
+
}): Signal<{
|
|
74
|
+
id: Signal<string>;
|
|
75
|
+
disabled: WritableSignal<boolean>;
|
|
76
|
+
status: Signal<ng_primitives_utils.NgpControlStatus>;
|
|
77
|
+
} | null>;
|
|
78
|
+
};
|
|
79
|
+
declare const provideInputState: (opts?: {
|
|
80
|
+
inherit?: boolean;
|
|
81
|
+
}) => _angular_core.FactoryProvider;
|
|
82
|
+
|
|
83
|
+
export { NgpInput, injectInputState, ngpInput, provideInputState };
|
|
84
|
+
export type { NgpInputProps, NgpInputState };
|