ng-primitives 0.89.0 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/index.d.ts +98 -3
- package/accordion/index.d.ts +361 -7
- package/ai/index.d.ts +238 -16
- package/autofill/index.d.ts +62 -1
- package/avatar/index.d.ts +155 -5
- package/breadcrumbs/index.d.ts +200 -7
- package/button/index.d.ts +39 -3
- package/checkbox/index.d.ts +137 -2
- package/combobox/index.d.ts +414 -8
- package/common/index.d.ts +31 -4
- package/date-picker/index.d.ts +714 -18
- package/date-time/index.d.ts +289 -3
- package/date-time-luxon/index.d.ts +31 -1
- package/dialog/index.d.ts +253 -9
- package/fesm2022/ng-primitives-a11y.mjs +42 -58
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +249 -225
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +61 -58
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +55 -38
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +105 -145
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +106 -49
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +20 -42
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +110 -84
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +82 -78
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +5 -5
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +119 -112
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +48 -47
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +56 -48
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +9 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +97 -64
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +44 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +38 -54
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +59 -54
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +14 -14
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +52 -50
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +86 -72
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +38 -35
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +83 -74
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +67 -60
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +11 -12
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +43 -40
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +35 -33
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +4 -4
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +264 -237
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +73 -69
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +7 -7
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +287 -253
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +173 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +105 -101
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +48 -43
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +33 -41
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +19 -19
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +160 -159
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +81 -68
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +31 -40
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +68 -60
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +50 -37
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/file-upload/index.d.ts +148 -4
- package/focus-trap/index.d.ts +98 -2
- package/form-field/index.d.ts +266 -7
- package/index.d.ts +2 -2
- package/input/index.d.ts +84 -2
- package/input-otp/index.d.ts +247 -4
- package/interactions/index.d.ts +295 -16
- package/internal/index.d.ts +201 -10
- package/listbox/index.d.ts +209 -6
- package/menu/index.d.ts +297 -8
- package/meter/index.d.ts +67 -6
- package/package.json +28 -28
- package/pagination/index.d.ts +211 -7
- package/popover/index.d.ts +224 -5
- package/portal/index.d.ts +389 -6
- package/progress/index.d.ts +124 -6
- package/radio/index.d.ts +140 -5
- package/resize/index.d.ts +29 -1
- package/roving-focus/index.d.ts +154 -4
- package/schematics/ng-add/schema.d.ts +0 -1
- package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +1 -1
- package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +6 -3
- package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toggle/toggle.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toggle-group/toggle-group.__fileSuffix@dasherize__.ts.template +2 -2
- package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +1 -1
- package/search/index.d.ts +66 -3
- package/select/index.d.ts +341 -8
- package/separator/index.d.ts +30 -2
- package/slider/index.d.ts +471 -10
- package/state/index.d.ts +68 -11
- package/switch/index.d.ts +151 -3
- package/tabs/index.d.ts +222 -7
- package/textarea/index.d.ts +87 -2
- package/toast/index.d.ts +219 -4
- package/toggle/index.d.ts +98 -2
- package/toggle-group/index.d.ts +168 -5
- package/toolbar/index.d.ts +43 -2
- package/tooltip/index.d.ts +214 -5
- package/utils/index.d.ts +170 -9
- package/a11y/active-descendant/active-descendant.d.ts +0 -42
- package/a11y/visually-hidden/visually-hidden-state.d.ts +0 -17
- package/a11y/visually-hidden/visually-hidden.d.ts +0 -50
- package/accordion/accordion/accordion-state.d.ts +0 -17
- package/accordion/accordion/accordion.d.ts +0 -50
- package/accordion/accordion-content/accordion-content.d.ts +0 -40
- package/accordion/accordion-item/accordion-item-state.d.ts +0 -17
- package/accordion/accordion-item/accordion-item.d.ts +0 -50
- package/accordion/accordion-trigger/accordion-trigger.d.ts +0 -31
- package/accordion/config/accordion-config.d.ts +0 -32
- package/ai/prompt-composer/prompt-composer-state.d.ts +0 -17
- package/ai/prompt-composer/prompt-composer.d.ts +0 -23
- package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +0 -17
- package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +0 -29
- package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +0 -17
- package/ai/prompt-composer-input/prompt-composer-input.d.ts +0 -16
- package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +0 -17
- package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +0 -15
- package/ai/thread/thread-state.d.ts +0 -17
- package/ai/thread/thread.d.ts +0 -23
- package/ai/thread-message/thread-message-state.d.ts +0 -17
- package/ai/thread-message/thread-message.d.ts +0 -11
- package/ai/thread-suggestion/thread-suggestion-state.d.ts +0 -17
- package/ai/thread-suggestion/thread-suggestion.d.ts +0 -14
- package/ai/thread-viewport/thread-viewport-state.d.ts +0 -17
- package/ai/thread-viewport/thread-viewport.d.ts +0 -34
- package/autofill/autofill/autofill.d.ts +0 -19
- package/avatar/avatar/avatar-state.d.ts +0 -17
- package/avatar/avatar/avatar.d.ts +0 -29
- package/avatar/avatar-fallback/avatar-fallback.d.ts +0 -37
- package/avatar/avatar-image/avatar-image.d.ts +0 -27
- package/avatar/config/avatar-config.d.ts +0 -21
- package/breadcrumbs/breadcrumb-ellipsis/breadcrumb-ellipsis.d.ts +0 -8
- package/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +0 -8
- package/breadcrumbs/breadcrumb-link/breadcrumb-link.d.ts +0 -9
- package/breadcrumbs/breadcrumb-list/breadcrumb-list.d.ts +0 -8
- package/breadcrumbs/breadcrumb-page/breadcrumb-page.d.ts +0 -8
- package/breadcrumbs/breadcrumb-separator/breadcrumb-separator.d.ts +0 -8
- package/breadcrumbs/breadcrumbs/breadcrumbs.d.ts +0 -8
- package/button/button/button-state.d.ts +0 -17
- package/button/button/button.d.ts +0 -15
- package/button/button/setup-button.d.ts +0 -15
- package/checkbox/checkbox/checkbox-state.d.ts +0 -17
- package/checkbox/checkbox/checkbox.d.ts +0 -45
- package/combobox/combobox/combobox-state.d.ts +0 -17
- package/combobox/combobox/combobox.d.ts +0 -222
- package/combobox/combobox-button/combobox-button.d.ts +0 -18
- package/combobox/combobox-dropdown/combobox-dropdown.d.ts +0 -21
- package/combobox/combobox-input/combobox-input.d.ts +0 -36
- package/combobox/combobox-option/combobox-option.d.ts +0 -51
- package/combobox/combobox-portal/combobox-portal.d.ts +0 -37
- package/combobox/config/combobox-config.d.ts +0 -28
- package/combobox/utils.d.ts +0 -9
- package/common/header/header-token.d.ts +0 -10
- package/common/header/header.d.ts +0 -13
- package/common/types/orientation.d.ts +0 -1
- package/common/types/selection.d.ts +0 -1
- package/date-picker/config/date-picker-config.d.ts +0 -22
- package/date-picker/date-picker/date-picker-first-day-of-week.d.ts +0 -29
- package/date-picker/date-picker/date-picker-state.d.ts +0 -9
- package/date-picker/date-picker/date-picker.d.ts +0 -129
- package/date-picker/date-picker-cell/date-picker-cell.d.ts +0 -20
- package/date-picker/date-picker-cell-render/date-picker-cell-render-token.d.ts +0 -12
- package/date-picker/date-picker-cell-render/date-picker-cell-render.d.ts +0 -39
- package/date-picker/date-picker-date-button/date-picker-date-button-token.d.ts +0 -7
- package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +0 -114
- package/date-picker/date-picker-grid/date-picker-grid.d.ts +0 -16
- package/date-picker/date-picker-label/date-picker-label-token.d.ts +0 -7
- package/date-picker/date-picker-label/date-picker-label.d.ts +0 -20
- package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -34
- package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -34
- package/date-picker/date-picker-row-render/date-picker-row-render-token.d.ts +0 -12
- package/date-picker/date-picker-row-render/date-picker-row-render.d.ts +0 -65
- package/date-picker/date-range-picker/date-range-picker-state.d.ts +0 -19
- package/date-picker/date-range-picker/date-range-picker.d.ts +0 -149
- package/date-time/date-adapter/date-adapter-token.d.ts +0 -11
- package/date-time/date-adapter/date-adapter.d.ts +0 -169
- package/date-time/native-date-adapter/native-date-adapter.d.ts +0 -106
- package/date-time-luxon/luxon-date-adapter/luxon-date-adapter.d.ts +0 -28
- package/dialog/config/dialog-config.d.ts +0 -41
- package/dialog/dialog/dialog-ref.d.ts +0 -45
- package/dialog/dialog/dialog-state.d.ts +0 -17
- package/dialog/dialog/dialog.d.ts +0 -37
- package/dialog/dialog/dialog.service.d.ts +0 -69
- package/dialog/dialog-description/dialog-description.d.ts +0 -12
- package/dialog/dialog-overlay/dialog-overlay.d.ts +0 -16
- package/dialog/dialog-title/dialog-title.d.ts +0 -12
- package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -26
- package/file-upload/file-dropzone/file-drop-filter.d.ts +0 -2
- package/file-upload/file-dropzone/file-dropzone-state.d.ts +0 -17
- package/file-upload/file-dropzone/file-dropzone.d.ts +0 -55
- package/file-upload/file-upload/file-upload-state.d.ts +0 -17
- package/file-upload/file-upload/file-upload.d.ts +0 -72
- package/focus-trap/focus-trap/focus-trap-state.d.ts +0 -17
- package/focus-trap/focus-trap/focus-trap.d.ts +0 -85
- package/form-field/description/description.d.ts +0 -17
- package/form-field/error/error.d.ts +0 -32
- package/form-field/form-control/form-control-state.d.ts +0 -17
- package/form-field/form-control/form-control.d.ts +0 -44
- package/form-field/form-field/form-field-state.d.ts +0 -17
- package/form-field/form-field/form-field.d.ts +0 -119
- package/form-field/label/label.d.ts +0 -30
- package/input/input/input-state.d.ts +0 -17
- package/input/input/input.d.ts +0 -34
- package/input-otp/input-otp/input-otp-state.d.ts +0 -17
- package/input-otp/input-otp/input-otp.d.ts +0 -133
- package/input-otp/input-otp-input/input-otp-input.d.ts +0 -57
- package/input-otp/input-otp-slot/input-otp-slot.d.ts +0 -45
- package/interactions/config/interactions-config.d.ts +0 -30
- package/interactions/focus/focus-interaction.d.ts +0 -14
- package/interactions/focus/focus.d.ts +0 -19
- package/interactions/focus-visible/focus-visible-interaction.d.ts +0 -12
- package/interactions/focus-visible/focus-visible.d.ts +0 -19
- package/interactions/hover/hover-interaction.d.ts +0 -17
- package/interactions/hover/hover.d.ts +0 -31
- package/interactions/interactions/interactions.d.ts +0 -20
- package/interactions/move/move.d.ts +0 -114
- package/interactions/press/press-interaction.d.ts +0 -14
- package/interactions/press/press.d.ts +0 -26
- package/internal/exit-animation/exit-animation-manager.d.ts +0 -17
- package/internal/exit-animation/exit-animation.d.ts +0 -26
- package/internal/signals/explicit-effect.d.ts +0 -19
- package/internal/style-injector/style-injector.d.ts +0 -44
- package/internal/utilities/dom-removal.d.ts +0 -6
- package/internal/utilities/element-ref.d.ts +0 -6
- package/internal/utilities/mutation-observer.d.ts +0 -39
- package/internal/utilities/overflow.d.ts +0 -13
- package/internal/utilities/resize.d.ts +0 -31
- package/internal/utilities/scrolling.d.ts +0 -1
- package/listbox/listbox/listbox-state.d.ts +0 -17
- package/listbox/listbox/listbox.d.ts +0 -101
- package/listbox/listbox-header/listbox-header.d.ts +0 -9
- package/listbox/listbox-option/listbox-option.d.ts +0 -68
- package/listbox/listbox-section/listbox-section.d.ts +0 -9
- package/listbox/listbox-trigger/listbox-trigger.d.ts +0 -13
- package/menu/config/menu-config.d.ts +0 -44
- package/menu/menu/menu-token.d.ts +0 -11
- package/menu/menu/menu.d.ts +0 -22
- package/menu/menu-item/menu-item.d.ts +0 -30
- package/menu/menu-trigger/menu-trigger-state.d.ts +0 -17
- package/menu/menu-trigger/menu-trigger.d.ts +0 -98
- package/menu/submenu-trigger/submenu-trigger-state.d.ts +0 -17
- package/menu/submenu-trigger/submenu-trigger.d.ts +0 -88
- package/meter/meter/meter-state.d.ts +0 -17
- package/meter/meter/meter.d.ts +0 -27
- package/meter/meter-indicator/meter-indicator.d.ts +0 -7
- package/meter/meter-label/meter-label.d.ts +0 -10
- package/meter/meter-track/meter-track.d.ts +0 -5
- package/meter/meter-value/meter-value.d.ts +0 -5
- package/pagination/pagination/pagination-state.d.ts +0 -17
- package/pagination/pagination/pagination.d.ts +0 -45
- package/pagination/pagination-button/pagination-button.d.ts +0 -39
- package/pagination/pagination-first/pagination-first.d.ts +0 -28
- package/pagination/pagination-last/pagination-last.d.ts +0 -28
- package/pagination/pagination-next/pagination-next.d.ts +0 -31
- package/pagination/pagination-previous/pagination-previous.d.ts +0 -31
- package/popover/config/popover-config.d.ts +0 -64
- package/popover/popover/popover.d.ts +0 -18
- package/popover/popover-arrow/popover-arrow.d.ts +0 -6
- package/popover/popover-trigger/popover-trigger-state.d.ts +0 -19
- package/popover/popover-trigger/popover-trigger.d.ts +0 -128
- package/portal/offset.d.ts +0 -39
- package/portal/overlay-arrow.d.ts +0 -1
- package/portal/overlay-token.d.ts +0 -12
- package/portal/overlay.d.ts +0 -214
- package/portal/portal.d.ts +0 -94
- package/portal/scroll-strategy.d.ts +0 -23
- package/progress/progress/progress-state.d.ts +0 -17
- package/progress/progress/progress.d.ts +0 -61
- package/progress/progress-indicator/progress-indicator.d.ts +0 -17
- package/progress/progress-label/progress-label.d.ts +0 -14
- package/progress/progress-track/progress-track.d.ts +0 -9
- package/progress/progress-value/progress-value.d.ts +0 -9
- package/radio/radio-group/radio-group-state.d.ts +0 -18
- package/radio/radio-group/radio-group.d.ts +0 -54
- package/radio/radio-indicator/radio-indicator.d.ts +0 -21
- package/radio/radio-item/radio-item-state.d.ts +0 -18
- package/radio/radio-item/radio-item.d.ts +0 -45
- package/resize/resize/resize.d.ts +0 -26
- package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +0 -17
- package/roving-focus/roving-focus-group/roving-focus-group-token.d.ts +0 -21
- package/roving-focus/roving-focus-group/roving-focus-group.d.ts +0 -94
- package/roving-focus/roving-focus-item/roving-focus-item.d.ts +0 -53
- package/search/search/search-state.d.ts +0 -17
- package/search/search/search.d.ts +0 -36
- package/search/search-clear/search-clear.d.ts +0 -16
- package/select/config/select-config.d.ts +0 -28
- package/select/native-select/native-select-state.d.ts +0 -17
- package/select/native-select/native-select.d.ts +0 -22
- package/select/select/select-state.d.ts +0 -17
- package/select/select/select.d.ts +0 -172
- package/select/select-dropdown/select-dropdown.d.ts +0 -17
- package/select/select-option/select-option.d.ts +0 -51
- package/select/select-portal/select-portal.d.ts +0 -37
- package/separator/config/separator-config.d.ts +0 -22
- package/separator/separator/separator.d.ts +0 -11
- package/slider/range-slider/range-slider/range-slider-state.d.ts +0 -17
- package/slider/range-slider/range-slider/range-slider.d.ts +0 -115
- package/slider/range-slider/range-slider-range/range-slider-range.d.ts +0 -12
- package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +0 -44
- package/slider/range-slider/range-slider-track/range-slider-track.d.ts +0 -22
- package/slider/slider/slider-state.d.ts +0 -17
- package/slider/slider/slider.d.ts +0 -58
- package/slider/slider-range/slider-range.d.ts +0 -12
- package/slider/slider-thumb/slider-thumb.d.ts +0 -29
- package/slider/slider-track/slider-track.d.ts +0 -22
- package/switch/switch/switch-state.d.ts +0 -17
- package/switch/switch/switch.d.ts +0 -49
- package/switch/switch-thumb/switch-thumb.d.ts +0 -13
- package/tabs/config/tabs-config.d.ts +0 -32
- package/tabs/tab-button/tab-button.d.ts +0 -59
- package/tabs/tab-list/tab-list.d.ts +0 -12
- package/tabs/tab-panel/tab-panel-token.d.ts +0 -8
- package/tabs/tab-panel/tab-panel.d.ts +0 -38
- package/tabs/tabset/tabset-state.d.ts +0 -17
- package/tabs/tabset/tabset.d.ts +0 -71
- package/textarea/textarea/textarea-state.d.ts +0 -17
- package/textarea/textarea/textarea.d.ts +0 -19
- package/toast/config/toast-config.d.ts +0 -70
- package/toast/toast/toast-context.d.ts +0 -3
- package/toast/toast/toast-manager.d.ts +0 -49
- package/toast/toast/toast-options.d.ts +0 -34
- package/toast/toast/toast-timer.d.ts +0 -14
- package/toast/toast/toast.d.ts +0 -72
- package/toggle/toggle/toggle-state.d.ts +0 -17
- package/toggle/toggle/toggle.d.ts +0 -44
- package/toggle-group/config/toggle-group-config.d.ts +0 -32
- package/toggle-group/toggle-group/toggle-group-state.d.ts +0 -17
- package/toggle-group/toggle-group/toggle-group.d.ts +0 -64
- package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +0 -17
- package/toggle-group/toggle-group-item/toggle-group-item.d.ts +0 -34
- package/toolbar/toolbar/toolbar-state.d.ts +0 -17
- package/toolbar/toolbar/toolbar.d.ts +0 -20
- package/tooltip/config/tooltip-config.d.ts +0 -59
- package/tooltip/tooltip/tooltip.d.ts +0 -17
- package/tooltip/tooltip-arrow/tooltip-arrow.d.ts +0 -6
- package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +0 -14
- package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +0 -17
- package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +0 -126
- package/utils/forms/providers.d.ts +0 -6
- package/utils/forms/status.d.ts +0 -16
- package/utils/forms/types.d.ts +0 -8
- package/utils/helpers/attributes.d.ts +0 -2
- package/utils/helpers/disposables.d.ts +0 -40
- package/utils/helpers/unique-id.d.ts +0 -6
- package/utils/helpers/validators.d.ts +0 -51
- package/utils/observables/take-until-destroyed.d.ts +0 -10
- package/utils/signals/index.d.ts +0 -22
|
@@ -1,237 +1,265 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
4
|
-
import { ngpInteractions } from 'ng-primitives/interactions';
|
|
2
|
+
import { signal, computed, Directive, input, numberAttribute, output, booleanAttribute, HostListener } from '@angular/core';
|
|
5
3
|
import { injectElementRef } from 'ng-primitives/internal';
|
|
6
|
-
import {
|
|
4
|
+
import { createPrimitive, controlled, attrBinding, dataBinding, deprecatedSetter, styleBinding, listener, createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
5
|
+
import { ngpFormControl } from 'ng-primitives/form-field';
|
|
7
6
|
import { uniqueId } from 'ng-primitives/utils';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import { ngpInteractions } from 'ng-primitives/interactions';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
const [NgpSliderStateToken, ngpSlider, injectSliderState, provideSliderState] = createPrimitive('NgpSlider', ({ id = signal(uniqueId('ngp-slider')), value: _value = signal(0), min = signal(0), max = signal(100), step = signal(1), orientation: _orientation = signal('horizontal'), disabled: _disabled = signal(false), onValueChange, }) => {
|
|
11
|
+
const element = injectElementRef();
|
|
12
|
+
const value = controlled(_value);
|
|
13
|
+
const disabledInput = controlled(_disabled);
|
|
14
|
+
const orientation = controlled(_orientation);
|
|
15
|
+
const valueChange = new Subject();
|
|
16
|
+
const track = signal(undefined, ...(ngDevMode ? [{ debugName: "track" }] : []));
|
|
17
|
+
// Form control integration
|
|
18
|
+
const status = ngpFormControl({ id, disabled: disabledInput });
|
|
19
|
+
const percentage = computed(() => {
|
|
20
|
+
const range = max() - min();
|
|
21
|
+
if (range <= 0) {
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
const pct = ((value() - min()) / range) * 100;
|
|
25
|
+
return Math.min(100, Math.max(0, pct));
|
|
26
|
+
}, ...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
27
|
+
// Host bindings
|
|
28
|
+
attrBinding(element, 'id', id);
|
|
29
|
+
dataBinding(element, 'data-orientation', orientation);
|
|
30
|
+
dataBinding(element, 'data-disabled', () => status().disabled);
|
|
31
|
+
function setTrack(newTrack) {
|
|
32
|
+
track.set(newTrack);
|
|
33
|
+
}
|
|
34
|
+
function setValue(newValue) {
|
|
35
|
+
const clamped = Math.min(max(), Math.max(min(), newValue));
|
|
36
|
+
value.set(clamped);
|
|
37
|
+
onValueChange?.(clamped);
|
|
38
|
+
valueChange.next(clamped);
|
|
39
|
+
}
|
|
40
|
+
function setDisabled(isDisabled) {
|
|
41
|
+
disabledInput.set(isDisabled);
|
|
42
|
+
}
|
|
43
|
+
function setOrientation(newOrientation) {
|
|
44
|
+
orientation.set(newOrientation);
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
id,
|
|
48
|
+
value,
|
|
49
|
+
min,
|
|
50
|
+
max,
|
|
51
|
+
step,
|
|
52
|
+
orientation: deprecatedSetter(orientation, 'setOrientation'),
|
|
53
|
+
disabled: deprecatedSetter(disabledInput, 'setDisabled'),
|
|
54
|
+
valueChange,
|
|
55
|
+
percentage,
|
|
56
|
+
track,
|
|
57
|
+
setValue,
|
|
58
|
+
setTrack,
|
|
59
|
+
setDisabled,
|
|
60
|
+
setOrientation,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const [NgpSliderRangeStateToken, ngpSliderRange, injectSliderRangeState, provideSliderRangeState,] = createPrimitive('NgpSliderRange', ({}) => {
|
|
65
|
+
const element = injectElementRef();
|
|
66
|
+
const slider = injectSliderState();
|
|
67
|
+
// Host bindings
|
|
68
|
+
dataBinding(element, 'data-orientation', () => slider().orientation());
|
|
69
|
+
dataBinding(element, 'data-disabled', () => slider().disabled());
|
|
70
|
+
styleBinding(element, 'width.%', () => slider().orientation() === 'horizontal' ? slider().percentage() : null);
|
|
71
|
+
styleBinding(element, 'height.%', () => slider().orientation() === 'vertical' ? slider().percentage() : null);
|
|
72
|
+
return {};
|
|
73
|
+
});
|
|
25
74
|
|
|
26
75
|
/**
|
|
27
76
|
* Apply the `ngpSliderRange` directive to an element that represents the range of the slider.
|
|
28
77
|
*/
|
|
29
78
|
class NgpSliderRange {
|
|
30
79
|
constructor() {
|
|
31
|
-
|
|
32
|
-
* Access the slider state.
|
|
33
|
-
*/
|
|
34
|
-
this.sliderState = injectSliderState();
|
|
80
|
+
ngpSliderRange({});
|
|
35
81
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSliderRange, isStandalone: true, selector: "[ngpSliderRange]", providers: [provideSliderRangeState()], exportAs: ["ngpSliderRange"], ngImport: i0 }); }
|
|
38
84
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderRange, decorators: [{
|
|
40
86
|
type: Directive,
|
|
41
87
|
args: [{
|
|
42
88
|
selector: '[ngpSliderRange]',
|
|
43
89
|
exportAs: 'ngpSliderRange',
|
|
44
|
-
|
|
45
|
-
'[attr.data-orientation]': 'sliderState().orientation()',
|
|
46
|
-
'[attr.data-disabled]': 'sliderState().disabled() ? "" : null',
|
|
47
|
-
'[style.width.%]': 'sliderState().orientation() === "horizontal" ? sliderState().percentage() : undefined',
|
|
48
|
-
'[style.height.%]': 'sliderState().orientation() === "vertical" ? sliderState().percentage() : undefined',
|
|
49
|
-
},
|
|
90
|
+
providers: [provideSliderRangeState()],
|
|
50
91
|
}]
|
|
51
|
-
}] });
|
|
92
|
+
}], ctorParameters: () => [] });
|
|
52
93
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provideSliderThumbState,] = createPrimitive('NgpSliderThumb', ({}) => {
|
|
95
|
+
const elementRef = injectElementRef();
|
|
96
|
+
const slider = injectSliderState();
|
|
97
|
+
let dragging = false;
|
|
98
|
+
const ariaValueNow = computed(() => slider().value(), ...(ngDevMode ? [{ debugName: "ariaValueNow" }] : []));
|
|
99
|
+
const tabindex = computed(() => (slider().disabled() ? -1 : 0), ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
100
|
+
// Host bindings
|
|
101
|
+
attrBinding(elementRef, 'role', 'slider');
|
|
102
|
+
attrBinding(elementRef, 'aria-valuemin', () => slider().min().toString());
|
|
103
|
+
attrBinding(elementRef, 'aria-valuemax', () => slider().max().toString());
|
|
104
|
+
attrBinding(elementRef, 'aria-valuenow', () => ariaValueNow().toString());
|
|
105
|
+
attrBinding(elementRef, 'aria-orientation', () => slider().orientation());
|
|
106
|
+
attrBinding(elementRef, 'tabindex', () => tabindex().toString());
|
|
107
|
+
dataBinding(elementRef, 'data-orientation', () => slider().orientation());
|
|
108
|
+
dataBinding(elementRef, 'data-disabled', () => slider().disabled());
|
|
109
|
+
styleBinding(elementRef, 'inset-inline-start.%', () => slider().orientation() === 'horizontal' ? slider().percentage() : null);
|
|
110
|
+
styleBinding(elementRef, 'inset-block-start.%', () => slider().orientation() === 'vertical' ? slider().percentage() : null);
|
|
111
|
+
ngpInteractions({
|
|
112
|
+
hover: true,
|
|
113
|
+
focusVisible: true,
|
|
114
|
+
press: true,
|
|
115
|
+
disabled: slider().disabled,
|
|
116
|
+
});
|
|
117
|
+
// Pointer interactions
|
|
118
|
+
listener(elementRef, 'pointerdown', (event) => {
|
|
78
119
|
event.preventDefault();
|
|
79
|
-
if (
|
|
120
|
+
if (slider().disabled()) {
|
|
80
121
|
return;
|
|
81
122
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
123
|
+
dragging = true;
|
|
124
|
+
elementRef.nativeElement.setPointerCapture(event.pointerId);
|
|
125
|
+
});
|
|
126
|
+
listener(elementRef, 'pointerup', (event) => {
|
|
127
|
+
if (slider().disabled()) {
|
|
86
128
|
return;
|
|
87
129
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
130
|
+
dragging = false;
|
|
131
|
+
if (elementRef.nativeElement.hasPointerCapture(event.pointerId)) {
|
|
132
|
+
elementRef.nativeElement.releasePointerCapture(event.pointerId);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
listener(elementRef, 'pointermove', (event) => {
|
|
136
|
+
if (slider().disabled() || !dragging) {
|
|
92
137
|
return;
|
|
93
138
|
}
|
|
94
|
-
const
|
|
139
|
+
const track = slider().track();
|
|
140
|
+
const rect = track?.nativeElement.getBoundingClientRect();
|
|
95
141
|
if (!rect) {
|
|
96
142
|
return;
|
|
97
143
|
}
|
|
98
|
-
const percentage =
|
|
144
|
+
const percentage = slider().orientation() === 'horizontal'
|
|
99
145
|
? (event.clientX - rect.left) / rect.width
|
|
100
146
|
: 1 - (event.clientY - rect.top) / rect.height;
|
|
101
|
-
const value =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Handle keyboard events.
|
|
108
|
-
* @param event
|
|
109
|
-
*/
|
|
110
|
-
handleKeydown(event) {
|
|
147
|
+
const value = slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));
|
|
148
|
+
slider().setValue(value);
|
|
149
|
+
});
|
|
150
|
+
// Keyboard interactions
|
|
151
|
+
listener(elementRef, 'keydown', (event) => {
|
|
111
152
|
const multiplier = event.shiftKey ? 10 : 1;
|
|
112
|
-
const step =
|
|
113
|
-
const currentValue =
|
|
153
|
+
const step = slider().step() * multiplier;
|
|
154
|
+
const currentValue = slider().value();
|
|
114
155
|
// determine the document direction
|
|
115
|
-
const isRTL = getComputedStyle(
|
|
156
|
+
const isRTL = getComputedStyle(elementRef.nativeElement).direction === 'rtl';
|
|
116
157
|
let newValue;
|
|
117
158
|
switch (event.key) {
|
|
118
159
|
case 'ArrowLeft':
|
|
119
160
|
newValue = isRTL
|
|
120
|
-
? Math.min(currentValue + step,
|
|
121
|
-
: Math.max(currentValue - step,
|
|
161
|
+
? Math.min(currentValue + step, slider().max())
|
|
162
|
+
: Math.max(currentValue - step, slider().min());
|
|
122
163
|
break;
|
|
123
164
|
case 'ArrowDown':
|
|
124
|
-
newValue = Math.max(currentValue - step,
|
|
165
|
+
newValue = Math.max(currentValue - step, slider().min());
|
|
125
166
|
break;
|
|
126
167
|
case 'ArrowRight':
|
|
127
168
|
newValue = isRTL
|
|
128
|
-
? Math.max(currentValue - step,
|
|
129
|
-
: Math.min(currentValue + step,
|
|
169
|
+
? Math.max(currentValue - step, slider().min())
|
|
170
|
+
: Math.min(currentValue + step, slider().max());
|
|
130
171
|
break;
|
|
131
172
|
case 'ArrowUp':
|
|
132
|
-
newValue = Math.min(currentValue + step,
|
|
173
|
+
newValue = Math.min(currentValue + step, slider().max());
|
|
133
174
|
break;
|
|
134
175
|
case 'Home':
|
|
135
|
-
newValue = isRTL ?
|
|
176
|
+
newValue = isRTL ? slider().max() : slider().min();
|
|
136
177
|
break;
|
|
137
178
|
case 'End':
|
|
138
|
-
newValue = isRTL ?
|
|
179
|
+
newValue = isRTL ? slider().min() : slider().max();
|
|
139
180
|
break;
|
|
140
181
|
default:
|
|
141
182
|
return;
|
|
142
183
|
}
|
|
143
|
-
// if the value is the same, do not emit an event
|
|
144
184
|
if (newValue === currentValue) {
|
|
145
185
|
return;
|
|
146
186
|
}
|
|
147
|
-
|
|
148
|
-
this.state().valueChange.emit(newValue);
|
|
187
|
+
slider().setValue(newValue);
|
|
149
188
|
event.preventDefault();
|
|
189
|
+
});
|
|
190
|
+
function focus() {
|
|
191
|
+
elementRef.nativeElement.focus({ preventScroll: true });
|
|
150
192
|
}
|
|
151
|
-
|
|
152
|
-
|
|
193
|
+
return {
|
|
194
|
+
dragging: computed(() => dragging),
|
|
195
|
+
focus,
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Apply the `ngpSliderThumb` directive to an element that represents the thumb of the slider.
|
|
201
|
+
*/
|
|
202
|
+
class NgpSliderThumb {
|
|
203
|
+
constructor() {
|
|
204
|
+
ngpSliderThumb({});
|
|
205
|
+
}
|
|
206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
207
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSliderThumb, isStandalone: true, selector: "[ngpSliderThumb]", providers: [provideSliderThumbState()], exportAs: ["ngpSliderThumb"], ngImport: i0 }); }
|
|
153
208
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderThumb, decorators: [{
|
|
155
210
|
type: Directive,
|
|
156
211
|
args: [{
|
|
157
212
|
selector: '[ngpSliderThumb]',
|
|
158
213
|
exportAs: 'ngpSliderThumb',
|
|
159
|
-
|
|
160
|
-
role: 'slider',
|
|
161
|
-
'[attr.aria-valuemin]': 'state().min()',
|
|
162
|
-
'[attr.aria-valuemax]': 'state().max()',
|
|
163
|
-
'[attr.aria-valuenow]': 'state().value()',
|
|
164
|
-
'[attr.aria-orientation]': 'state().orientation()',
|
|
165
|
-
'[tabindex]': 'state().disabled() ? -1 : 0',
|
|
166
|
-
'[attr.data-orientation]': 'state().orientation()',
|
|
167
|
-
'[attr.data-disabled]': 'state().disabled() ? "" : null',
|
|
168
|
-
'[style.inset-inline-start.%]': 'state().orientation() === "horizontal" ? state().percentage() : undefined',
|
|
169
|
-
'[style.inset-block-start.%]': 'state().orientation() === "vertical" ? state().percentage() : undefined',
|
|
170
|
-
},
|
|
214
|
+
providers: [provideSliderThumbState()],
|
|
171
215
|
}]
|
|
172
|
-
}], ctorParameters: () => []
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
216
|
+
}], ctorParameters: () => [] });
|
|
217
|
+
|
|
218
|
+
const [NgpSliderTrackStateToken, ngpSliderTrack, injectSliderTrackState, provideSliderTrackState,] = createPrimitive('NgpSliderTrack', ({}) => {
|
|
219
|
+
const element = injectElementRef();
|
|
220
|
+
const slider = injectSliderState();
|
|
221
|
+
// Host bindings
|
|
222
|
+
dataBinding(element, 'data-orientation', () => slider().orientation());
|
|
223
|
+
dataBinding(element, 'data-disabled', () => slider().disabled());
|
|
224
|
+
// Register track for thumb measurements
|
|
225
|
+
slider().setTrack(element);
|
|
226
|
+
// Listener for pointer interactions to set value
|
|
227
|
+
listener(element, 'pointerdown', (event) => {
|
|
228
|
+
if (slider().disabled()) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
// prevent text selection
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
const rect = element.nativeElement.getBoundingClientRect();
|
|
234
|
+
const position = slider().orientation() === 'horizontal'
|
|
235
|
+
? event.clientX - rect.left
|
|
236
|
+
: event.clientY - rect.top;
|
|
237
|
+
const size = slider().orientation() === 'horizontal' ? rect.width : rect.height;
|
|
238
|
+
const percentage = size === 0 ? 0 : position / size;
|
|
239
|
+
const value = slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));
|
|
240
|
+
slider().setValue(value);
|
|
241
|
+
});
|
|
242
|
+
return {};
|
|
243
|
+
});
|
|
185
244
|
|
|
186
245
|
/**
|
|
187
246
|
* Apply the `ngpSliderTrack` directive to an element that represents the track of the slider.
|
|
188
247
|
*/
|
|
189
248
|
class NgpSliderTrack {
|
|
190
249
|
constructor() {
|
|
191
|
-
|
|
192
|
-
* Access the slider state.
|
|
193
|
-
*/
|
|
194
|
-
this.sliderState = injectSliderState();
|
|
195
|
-
/**
|
|
196
|
-
* The element that represents the slider track.
|
|
197
|
-
*/
|
|
198
|
-
this.element = injectElementRef();
|
|
199
|
-
this.sliderState().track.set(this);
|
|
250
|
+
ngpSliderTrack({});
|
|
200
251
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
* @param event The click event.
|
|
204
|
-
*/
|
|
205
|
-
handlePointerDown(event) {
|
|
206
|
-
if (this.sliderState().disabled()) {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
// get the position the click occurred within the slider track
|
|
210
|
-
const position = this.sliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;
|
|
211
|
-
const rect = this.element.nativeElement.getBoundingClientRect();
|
|
212
|
-
const percentage = (position - (this.sliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /
|
|
213
|
-
(this.sliderState().orientation() === 'horizontal' ? rect.width : rect.height);
|
|
214
|
-
// update the value based on the position
|
|
215
|
-
this.sliderState().value.set(this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage);
|
|
216
|
-
this.sliderState().valueChange.emit(this.sliderState().value());
|
|
217
|
-
}
|
|
218
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
219
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpSliderTrack, isStandalone: true, selector: "[ngpSliderTrack]", host: { listeners: { "pointerdown": "handlePointerDown($event)" }, properties: { "attr.data-orientation": "sliderState().orientation()", "attr.data-disabled": "sliderState().disabled() ? \"\" : null" } }, exportAs: ["ngpSliderTrack"], ngImport: i0 }); }
|
|
252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
253
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSliderTrack, isStandalone: true, selector: "[ngpSliderTrack]", providers: [provideSliderTrackState()], exportAs: ["ngpSliderTrack"], ngImport: i0 }); }
|
|
220
254
|
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSliderTrack, decorators: [{
|
|
222
256
|
type: Directive,
|
|
223
257
|
args: [{
|
|
224
258
|
selector: '[ngpSliderTrack]',
|
|
225
259
|
exportAs: 'ngpSliderTrack',
|
|
226
|
-
|
|
227
|
-
'[attr.data-orientation]': 'sliderState().orientation()',
|
|
228
|
-
'[attr.data-disabled]': 'sliderState().disabled() ? "" : null',
|
|
229
|
-
},
|
|
260
|
+
providers: [provideSliderTrackState()],
|
|
230
261
|
}]
|
|
231
|
-
}], ctorParameters: () => []
|
|
232
|
-
type: HostListener,
|
|
233
|
-
args: ['pointerdown', ['$event']]
|
|
234
|
-
}] } });
|
|
262
|
+
}], ctorParameters: () => [] });
|
|
235
263
|
|
|
236
264
|
/**
|
|
237
265
|
* Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.
|
|
@@ -241,14 +269,15 @@ class NgpSlider {
|
|
|
241
269
|
/**
|
|
242
270
|
* The id of the slider. If not provided, a unique id will be generated.
|
|
243
271
|
*/
|
|
244
|
-
this.id = input(uniqueId('ngp-slider'));
|
|
272
|
+
this.id = input(uniqueId('ngp-slider'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
245
273
|
/**
|
|
246
274
|
* The value of the slider.
|
|
247
275
|
*/
|
|
248
|
-
this.value = input(0, {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
276
|
+
this.value = input(0, ...(ngDevMode ? [{ debugName: "value", alias: 'ngpSliderValue',
|
|
277
|
+
transform: numberAttribute }] : [{
|
|
278
|
+
alias: 'ngpSliderValue',
|
|
279
|
+
transform: numberAttribute,
|
|
280
|
+
}]));
|
|
252
281
|
/**
|
|
253
282
|
* Emits when the value changes.
|
|
254
283
|
*/
|
|
@@ -258,68 +287,67 @@ class NgpSlider {
|
|
|
258
287
|
/**
|
|
259
288
|
* The minimum value of the slider.
|
|
260
289
|
*/
|
|
261
|
-
this.min = input(0, {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
290
|
+
this.min = input(0, ...(ngDevMode ? [{ debugName: "min", alias: 'ngpSliderMin',
|
|
291
|
+
transform: numberAttribute }] : [{
|
|
292
|
+
alias: 'ngpSliderMin',
|
|
293
|
+
transform: numberAttribute,
|
|
294
|
+
}]));
|
|
265
295
|
/**
|
|
266
296
|
* The maximum value of the slider.
|
|
267
297
|
*/
|
|
268
|
-
this.max = input(100, {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
298
|
+
this.max = input(100, ...(ngDevMode ? [{ debugName: "max", alias: 'ngpSliderMax',
|
|
299
|
+
transform: numberAttribute }] : [{
|
|
300
|
+
alias: 'ngpSliderMax',
|
|
301
|
+
transform: numberAttribute,
|
|
302
|
+
}]));
|
|
272
303
|
/**
|
|
273
304
|
* The step value of the slider.
|
|
274
305
|
*/
|
|
275
|
-
this.step = input(1, {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
306
|
+
this.step = input(1, ...(ngDevMode ? [{ debugName: "step", alias: 'ngpSliderStep',
|
|
307
|
+
transform: numberAttribute }] : [{
|
|
308
|
+
alias: 'ngpSliderStep',
|
|
309
|
+
transform: numberAttribute,
|
|
310
|
+
}]));
|
|
279
311
|
/**
|
|
280
312
|
* The orientation of the slider.
|
|
281
313
|
*/
|
|
282
|
-
this.orientation = input('horizontal', {
|
|
283
|
-
|
|
284
|
-
|
|
314
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation", alias: 'ngpSliderOrientation' }] : [{
|
|
315
|
+
alias: 'ngpSliderOrientation',
|
|
316
|
+
}]));
|
|
285
317
|
/**
|
|
286
318
|
* The disabled state of the slider.
|
|
287
319
|
*/
|
|
288
|
-
this.disabled = input(false, {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* Access the slider track.
|
|
294
|
-
* @internal
|
|
295
|
-
*/
|
|
296
|
-
this.track = signal(undefined);
|
|
297
|
-
/**
|
|
298
|
-
* The value as a percentage based on the min and max values.
|
|
299
|
-
*/
|
|
300
|
-
this.percentage = computed(() => ((this.state.value() - this.state.min()) / (this.state.max() - this.state.min())) * 100);
|
|
320
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpSliderDisabled',
|
|
321
|
+
transform: booleanAttribute }] : [{
|
|
322
|
+
alias: 'ngpSliderDisabled',
|
|
323
|
+
transform: booleanAttribute,
|
|
324
|
+
}]));
|
|
301
325
|
/**
|
|
302
326
|
* The state of the slider. We use this for the slider state rather than relying on the inputs.
|
|
303
327
|
* @internal
|
|
304
328
|
*/
|
|
305
|
-
this.state =
|
|
306
|
-
|
|
329
|
+
this.state = ngpSlider({
|
|
330
|
+
id: this.id,
|
|
331
|
+
value: this.value,
|
|
332
|
+
min: this.min,
|
|
333
|
+
max: this.max,
|
|
334
|
+
step: this.step,
|
|
335
|
+
orientation: this.orientation,
|
|
336
|
+
disabled: this.disabled,
|
|
337
|
+
onValueChange: value => this.valueChange.emit(value),
|
|
338
|
+
});
|
|
307
339
|
}
|
|
308
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
309
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
340
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
341
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpSlider, isStandalone: true, selector: "[ngpSlider]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpSliderValue", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "ngpSliderMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpSliderMax", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "ngpSliderStep", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpSliderOrientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSliderDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpSliderValueChange" }, providers: [provideSliderState()], exportAs: ["ngpSlider"], ngImport: i0 }); }
|
|
310
342
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSlider, decorators: [{
|
|
312
344
|
type: Directive,
|
|
313
345
|
args: [{
|
|
314
346
|
selector: '[ngpSlider]',
|
|
315
347
|
exportAs: 'ngpSlider',
|
|
316
348
|
providers: [provideSliderState()],
|
|
317
|
-
host: {
|
|
318
|
-
'[id]': 'id()',
|
|
319
|
-
'[attr.data-orientation]': 'state.orientation()',
|
|
320
|
-
},
|
|
321
349
|
}]
|
|
322
|
-
}],
|
|
350
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderValue", required: false }] }], valueChange: [{ type: i0.Output, args: ["ngpSliderValueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderMin", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderMax", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderStep", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderOrientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSliderDisabled", required: false }] }] } });
|
|
323
351
|
|
|
324
352
|
/**
|
|
325
353
|
* The state token for the Range Slider primitive.
|
|
@@ -348,10 +376,10 @@ class NgpRangeSliderRange {
|
|
|
348
376
|
*/
|
|
349
377
|
this.rangeSliderState = injectRangeSliderState();
|
|
350
378
|
}
|
|
351
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
352
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
380
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpRangeSliderRange, isStandalone: true, selector: "[ngpRangeSliderRange]", host: { properties: { "attr.data-orientation": "rangeSliderState().orientation()", "attr.data-disabled": "rangeSliderState().disabled() ? \"\" : null", "style.width.%": "rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().rangePercentage() : undefined", "style.height.%": "rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().rangePercentage() : undefined", "style.inset-inline-start.%": "rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().lowPercentage() : undefined", "style.inset-block-start.%": "rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().lowPercentage() : undefined" } }, exportAs: ["ngpRangeSliderRange"], ngImport: i0 }); }
|
|
353
381
|
}
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderRange, decorators: [{
|
|
355
383
|
type: Directive,
|
|
356
384
|
args: [{
|
|
357
385
|
selector: '[ngpRangeSliderRange]',
|
|
@@ -384,7 +412,7 @@ class NgpRangeSliderThumb {
|
|
|
384
412
|
/**
|
|
385
413
|
* Determines which value this thumb controls ('low' or 'high').
|
|
386
414
|
*/
|
|
387
|
-
this.thumb = computed(() => this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high');
|
|
415
|
+
this.thumb = computed(() => this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high', ...(ngDevMode ? [{ debugName: "thumb" }] : []));
|
|
388
416
|
/**
|
|
389
417
|
* Store the dragging state.
|
|
390
418
|
*/
|
|
@@ -392,11 +420,11 @@ class NgpRangeSliderThumb {
|
|
|
392
420
|
/**
|
|
393
421
|
* Get the current value for this thumb.
|
|
394
422
|
*/
|
|
395
|
-
this.value = computed(() => this.thumb() === 'low' ? this.state().low() : this.state().high());
|
|
423
|
+
this.value = computed(() => this.thumb() === 'low' ? this.state().low() : this.state().high(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
396
424
|
/**
|
|
397
425
|
* Get the current percentage for this thumb.
|
|
398
426
|
*/
|
|
399
|
-
this.percentage = computed(() => this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage());
|
|
427
|
+
this.percentage = computed(() => this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage(), ...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
400
428
|
ngpInteractions({
|
|
401
429
|
hover: true,
|
|
402
430
|
focusVisible: true,
|
|
@@ -488,10 +516,10 @@ class NgpRangeSliderThumb {
|
|
|
488
516
|
}
|
|
489
517
|
event.preventDefault();
|
|
490
518
|
}
|
|
491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
492
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
520
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpRangeSliderThumb, isStandalone: true, selector: "[ngpRangeSliderThumb]", host: { attributes: { "role": "slider" }, listeners: { "pointerdown": "handlePointerDown($event)", "document:pointerup": "handlePointerUp()", "document:pointermove": "handlePointerMove($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.aria-valuemin": "state().min()", "attr.aria-valuemax": "state().max()", "attr.aria-valuenow": "value()", "attr.aria-orientation": "state().orientation()", "tabindex": "state().disabled() ? -1 : 0", "attr.data-orientation": "state().orientation()", "attr.data-disabled": "state().disabled() ? \"\" : null", "attr.data-thumb": "thumb()", "style.inset-inline-start.%": "state().orientation() === \"horizontal\" ? percentage() : undefined", "style.inset-block-start.%": "state().orientation() === \"vertical\" ? percentage() : undefined" } }, exportAs: ["ngpRangeSliderThumb"], ngImport: i0 }); }
|
|
493
521
|
}
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderThumb, decorators: [{
|
|
495
523
|
type: Directive,
|
|
496
524
|
args: [{
|
|
497
525
|
selector: '[ngpRangeSliderThumb]',
|
|
@@ -564,10 +592,10 @@ class NgpRangeSliderTrack {
|
|
|
564
592
|
this.rangeSliderState().setHighValue(value);
|
|
565
593
|
}
|
|
566
594
|
}
|
|
567
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
568
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
596
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpRangeSliderTrack, isStandalone: true, selector: "[ngpRangeSliderTrack]", host: { listeners: { "pointerdown": "handlePointerDown($event)" }, properties: { "attr.data-orientation": "rangeSliderState().orientation()", "attr.data-disabled": "rangeSliderState().disabled() ? \"\" : null" } }, exportAs: ["ngpRangeSliderTrack"], ngImport: i0 }); }
|
|
569
597
|
}
|
|
570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSliderTrack, decorators: [{
|
|
571
599
|
type: Directive,
|
|
572
600
|
args: [{
|
|
573
601
|
selector: '[ngpRangeSliderTrack]',
|
|
@@ -590,14 +618,15 @@ class NgpRangeSlider {
|
|
|
590
618
|
/**
|
|
591
619
|
* The id of the range slider. If not provided, a unique id will be generated.
|
|
592
620
|
*/
|
|
593
|
-
this.id = input(uniqueId('ngp-range-slider'));
|
|
621
|
+
this.id = input(uniqueId('ngp-range-slider'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
594
622
|
/**
|
|
595
623
|
* The low value of the range slider.
|
|
596
624
|
*/
|
|
597
|
-
this.low = input(0, {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
625
|
+
this.low = input(0, ...(ngDevMode ? [{ debugName: "low", alias: 'ngpRangeSliderLow',
|
|
626
|
+
transform: numberAttribute }] : [{
|
|
627
|
+
alias: 'ngpRangeSliderLow',
|
|
628
|
+
transform: numberAttribute,
|
|
629
|
+
}]));
|
|
601
630
|
/**
|
|
602
631
|
* Emits when the low value changes.
|
|
603
632
|
*/
|
|
@@ -607,10 +636,11 @@ class NgpRangeSlider {
|
|
|
607
636
|
/**
|
|
608
637
|
* The high value of the range slider.
|
|
609
638
|
*/
|
|
610
|
-
this.high = input(100, {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
639
|
+
this.high = input(100, ...(ngDevMode ? [{ debugName: "high", alias: 'ngpRangeSliderHigh',
|
|
640
|
+
transform: numberAttribute }] : [{
|
|
641
|
+
alias: 'ngpRangeSliderHigh',
|
|
642
|
+
transform: numberAttribute,
|
|
643
|
+
}]));
|
|
614
644
|
/**
|
|
615
645
|
* Emits when the high value changes.
|
|
616
646
|
*/
|
|
@@ -620,68 +650,72 @@ class NgpRangeSlider {
|
|
|
620
650
|
/**
|
|
621
651
|
* The minimum value of the range slider.
|
|
622
652
|
*/
|
|
623
|
-
this.min = input(0, {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
653
|
+
this.min = input(0, ...(ngDevMode ? [{ debugName: "min", alias: 'ngpRangeSliderMin',
|
|
654
|
+
transform: numberAttribute }] : [{
|
|
655
|
+
alias: 'ngpRangeSliderMin',
|
|
656
|
+
transform: numberAttribute,
|
|
657
|
+
}]));
|
|
627
658
|
/**
|
|
628
659
|
* The maximum value of the range slider.
|
|
629
660
|
*/
|
|
630
|
-
this.max = input(100, {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
661
|
+
this.max = input(100, ...(ngDevMode ? [{ debugName: "max", alias: 'ngpRangeSliderMax',
|
|
662
|
+
transform: numberAttribute }] : [{
|
|
663
|
+
alias: 'ngpRangeSliderMax',
|
|
664
|
+
transform: numberAttribute,
|
|
665
|
+
}]));
|
|
634
666
|
/**
|
|
635
667
|
* The step value of the range slider.
|
|
636
668
|
*/
|
|
637
|
-
this.step = input(1, {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
669
|
+
this.step = input(1, ...(ngDevMode ? [{ debugName: "step", alias: 'ngpRangeSliderStep',
|
|
670
|
+
transform: numberAttribute }] : [{
|
|
671
|
+
alias: 'ngpRangeSliderStep',
|
|
672
|
+
transform: numberAttribute,
|
|
673
|
+
}]));
|
|
641
674
|
/**
|
|
642
675
|
* The orientation of the range slider.
|
|
643
676
|
*/
|
|
644
|
-
this.orientation = input('horizontal', {
|
|
645
|
-
|
|
646
|
-
|
|
677
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation", alias: 'ngpRangeSliderOrientation' }] : [{
|
|
678
|
+
alias: 'ngpRangeSliderOrientation',
|
|
679
|
+
}]));
|
|
647
680
|
/**
|
|
648
681
|
* The disabled state of the range slider.
|
|
649
682
|
*/
|
|
650
|
-
this.disabled = input(false, {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
683
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpRangeSliderDisabled',
|
|
684
|
+
transform: booleanAttribute }] : [{
|
|
685
|
+
alias: 'ngpRangeSliderDisabled',
|
|
686
|
+
transform: booleanAttribute,
|
|
687
|
+
}]));
|
|
654
688
|
/**
|
|
655
689
|
* Access the slider track.
|
|
656
690
|
* @internal
|
|
657
691
|
*/
|
|
658
|
-
this.track = signal(undefined);
|
|
692
|
+
this.track = signal(undefined, ...(ngDevMode ? [{ debugName: "track" }] : []));
|
|
659
693
|
/**
|
|
660
694
|
* The thumbs of the range slider.
|
|
661
695
|
* @internal
|
|
662
696
|
*/
|
|
663
|
-
this.thumbs = signal([]);
|
|
697
|
+
this.thumbs = signal([], ...(ngDevMode ? [{ debugName: "thumbs" }] : []));
|
|
664
698
|
/**
|
|
665
699
|
* The low value as a percentage based on the min and max values.
|
|
666
700
|
* @internal
|
|
667
701
|
*/
|
|
668
|
-
this.lowPercentage = computed(() => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100);
|
|
702
|
+
this.lowPercentage = computed(() => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100, ...(ngDevMode ? [{ debugName: "lowPercentage" }] : []));
|
|
669
703
|
/**
|
|
670
704
|
* The high value as a percentage based on the min and max values.
|
|
671
705
|
* @internal
|
|
672
706
|
*/
|
|
673
|
-
this.highPercentage = computed(() => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100);
|
|
707
|
+
this.highPercentage = computed(() => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100, ...(ngDevMode ? [{ debugName: "highPercentage" }] : []));
|
|
674
708
|
/**
|
|
675
709
|
* The range between low and high values as a percentage.
|
|
676
710
|
* @internal
|
|
677
711
|
*/
|
|
678
|
-
this.rangePercentage = computed(() => this.highPercentage() - this.lowPercentage());
|
|
712
|
+
this.rangePercentage = computed(() => this.highPercentage() - this.lowPercentage(), ...(ngDevMode ? [{ debugName: "rangePercentage" }] : []));
|
|
679
713
|
/**
|
|
680
714
|
* The state of the range slider. We use this for the range slider state rather than relying on the inputs.
|
|
681
715
|
* @internal
|
|
682
716
|
*/
|
|
683
717
|
this.state = rangeSliderState(this);
|
|
684
|
-
|
|
718
|
+
ngpFormControl({ id: this.state.id, disabled: this.state.disabled });
|
|
685
719
|
}
|
|
686
720
|
/**
|
|
687
721
|
* Updates the low value, ensuring it doesn't exceed the high value.
|
|
@@ -732,10 +766,10 @@ class NgpRangeSlider {
|
|
|
732
766
|
removeThumb(thumb) {
|
|
733
767
|
this.thumbs.update(thumbs => thumbs.filter(t => t !== thumb));
|
|
734
768
|
}
|
|
735
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
736
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
769
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
770
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpRangeSlider, isStandalone: true, selector: "[ngpRangeSlider]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, low: { classPropertyName: "low", publicName: "ngpRangeSliderLow", isSignal: true, isRequired: false, transformFunction: null }, high: { classPropertyName: "high", publicName: "ngpRangeSliderHigh", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "ngpRangeSliderMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpRangeSliderMax", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "ngpRangeSliderStep", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpRangeSliderOrientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRangeSliderDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lowChange: "ngpRangeSliderLowChange", highChange: "ngpRangeSliderHighChange" }, host: { properties: { "id": "id()", "attr.data-orientation": "state.orientation()" } }, providers: [provideRangeSliderState()], exportAs: ["ngpRangeSlider"], ngImport: i0 }); }
|
|
737
771
|
}
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpRangeSlider, decorators: [{
|
|
739
773
|
type: Directive,
|
|
740
774
|
args: [{
|
|
741
775
|
selector: '[ngpRangeSlider]',
|
|
@@ -746,11 +780,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
746
780
|
'[attr.data-orientation]': 'state.orientation()',
|
|
747
781
|
},
|
|
748
782
|
}]
|
|
749
|
-
}], ctorParameters: () => [] });
|
|
783
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], low: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderLow", required: false }] }], lowChange: [{ type: i0.Output, args: ["ngpRangeSliderLowChange"] }], high: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderHigh", required: false }] }], highChange: [{ type: i0.Output, args: ["ngpRangeSliderHighChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderMin", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderMax", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderStep", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderOrientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpRangeSliderDisabled", required: false }] }] } });
|
|
750
784
|
|
|
751
785
|
/**
|
|
752
786
|
* Generated bundle index. Do not edit.
|
|
753
787
|
*/
|
|
754
788
|
|
|
755
|
-
export { NgpRangeSlider, NgpRangeSliderRange, NgpRangeSliderThumb, NgpRangeSliderTrack, NgpSlider, NgpSliderRange, NgpSliderThumb, NgpSliderTrack, injectRangeSliderState, injectSliderState, provideRangeSliderState, provideSliderState };
|
|
789
|
+
export { NgpRangeSlider, NgpRangeSliderRange, NgpRangeSliderThumb, NgpRangeSliderTrack, NgpSlider, NgpSliderRange, NgpSliderThumb, NgpSliderTrack, injectRangeSliderState, injectSliderRangeState, injectSliderState, injectSliderThumbState, injectSliderTrackState, ngpSlider, ngpSliderRange, ngpSliderThumb, ngpSliderTrack, provideRangeSliderState, provideSliderRangeState, provideSliderState, provideSliderThumbState, provideSliderTrackState };
|
|
756
790
|
//# sourceMappingURL=ng-primitives-slider.mjs.map
|