@ngstarter-ui/components 1.0.21
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/README.md +0 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs +42 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-alert.mjs +132 -0
- package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-announcement.mjs +86 -0
- package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +360 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-avatar.mjs +235 -0
- package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-badge.mjs +97 -0
- package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-block-loader.mjs +48 -0
- package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +327 -0
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +209 -0
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs +175 -0
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-button.mjs +70 -0
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs +49 -0
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-card.mjs +199 -0
- package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-carousel.mjs +614 -0
- package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-checkbox.mjs +300 -0
- package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-chips.mjs +589 -0
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +347 -0
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +713 -0
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs +106 -0
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs +72 -0
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-command-bar.mjs +57 -0
- package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +1024 -0
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +177 -0
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-confirm.mjs +85 -0
- package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs +173 -0
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs +124 -0
- package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +99 -0
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs +33 -0
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs +114 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs +146 -0
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs +215 -0
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs +2548 -0
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs +110 -0
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs +141 -0
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs +1604 -0
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs +175 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +2 -0
- package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-fade.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-content-fade.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +107 -0
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-core.mjs +1330 -0
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-country-select.mjs +489 -0
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-crop.mjs +183 -0
- package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +397 -0
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1494 -0
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +154 -0
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +1159 -0
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-dialog.mjs +357 -0
- package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-divider.mjs +42 -0
- package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-drawer.mjs +132 -0
- package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +245 -0
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-empty-state.mjs +75 -0
- package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-expand.mjs +56 -0
- package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-expansion.mjs +193 -0
- package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +333 -0
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-field.mjs +230 -0
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs +124 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs +44 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs +17 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs +17 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs +38 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs +39 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs +24 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs +37 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer.mjs +317 -0
- package/fesm2022/ngstarter-ui-components-form-renderer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-gauge.mjs +44 -0
- package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-grid.mjs +78 -0
- package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs +736 -0
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +192 -0
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-icon.mjs +61 -0
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +4016 -0
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +20 -0
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs +151 -0
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs +349 -0
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +162 -0
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-incidents.mjs +257 -0
- package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +179 -0
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input-mask.mjs +180 -0
- package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input-validator.mjs +24 -0
- package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input.mjs +152 -0
- package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +156 -0
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-kbd.mjs +31 -0
- package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-layout.mjs +199 -0
- package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-list.mjs +279 -0
- package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-logo.mjs +51 -0
- package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-marquee.mjs +76 -0
- package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-menu.mjs +851 -0
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs +928 -0
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-navigation.mjs +439 -0
- package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-notifications.mjs +181 -0
- package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-number-input.mjs +293 -0
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-option.mjs +157 -0
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-overlay.mjs +112 -0
- package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +77 -0
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-paginator.mjs +297 -0
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-panel.mjs +123 -0
- package/fesm2022/ngstarter-ui-components-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +335 -0
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +651 -0
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +193 -0
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-popover.mjs +302 -0
- package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs +68 -0
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-radio-card.mjs +102 -0
- package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-radio.mjs +147 -0
- package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs +87 -0
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs +74 -0
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs +95 -0
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +219 -0
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +459 -0
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-segmented.mjs +218 -0
- package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-select.mjs +496 -0
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-side-panel.mjs +107 -0
- package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +435 -0
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sidenav.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +452 -0
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-skeleton.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +93 -0
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-slider.mjs +481 -0
- package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sort.mjs +140 -0
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-spinner.mjs +75 -0
- package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs +93 -0
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-split.mjs +948 -0
- package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-stepper.mjs +103 -0
- package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-suggestions.mjs +72 -0
- package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs +265 -0
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-table.mjs +648 -0
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tabs.mjs +591 -0
- package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-text-editor.mjs +1012 -0
- package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +212 -0
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tiles.mjs +634 -0
- package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timeline.mjs +122 -0
- package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +486 -0
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +371 -0
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-toolbar.mjs +299 -0
- package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tooltip.mjs +506 -0
- package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tree.mjs +200 -0
- package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-upload.mjs +330 -0
- package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-video-player.mjs +516 -0
- package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs +218 -0
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs +18 -0
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components.mjs +6 -0
- package/fesm2022/ngstarter-ui-components.mjs.map +1 -0
- package/package.json +535 -0
- package/styles/_common.scss +456 -0
- package/styles/_global.scss +91 -0
- package/styles/themes/default.scss +2 -0
- package/types/ngstarter-ui-components-action-required.d.ts +14 -0
- package/types/ngstarter-ui-components-alert.d.ts +50 -0
- package/types/ngstarter-ui-components-announcement.d.ts +59 -0
- package/types/ngstarter-ui-components-autocomplete.d.ts +83 -0
- package/types/ngstarter-ui-components-avatar.d.ts +69 -0
- package/types/ngstarter-ui-components-badge.d.ts +38 -0
- package/types/ngstarter-ui-components-block-loader.d.ts +21 -0
- package/types/ngstarter-ui-components-bottom-sheet.d.ts +149 -0
- package/types/ngstarter-ui-components-breadcrumbs.d.ts +104 -0
- package/types/ngstarter-ui-components-button-toggle.d.ts +54 -0
- package/types/ngstarter-ui-components-button.d.ts +27 -0
- package/types/ngstarter-ui-components-card-overlay.d.ts +20 -0
- package/types/ngstarter-ui-components-card.d.ts +85 -0
- package/types/ngstarter-ui-components-carousel.d.ts +76 -0
- package/types/ngstarter-ui-components-checkbox.d.ts +94 -0
- package/types/ngstarter-ui-components-chips.d.ts +189 -0
- package/types/ngstarter-ui-components-code-highlighter.d.ts +28 -0
- package/types/ngstarter-ui-components-color-picker.d.ts +92 -0
- package/types/ngstarter-ui-components-color-scheme.d.ts +44 -0
- package/types/ngstarter-ui-components-color-switcher.d.ts +26 -0
- package/types/ngstarter-ui-components-command-bar.d.ts +28 -0
- package/types/ngstarter-ui-components-comment-editor.d.ts +194 -0
- package/types/ngstarter-ui-components-comparison-slider.d.ts +42 -0
- package/types/ngstarter-ui-components-confirm.d.ts +34 -0
- package/types/ngstarter-ui-components-content-editor.d.ts +321 -0
- package/types/ngstarter-ui-components-content-fade.d.ts +17 -0
- package/types/ngstarter-ui-components-cookie-popup.d.ts +41 -0
- package/types/ngstarter-ui-components-core.d.ts +421 -0
- package/types/ngstarter-ui-components-country-select.d.ts +78 -0
- package/types/ngstarter-ui-components-crop.d.ts +59 -0
- package/types/ngstarter-ui-components-currency-select.d.ts +82 -0
- package/types/ngstarter-ui-components-data-view.d.ts +391 -0
- package/types/ngstarter-ui-components-date-format-select.d.ts +59 -0
- package/types/ngstarter-ui-components-datepicker.d.ts +384 -0
- package/types/ngstarter-ui-components-dialog.d.ts +115 -0
- package/types/ngstarter-ui-components-divider.d.ts +18 -0
- package/types/ngstarter-ui-components-drawer.d.ts +32 -0
- package/types/ngstarter-ui-components-emoji-picker.d.ts +49 -0
- package/types/ngstarter-ui-components-empty-state.d.ts +33 -0
- package/types/ngstarter-ui-components-expand.d.ts +26 -0
- package/types/ngstarter-ui-components-expansion.d.ts +68 -0
- package/types/ngstarter-ui-components-filter-builder.d.ts +106 -0
- package/types/ngstarter-ui-components-form-field.d.ts +107 -0
- package/types/ngstarter-ui-components-form-renderer.d.ts +121 -0
- package/types/ngstarter-ui-components-gauge.d.ts +21 -0
- package/types/ngstarter-ui-components-grid.d.ts +45 -0
- package/types/ngstarter-ui-components-guided-tour.d.ts +227 -0
- package/types/ngstarter-ui-components-headless-stepper.d.ts +65 -0
- package/types/ngstarter-ui-components-icon.d.ts +17 -0
- package/types/ngstarter-ui-components-image-designer.d.ts +357 -0
- package/types/ngstarter-ui-components-image-placeholder.d.ts +8 -0
- package/types/ngstarter-ui-components-image-resizer.d.ts +35 -0
- package/types/ngstarter-ui-components-image-viewer.d.ts +63 -0
- package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +34 -0
- package/types/ngstarter-ui-components-incidents.d.ts +119 -0
- package/types/ngstarter-ui-components-inline-text-edit.d.ts +39 -0
- package/types/ngstarter-ui-components-input-mask.d.ts +36 -0
- package/types/ngstarter-ui-components-input-validator.d.ts +5 -0
- package/types/ngstarter-ui-components-input.d.ts +53 -0
- package/types/ngstarter-ui-components-kanban-board.d.ts +68 -0
- package/types/ngstarter-ui-components-kbd.d.ts +13 -0
- package/types/ngstarter-ui-components-layout.d.ts +83 -0
- package/types/ngstarter-ui-components-list.d.ts +98 -0
- package/types/ngstarter-ui-components-logo.d.ts +26 -0
- package/types/ngstarter-ui-components-marquee.d.ts +27 -0
- package/types/ngstarter-ui-components-menu.d.ts +199 -0
- package/types/ngstarter-ui-components-micro-chart.d.ts +195 -0
- package/types/ngstarter-ui-components-navigation.d.ts +136 -0
- package/types/ngstarter-ui-components-notifications.d.ts +84 -0
- package/types/ngstarter-ui-components-number-input.d.ts +99 -0
- package/types/ngstarter-ui-components-option.d.ts +61 -0
- package/types/ngstarter-ui-components-overlay.d.ts +12 -0
- package/types/ngstarter-ui-components-page-loading-bar.d.ts +20 -0
- package/types/ngstarter-ui-components-paginator.d.ts +145 -0
- package/types/ngstarter-ui-components-panel.d.ts +59 -0
- package/types/ngstarter-ui-components-password-strength.d.ts +109 -0
- package/types/ngstarter-ui-components-phone-input.d.ts +103 -0
- package/types/ngstarter-ui-components-pin-input.d.ts +48 -0
- package/types/ngstarter-ui-components-popover.d.ts +94 -0
- package/types/ngstarter-ui-components-progress-bar.d.ts +30 -0
- package/types/ngstarter-ui-components-radio-card.d.ts +37 -0
- package/types/ngstarter-ui-components-radio.d.ts +45 -0
- package/types/ngstarter-ui-components-rail-nav.d.ts +36 -0
- package/types/ngstarter-ui-components-resizable-container.d.ts +25 -0
- package/types/ngstarter-ui-components-screen-loader.d.ts +34 -0
- package/types/ngstarter-ui-components-scroll-spy.d.ts +63 -0
- package/types/ngstarter-ui-components-scrollbar-area.d.ts +67 -0
- package/types/ngstarter-ui-components-segmented.d.ts +65 -0
- package/types/ngstarter-ui-components-select.d.ts +126 -0
- package/types/ngstarter-ui-components-side-panel.d.ts +42 -0
- package/types/ngstarter-ui-components-sidebar.d.ts +143 -0
- package/types/ngstarter-ui-components-sidenav.d.ts +86 -0
- package/types/ngstarter-ui-components-signature-pad.d.ts +49 -0
- package/types/ngstarter-ui-components-skeleton.d.ts +9 -0
- package/types/ngstarter-ui-components-slide-toggle.d.ts +41 -0
- package/types/ngstarter-ui-components-slider.d.ts +85 -0
- package/types/ngstarter-ui-components-snack-bar.d.ts +142 -0
- package/types/ngstarter-ui-components-sort.d.ts +66 -0
- package/types/ngstarter-ui-components-spinner.d.ts +28 -0
- package/types/ngstarter-ui-components-splash-screen.d.ts +31 -0
- package/types/ngstarter-ui-components-split.d.ts +210 -0
- package/types/ngstarter-ui-components-stepper.d.ts +44 -0
- package/types/ngstarter-ui-components-suggestions.d.ts +32 -0
- package/types/ngstarter-ui-components-tab-panel.d.ts +96 -0
- package/types/ngstarter-ui-components-table.d.ts +277 -0
- package/types/ngstarter-ui-components-tabs.d.ts +145 -0
- package/types/ngstarter-ui-components-text-editor.d.ts +191 -0
- package/types/ngstarter-ui-components-thumbnail-maker.d.ts +35 -0
- package/types/ngstarter-ui-components-tiles.d.ts +109 -0
- package/types/ngstarter-ui-components-timeline.d.ts +57 -0
- package/types/ngstarter-ui-components-timepicker.d.ts +115 -0
- package/types/ngstarter-ui-components-timezone-select.d.ts +75 -0
- package/types/ngstarter-ui-components-toolbar.d.ts +74 -0
- package/types/ngstarter-ui-components-tooltip.d.ts +52 -0
- package/types/ngstarter-ui-components-tree.d.ts +60 -0
- package/types/ngstarter-ui-components-upload.d.ts +134 -0
- package/types/ngstarter-ui-components-video-player.d.ts +67 -0
- package/types/ngstarter-ui-components-video-viewer.d.ts +98 -0
- package/types/ngstarter-ui-components-visual-builder.d.ts +8 -0
- package/types/ngstarter-ui-components.d.ts +2 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, model, numberAttribute, output, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
class SlideToggleChange {
|
|
6
|
+
source;
|
|
7
|
+
checked;
|
|
8
|
+
constructor(source, checked) {
|
|
9
|
+
this.source = source;
|
|
10
|
+
this.checked = checked;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
let nextId = 0;
|
|
14
|
+
class SlideToggle {
|
|
15
|
+
_uniqueId = `ngs-slide-toggle-${nextId++}`;
|
|
16
|
+
id = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
17
|
+
name = input(null, ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
18
|
+
labelPosition = input('after', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
19
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
20
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
21
|
+
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
22
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
23
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
24
|
+
disableRipple = input(false, { ...(ngDevMode ? { debugName: "disableRipple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
25
|
+
tabIndex = input(0, { ...(ngDevMode ? { debugName: "tabIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
26
|
+
hideIcon = input(false, { ...(ngDevMode ? { debugName: "hideIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
27
|
+
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
28
|
+
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
29
|
+
change = output();
|
|
30
|
+
toggleChange = output();
|
|
31
|
+
_onChange = (_) => { };
|
|
32
|
+
_onTouched = () => { };
|
|
33
|
+
constructor() { }
|
|
34
|
+
writeValue(value) {
|
|
35
|
+
this.checked.set(!!value);
|
|
36
|
+
}
|
|
37
|
+
registerOnChange(fn) {
|
|
38
|
+
this._onChange = fn;
|
|
39
|
+
}
|
|
40
|
+
registerOnTouched(fn) {
|
|
41
|
+
this._onTouched = fn;
|
|
42
|
+
}
|
|
43
|
+
setDisabledState(isDisabled) {
|
|
44
|
+
this.disabled.set(isDisabled);
|
|
45
|
+
}
|
|
46
|
+
toggle() {
|
|
47
|
+
this.checked.update(checked => !checked);
|
|
48
|
+
this._onChange(this.checked());
|
|
49
|
+
this._emitChangeEvent();
|
|
50
|
+
}
|
|
51
|
+
_onInputClick(event) {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
this.toggle();
|
|
54
|
+
this.toggleChange.emit();
|
|
55
|
+
}
|
|
56
|
+
_emitChangeEvent() {
|
|
57
|
+
this.change.emit(new SlideToggleChange(this, this.checked()));
|
|
58
|
+
}
|
|
59
|
+
_onInputBlur() {
|
|
60
|
+
this._onTouched();
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SlideToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: SlideToggle, isStandalone: true, selector: "ngs-slide-toggle", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", checked: "checkedChange", change: "change", toggleChange: "toggleChange" }, host: { properties: { "class.ngs-slide-toggle-checked": "checked()", "class.ngs-slide-toggle-disabled": "disabled()", "class.ngs-slide-toggle-label-before": "labelPosition() === \"before\"", "attr.id": "id()" }, classAttribute: "ngs-slide-toggle" }, providers: [
|
|
64
|
+
{
|
|
65
|
+
provide: NG_VALUE_ACCESSOR,
|
|
66
|
+
useExisting: forwardRef(() => SlideToggle),
|
|
67
|
+
multi: true
|
|
68
|
+
}
|
|
69
|
+
], exportAs: ["ngsSlideToggle"], ngImport: i0, template: "<label class=\"ngs-slide-toggle-label\" [attr.for]=\"id() + '-input'\">\n <div class=\"ngs-slide-toggle-bar\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"ngs-slide-toggle-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name()\"\n [tabIndex]=\"tabIndex()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n (change)=\"_onInputClick($event)\"\n (blur)=\"_onInputBlur()\">\n <div class=\"ngs-slide-toggle-thumb-container\">\n <div class=\"ngs-slide-toggle-thumb\"></div>\n </div>\n </div>\n <span class=\"ngs-slide-toggle-content\" [id]=\"id() + '-content'\">\n <ng-content/>\n </span>\n</label>\n", styles: [":host{--ngs-slide-toggle-width: 44px;--ngs-slide-toggle-height: 24px;--ngs-slide-toggle-thumb-size: 20px;--ngs-slide-toggle-bar-color: var(--color-surface-container-highest);--ngs-slide-toggle-bar-checked-color: var(--color-primary);--ngs-slide-toggle-thumb-color: var(--color-surface);--ngs-slide-toggle-thumb-checked-color: var(--color-on-primary);--ngs-slide-toggle-transition-duration: .2s;display:inline-block;cursor:pointer;outline:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host.ngs-slide-toggle-disabled{cursor:default;opacity:.5;pointer-events:none}:host.ngs-slide-toggle-label-before .ngs-slide-toggle-label{flex-direction:row-reverse}:host.ngs-slide-toggle-label-before .ngs-slide-toggle-content{margin-left:0;margin-right:8px}:host .ngs-slide-toggle-label{display:flex;align-items:center;cursor:inherit}:host .ngs-slide-toggle-bar{position:relative;width:var(--ngs-slide-toggle-width);height:var(--ngs-slide-toggle-height);background:var(--ngs-slide-toggle-bar-color);border-radius:calc(var(--ngs-slide-toggle-height) / 2);transition:background-color var(--ngs-slide-toggle-transition-duration) ease;flex-shrink:0}:host.ngs-slide-toggle-checked .ngs-slide-toggle-bar{background:var(--ngs-slide-toggle-bar-checked-color)}:host .ngs-slide-toggle-input{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit;z-index:1}:host .ngs-slide-toggle-thumb-container{position:absolute;top:50%;left:2px;transform:translateY(-50%);width:var(--ngs-slide-toggle-thumb-size);height:var(--ngs-slide-toggle-thumb-size);transition:left var(--ngs-slide-toggle-transition-duration) ease}:host.ngs-slide-toggle-checked .ngs-slide-toggle-thumb-container{left:calc(100% - var(--ngs-slide-toggle-thumb-size) - 2px)}:host .ngs-slide-toggle-thumb{width:100%;height:100%;background:var(--ngs-slide-toggle-thumb-color);border-radius:50%;box-shadow:0 2px 4px #0003}:host.ngs-slide-toggle-checked .ngs-slide-toggle-thumb{background:var(--ngs-slide-toggle-thumb-checked-color)}:host .ngs-slide-toggle-content{margin-left:8px;display:inline-block}:host .ngs-slide-toggle-content:empty{display:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SlideToggle, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ selector: 'ngs-slide-toggle', exportAs: 'ngsSlideToggle', standalone: true, imports: [], host: {
|
|
74
|
+
'class': 'ngs-slide-toggle',
|
|
75
|
+
'[class.ngs-slide-toggle-checked]': 'checked()',
|
|
76
|
+
'[class.ngs-slide-toggle-disabled]': 'disabled()',
|
|
77
|
+
'[class.ngs-slide-toggle-label-before]': 'labelPosition() === "before"',
|
|
78
|
+
'[attr.id]': 'id()',
|
|
79
|
+
}, providers: [
|
|
80
|
+
{
|
|
81
|
+
provide: NG_VALUE_ACCESSOR,
|
|
82
|
+
useExisting: forwardRef(() => SlideToggle),
|
|
83
|
+
multi: true
|
|
84
|
+
}
|
|
85
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"ngs-slide-toggle-label\" [attr.for]=\"id() + '-input'\">\n <div class=\"ngs-slide-toggle-bar\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"ngs-slide-toggle-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name()\"\n [tabIndex]=\"tabIndex()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n (change)=\"_onInputClick($event)\"\n (blur)=\"_onInputBlur()\">\n <div class=\"ngs-slide-toggle-thumb-container\">\n <div class=\"ngs-slide-toggle-thumb\"></div>\n </div>\n </div>\n <span class=\"ngs-slide-toggle-content\" [id]=\"id() + '-content'\">\n <ng-content/>\n </span>\n</label>\n", styles: [":host{--ngs-slide-toggle-width: 44px;--ngs-slide-toggle-height: 24px;--ngs-slide-toggle-thumb-size: 20px;--ngs-slide-toggle-bar-color: var(--color-surface-container-highest);--ngs-slide-toggle-bar-checked-color: var(--color-primary);--ngs-slide-toggle-thumb-color: var(--color-surface);--ngs-slide-toggle-thumb-checked-color: var(--color-on-primary);--ngs-slide-toggle-transition-duration: .2s;display:inline-block;cursor:pointer;outline:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host.ngs-slide-toggle-disabled{cursor:default;opacity:.5;pointer-events:none}:host.ngs-slide-toggle-label-before .ngs-slide-toggle-label{flex-direction:row-reverse}:host.ngs-slide-toggle-label-before .ngs-slide-toggle-content{margin-left:0;margin-right:8px}:host .ngs-slide-toggle-label{display:flex;align-items:center;cursor:inherit}:host .ngs-slide-toggle-bar{position:relative;width:var(--ngs-slide-toggle-width);height:var(--ngs-slide-toggle-height);background:var(--ngs-slide-toggle-bar-color);border-radius:calc(var(--ngs-slide-toggle-height) / 2);transition:background-color var(--ngs-slide-toggle-transition-duration) ease;flex-shrink:0}:host.ngs-slide-toggle-checked .ngs-slide-toggle-bar{background:var(--ngs-slide-toggle-bar-checked-color)}:host .ngs-slide-toggle-input{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit;z-index:1}:host .ngs-slide-toggle-thumb-container{position:absolute;top:50%;left:2px;transform:translateY(-50%);width:var(--ngs-slide-toggle-thumb-size);height:var(--ngs-slide-toggle-thumb-size);transition:left var(--ngs-slide-toggle-transition-duration) ease}:host.ngs-slide-toggle-checked .ngs-slide-toggle-thumb-container{left:calc(100% - var(--ngs-slide-toggle-thumb-size) - 2px)}:host .ngs-slide-toggle-thumb{width:100%;height:100%;background:var(--ngs-slide-toggle-thumb-color);border-radius:50%;box-shadow:0 2px 4px #0003}:host.ngs-slide-toggle-checked .ngs-slide-toggle-thumb{background:var(--ngs-slide-toggle-thumb-checked-color)}:host .ngs-slide-toggle-content{margin-left:8px;display:inline-block}:host .ngs-slide-toggle-content:empty{display:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
86
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], hideIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideIcon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], change: [{ type: i0.Output, args: ["change"] }], toggleChange: [{ type: i0.Output, args: ["toggleChange"] }] } });
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generated bundle index. Do not edit.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
export { SlideToggle, SlideToggleChange };
|
|
93
|
+
//# sourceMappingURL=ngstarter-ui-components-slide-toggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-slide-toggle.mjs","sources":["../../../projects/components/slide-toggle/src/slide-toggle/slide-toggle.ts","../../../projects/components/slide-toggle/src/slide-toggle/slide-toggle.html","../../../projects/components/slide-toggle/ngstarter-ui-components-slide-toggle.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n input,\n model,\n numberAttribute,\n output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport class SlideToggleChange {\n constructor(\n public source: SlideToggle,\n public checked: boolean\n ) {\n }\n}\n\nlet nextId = 0;\n\n@Component({\n selector: 'ngs-slide-toggle',\n exportAs: 'ngsSlideToggle',\n standalone: true,\n imports: [],\n templateUrl: './slide-toggle.html',\n styleUrl: './slide-toggle.scss',\n host: {\n 'class': 'ngs-slide-toggle',\n '[class.ngs-slide-toggle-checked]': 'checked()',\n '[class.ngs-slide-toggle-disabled]': 'disabled()',\n '[class.ngs-slide-toggle-label-before]': 'labelPosition() === \"before\"',\n '[attr.id]': 'id()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SlideToggle),\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SlideToggle implements ControlValueAccessor {\n private _uniqueId = `ngs-slide-toggle-${nextId++}`;\n\n id = input<string>(this._uniqueId);\n name = input<string | null>(null);\n labelPosition = input<'before' | 'after'>('after');\n ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n required = input(false, { transform: booleanAttribute });\n disabled = model(false);\n disableRipple = input(false, { transform: booleanAttribute });\n tabIndex = input(0, { transform: numberAttribute });\n hideIcon = input(false, { transform: booleanAttribute });\n color = input<string | undefined>();\n\n checked = model(false);\n\n change = output<SlideToggleChange>();\n toggleChange = output<void>();\n\n private _onChange = (_: any) => {};\n private _onTouched = () => {};\n\n constructor() {}\n\n writeValue(value: any): void {\n this.checked.set(!!value);\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n toggle(): void {\n this.checked.update(checked => !checked);\n this._onChange(this.checked());\n this._emitChangeEvent();\n }\n\n _onInputClick(event: Event): void {\n event.stopPropagation();\n this.toggle();\n this.toggleChange.emit();\n }\n\n private _emitChangeEvent(): void {\n this.change.emit(new SlideToggleChange(this, this.checked()));\n }\n\n _onInputBlur(): void {\n this._onTouched();\n }\n}\n","<label class=\"ngs-slide-toggle-label\" [attr.for]=\"id() + '-input'\">\n <div class=\"ngs-slide-toggle-bar\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"ngs-slide-toggle-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name()\"\n [tabIndex]=\"tabIndex()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n (change)=\"_onInputClick($event)\"\n (blur)=\"_onInputBlur()\">\n <div class=\"ngs-slide-toggle-thumb-container\">\n <div class=\"ngs-slide-toggle-thumb\"></div>\n </div>\n </div>\n <span class=\"ngs-slide-toggle-content\" [id]=\"id() + '-content'\">\n <ng-content/>\n </span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAYa,iBAAiB,CAAA;AAEnB,IAAA,MAAA;AACA,IAAA,OAAA;IAFT,WAAA,CACS,MAAmB,EACnB,OAAgB,EAAA;QADhB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,OAAO,GAAP,OAAO;IAEhB;AACD;AAED,IAAI,MAAM,GAAG,CAAC;MAyBD,WAAW,CAAA;AACd,IAAA,SAAS,GAAG,CAAA,iBAAA,EAAoB,MAAM,EAAE,EAAE;AAElD,IAAA,EAAE,GAAG,KAAK,CAAS,IAAI,CAAC,SAAS,yEAAC;AAClC,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;AACjC,IAAA,aAAa,GAAG,KAAK,CAAqB,OAAO,oFAAC;IAClD,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC/D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;IACzE,eAAe,GAAG,KAAK,CAAgB,IAAI,uFAAI,KAAK,EAAE,kBAAkB,EAAA,CAAG;IAC3E,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACxD,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,+EAAC;IACvB,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC7D,QAAQ,GAAG,KAAK,CAAC,CAAC,gFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IACnD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAsB;AAEnC,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,8EAAC;IAEtB,MAAM,GAAG,MAAM,EAAqB;IACpC,YAAY,GAAG,MAAM,EAAQ;AAErB,IAAA,SAAS,GAAG,CAAC,CAAM,KAAI,EAAE,CAAC;AAC1B,IAAA,UAAU,GAAG,MAAK,EAAE,CAAC;AAE7B,IAAA,WAAA,GAAA,EAAe;AAEf,IAAA,UAAU,CAAC,KAAU,EAAA;QACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3B;AAEA,IAAA,gBAAgB,CAAC,EAAO,EAAA;AACtB,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,iBAAiB,CAAC,EAAO,EAAA;AACvB,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;IACtB;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC;IAC/B;IAEA,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,gBAAgB,EAAE;IACzB;AAEA,IAAA,aAAa,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,eAAe,EAAE;QACvB,IAAI,CAAC,MAAM,EAAE;AACb,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;IAEQ,gBAAgB,GAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D;IAEA,YAAY,GAAA;QACV,IAAI,CAAC,UAAU,EAAE;IACnB;uGA5DW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,OAAA,EAAA,eAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gCAAA,EAAA,WAAA,EAAA,iCAAA,EAAA,YAAA,EAAA,qCAAA,EAAA,gCAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,EAAA,SAAA,EATX;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,gBAAA,KAAK,EAAE;AACR;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1CH,+1BAyBA,EAAA,MAAA,EAAA,CAAA,irEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDoBa,WAAW,EAAA,UAAA,EAAA,CAAA;kBAvBvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,YAClB,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,IAAA,EAGL;AACJ,wBAAA,OAAO,EAAE,kBAAkB;AAC3B,wBAAA,kCAAkC,EAAE,WAAW;AAC/C,wBAAA,mCAAmC,EAAE,YAAY;AACjD,wBAAA,uCAAuC,EAAE,8BAA8B;AACvE,wBAAA,WAAW,EAAE,MAAM;qBACpB,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC;AAC1C,4BAAA,KAAK,EAAE;AACR;qBACF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+1BAAA,EAAA,MAAA,EAAA,CAAA,irEAAA,CAAA,EAAA;;;AE3CjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, output, input, numberAttribute, signal, effect, forwardRef, Directive, ChangeDetectorRef, DestroyRef, PLATFORM_ID, booleanAttribute, contentChildren, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
+
import { merge, fromEvent, filter, tap, switchMap, takeUntil } from 'rxjs';
|
|
8
|
+
|
|
9
|
+
class SliderThumb {
|
|
10
|
+
_elementRef = inject((ElementRef));
|
|
11
|
+
_slider = inject(Slider);
|
|
12
|
+
valueChange = output();
|
|
13
|
+
valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), transform: numberAttribute, alias: 'value' });
|
|
14
|
+
_value = signal(0, ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
15
|
+
getId() {
|
|
16
|
+
return 'base';
|
|
17
|
+
}
|
|
18
|
+
get value() {
|
|
19
|
+
return this._value();
|
|
20
|
+
}
|
|
21
|
+
set value(v) {
|
|
22
|
+
this._value.set(this._clampValue(v));
|
|
23
|
+
this._updateHostValue();
|
|
24
|
+
this._slider._onValueChange(this);
|
|
25
|
+
}
|
|
26
|
+
_clampValue(v) {
|
|
27
|
+
const thumbs = this._slider._allThumbs();
|
|
28
|
+
const min = this._slider.min();
|
|
29
|
+
const max = this._slider.max();
|
|
30
|
+
if (thumbs.length === 2) {
|
|
31
|
+
const index = thumbs.indexOf(this);
|
|
32
|
+
if (index === 0) {
|
|
33
|
+
return Math.max(min, Math.min(v, thumbs[1].value));
|
|
34
|
+
}
|
|
35
|
+
else if (index === 1) {
|
|
36
|
+
return Math.min(max, Math.max(v, thumbs[0].value));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return Math.max(min, Math.min(max, v));
|
|
40
|
+
}
|
|
41
|
+
constructor() {
|
|
42
|
+
effect(() => {
|
|
43
|
+
const inputVal = this.valueInput();
|
|
44
|
+
if (inputVal !== undefined && inputVal !== this.value && !this._isUserInteraction) {
|
|
45
|
+
this.value = inputVal;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
_onChangeFn = () => { };
|
|
50
|
+
_onTouchedFn = () => { };
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
if (this.valueInput() === undefined) {
|
|
53
|
+
const initialValue = this._elementRef.nativeElement.getAttribute('value');
|
|
54
|
+
if (initialValue !== null) {
|
|
55
|
+
this.value = Number(initialValue);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.value = this._slider.min();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this._slider._onValueChange(this);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
get min() {
|
|
66
|
+
return this._slider.min();
|
|
67
|
+
}
|
|
68
|
+
get max() {
|
|
69
|
+
return this._slider.max();
|
|
70
|
+
}
|
|
71
|
+
get step() {
|
|
72
|
+
return this._slider.step();
|
|
73
|
+
}
|
|
74
|
+
ngOnDestroy() { }
|
|
75
|
+
_updateValueFromUser(value) {
|
|
76
|
+
const clampedValue = this._clampValue(value);
|
|
77
|
+
if (this._value() !== clampedValue) {
|
|
78
|
+
this._isUserInteraction = true;
|
|
79
|
+
this._value.set(clampedValue);
|
|
80
|
+
this._updateHostValue();
|
|
81
|
+
this._onChangeFn(clampedValue);
|
|
82
|
+
this.valueChange.emit(clampedValue);
|
|
83
|
+
this._slider._onValueChange(this);
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
this._isUserInteraction = false;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
_onInput(event) {
|
|
90
|
+
if (this._slider._allThumbs().length > 1 && this._slider._activeThumb() !== this) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
let value = event.target.valueAsNumber;
|
|
94
|
+
const initialValue = value;
|
|
95
|
+
this._updateValueFromUser(value);
|
|
96
|
+
if (value !== initialValue) {
|
|
97
|
+
this._updateHostValue();
|
|
98
|
+
}
|
|
99
|
+
this._slider._activeThumb.set(this);
|
|
100
|
+
}
|
|
101
|
+
_onChange(event) {
|
|
102
|
+
this._onTouchedFn();
|
|
103
|
+
}
|
|
104
|
+
_onBlur() {
|
|
105
|
+
this._onTouchedFn();
|
|
106
|
+
}
|
|
107
|
+
_onFocus() {
|
|
108
|
+
this._slider._activeThumb.set(this);
|
|
109
|
+
}
|
|
110
|
+
focus() {
|
|
111
|
+
this._elementRef.nativeElement.focus();
|
|
112
|
+
}
|
|
113
|
+
_isUserInteraction = false;
|
|
114
|
+
writeValue(value) {
|
|
115
|
+
this._isUserInteraction = true;
|
|
116
|
+
this.value = value;
|
|
117
|
+
setTimeout(() => {
|
|
118
|
+
this._isUserInteraction = false;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
registerOnChange(fn) {
|
|
122
|
+
this._onChangeFn = fn;
|
|
123
|
+
}
|
|
124
|
+
registerOnTouched(fn) {
|
|
125
|
+
this._onTouchedFn = fn;
|
|
126
|
+
}
|
|
127
|
+
setDisabledState(isDisabled) {
|
|
128
|
+
this._elementRef.nativeElement.disabled = isDisabled;
|
|
129
|
+
}
|
|
130
|
+
_updateHostValue() {
|
|
131
|
+
this._elementRef.nativeElement.value = (this._value() ?? 0).toString();
|
|
132
|
+
}
|
|
133
|
+
get percentage() {
|
|
134
|
+
const max = this._slider.max();
|
|
135
|
+
const min = this._slider.min();
|
|
136
|
+
if (max === min) {
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
const p = (this._value() - min) / (max - min);
|
|
140
|
+
return Math.max(0, Math.min(1, p));
|
|
141
|
+
}
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
143
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: SliderThumb, isStandalone: true, selector: "input[ngsSliderThumb]", inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
|
|
144
|
+
{
|
|
145
|
+
provide: NG_VALUE_ACCESSOR,
|
|
146
|
+
useExisting: forwardRef(() => SliderThumb),
|
|
147
|
+
multi: true,
|
|
148
|
+
},
|
|
149
|
+
], exportAs: ["ngsSliderThumb"], ngImport: i0 });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderThumb, decorators: [{
|
|
152
|
+
type: Directive,
|
|
153
|
+
args: [{
|
|
154
|
+
selector: 'input[ngsSliderThumb]',
|
|
155
|
+
exportAs: 'ngsSliderThumb',
|
|
156
|
+
providers: [
|
|
157
|
+
{
|
|
158
|
+
provide: NG_VALUE_ACCESSOR,
|
|
159
|
+
useExisting: forwardRef(() => SliderThumb),
|
|
160
|
+
multi: true,
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
host: {
|
|
164
|
+
'class': 'ngs-slider-input',
|
|
165
|
+
'[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
|
|
166
|
+
'type': 'range',
|
|
167
|
+
'[attr.min]': 'min',
|
|
168
|
+
'[attr.max]': 'max',
|
|
169
|
+
'[attr.step]': 'step',
|
|
170
|
+
'[value]': 'value',
|
|
171
|
+
'(input)': '_onInput($event)',
|
|
172
|
+
'(change)': '_onChange($event)',
|
|
173
|
+
'(blur)': '_onBlur()',
|
|
174
|
+
'(focus)': '_onFocus()',
|
|
175
|
+
},
|
|
176
|
+
}]
|
|
177
|
+
}], ctorParameters: () => [], propDecorators: { valueChange: [{ type: i0.Output, args: ["valueChange"] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
178
|
+
|
|
179
|
+
class Slider {
|
|
180
|
+
elementRef = inject(ElementRef);
|
|
181
|
+
_cdr = inject(ChangeDetectorRef);
|
|
182
|
+
_dir = inject(Directionality, { optional: true });
|
|
183
|
+
_destroyRef = inject(DestroyRef);
|
|
184
|
+
_document = inject(DOCUMENT);
|
|
185
|
+
_platformId = inject(PLATFORM_ID);
|
|
186
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
187
|
+
discrete = input(false, { ...(ngDevMode ? { debugName: "discrete" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
188
|
+
showTickMarks = input(false, { ...(ngDevMode ? { debugName: "showTickMarks" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
189
|
+
min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
190
|
+
max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
191
|
+
step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
192
|
+
displayWith = input((value) => `${value}`, ...(ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []));
|
|
193
|
+
_allThumbs = contentChildren(SliderThumb, { ...(ngDevMode ? { debugName: "_allThumbs" } : /* istanbul ignore next */ {}), descendants: true });
|
|
194
|
+
_trackLeft = computed(() => {
|
|
195
|
+
const thumbs = this._allThumbs();
|
|
196
|
+
if (thumbs.length === 2) {
|
|
197
|
+
const p1 = thumbs[0].percentage || 0;
|
|
198
|
+
const p2 = thumbs[1].percentage || 0;
|
|
199
|
+
return Math.min(p1, p2) * 100;
|
|
200
|
+
}
|
|
201
|
+
return 0;
|
|
202
|
+
}, ...(ngDevMode ? [{ debugName: "_trackLeft" }] : /* istanbul ignore next */ []));
|
|
203
|
+
_trackRight = computed(() => {
|
|
204
|
+
const thumbs = this._allThumbs();
|
|
205
|
+
if (thumbs.length === 2) {
|
|
206
|
+
const p1 = thumbs[0].percentage || 0;
|
|
207
|
+
const p2 = thumbs[1].percentage || 0;
|
|
208
|
+
return (1 - Math.max(p1, p2)) * 100;
|
|
209
|
+
}
|
|
210
|
+
const thumb = thumbs[0];
|
|
211
|
+
return (1 - (thumb?.percentage || 0)) * 100;
|
|
212
|
+
}, ...(ngDevMode ? [{ debugName: "_trackRight" }] : /* istanbul ignore next */ []));
|
|
213
|
+
_activeThumb = signal(null, ...(ngDevMode ? [{ debugName: "_activeThumb" }] : /* istanbul ignore next */ []));
|
|
214
|
+
_isDragging = signal(false, ...(ngDevMode ? [{ debugName: "_isDragging" }] : /* istanbul ignore next */ []));
|
|
215
|
+
_tickMarks = computed(() => {
|
|
216
|
+
if (!this.showTickMarks() || this.step() <= 0) {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
const count = Math.floor((this.max() - this.min()) / this.step()) + 1;
|
|
220
|
+
return Array(count).fill(1); // 1 = inactive by default
|
|
221
|
+
}, ...(ngDevMode ? [{ debugName: "_tickMarks" }] : /* istanbul ignore next */ []));
|
|
222
|
+
_isRtl = false;
|
|
223
|
+
constructor() {
|
|
224
|
+
if (this._dir) {
|
|
225
|
+
this._dir.change.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
226
|
+
this._isRtl = this._dir.value === 'rtl';
|
|
227
|
+
this._cdr.markForCheck();
|
|
228
|
+
});
|
|
229
|
+
this._isRtl = this._dir.value === 'rtl';
|
|
230
|
+
}
|
|
231
|
+
effect(() => {
|
|
232
|
+
this._allThumbs();
|
|
233
|
+
this._cdr.markForCheck();
|
|
234
|
+
});
|
|
235
|
+
this._initializeEvents();
|
|
236
|
+
}
|
|
237
|
+
_initializeEvents() {
|
|
238
|
+
if (!isPlatformBrowser(this._platformId)) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const sliderElement = this.elementRef.nativeElement;
|
|
242
|
+
const pointerDown$ = merge(fromEvent(sliderElement, 'mousedown'), fromEvent(sliderElement, 'touchstart', { passive: false })).pipe(filter((event) => {
|
|
243
|
+
if (this.disabled())
|
|
244
|
+
return false;
|
|
245
|
+
return !(event instanceof MouseEvent && event.button !== 0);
|
|
246
|
+
}));
|
|
247
|
+
const pointerMove$ = merge(fromEvent(this._document, 'mousemove'), fromEvent(this._document, 'touchmove', { passive: false }));
|
|
248
|
+
const pointerUp$ = merge(fromEvent(this._document, 'mouseup'), fromEvent(this._document, 'touchend', { passive: false }), fromEvent(this._document, 'touchcancel', { passive: false }));
|
|
249
|
+
pointerDown$
|
|
250
|
+
.pipe(filter(() => !this.disabled()), tap((event) => {
|
|
251
|
+
if (event instanceof TouchEvent) {
|
|
252
|
+
event.preventDefault();
|
|
253
|
+
}
|
|
254
|
+
this._isDragging.set(true);
|
|
255
|
+
this._onPointerDown(event);
|
|
256
|
+
this._cdr.markForCheck();
|
|
257
|
+
}), switchMap(() => pointerMove$.pipe(tap((event) => {
|
|
258
|
+
if (event instanceof TouchEvent) {
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
}
|
|
261
|
+
}), takeUntil(pointerUp$.pipe(tap(() => {
|
|
262
|
+
this._isDragging.set(false);
|
|
263
|
+
this._cdr.markForCheck();
|
|
264
|
+
}))))), takeUntilDestroyed(this._destroyRef))
|
|
265
|
+
.subscribe((event) => {
|
|
266
|
+
this._onPointerMove(event);
|
|
267
|
+
});
|
|
268
|
+
merge(fromEvent(sliderElement, 'mousemove'), fromEvent(sliderElement, 'touchmove', { passive: false }))
|
|
269
|
+
.pipe(filter(() => !this.disabled() && !this._isDragging()), takeUntilDestroyed(this._destroyRef))
|
|
270
|
+
.subscribe((event) => {
|
|
271
|
+
this._onPointerMove(event);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
_onValueChange(thumb) {
|
|
275
|
+
this._cdr.markForCheck();
|
|
276
|
+
}
|
|
277
|
+
_findClosestThumb(percentage) {
|
|
278
|
+
const thumbs = this._allThumbs();
|
|
279
|
+
if (thumbs.length === 0) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
let closestThumb = thumbs[0];
|
|
283
|
+
let minDistance = Math.abs(thumbs[0].percentage - percentage);
|
|
284
|
+
for (let i = 1; i < thumbs.length; i++) {
|
|
285
|
+
const distance = Math.abs(thumbs[i].percentage - percentage);
|
|
286
|
+
if (distance < minDistance) {
|
|
287
|
+
minDistance = distance;
|
|
288
|
+
closestThumb = thumbs[i];
|
|
289
|
+
}
|
|
290
|
+
else if (distance === minDistance) {
|
|
291
|
+
// If distances are equal (e.g., thumbs are at the same point)
|
|
292
|
+
if (percentage > thumbs[i].percentage) {
|
|
293
|
+
// If click is to the right of the overlap point, select the "right" thumb
|
|
294
|
+
// (in the array thumbs[1] is usually the end thumb)
|
|
295
|
+
closestThumb = thumbs[i];
|
|
296
|
+
}
|
|
297
|
+
else if (percentage < thumbs[i].percentage) {
|
|
298
|
+
// If click is to the left
|
|
299
|
+
closestThumb = thumbs[i - 1];
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
// If click is exactly at the overlap point
|
|
303
|
+
// give priority to the already active one
|
|
304
|
+
if (thumbs[i] === this._activeThumb()) {
|
|
305
|
+
closestThumb = thumbs[i];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return closestThumb;
|
|
311
|
+
}
|
|
312
|
+
_onPointerDown(event) {
|
|
313
|
+
if (this.disabled()) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
const percentage = this._calculatePercentage(event);
|
|
317
|
+
const closestThumb = this._findClosestThumb(percentage);
|
|
318
|
+
if (closestThumb) {
|
|
319
|
+
this._activeThumb.set(closestThumb);
|
|
320
|
+
const value = this._calculateValueFromPercentage(percentage);
|
|
321
|
+
closestThumb._updateValueFromUser(value);
|
|
322
|
+
closestThumb.focus();
|
|
323
|
+
this._cdr.markForCheck();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
_onPointerMove(event) {
|
|
327
|
+
if (this.disabled()) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const percentage = this._calculatePercentage(event);
|
|
331
|
+
const isDragging = this._isDragging();
|
|
332
|
+
const activeThumb = this._activeThumb();
|
|
333
|
+
if (isDragging && activeThumb) {
|
|
334
|
+
const value = this._calculateValueFromPercentage(percentage);
|
|
335
|
+
activeThumb._updateValueFromUser(value);
|
|
336
|
+
this._cdr.markForCheck();
|
|
337
|
+
}
|
|
338
|
+
else if (!isDragging) {
|
|
339
|
+
const closestThumb = this._findClosestThumb(percentage);
|
|
340
|
+
if (closestThumb && activeThumb !== closestThumb) {
|
|
341
|
+
this._activeThumb.set(closestThumb);
|
|
342
|
+
this._cdr.markForCheck();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
_calculatePercentage(event) {
|
|
347
|
+
const sliderElement = this.elementRef.nativeElement;
|
|
348
|
+
const wrapper = sliderElement.querySelector('.ngs-slider-wrapper');
|
|
349
|
+
const rect = (wrapper || sliderElement).getBoundingClientRect();
|
|
350
|
+
const clientX = 'touches' in event ? event.touches[0].clientX : event.clientX;
|
|
351
|
+
let position = (clientX - rect.left) / rect.width;
|
|
352
|
+
position = Math.max(0, Math.min(1, position));
|
|
353
|
+
return this._isRtl ? 1 - position : position;
|
|
354
|
+
}
|
|
355
|
+
_calculateValueFromPercentage(percentage) {
|
|
356
|
+
const min = this.min();
|
|
357
|
+
const max = this.max();
|
|
358
|
+
const step = this.step();
|
|
359
|
+
const rawValue = min + percentage * (max - min);
|
|
360
|
+
let value = rawValue;
|
|
361
|
+
if (step > 0) {
|
|
362
|
+
value = Math.round(rawValue / step) * step;
|
|
363
|
+
}
|
|
364
|
+
return Math.max(min, Math.min(max, value));
|
|
365
|
+
}
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Slider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
367
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: Slider, isStandalone: true, selector: "ngs-slider", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, discrete: { classPropertyName: "discrete", publicName: "discrete", isSignal: true, isRequired: false, transformFunction: null }, showTickMarks: { classPropertyName: "showTickMarks", publicName: "showTickMarks", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ngs-slider-disabled": "disabled()", "class.ngs-slider-discrete": "discrete()", "class.ngs-slider-show-tick-marks": "showTickMarks()" }, classAttribute: "ngs-slider" }, queries: [{ propertyName: "_allThumbs", predicate: SliderThumb, descendants: true, isSignal: true }], exportAs: ["ngsSlider"], ngImport: i0, template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.value) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--color-surface-container-high);--ngs-slider-track-active-color: var(--color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--color-primary);--ngs-slider-thumb-ripple-color: var(--color-primary-100);--ngs-slider-tick-mark-color: var(--color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--color-on-primary);--ngs-slider-value-indicator-color: var(--color-on-surface);--ngs-slider-value-indicator-text-color: var(--color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 10px var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
368
|
+
}
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Slider, decorators: [{
|
|
370
|
+
type: Component,
|
|
371
|
+
args: [{ selector: 'ngs-slider', exportAs: 'ngsSlider', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
372
|
+
'class': 'ngs-slider',
|
|
373
|
+
'[class.ngs-slider-disabled]': 'disabled()',
|
|
374
|
+
'[class.ngs-slider-discrete]': 'discrete()',
|
|
375
|
+
'[class.ngs-slider-show-tick-marks]': 'showTickMarks()',
|
|
376
|
+
}, template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.value) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--color-surface-container-high);--ngs-slider-track-active-color: var(--color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--color-primary);--ngs-slider-thumb-ripple-color: var(--color-primary-100);--ngs-slider-tick-mark-color: var(--color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--color-on-primary);--ngs-slider-value-indicator-color: var(--color-on-surface);--ngs-slider-value-indicator-text-color: var(--color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 10px var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
377
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], discrete: [{ type: i0.Input, args: [{ isSignal: true, alias: "discrete", required: false }] }], showTickMarks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTickMarks", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], _allThumbs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SliderThumb), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
378
|
+
|
|
379
|
+
class SliderStartThumb extends SliderThumb {
|
|
380
|
+
getId() {
|
|
381
|
+
return 'start';
|
|
382
|
+
}
|
|
383
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderStartThumb, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
384
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: SliderStartThumb, isStandalone: true, selector: "input[ngsSliderStartThumb]", host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
|
|
385
|
+
{
|
|
386
|
+
provide: SliderThumb,
|
|
387
|
+
useExisting: forwardRef(() => SliderStartThumb),
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
provide: NG_VALUE_ACCESSOR,
|
|
391
|
+
useExisting: forwardRef(() => SliderStartThumb),
|
|
392
|
+
multi: true,
|
|
393
|
+
},
|
|
394
|
+
], usesInheritance: true, ngImport: i0 });
|
|
395
|
+
}
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderStartThumb, decorators: [{
|
|
397
|
+
type: Directive,
|
|
398
|
+
args: [{
|
|
399
|
+
selector: 'input[ngsSliderStartThumb]',
|
|
400
|
+
standalone: true,
|
|
401
|
+
host: {
|
|
402
|
+
'class': 'ngs-slider-input',
|
|
403
|
+
'[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
|
|
404
|
+
'type': 'range',
|
|
405
|
+
'[attr.min]': 'min',
|
|
406
|
+
'[attr.max]': 'max',
|
|
407
|
+
'[attr.step]': 'step',
|
|
408
|
+
'[value]': 'value',
|
|
409
|
+
'(input)': '_onInput($event)',
|
|
410
|
+
'(change)': '_onChange($event)',
|
|
411
|
+
'(blur)': '_onBlur()',
|
|
412
|
+
'(focus)': '_onFocus()',
|
|
413
|
+
},
|
|
414
|
+
providers: [
|
|
415
|
+
{
|
|
416
|
+
provide: SliderThumb,
|
|
417
|
+
useExisting: forwardRef(() => SliderStartThumb),
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
provide: NG_VALUE_ACCESSOR,
|
|
421
|
+
useExisting: forwardRef(() => SliderStartThumb),
|
|
422
|
+
multi: true,
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
}]
|
|
426
|
+
}] });
|
|
427
|
+
|
|
428
|
+
class SliderEndThumb extends SliderThumb {
|
|
429
|
+
getId() {
|
|
430
|
+
return 'end';
|
|
431
|
+
}
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderEndThumb, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
433
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: SliderEndThumb, isStandalone: true, selector: "input[ngsSliderEndThumb]", host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
|
|
434
|
+
{
|
|
435
|
+
provide: SliderThumb,
|
|
436
|
+
useExisting: forwardRef(() => SliderEndThumb),
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
provide: NG_VALUE_ACCESSOR,
|
|
440
|
+
useExisting: forwardRef(() => SliderEndThumb),
|
|
441
|
+
multi: true,
|
|
442
|
+
},
|
|
443
|
+
], usesInheritance: true, ngImport: i0 });
|
|
444
|
+
}
|
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SliderEndThumb, decorators: [{
|
|
446
|
+
type: Directive,
|
|
447
|
+
args: [{
|
|
448
|
+
selector: 'input[ngsSliderEndThumb]',
|
|
449
|
+
host: {
|
|
450
|
+
'class': 'ngs-slider-input',
|
|
451
|
+
'[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
|
|
452
|
+
'type': 'range',
|
|
453
|
+
'[attr.min]': 'min',
|
|
454
|
+
'[attr.max]': 'max',
|
|
455
|
+
'[attr.step]': 'step',
|
|
456
|
+
'[value]': 'value',
|
|
457
|
+
'(input)': '_onInput($event)',
|
|
458
|
+
'(change)': '_onChange($event)',
|
|
459
|
+
'(blur)': '_onBlur()',
|
|
460
|
+
'(focus)': '_onFocus()',
|
|
461
|
+
},
|
|
462
|
+
providers: [
|
|
463
|
+
{
|
|
464
|
+
provide: SliderThumb,
|
|
465
|
+
useExisting: forwardRef(() => SliderEndThumb),
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
provide: NG_VALUE_ACCESSOR,
|
|
469
|
+
useExisting: forwardRef(() => SliderEndThumb),
|
|
470
|
+
multi: true,
|
|
471
|
+
},
|
|
472
|
+
],
|
|
473
|
+
}]
|
|
474
|
+
}] });
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Generated bundle index. Do not edit.
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
export { Slider, SliderEndThumb, SliderStartThumb, SliderThumb };
|
|
481
|
+
//# sourceMappingURL=ngstarter-ui-components-slider.mjs.map
|