@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,147 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { contentChildren, forwardRef, model, input, output, effect, ChangeDetectionStrategy, Component, booleanAttribute, computed, Optional, Inject } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
class RadioGroup {
|
|
6
|
+
_radios = contentChildren(forwardRef(() => RadioButton), { ...(ngDevMode ? { debugName: "_radios" } : /* istanbul ignore next */ {}), descendants: true });
|
|
7
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
8
|
+
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
9
|
+
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
10
|
+
change = output();
|
|
11
|
+
constructor() {
|
|
12
|
+
effect(() => {
|
|
13
|
+
this._markRadiosForCheck();
|
|
14
|
+
});
|
|
15
|
+
effect(() => {
|
|
16
|
+
this._updateSelectedRadioFromValue();
|
|
17
|
+
this._onChange(this.value());
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
_onChange = () => { };
|
|
21
|
+
_onTouched = () => { };
|
|
22
|
+
ngAfterContentInit() {
|
|
23
|
+
this._updateSelectedRadioFromValue();
|
|
24
|
+
}
|
|
25
|
+
writeValue(value) {
|
|
26
|
+
this.value.set(value);
|
|
27
|
+
}
|
|
28
|
+
registerOnChange(fn) {
|
|
29
|
+
this._onChange = fn;
|
|
30
|
+
}
|
|
31
|
+
registerOnTouched(fn) {
|
|
32
|
+
this._onTouched = fn;
|
|
33
|
+
}
|
|
34
|
+
setDisabledState(isDisabled) {
|
|
35
|
+
this.disabled.set(isDisabled);
|
|
36
|
+
}
|
|
37
|
+
_emitChangeEvent(value) {
|
|
38
|
+
this._onChange(value);
|
|
39
|
+
this.change.emit({ source: this, value });
|
|
40
|
+
}
|
|
41
|
+
_updateSelectedRadioFromValue() {
|
|
42
|
+
const _radios = this._radios();
|
|
43
|
+
if (_radios) {
|
|
44
|
+
_radios.forEach(radio => {
|
|
45
|
+
radio.checked.set(this.value() === radio.value());
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
_markRadiosForCheck() {
|
|
50
|
+
const _radios = this._radios();
|
|
51
|
+
if (_radios) {
|
|
52
|
+
_radios.forEach(radio => radio._markForCheck());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
_onRadioClick(radio) {
|
|
56
|
+
if (this.disabled() || radio.disabled()) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (this.value() !== radio.value()) {
|
|
60
|
+
this.value.set(radio.value());
|
|
61
|
+
this._emitChangeEvent(this.value());
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: RadioGroup, isStandalone: true, selector: "ngs-radio-group", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", value: "valueChange", change: "change" }, host: { properties: { "attr.role": "\"radiogroup\"", "attr.aria-disabled": "disabled()" }, classAttribute: "ngs-radio-group" }, providers: [
|
|
66
|
+
{
|
|
67
|
+
provide: NG_VALUE_ACCESSOR,
|
|
68
|
+
useExisting: forwardRef(() => RadioGroup),
|
|
69
|
+
multi: true
|
|
70
|
+
}
|
|
71
|
+
], queries: [{ propertyName: "_radios", predicate: i0.forwardRef(() => RadioButton), descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content />\n", styles: [":host{display:flex;flex-wrap:wrap;gap:1rem}:host[aria-disabled=true]{pointer-events:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
|
+
}
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RadioGroup, decorators: [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{ selector: 'ngs-radio-group', providers: [
|
|
76
|
+
{
|
|
77
|
+
provide: NG_VALUE_ACCESSOR,
|
|
78
|
+
useExisting: forwardRef(() => RadioGroup),
|
|
79
|
+
multi: true
|
|
80
|
+
}
|
|
81
|
+
], host: {
|
|
82
|
+
'class': 'ngs-radio-group',
|
|
83
|
+
'[attr.role]': '"radiogroup"',
|
|
84
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
85
|
+
}, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: [":host{display:flex;flex-wrap:wrap;gap:1rem}:host[aria-disabled=true]{pointer-events:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
86
|
+
}], ctorParameters: () => [], propDecorators: { _radios: [{ type: i0.ContentChildren, args: [forwardRef(() => RadioButton), { ...{ descendants: true }, isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], change: [{ type: i0.Output, args: ["change"] }] } });
|
|
87
|
+
|
|
88
|
+
let nextId = 0;
|
|
89
|
+
class RadioButton {
|
|
90
|
+
radioGroup;
|
|
91
|
+
_changeDetectorRef;
|
|
92
|
+
id = input(`ngs-radio-button-${nextId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
93
|
+
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
94
|
+
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
95
|
+
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
96
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
97
|
+
transform: booleanAttribute });
|
|
98
|
+
disabled = computed(() => {
|
|
99
|
+
return this.disabledInput() || (this.radioGroup && this.radioGroup.disabled());
|
|
100
|
+
}, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
101
|
+
change = output();
|
|
102
|
+
constructor(radioGroup, _changeDetectorRef) {
|
|
103
|
+
this.radioGroup = radioGroup;
|
|
104
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
105
|
+
}
|
|
106
|
+
ngOnInit() {
|
|
107
|
+
if (this.radioGroup && this.radioGroup.value() === this.value()) {
|
|
108
|
+
this.checked.set(true);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
_onInputClick(event) {
|
|
112
|
+
event.stopPropagation();
|
|
113
|
+
if (this.radioGroup) {
|
|
114
|
+
this.radioGroup._onRadioClick(this);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.checked.set(true);
|
|
118
|
+
this.change.emit({ source: this, value: this.value() });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
_markForCheck() {
|
|
122
|
+
this._changeDetectorRef.markForCheck();
|
|
123
|
+
}
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RadioButton, deps: [{ token: forwardRef(() => RadioGroup), optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: RadioButton, isStandalone: true, selector: "ngs-radio-button", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", change: "change" }, host: { properties: { "class.ngs-radio-button-checked": "checked()", "class.ngs-radio-button-disabled": "disabled()", "attr.id": "id()" }, classAttribute: "ngs-radio-button" }, ngImport: i0, template: "\n<label class=\"ngs-radio-button-label\" [attr.for]=\"id() + '-input'\">\n <span class=\"ngs-radio-button-container\">\n <input\n type=\"radio\"\n class=\"ngs-radio-button-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name() || (radioGroup ? radioGroup.name() : null)\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [value]=\"value()\"\n (click)=\"_onInputClick($event)\"\n >\n <span class=\"ngs-radio-button-outer-circle\"></span>\n <span class=\"ngs-radio-button-inner-circle\"></span>\n </span>\n <span class=\"ngs-radio-button-label-content\">\n <ng-content />\n </span>\n</label>\n", styles: [":host{--ngs-radio-button-size: 19px;--ngs-radio-button-inner-circle-size: 10px;--ngs-radio-button-border-width: 1px;--ngs-radio-button-unchecked-color: var(--input-border-color);--ngs-radio-button-checked-color: var(--color-primary);--ngs-radio-button-disabled-color: var(--color-on-surface-variant);--ngs-radio-button-label-color: var(--color-on-surface);--ngs-radio-button-disabled-label-color: var(--color-on-surface-variant);--ngs-radio-button-gap: 8px;display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}:host.ngs-radio-button-disabled{cursor:default;pointer-events:none;--ngs-radio-button-unchecked-color: var(--color-on-surface);--ngs-radio-button-checked-color: var(--color-on-surface);--ngs-radio-button-label-color: var(--color-on-surface)}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-unchecked-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-checked-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-label-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}:host .ngs-radio-button-label{display:flex;align-items:center;cursor:inherit}:host .ngs-radio-button-container{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ngs-radio-button-size);height:var(--ngs-radio-button-size)}:host .ngs-radio-button-input{position:absolute;inset:0;opacity:0;cursor:inherit;z-index:1;margin:0}:host .ngs-radio-button-outer-circle{position:absolute;inset:0;border-radius:9999px;border-style:solid;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-width:var(--ngs-radio-button-border-width);border-color:var(--ngs-radio-button-unchecked-color)}:host .ngs-radio-button-inner-circle{border-radius:9999px;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transform:scale(0);width:var(--ngs-radio-button-inner-circle-size);height:var(--ngs-radio-button-inner-circle-size);background:var(--ngs-radio-button-checked-color)}:host.ngs-radio-button-checked .ngs-radio-button-outer-circle{border-color:var(--ngs-radio-button-checked-color)}:host.ngs-radio-button-checked .ngs-radio-button-inner-circle{transform:scale(1)}:host .ngs-radio-button-label-content{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;padding-left:var(--ngs-radio-button-gap);color:var(--ngs-radio-button-label-color)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RadioButton, decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{ selector: 'ngs-radio-button', host: {
|
|
130
|
+
'[class.ngs-radio-button-checked]': 'checked()',
|
|
131
|
+
'[class.ngs-radio-button-disabled]': 'disabled()',
|
|
132
|
+
'[attr.id]': 'id()',
|
|
133
|
+
'class': 'ngs-radio-button',
|
|
134
|
+
}, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "\n<label class=\"ngs-radio-button-label\" [attr.for]=\"id() + '-input'\">\n <span class=\"ngs-radio-button-container\">\n <input\n type=\"radio\"\n class=\"ngs-radio-button-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name() || (radioGroup ? radioGroup.name() : null)\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [value]=\"value()\"\n (click)=\"_onInputClick($event)\"\n >\n <span class=\"ngs-radio-button-outer-circle\"></span>\n <span class=\"ngs-radio-button-inner-circle\"></span>\n </span>\n <span class=\"ngs-radio-button-label-content\">\n <ng-content />\n </span>\n</label>\n", styles: [":host{--ngs-radio-button-size: 19px;--ngs-radio-button-inner-circle-size: 10px;--ngs-radio-button-border-width: 1px;--ngs-radio-button-unchecked-color: var(--input-border-color);--ngs-radio-button-checked-color: var(--color-primary);--ngs-radio-button-disabled-color: var(--color-on-surface-variant);--ngs-radio-button-label-color: var(--color-on-surface);--ngs-radio-button-disabled-label-color: var(--color-on-surface-variant);--ngs-radio-button-gap: 8px;display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}:host.ngs-radio-button-disabled{cursor:default;pointer-events:none;--ngs-radio-button-unchecked-color: var(--color-on-surface);--ngs-radio-button-checked-color: var(--color-on-surface);--ngs-radio-button-label-color: var(--color-on-surface)}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-unchecked-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-checked-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}@supports (color: color-mix(in lab,red,red)){:host.ngs-radio-button-disabled{--ngs-radio-button-label-color: color-mix(in srgb, var(--color-on-surface), transparent 62%)}}:host .ngs-radio-button-label{display:flex;align-items:center;cursor:inherit}:host .ngs-radio-button-container{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ngs-radio-button-size);height:var(--ngs-radio-button-size)}:host .ngs-radio-button-input{position:absolute;inset:0;opacity:0;cursor:inherit;z-index:1;margin:0}:host .ngs-radio-button-outer-circle{position:absolute;inset:0;border-radius:9999px;border-style:solid;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-width:var(--ngs-radio-button-border-width);border-color:var(--ngs-radio-button-unchecked-color)}:host .ngs-radio-button-inner-circle{border-radius:9999px;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transform:scale(0);width:var(--ngs-radio-button-inner-circle-size);height:var(--ngs-radio-button-inner-circle-size);background:var(--ngs-radio-button-checked-color)}:host.ngs-radio-button-checked .ngs-radio-button-outer-circle{border-color:var(--ngs-radio-button-checked-color)}:host.ngs-radio-button-checked .ngs-radio-button-inner-circle{transform:scale(1)}:host .ngs-radio-button-label-content{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;padding-left:var(--ngs-radio-button-gap);color:var(--ngs-radio-button-label-color)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
135
|
+
}], ctorParameters: () => [{ type: RadioGroup, decorators: [{
|
|
136
|
+
type: Optional
|
|
137
|
+
}, {
|
|
138
|
+
type: Inject,
|
|
139
|
+
args: [forwardRef(() => RadioGroup)]
|
|
140
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], change: [{ type: i0.Output, args: ["change"] }] } });
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Generated bundle index. Do not edit.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
export { RadioButton, RadioGroup };
|
|
147
|
+
//# sourceMappingURL=ngstarter-ui-components-radio.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-radio.mjs","sources":["../../../projects/components/radio/src/radio-group/radio-group.ts","../../../projects/components/radio/src/radio-group/radio-group.html","../../../projects/components/radio/src/radio-button/radio-button.ts","../../../projects/components/radio/src/radio-button/radio-button.html","../../../projects/components/radio/ngstarter-ui-components-radio.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n input,\n output,\n booleanAttribute,\n model,\n effect,\n contentChildren\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RadioButton } from '../radio-button/radio-button';\n\n@Component({\n selector: 'ngs-radio-group',\n templateUrl: './radio-group.html',\n styleUrl: './radio-group.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroup),\n multi: true\n }\n ],\n host: {\n 'class': 'ngs-radio-group',\n '[attr.role]': '\"radiogroup\"',\n '[attr.aria-disabled]': 'disabled()',\n },\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RadioGroup implements ControlValueAccessor, AfterContentInit {\n readonly _radios = contentChildren(forwardRef(() => RadioButton), { descendants: true });\n\n disabled = model(false);\n\n name = input<string>();\n value = model<any>();\n\n readonly change = output<any>();\n\n constructor() {\n effect(() => {\n this._markRadiosForCheck();\n });\n effect(() => {\n this._updateSelectedRadioFromValue();\n this._onChange(this.value());\n });\n }\n\n _onChange: (value: any) => void = () => {};\n _onTouched: () => void = () => {};\n\n ngAfterContentInit() {\n this._updateSelectedRadioFromValue();\n }\n\n writeValue(value: any): void {\n this.value.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 _emitChangeEvent(value: any): void {\n this._onChange(value);\n this.change.emit({ source: this, value });\n }\n\n private _updateSelectedRadioFromValue() {\n const _radios = this._radios();\n if (_radios) {\n _radios.forEach(radio => {\n radio.checked.set(this.value() === radio.value());\n });\n }\n }\n\n private _markRadiosForCheck() {\n const _radios = this._radios();\n if (_radios) {\n _radios.forEach(radio => radio._markForCheck());\n }\n }\n\n _onRadioClick(radio: RadioButton) {\n if (this.disabled() || radio.disabled()) {\n return;\n }\n\n if (this.value() !== radio.value()) {\n this.value.set(radio.value());\n this._emitChangeEvent(this.value());\n }\n }\n}\n","<ng-content />\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n input,\n OnInit,\n Optional,\n output,\n booleanAttribute,\n model,\n computed\n} from '@angular/core';\nimport { RadioGroup } from '../radio-group/radio-group';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ngs-radio-button',\n templateUrl: './radio-button.html',\n styleUrl: './radio-button.scss',\n host: {\n '[class.ngs-radio-button-checked]': 'checked()',\n '[class.ngs-radio-button-disabled]': 'disabled()',\n '[attr.id]': 'id()',\n 'class': 'ngs-radio-button',\n },\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RadioButton implements OnInit {\n id = input(`ngs-radio-button-${nextId++}`);\n value = input<any>();\n name = input<string>();\n checked = model(false);\n disabledInput = input(false, {\n alias: 'disabled',\n transform: booleanAttribute\n });\n\n disabled = computed(() => {\n return this.disabledInput() || (this.radioGroup && this.radioGroup.disabled());\n });\n\n readonly change = output<any>();\n\n constructor(\n @Optional() @Inject(forwardRef(() => RadioGroup)) public radioGroup: RadioGroup,\n private _changeDetectorRef: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n if (this.radioGroup && this.radioGroup.value() === this.value()) {\n this.checked.set(true);\n }\n }\n\n _onInputClick(event: Event) {\n event.stopPropagation();\n if (this.radioGroup) {\n this.radioGroup._onRadioClick(this);\n } else {\n this.checked.set(true);\n this.change.emit({ source: this, value: this.value() });\n }\n }\n\n _markForCheck() {\n this._changeDetectorRef.markForCheck();\n }\n}\n","\n<label class=\"ngs-radio-button-label\" [attr.for]=\"id() + '-input'\">\n <span class=\"ngs-radio-button-container\">\n <input\n type=\"radio\"\n class=\"ngs-radio-button-input\"\n [id]=\"id() + '-input'\"\n [name]=\"name() || (radioGroup ? radioGroup.name() : null)\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [value]=\"value()\"\n (click)=\"_onInputClick($event)\"\n >\n <span class=\"ngs-radio-button-outer-circle\"></span>\n <span class=\"ngs-radio-button-inner-circle\"></span>\n </span>\n <span class=\"ngs-radio-button-label-content\">\n <ng-content />\n </span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAkCa,UAAU,CAAA;AACZ,IAAA,OAAO,GAAG,eAAe,CAAC,UAAU,CAAC,MAAM,WAAW,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,SAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,WAAW,EAAE,IAAI,GAAG;AAExF,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,+EAAC;IAEvB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAO;IAEX,MAAM,GAAG,MAAM,EAAO;AAE/B,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,mBAAmB,EAAE;AAC5B,QAAA,CAAC,CAAC;QACF,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,6BAA6B,EAAE;YACpC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AAC9B,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,SAAS,GAAyB,MAAK,EAAE,CAAC;AAC1C,IAAA,UAAU,GAAe,MAAK,EAAE,CAAC;IAEjC,kBAAkB,GAAA;QAChB,IAAI,CAAC,6BAA6B,EAAE;IACtC;AAEA,IAAA,UAAU,CAAC,KAAU,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A,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAjBvC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,u6BC/BxB,kpBAoBA,EAAA,MAAA,EAAA,CAAA,o3FAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDWa,WAAW,EAAA,UAAA,EAAA,CAAA;kBAbvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,IAAA,EAGtB;AACJ,wBAAA,kCAAkC,EAAE,WAAW;AAC/C,wBAAA,mCAAmC,EAAE,YAAY;AACjD,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,OAAO,EAAE,kBAAkB;AAC5B,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kpBAAA,EAAA,MAAA,EAAA,CAAA,o3FAAA,CAAA,EAAA;;0BAmB5C;;0BAAY,MAAM;AAAC,oBAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,UAAU,CAAC;;;AEhDpD;;AAEG;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, input, forwardRef, Component, inject, Directive } from '@angular/core';
|
|
3
|
+
import { v7 } from 'uuid';
|
|
4
|
+
import { Ripple } from '@ngstarter-ui/components/core';
|
|
5
|
+
|
|
6
|
+
const RAIL_NAV = new InjectionToken('RAIL_NAV');
|
|
7
|
+
|
|
8
|
+
class RailNav {
|
|
9
|
+
activeKey = input(...(ngDevMode ? [undefined, { debugName: "activeKey" }] : /* istanbul ignore next */ []));
|
|
10
|
+
_activeKey;
|
|
11
|
+
api = {
|
|
12
|
+
activateItem: (key) => {
|
|
13
|
+
this._activeKey = key;
|
|
14
|
+
},
|
|
15
|
+
getActiveKey: () => this._activeKey,
|
|
16
|
+
isActive: (key) => key === this._activeKey,
|
|
17
|
+
};
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this._activeKey = this.activeKey();
|
|
20
|
+
}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: RailNav, isStandalone: true, selector: "ngs-rail-nav", inputs: { activeKey: { classPropertyName: "activeKey", publicName: "activeKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-rail-nav" }, providers: [
|
|
23
|
+
{
|
|
24
|
+
provide: RAIL_NAV,
|
|
25
|
+
useExisting: forwardRef(() => RailNav),
|
|
26
|
+
}
|
|
27
|
+
], exportAs: ["ngsRailNav"], ngImport: i0, template: "<ng-content/>\n", styles: [":host{--ngs-rail-nav-bg: none;--ngs-rail-nav-bg-item-icon-is-active-bg: var(--nav-item-active-bg);--ngs-rail-nav-bg-item-icon-is-active-active-bg: var(--nav-item-active-bg);--ngs-rail-nav-bg-item-icon-hover-bg: var(--nav-item-hover-bg);--ngs-rail-nav-bg-item-icon-active-bg: var(--nav-item-hover-bg);--ngs-rail-nav-bg-item-icon-color: var(--nav-item-icon-color);--ngs-rail-nav-bg-item-icon-is-active-color: var(--nav-item-active-icon-color);--ngs-rail-nav-bg-item-active-color: var(--nav-item-active-color);--ngs-rail-nav-bg-item-color: var(--nav-item-color);--ngs-rail-nav-width: calc(var(--spacing, .25rem) * 24);--ngs-rail-nav-gap: calc(var(--spacing, .25rem) * 3);--ngs-rail-nav-padding: calc(var(--spacing, .25rem) * 0);display:flex;flex-direction:column;gap:var(--ngs-rail-nav-gap);width:var(--ngs-rail-nav-width);background:var(--ngs-rail-nav-bg);padding:var(--ngs-rail-nav-padding)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNav, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{ selector: 'ngs-rail-nav', exportAs: 'ngsRailNav', imports: [], providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: RAIL_NAV,
|
|
34
|
+
useExisting: forwardRef(() => RailNav),
|
|
35
|
+
}
|
|
36
|
+
], host: {
|
|
37
|
+
'class': 'ngs-rail-nav'
|
|
38
|
+
}, template: "<ng-content/>\n", styles: [":host{--ngs-rail-nav-bg: none;--ngs-rail-nav-bg-item-icon-is-active-bg: var(--nav-item-active-bg);--ngs-rail-nav-bg-item-icon-is-active-active-bg: var(--nav-item-active-bg);--ngs-rail-nav-bg-item-icon-hover-bg: var(--nav-item-hover-bg);--ngs-rail-nav-bg-item-icon-active-bg: var(--nav-item-hover-bg);--ngs-rail-nav-bg-item-icon-color: var(--nav-item-icon-color);--ngs-rail-nav-bg-item-icon-is-active-color: var(--nav-item-active-icon-color);--ngs-rail-nav-bg-item-active-color: var(--nav-item-active-color);--ngs-rail-nav-bg-item-color: var(--nav-item-color);--ngs-rail-nav-width: calc(var(--spacing, .25rem) * 24);--ngs-rail-nav-gap: calc(var(--spacing, .25rem) * 3);--ngs-rail-nav-padding: calc(var(--spacing, .25rem) * 0);display:flex;flex-direction:column;gap:var(--ngs-rail-nav-gap);width:var(--ngs-rail-nav-width);background:var(--ngs-rail-nav-bg);padding:var(--ngs-rail-nav-padding)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
39
|
+
}], propDecorators: { activeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeKey", required: false }] }] } });
|
|
40
|
+
|
|
41
|
+
class RailNavItem {
|
|
42
|
+
_railNav = inject(RAIL_NAV);
|
|
43
|
+
key = input(v7(), ...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
44
|
+
get isActive() {
|
|
45
|
+
if (!this.key() || !this._railNav.api.getActiveKey()) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return this._railNav.api.isActive(this.key());
|
|
49
|
+
}
|
|
50
|
+
click(event) {
|
|
51
|
+
if (!this.key()) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this._railNav.api.activateItem(this.key());
|
|
55
|
+
}
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNavItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: RailNavItem, isStandalone: true, selector: "ngs-rail-nav-item,[ngs-rail-nav-item]", inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "click($event)" }, properties: { "class.is-active": "isActive" }, classAttribute: "ngs-rail-nav-item" }, exportAs: ["ngsRailNavItem"], ngImport: i0, template: "<div class=\"icon\" ngsRipple>\n <ng-content select=\"[ngsRailNavItemIcon]\"/>\n</div>\n<div class=\"label\">\n <ng-content/>\n</div>\n", styles: [":host{display:flex;flex:none;align-items:center;justify-content:center;flex-direction:column;cursor:pointer;gap:calc(var(--spacing, .25rem) * .5);color:var(--ngs-rail-nav-bg-item-color)}:host .icon{padding:calc(var(--spacing, .25rem) * 1.5) calc(var(--spacing, .25rem) * 4);border-radius:calc(infinity * 1px);color:var(--ngs-rail-nav-bg-item-icon-color);display:flex;align-items:center;justify-content:center}:host .icon:empty{display:none}:host:hover .icon{background:var(--ngs-rail-nav-bg-item-icon-hover-bg)}:host:hover .icon ::ng-deep *{scale:1.025;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.25s}:host:active .icon{background:var(--ngs-rail-nav-bg-item-icon-active-bg)}:host.is-active{--icon-color: var(--ngs-rail-nav-bg-item-icon-is-active-color)}:host.is-active .icon{background:var(--ngs-rail-nav-bg-item-icon-is-active-bg)}:host.is-active{color:var(--ngs-rail-nav-bg-item-active-color)}:host.is-active:active .icon{background:var(--ngs-rail-nav-bg-item-icon-is-active-active-bg)}:host .label{font-size:var(--text-tiny)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }] });
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNavItem, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ selector: 'ngs-rail-nav-item,[ngs-rail-nav-item]', exportAs: 'ngsRailNavItem', imports: [
|
|
62
|
+
Ripple
|
|
63
|
+
], host: {
|
|
64
|
+
'class': 'ngs-rail-nav-item',
|
|
65
|
+
'[class.is-active]': 'isActive',
|
|
66
|
+
'(click)': 'click($event)'
|
|
67
|
+
}, template: "<div class=\"icon\" ngsRipple>\n <ng-content select=\"[ngsRailNavItemIcon]\"/>\n</div>\n<div class=\"label\">\n <ng-content/>\n</div>\n", styles: [":host{display:flex;flex:none;align-items:center;justify-content:center;flex-direction:column;cursor:pointer;gap:calc(var(--spacing, .25rem) * .5);color:var(--ngs-rail-nav-bg-item-color)}:host .icon{padding:calc(var(--spacing, .25rem) * 1.5) calc(var(--spacing, .25rem) * 4);border-radius:calc(infinity * 1px);color:var(--ngs-rail-nav-bg-item-icon-color);display:flex;align-items:center;justify-content:center}:host .icon:empty{display:none}:host:hover .icon{background:var(--ngs-rail-nav-bg-item-icon-hover-bg)}:host:hover .icon ::ng-deep *{scale:1.025;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.25s}:host:active .icon{background:var(--ngs-rail-nav-bg-item-icon-active-bg)}:host.is-active{--icon-color: var(--ngs-rail-nav-bg-item-icon-is-active-color)}:host.is-active .icon{background:var(--ngs-rail-nav-bg-item-icon-is-active-bg)}:host.is-active{color:var(--ngs-rail-nav-bg-item-active-color)}:host.is-active:active .icon{background:var(--ngs-rail-nav-bg-item-icon-is-active-active-bg)}:host .label{font-size:var(--text-tiny)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
68
|
+
}], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }] } });
|
|
69
|
+
|
|
70
|
+
class RailNavItemIconDirective {
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNavItemIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: RailNavItemIconDirective, isStandalone: true, selector: "[ngsRailNavItemIcon]", ngImport: i0 });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RailNavItemIconDirective, decorators: [{
|
|
75
|
+
type: Directive,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: '[ngsRailNavItemIcon]',
|
|
78
|
+
standalone: true
|
|
79
|
+
}]
|
|
80
|
+
}] });
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Generated bundle index. Do not edit.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
export { RailNav, RailNavItem, RailNavItemIconDirective };
|
|
87
|
+
//# sourceMappingURL=ngstarter-ui-components-rail-nav.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-rail-nav.mjs","sources":["../../../projects/components/rail-nav/src/types.ts","../../../projects/components/rail-nav/src/rail-nav/rail-nav.ts","../../../projects/components/rail-nav/src/rail-nav/rail-nav.html","../../../projects/components/rail-nav/src/rail-nav-item/rail-nav-item.ts","../../../projects/components/rail-nav/src/rail-nav-item/rail-nav-item.html","../../../projects/components/rail-nav/src/rail-nav-item-icon.directive.ts","../../../projects/components/rail-nav/ngstarter-ui-components-rail-nav.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport const RAIL_NAV = new InjectionToken('RAIL_NAV');\n\nexport interface RailNavAPI {\n getActiveKey: () => any;\n activateItem: (key: any) => void;\n isActive: (key: any) => boolean;\n}\n\nexport interface RailNavComponent {\n api: RailNavAPI;\n}\n","import { Component, forwardRef, input, OnInit } from '@angular/core';\nimport { RAIL_NAV, RailNavAPI } from '../types';\n\n@Component({\n selector: 'ngs-rail-nav',\n exportAs: 'ngsRailNav',\n imports: [],\n templateUrl: './rail-nav.html',\n styleUrl: './rail-nav.scss',\n providers: [\n {\n provide: RAIL_NAV,\n useExisting: forwardRef(() => RailNav),\n }\n ],\n host: {\n 'class': 'ngs-rail-nav'\n }\n})\nexport class RailNav implements OnInit {\n activeKey = input();\n\n private _activeKey: any;\n\n readonly api: RailNavAPI = {\n activateItem: (key: any) => {\n this._activeKey = key;\n },\n getActiveKey: () => this._activeKey,\n isActive: (key: any) => key === this._activeKey,\n };\n\n ngOnInit() {\n this._activeKey = this.activeKey();\n }\n}\n","<ng-content/>\n","import { Component, inject, input } from '@angular/core';\nimport { v7 as uuid } from 'uuid';\nimport { RAIL_NAV, RailNavComponent } from '../types';\nimport { Ripple } from '@ngstarter-ui/components/core';\n\n@Component({\n selector: 'ngs-rail-nav-item,[ngs-rail-nav-item]',\n exportAs: 'ngsRailNavItem',\n templateUrl: './rail-nav-item.html',\n styleUrl: './rail-nav-item.scss',\n imports: [\n Ripple\n ],\n host: {\n 'class': 'ngs-rail-nav-item',\n '[class.is-active]': 'isActive',\n '(click)': 'click($event)'\n }\n})\nexport class RailNavItem {\n protected _railNav = inject<RailNavComponent>(RAIL_NAV);\n\n key = input(uuid());\n\n get isActive(): boolean {\n if (!this.key() || !this._railNav.api.getActiveKey()) {\n return false;\n }\n\n return this._railNav.api.isActive(this.key());\n }\n\n click(event: MouseEvent) {\n if (!this.key()) {\n return;\n }\n\n this._railNav.api.activateItem(this.key());\n }\n}\n","<div class=\"icon\" ngsRipple>\n <ng-content select=\"[ngsRailNavItemIcon]\"/>\n</div>\n<div class=\"label\">\n <ng-content/>\n</div>\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsRailNavItemIcon]',\n standalone: true\n})\nexport class RailNavItemIconDirective {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid"],"mappings":";;;;;AAEO,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,UAAU,CAAC;;MCiBzC,OAAO,CAAA;IAClB,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAE;AAEX,IAAA,UAAU;AAET,IAAA,GAAG,GAAe;AACzB,QAAA,YAAY,EAAE,CAAC,GAAQ,KAAI;AACzB,YAAA,IAAI,CAAC,UAAU,GAAG,GAAG;QACvB,CAAC;AACD,QAAA,YAAY,EAAE,MAAM,IAAI,CAAC,UAAU;QACnC,QAAQ,EAAE,CAAC,GAAQ,KAAK,GAAG,KAAK,IAAI,CAAC,UAAU;KAChD;IAED,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE;IACpC;uGAfW,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAA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OAAA,EAAA,CAAA,yBAAA,EAAA,yBAAA,EAAA,wBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAQG,WAAW,EAAA,UAAA,EAAA,CAAA;kBAdvB,SAAS;+BACE,uCAAuC,EAAA,QAAA,EACvC,gBAAgB,EAAA,OAAA,EAGjB;wBACP;qBACD,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,mBAAmB;AAC5B,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,SAAS,EAAE;AACZ,qBAAA,EAAA,QAAA,EAAA,2IAAA,EAAA,MAAA,EAAA,CAAA,+nCAAA,CAAA,EAAA;;;MEXU,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Renderer2, ElementRef, ChangeDetectorRef, NgZone, DestroyRef, DOCUMENT, viewChild, input, numberAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { fromEvent, throttleTime } from 'rxjs';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
|
|
6
|
+
class ResizableContainer {
|
|
7
|
+
_renderer = inject(Renderer2);
|
|
8
|
+
_elementRef = inject(ElementRef);
|
|
9
|
+
_cdr = inject(ChangeDetectorRef);
|
|
10
|
+
_ngZone = inject(NgZone);
|
|
11
|
+
_destroyRef = inject(DestroyRef);
|
|
12
|
+
_document = inject(DOCUMENT);
|
|
13
|
+
_resizing = false;
|
|
14
|
+
_maxWidth;
|
|
15
|
+
_clientX;
|
|
16
|
+
_initialWidth;
|
|
17
|
+
handlerRef = viewChild.required('handler');
|
|
18
|
+
minWidth = input(0, { ...(ngDevMode ? { debugName: "minWidth" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
19
|
+
resized = output();
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
this._ngZone.runOutsideAngular(() => {
|
|
22
|
+
fromEvent(this.handlerRef().nativeElement, 'mousedown')
|
|
23
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
24
|
+
.subscribe((event) => {
|
|
25
|
+
this._resizing = true;
|
|
26
|
+
this._maxWidth = this._elementRef.nativeElement.parentElement.getBoundingClientRect().width;
|
|
27
|
+
this._clientX = event.clientX;
|
|
28
|
+
this._initialWidth = this._elementRef.nativeElement.getBoundingClientRect().width;
|
|
29
|
+
// Prevent text selection during resize
|
|
30
|
+
this._document.body.style.userSelect = 'none';
|
|
31
|
+
this._document.body.style.cursor = 'ew-resize';
|
|
32
|
+
this._cdr.detectChanges();
|
|
33
|
+
});
|
|
34
|
+
fromEvent(this._document, 'mousemove')
|
|
35
|
+
.pipe(throttleTime(5), takeUntilDestroyed(this._destroyRef))
|
|
36
|
+
.subscribe((event) => {
|
|
37
|
+
if (this._resizing) {
|
|
38
|
+
let width = this._initialWidth - (this._clientX - event.clientX);
|
|
39
|
+
if (width <= this.minWidth()) {
|
|
40
|
+
width = this.minWidth();
|
|
41
|
+
}
|
|
42
|
+
else if (width >= this._maxWidth) {
|
|
43
|
+
width = this._maxWidth;
|
|
44
|
+
}
|
|
45
|
+
this._renderer.setStyle(this._elementRef.nativeElement, 'width', width + 'px');
|
|
46
|
+
this.resized.emit({ width });
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
fromEvent(this._document, 'mouseup')
|
|
50
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
51
|
+
.subscribe(event => {
|
|
52
|
+
this._resizing = false;
|
|
53
|
+
this._document.body.style.userSelect = '';
|
|
54
|
+
this._document.body.style.cursor = '';
|
|
55
|
+
this._cdr.detectChanges();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResizableContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: ResizableContainer, isStandalone: true, selector: "ngs-resizable-container", inputs: { minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resized: "resized" }, host: { classAttribute: "ngs-resizable-container" }, viewQueries: [{ propertyName: "handlerRef", first: true, predicate: ["handler"], descendants: true, isSignal: true }], exportAs: ["ngsResizableContainer"], ngImport: i0, template: "<div class=\"content\">\n <ng-content/>\n</div>\n<button #handler class=\"handler\">\n <span class=\"handler-indicator\"></span>\n</button>\n", styles: [":host{position:relative;display:flex;align-items:stretch;overflow:hidden}:host .content{flex-grow:1;width:100%;height:100%;margin-inline-end:calc(var(--spacing, .25rem) * 4)}:host .handler{position:absolute;-webkit-user-select:none;user-select:none;top:0;bottom:0;inset-inline-end:0;cursor:ew-resize;align-items:center;display:flex;justify-content:center;width:calc(var(--spacing, .25rem) * 5)}:host .handler .handler-indicator{display:flex;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 1.5);border-radius:calc(infinity * 1px);background:var(--color-surface-container-highest)}:host .handler:hover .handler-indicator,:host .handler:active .handler-indicator{background:var(--color-secondary)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResizableContainer, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'ngs-resizable-container', exportAs: 'ngsResizableContainer', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
65
|
+
'class': 'ngs-resizable-container'
|
|
66
|
+
}, template: "<div class=\"content\">\n <ng-content/>\n</div>\n<button #handler class=\"handler\">\n <span class=\"handler-indicator\"></span>\n</button>\n", styles: [":host{position:relative;display:flex;align-items:stretch;overflow:hidden}:host .content{flex-grow:1;width:100%;height:100%;margin-inline-end:calc(var(--spacing, .25rem) * 4)}:host .handler{position:absolute;-webkit-user-select:none;user-select:none;top:0;bottom:0;inset-inline-end:0;cursor:ew-resize;align-items:center;display:flex;justify-content:center;width:calc(var(--spacing, .25rem) * 5)}:host .handler .handler-indicator{display:flex;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 1.5);border-radius:calc(infinity * 1px);background:var(--color-surface-container-highest)}:host .handler:hover .handler-indicator,:host .handler:active .handler-indicator{background:var(--color-secondary)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
67
|
+
}], propDecorators: { handlerRef: [{ type: i0.ViewChild, args: ['handler', { isSignal: true }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], resized: [{ type: i0.Output, args: ["resized"] }] } });
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Generated bundle index. Do not edit.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
export { ResizableContainer };
|
|
74
|
+
//# sourceMappingURL=ngstarter-ui-components-resizable-container.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-resizable-container.mjs","sources":["../../../projects/components/resizable-container/src/resizable-container/resizable-container.ts","../../../projects/components/resizable-container/src/resizable-container/resizable-container.html","../../../projects/components/resizable-container/ngstarter-ui-components-resizable-container.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n inject, input,\n NgZone,\n numberAttribute,\n OnInit,\n Renderer2,\n viewChild,\n DOCUMENT,\n output\n} from '@angular/core';\nimport { fromEvent, throttleTime } from 'rxjs';\n\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'ngs-resizable-container',\n exportAs: 'ngsResizableContainer',\n templateUrl: './resizable-container.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './resizable-container.scss',\n host: {\n 'class': 'ngs-resizable-container'\n }\n})\nexport class ResizableContainer implements OnInit {\n private _renderer = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _cdr = inject(ChangeDetectorRef);\n private _ngZone = inject(NgZone);\n private _destroyRef = inject(DestroyRef);\n private _document = inject(DOCUMENT);\n private _resizing = false;\n private _maxWidth: number;\n private _clientX: number;\n private _initialWidth: number;\n\n readonly handlerRef = viewChild.required<ElementRef>('handler');\n\n minWidth = input(0, {\n transform: numberAttribute\n });\n\n readonly resized = output<{ width: number }>();\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n fromEvent<MouseEvent>(this.handlerRef().nativeElement, 'mousedown')\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe((event: MouseEvent) => {\n this._resizing = true;\n this._maxWidth = this._elementRef.nativeElement.parentElement.getBoundingClientRect().width;\n this._clientX = event.clientX;\n this._initialWidth = this._elementRef.nativeElement.getBoundingClientRect().width;\n\n // Prevent text selection during resize\n this._document.body.style.userSelect = 'none';\n this._document.body.style.cursor = 'ew-resize';\n\n this._cdr.detectChanges();\n })\n ;\n fromEvent<MouseEvent>(this._document, 'mousemove')\n .pipe(\n throttleTime(5),\n takeUntilDestroyed(this._destroyRef)\n )\n .subscribe((event: MouseEvent) => {\n if (this._resizing) {\n let width = this._initialWidth - (this._clientX - event.clientX);\n\n if (width <= this.minWidth()) {\n width = this.minWidth();\n } else if (width >= this._maxWidth) {\n width = this._maxWidth;\n }\n\n this._renderer.setStyle(this._elementRef.nativeElement, 'width', width + 'px');\n this.resized.emit({ width });\n }\n })\n ;\n fromEvent(this._document, 'mouseup')\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(event => {\n this._resizing = false;\n this._document.body.style.userSelect = '';\n this._document.body.style.cursor = '';\n this._cdr.detectChanges();\n })\n ;\n });\n }\n}\n","<div class=\"content\">\n <ng-content/>\n</div>\n<button #handler class=\"handler\">\n <span class=\"handler-indicator\"></span>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA6Ba,kBAAkB,CAAA;AACrB,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChC,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5B,SAAS,GAAG,KAAK;AACjB,IAAA,SAAS;AACT,IAAA,QAAQ;AACR,IAAA,aAAa;AAEZ,IAAA,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAa,SAAS,CAAC;IAE/D,QAAQ,GAAG,KAAK,CAAC,CAAC,gFAChB,SAAS,EAAE,eAAe,EAAA,CAC1B;IAEO,OAAO,GAAG,MAAM,EAAqB;IAE9C,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAK;YAClC,SAAS,CAAa,IAAI,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE,WAAW;AAC/D,iBAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CA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AAA;wEAcoD,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzChE;;AAEG;;;;"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, TemplateRef, Component, Injectable } from '@angular/core';
|
|
3
|
+
import { ProgressBar } from '@ngstarter-ui/components/progress-bar';
|
|
4
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
7
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
|
|
10
|
+
class ScreenLoader {
|
|
11
|
+
opened = input(false, { ...(ngDevMode ? { debugName: "opened" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12
|
+
message = input(null, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
13
|
+
isTemplateRef(value) {
|
|
14
|
+
return value instanceof TemplateRef;
|
|
15
|
+
}
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ScreenLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ScreenLoader, isStandalone: true, selector: "ngs-screen-loader", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-opened": "opened()" }, classAttribute: "ngs-screen-loader not-prose" }, exportAs: ["ngsScreenLoader"], ngImport: i0, template: "<div class=\"message\">\n @if (message(); as msg) {\n @if (isTemplateRef(msg)) {\n <ng-container *ngTemplateOutlet=\"msg\" />\n } @else {\n {{ msg }}\n }\n } @else {\n <ng-content/>\n }\n</div>\n<div class=\"progress-bar\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n</div>\n", styles: [":host{--ngs-screen-loader-bg: var(--color-background);opacity:0;position:fixed;inset:0;z-index:-9999;display:flex;align-items:center;justify-content:center;flex-direction:column;background:var(--ngs-screen-loader-bg)}:host.is-opened{z-index:9999;opacity:1}:host .message{max-width:600px;line-height:var(--leading-snug);text-align:center}:host .progress-bar{width:calc(var(--spacing, .25rem) * 64);margin-top:calc(var(--spacing, .25rem) * 5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: ProgressBar, selector: "ngs-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["ngsProgressBar"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ScreenLoader, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'ngs-screen-loader', exportAs: 'ngsScreenLoader', imports: [
|
|
22
|
+
ProgressBar,
|
|
23
|
+
NgTemplateOutlet
|
|
24
|
+
], host: {
|
|
25
|
+
'class': 'ngs-screen-loader not-prose',
|
|
26
|
+
'[class.is-opened]': 'opened()'
|
|
27
|
+
}, template: "<div class=\"message\">\n @if (message(); as msg) {\n @if (isTemplateRef(msg)) {\n <ng-container *ngTemplateOutlet=\"msg\" />\n } @else {\n {{ msg }}\n }\n } @else {\n <ng-content/>\n }\n</div>\n<div class=\"progress-bar\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n</div>\n", styles: [":host{--ngs-screen-loader-bg: var(--color-background);opacity:0;position:fixed;inset:0;z-index:-9999;display:flex;align-items:center;justify-content:center;flex-direction:column;background:var(--ngs-screen-loader-bg)}:host.is-opened{z-index:9999;opacity:1}:host .message{max-width:600px;line-height:var(--leading-snug);text-align:center}:host .progress-bar{width:calc(var(--spacing, .25rem) * 64);margin-top:calc(var(--spacing, .25rem) * 5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
28
|
+
}], propDecorators: { opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
|
|
29
|
+
|
|
30
|
+
class ScreenLoaderRef {
|
|
31
|
+
overlayRef;
|
|
32
|
+
_afterOpened = new Subject();
|
|
33
|
+
_afterClosed = new Subject();
|
|
34
|
+
constructor(overlayRef) {
|
|
35
|
+
this.overlayRef = overlayRef;
|
|
36
|
+
this.overlayRef.detachments().subscribe(() => {
|
|
37
|
+
this._afterClosed.next();
|
|
38
|
+
this._afterClosed.complete();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
close() {
|
|
42
|
+
this.overlayRef.dispose();
|
|
43
|
+
}
|
|
44
|
+
afterOpened() {
|
|
45
|
+
return this._afterOpened.asObservable();
|
|
46
|
+
}
|
|
47
|
+
afterClosed() {
|
|
48
|
+
return this._afterClosed.asObservable();
|
|
49
|
+
}
|
|
50
|
+
_notifyOpened() {
|
|
51
|
+
this._afterOpened.next();
|
|
52
|
+
this._afterOpened.complete();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
class ScreenLoaderService {
|
|
57
|
+
overlay;
|
|
58
|
+
injector;
|
|
59
|
+
constructor(overlay, injector) {
|
|
60
|
+
this.overlay = overlay;
|
|
61
|
+
this.injector = injector;
|
|
62
|
+
}
|
|
63
|
+
open(message) {
|
|
64
|
+
const overlayConfig = new OverlayConfig({
|
|
65
|
+
hasBackdrop: true,
|
|
66
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
67
|
+
positionStrategy: this.overlay.position().global(),
|
|
68
|
+
width: '100%',
|
|
69
|
+
height: '100%'
|
|
70
|
+
});
|
|
71
|
+
const overlayRef = this.overlay.create(overlayConfig);
|
|
72
|
+
const screenLoaderRef = new ScreenLoaderRef(overlayRef);
|
|
73
|
+
const componentPortal = new ComponentPortal(ScreenLoader, null, this.injector);
|
|
74
|
+
const componentRef = overlayRef.attach(componentPortal);
|
|
75
|
+
componentRef.setInput('opened', true);
|
|
76
|
+
componentRef.setInput('message', message);
|
|
77
|
+
screenLoaderRef._notifyOpened();
|
|
78
|
+
return screenLoaderRef;
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ScreenLoaderService, deps: [{ token: i1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
81
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ScreenLoaderService, providedIn: 'root' });
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ScreenLoaderService, decorators: [{
|
|
84
|
+
type: Injectable,
|
|
85
|
+
args: [{
|
|
86
|
+
providedIn: 'root'
|
|
87
|
+
}]
|
|
88
|
+
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }] });
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Generated bundle index. Do not edit.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
export { ScreenLoader, ScreenLoaderRef, ScreenLoaderService };
|
|
95
|
+
//# sourceMappingURL=ngstarter-ui-components-screen-loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-screen-loader.mjs","sources":["../../../projects/components/screen-loader/src/screen-loader/screen-loader.ts","../../../projects/components/screen-loader/src/screen-loader/screen-loader.html","../../../projects/components/screen-loader/src/screen-loader/screen-loader-ref.ts","../../../projects/components/screen-loader/src/screen-loader/screen-loader.service.ts","../../../projects/components/screen-loader/ngstarter-ui-components-screen-loader.ts"],"sourcesContent":["import { booleanAttribute, Component, input, TemplateRef } from '@angular/core';\nimport { ProgressBar } from '@ngstarter-ui/components/progress-bar';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'ngs-screen-loader',\n exportAs: 'ngsScreenLoader',\n imports: [\n ProgressBar,\n NgTemplateOutlet\n ],\n templateUrl: './screen-loader.html',\n styleUrl: './screen-loader.scss',\n host: {\n 'class': 'ngs-screen-loader not-prose',\n '[class.is-opened]': 'opened()'\n }\n})\nexport class ScreenLoader {\n opened = input(false, {\n transform: booleanAttribute\n });\n\n message = input<string | TemplateRef<any> | null>(null);\n\n protected isTemplateRef(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n}\n","<div class=\"message\">\n @if (message(); as msg) {\n @if (isTemplateRef(msg)) {\n <ng-container *ngTemplateOutlet=\"msg\" />\n } @else {\n {{ msg }}\n }\n } @else {\n <ng-content/>\n }\n</div>\n<div class=\"progress-bar\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n</div>\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { Observable, Subject } from 'rxjs';\n\nexport class ScreenLoaderRef {\n private readonly _afterOpened = new Subject<void>();\n private readonly _afterClosed = new Subject<void>();\n\n constructor(private overlayRef: OverlayRef) {\n this.overlayRef.detachments().subscribe(() => {\n this._afterClosed.next();\n this._afterClosed.complete();\n });\n }\n\n close(): void {\n this.overlayRef.dispose();\n }\n\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n afterClosed(): Observable<void> {\n return this._afterClosed.asObservable();\n }\n\n _notifyOpened() {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n}\n","import { ComponentRef, Injectable, Injector, TemplateRef } from '@angular/core';\nimport { Overlay, OverlayConfig } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ScreenLoader } from './screen-loader';\nimport { ScreenLoaderRef } from './screen-loader-ref';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScreenLoaderService {\n constructor(\n private overlay: Overlay,\n private injector: Injector\n ) {}\n\n open(message: string | TemplateRef<any>): ScreenLoaderRef {\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global(),\n width: '100%',\n height: '100%'\n });\n\n const overlayRef = this.overlay.create(overlayConfig);\n const screenLoaderRef = new ScreenLoaderRef(overlayRef);\n\n const componentPortal = new ComponentPortal(ScreenLoader, null, this.injector);\n const componentRef: ComponentRef<ScreenLoader> = overlayRef.attach(componentPortal);\n\n componentRef.setInput('opened', true);\n componentRef.setInput('message', message);\n\n screenLoaderRef._notifyOpened();\n\n return screenLoaderRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,YAAY,CAAA;IACvB,MAAM,GAAG,KAAK,CAAC,KAAK,8EAClB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AAEF,IAAA,OAAO,GAAG,KAAK,CAAmC,IAAI,8EAAC;AAE7C,IAAA,aAAa,CAAC,KAAU,EAAA;QAChC,OAAO,KAAK,YAAY,WAAW;IACrC;uGATW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ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