dasar-ui 1.1.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +31 -0
- package/.github/workflows/npm-publish-github-packages.yml +36 -0
- package/.versionrc.json +4 -0
- package/CHANGELOG.md +30 -0
- package/Dockerfile +26 -0
- package/angular.json +77 -0
- package/package.json +38 -24
- package/projects/dasar-ui/package.json +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.ts +3 -7
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.ts +2 -2
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.html +11 -2
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.scss +30 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.spec.ts +78 -6
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.ts +32 -32
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.registry.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.scss +0 -30
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.ts +0 -4
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list-item.html +17 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.html +25 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.scss +122 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.ts +166 -0
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.html +6 -5
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.scss +39 -5
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.spec.ts +78 -6
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.ts +41 -3
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.html +72 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.scss +170 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.spec.ts +267 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.ts +305 -0
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.scss +2 -7
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.html +11 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.scss +18 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.spec.ts +104 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.ts +87 -0
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.html +1 -14
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.scss +0 -11
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.html +9 -5
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.scss +62 -22
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.spec.ts +82 -6
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.ts +47 -4
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.html +92 -30
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.scss +137 -25
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.spec.ts +554 -5
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.ts +312 -35
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +6 -21
- package/projects/dasar-ui/src/lib/models/theme.model.ts +35 -12
- package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +65 -0
- package/projects/dasar-ui/src/lib/services/theme.service.ts +68 -4
- package/projects/dasar-ui/src/lib/styles/theme.scss +47 -48
- package/projects/dasar-ui/src/lib/utils/common.ts +5 -24
- package/projects/dasar-ui/src/lib/utils/icon-size.spec.ts +23 -0
- package/projects/dasar-ui/src/lib/utils/icon-size.ts +16 -0
- package/projects/dasar-ui/src/lib/utils/panel-placement.spec.ts +90 -0
- package/projects/dasar-ui/src/lib/utils/panel-placement.ts +53 -0
- package/projects/dasar-ui/src/public-api.ts +4 -4
- package/projects/dasar-ui/tsconfig.spec.json +8 -1
- package/projects/documentation/public/favicon.ico +0 -0
- package/projects/documentation/src/app/app.html +51 -0
- package/projects/documentation/src/app/app.spec.ts +23 -0
- package/projects/documentation/src/app/app.ts +23 -0
- package/projects/documentation/src/app/components/doc-customize-modal.component.ts +314 -0
- package/projects/documentation/src/app/components/doc-example.component.ts +195 -0
- package/projects/documentation/src/app/config/app.config.server.ts +10 -0
- package/projects/documentation/src/app/config/app.config.ts +17 -0
- package/projects/documentation/src/app/layouts/doc.layout.ts +229 -0
- package/projects/documentation/src/app/pages/button/button.page.html +65 -0
- package/projects/documentation/src/app/pages/button/button.page.ts +139 -0
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.html +7 -0
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.html +19 -0
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.html +9 -0
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.html +7 -0
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.html +10 -0
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.html +9 -0
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.ts +10 -0
- package/projects/documentation/src/app/pages/calendar/calendar.page.html +75 -0
- package/projects/documentation/src/app/pages/calendar/calendar.page.ts +165 -0
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.html +21 -0
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.ts +10 -0
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.html +11 -0
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.html +36 -0
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.ts +11 -0
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.html +10 -0
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.ts +12 -0
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.html +15 -0
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.ts +12 -0
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.html +34 -0
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.ts +14 -0
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.html +20 -0
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.ts +37 -0
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.html +16 -0
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/card.page.html +75 -0
- package/projects/documentation/src/app/pages/card/card.page.ts +182 -0
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.html +13 -0
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.html +30 -0
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.ts +19 -0
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.html +173 -0
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.html +27 -0
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.html +13 -0
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.html +20 -0
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.html +11 -0
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/chip.page.html +55 -0
- package/projects/documentation/src/app/pages/chip/chip.page.ts +158 -0
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.html +7 -0
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.html +13 -0
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.ts +17 -0
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.html +9 -0
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.html +6 -0
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.html +8 -0
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.html +75 -0
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.ts +181 -0
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.html +29 -0
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.html +12 -0
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.ts +12 -0
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.html +23 -0
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.ts +17 -0
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.html +30 -0
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.ts +13 -0
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.html +24 -0
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.html +19 -0
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.html +28 -0
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.ts +12 -0
- package/projects/documentation/src/app/pages/icon/icon.page.html +15 -0
- package/projects/documentation/src/app/pages/icon/icon.page.ts +60 -0
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.html +27 -0
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.html +31 -0
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.ts +19 -0
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.html +68 -0
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.ts +18 -0
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.html +52 -0
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.html +29 -0
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/input.page.html +65 -0
- package/projects/documentation/src/app/pages/input/input.page.ts +170 -0
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.html +5 -0
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.ts +17 -0
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.html +35 -0
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.ts +57 -0
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.html +12 -0
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.ts +16 -0
- package/projects/documentation/src/app/pages/menu/menu.page.html +35 -0
- package/projects/documentation/src/app/pages/menu/menu.page.ts +149 -0
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.html +18 -0
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.ts +21 -0
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.html +8 -0
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.html +44 -0
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.ts +14 -0
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.html +36 -0
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.html +29 -0
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.ts +14 -0
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.html +27 -0
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.ts +27 -0
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.html +14 -0
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.ts +13 -0
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.html +17 -0
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.ts +21 -0
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.html +30 -0
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.html +23 -0
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.ts +13 -0
- package/projects/documentation/src/app/pages/modal/modal.page.html +105 -0
- package/projects/documentation/src/app/pages/modal/modal.page.ts +257 -0
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.html +30 -0
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.html +12 -0
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.html +30 -0
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.ts +14 -0
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.html +49 -0
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.html +21 -0
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/number-input.page.html +55 -0
- package/projects/documentation/src/app/pages/number-input/number-input.page.ts +142 -0
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.html +32 -0
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.ts +15 -0
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.ts +20 -0
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.html +24 -0
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.ts +59 -0
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.html +20 -0
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.ts +20 -0
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.html +13 -0
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.ts +22 -0
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.html +44 -0
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.ts +15 -0
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.html +31 -0
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.ts +12 -0
- package/projects/documentation/src/app/pages/select/select.page.html +75 -0
- package/projects/documentation/src/app/pages/select/select.page.ts +195 -0
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.html +14 -0
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.ts +25 -0
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.html +12 -0
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.html +29 -0
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.ts +20 -0
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.html +39 -0
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.html +7 -0
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.html +3 -0
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.ts +41 -0
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.html +43 -0
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.html +36 -0
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.ts +34 -0
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.html +8 -0
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.ts +52 -0
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.html +53 -0
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.ts +50 -0
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.html +23 -0
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.ts +42 -0
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.html +20 -0
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/table.page.html +125 -0
- package/projects/documentation/src/app/pages/table/table.page.ts +261 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.html +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.ts +27 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.html +27 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.ts +36 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.html +5 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.ts +20 -0
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.html +19 -0
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.html +16 -0
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.ts +23 -0
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.html +5 -0
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.html +20 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.ts +30 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.html +16 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.ts +26 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.html +22 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.ts +26 -0
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.html +25 -0
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/tabs.page.html +165 -0
- package/projects/documentation/src/app/pages/tabs/tabs.page.ts +340 -0
- package/projects/documentation/src/app/routes/app.routes.server.ts +8 -0
- package/projects/documentation/src/app/routes/app.routes.ts +87 -0
- package/projects/documentation/src/app/services/doc-customize.service.ts +107 -0
- package/projects/documentation/src/app/utils/highlight.pipe.ts +43 -0
- package/projects/documentation/src/index.html +13 -0
- package/projects/documentation/src/main.server.ts +7 -0
- package/projects/documentation/src/main.ts +5 -0
- package/projects/documentation/src/server.ts +47 -0
- package/projects/documentation/src/styles.scss +7 -0
- package/projects/documentation/tsconfig.app.json +11 -0
- package/projects/documentation/tsconfig.spec.json +10 -0
- package/tsconfig.json +6 -3
- package/.nvmrc +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-custom-style.example.html',
|
|
6
|
+
selector: 'app-modal-custom-style-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalCustomStyleExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
}
|
package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<p style="margin: 0 0 8px">
|
|
2
|
+
This text sits behind the overlay, so you can see how much of it stays readable.
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
6
|
+
<dasar-button (click)="blur.set('0px'); open.set(true)">No blur</dasar-button>
|
|
7
|
+
<dasar-button (click)="blur.set('4px'); open.set(true)">Default blur</dasar-button>
|
|
8
|
+
<dasar-button (click)="blur.set('12px'); open.set(true)">Heavy blur</dasar-button>
|
|
9
|
+
<dasar-button
|
|
10
|
+
(click)="blur.set('6px'); background.set('rgba(37, 99, 235, 0.35)'); open.set(true)"
|
|
11
|
+
>
|
|
12
|
+
Tinted backdrop
|
|
13
|
+
</dasar-button>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<dasar-modal
|
|
17
|
+
[open]="open()"
|
|
18
|
+
label="Overlay"
|
|
19
|
+
[overlay-blur]="blur()"
|
|
20
|
+
[overlay-background]="background()"
|
|
21
|
+
(onClose)="open.set(false)"
|
|
22
|
+
>
|
|
23
|
+
<p>
|
|
24
|
+
<code>overlay-blur</code> controls the backdrop blur radius and
|
|
25
|
+
<code>overlay-background</code> its color. Both are passed down to the underlying
|
|
26
|
+
<code>dasar-overlay</code>.
|
|
27
|
+
</p>
|
|
28
|
+
<p>Current blur: {{ blur() }}. Current background: {{ background() }}.</p>
|
|
29
|
+
</dasar-modal>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-overlay.example.html',
|
|
6
|
+
selector: 'app-modal-overlay-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalOverlayExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected blur = signal('4px');
|
|
13
|
+
protected background = signal('rgba(0, 0, 0, 0.45)');
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<h4 style="margin: 0 0 8px">Radius</h4>
|
|
2
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px">
|
|
3
|
+
@for (r of radii; track r) {
|
|
4
|
+
<dasar-button size="sm" radius="md" (click)="showRadius(r)">{{ r }}</dasar-button>
|
|
5
|
+
}
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<h4 style="margin: 0 0 8px">Spacing</h4>
|
|
9
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
10
|
+
@for (s of spacings; track s) {
|
|
11
|
+
<dasar-button size="sm" radius="md" (click)="showSpacing(s)">{{ s }}</dasar-button>
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<dasar-modal
|
|
16
|
+
[open]="open()"
|
|
17
|
+
[radius]="radius()"
|
|
18
|
+
[spacing]="spacing()"
|
|
19
|
+
[label]="'radius: ' + radius() + ' / spacing: ' + spacing()"
|
|
20
|
+
(onClose)="open.set(false)"
|
|
21
|
+
>
|
|
22
|
+
<p>
|
|
23
|
+
<code>radius</code> uses the shared scale from <code>dasar-card</code>.
|
|
24
|
+
<code>spacing</code> switches the padding of the header, body and actions between
|
|
25
|
+
<code>normal</code> and <code>compact</code>.
|
|
26
|
+
</p>
|
|
27
|
+
</dasar-modal>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent, DasarModalRadius } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-radius-spacing.example.html',
|
|
6
|
+
selector: 'app-modal-radius-spacing-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalRadiusSpacingExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected radius = signal<DasarModalRadius>('lg');
|
|
13
|
+
protected spacing = signal<'normal' | 'compact'>('normal');
|
|
14
|
+
|
|
15
|
+
protected radii: DasarModalRadius[] = ['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'];
|
|
16
|
+
protected spacings: Array<'normal' | 'compact'> = ['normal', 'compact'];
|
|
17
|
+
|
|
18
|
+
showRadius(radius: DasarModalRadius) {
|
|
19
|
+
this.radius.set(radius);
|
|
20
|
+
this.open.set(true);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
showSpacing(spacing: 'normal' | 'compact') {
|
|
24
|
+
this.spacing.set(spacing);
|
|
25
|
+
this.open.set(true);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open a tall modal</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal [open]="open()" label="Scrollable body" (onClose)="open.set(false)">
|
|
4
|
+
@for (p of paragraphs; track p) {
|
|
5
|
+
<p>
|
|
6
|
+
Paragraph {{ p }}. When the content is taller than the viewport, only the body scrolls while
|
|
7
|
+
the header and the actions stay visible.
|
|
8
|
+
</p>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
<div action-slot>
|
|
12
|
+
<dasar-button size="md" radius="md" (click)="open.set(false)">Close</dasar-button>
|
|
13
|
+
</div>
|
|
14
|
+
</dasar-modal>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-scroll.example.html',
|
|
6
|
+
selector: 'app-modal-scroll-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalScrollExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected paragraphs = Array.from({ length: 40 }, (_, i) => i + 1);
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
@for (s of sizes; track s) {
|
|
3
|
+
<dasar-button (click)="show(s)">Size: {{ s }}</dasar-button>
|
|
4
|
+
}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<dasar-modal
|
|
8
|
+
[open]="open()"
|
|
9
|
+
[size]="size()"
|
|
10
|
+
[label]="'Size: ' + size()"
|
|
11
|
+
(onClose)="open.set(false)"
|
|
12
|
+
>
|
|
13
|
+
<p>
|
|
14
|
+
The <code>size</code> input controls both the width preset and the typographic scale inside the
|
|
15
|
+
modal: <code>sm</code> is 400px, <code>md</code> is 560px and <code>lg</code> is 800px.
|
|
16
|
+
</p>
|
|
17
|
+
</dasar-modal>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
templateUrl: './modal-size.example.html',
|
|
8
|
+
selector: 'app-modal-size-example',
|
|
9
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
10
|
+
standalone: true,
|
|
11
|
+
})
|
|
12
|
+
export class ModalSizeExample {
|
|
13
|
+
protected open = signal(false);
|
|
14
|
+
protected size = signal<Size>('md');
|
|
15
|
+
protected sizes: Size[] = ['sm', 'md', 'lg'];
|
|
16
|
+
|
|
17
|
+
show(size: Size) {
|
|
18
|
+
this.size.set(size);
|
|
19
|
+
this.open.set(true);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open with slots</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal [open]="open()" (onClose)="open.set(false)">
|
|
4
|
+
<div header-slot style="display: flex; align-items: center; gap: 8px">
|
|
5
|
+
<dasar-icon name="info-circle"></dasar-icon>
|
|
6
|
+
<strong>Custom header content</strong>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<dasar-button close-slot variant="ghost" size="sm" radius="md" (click)="open.set(false)">
|
|
10
|
+
Dismiss
|
|
11
|
+
</dasar-button>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
The <code>header-slot</code> replaces the <code>label</code>, the <code>close-slot</code>
|
|
15
|
+
replaces the default ✕ button, and the default slot is the body.
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<div action-slot>
|
|
19
|
+
<dasar-button
|
|
20
|
+
appearance="outline"
|
|
21
|
+
variant="secondary"
|
|
22
|
+
size="md"
|
|
23
|
+
radius="md"
|
|
24
|
+
(click)="open.set(false)"
|
|
25
|
+
>
|
|
26
|
+
Cancel
|
|
27
|
+
</dasar-button>
|
|
28
|
+
<dasar-button size="md" radius="md" (click)="open.set(false)">Confirm</dasar-button>
|
|
29
|
+
</div>
|
|
30
|
+
</dasar-modal>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent, DasarIconComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-slots.example.html',
|
|
6
|
+
selector: 'app-modal-slots-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent, DasarIconComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalSlotsExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
<dasar-button (click)="openCustom.set(true)">Custom width (720px)</dasar-button>
|
|
3
|
+
<dasar-button (click)="openFull.set(true)">Full width</dasar-button>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<dasar-modal
|
|
7
|
+
[open]="openCustom()"
|
|
8
|
+
label="Custom width"
|
|
9
|
+
width="720px"
|
|
10
|
+
(onClose)="openCustom.set(false)"
|
|
11
|
+
>
|
|
12
|
+
<p>
|
|
13
|
+
The <code>width</code> input sets an explicit width and overrides the preset that comes from
|
|
14
|
+
<code>size</code>.
|
|
15
|
+
</p>
|
|
16
|
+
</dasar-modal>
|
|
17
|
+
|
|
18
|
+
<dasar-modal [open]="openFull()" label="Full width" full-width (onClose)="openFull.set(false)">
|
|
19
|
+
<p>
|
|
20
|
+
<code>full-width</code> makes the modal span the viewport minus the overlay padding, and it wins
|
|
21
|
+
over an explicit <code>width</code>.
|
|
22
|
+
</p>
|
|
23
|
+
</dasar-modal>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-width.example.html',
|
|
6
|
+
selector: 'app-modal-width-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalWidthExample {
|
|
11
|
+
protected openCustom = signal(false);
|
|
12
|
+
protected openFull = signal(false);
|
|
13
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<docs-layout
|
|
2
|
+
title="Modal"
|
|
3
|
+
description="A modal overlays the page to focus the user on a task. It follows the dasar-card structure and naming, adds a scrolling body, and delegates the backdrop to dasar-overlay."
|
|
4
|
+
[apiData]="apiProps"
|
|
5
|
+
>
|
|
6
|
+
<doc-example-component
|
|
7
|
+
[codes]="[
|
|
8
|
+
{ label: 'HTML', lang: 'html', value: basicHtml },
|
|
9
|
+
{ label: 'TypeScript', lang: 'typescript', value: basicTs },
|
|
10
|
+
]"
|
|
11
|
+
title="Basic"
|
|
12
|
+
>
|
|
13
|
+
<app-modal-basic-example />
|
|
14
|
+
</doc-example-component>
|
|
15
|
+
|
|
16
|
+
<doc-example-component
|
|
17
|
+
[codes]="[
|
|
18
|
+
{ label: 'HTML', lang: 'html', value: sizeHtml },
|
|
19
|
+
{ label: 'TypeScript', lang: 'typescript', value: sizeTs },
|
|
20
|
+
]"
|
|
21
|
+
title="Size"
|
|
22
|
+
>
|
|
23
|
+
<app-modal-size-example />
|
|
24
|
+
</doc-example-component>
|
|
25
|
+
|
|
26
|
+
<doc-example-component
|
|
27
|
+
[codes]="[
|
|
28
|
+
{ label: 'HTML', lang: 'html', value: appearanceHtml },
|
|
29
|
+
{ label: 'TypeScript', lang: 'typescript', value: appearanceTs },
|
|
30
|
+
]"
|
|
31
|
+
title="Appearance"
|
|
32
|
+
>
|
|
33
|
+
<app-modal-appearance-example />
|
|
34
|
+
</doc-example-component>
|
|
35
|
+
|
|
36
|
+
<doc-example-component
|
|
37
|
+
[codes]="[
|
|
38
|
+
{ label: 'HTML', lang: 'html', value: radiusSpacingHtml },
|
|
39
|
+
{ label: 'TypeScript', lang: 'typescript', value: radiusSpacingTs },
|
|
40
|
+
]"
|
|
41
|
+
title="Radius & Spacing"
|
|
42
|
+
>
|
|
43
|
+
<app-modal-radius-spacing-example />
|
|
44
|
+
</doc-example-component>
|
|
45
|
+
|
|
46
|
+
<doc-example-component
|
|
47
|
+
[codes]="[
|
|
48
|
+
{ label: 'HTML', lang: 'html', value: widthHtml },
|
|
49
|
+
{ label: 'TypeScript', lang: 'typescript', value: widthTs },
|
|
50
|
+
]"
|
|
51
|
+
title="Width"
|
|
52
|
+
>
|
|
53
|
+
<app-modal-width-example />
|
|
54
|
+
</doc-example-component>
|
|
55
|
+
|
|
56
|
+
<doc-example-component
|
|
57
|
+
[codes]="[
|
|
58
|
+
{ label: 'HTML', lang: 'html', value: slotsHtml },
|
|
59
|
+
{ label: 'TypeScript', lang: 'typescript', value: slotsTs },
|
|
60
|
+
]"
|
|
61
|
+
title="Slots"
|
|
62
|
+
>
|
|
63
|
+
<app-modal-slots-example />
|
|
64
|
+
</doc-example-component>
|
|
65
|
+
|
|
66
|
+
<doc-example-component
|
|
67
|
+
[codes]="[
|
|
68
|
+
{ label: 'HTML', lang: 'html', value: scrollHtml },
|
|
69
|
+
{ label: 'TypeScript', lang: 'typescript', value: scrollTs },
|
|
70
|
+
]"
|
|
71
|
+
title="Scrollable Body"
|
|
72
|
+
>
|
|
73
|
+
<app-modal-scroll-example />
|
|
74
|
+
</doc-example-component>
|
|
75
|
+
|
|
76
|
+
<doc-example-component
|
|
77
|
+
[codes]="[
|
|
78
|
+
{ label: 'HTML', lang: 'html', value: closeBehaviorHtml },
|
|
79
|
+
{ label: 'TypeScript', lang: 'typescript', value: closeBehaviorTs },
|
|
80
|
+
]"
|
|
81
|
+
title="Close Behavior"
|
|
82
|
+
>
|
|
83
|
+
<app-modal-close-behavior-example />
|
|
84
|
+
</doc-example-component>
|
|
85
|
+
|
|
86
|
+
<doc-example-component
|
|
87
|
+
[codes]="[
|
|
88
|
+
{ label: 'HTML', lang: 'html', value: overlayHtml },
|
|
89
|
+
{ label: 'TypeScript', lang: 'typescript', value: overlayTs },
|
|
90
|
+
]"
|
|
91
|
+
title="Overlay"
|
|
92
|
+
>
|
|
93
|
+
<app-modal-overlay-example />
|
|
94
|
+
</doc-example-component>
|
|
95
|
+
|
|
96
|
+
<doc-example-component
|
|
97
|
+
[codes]="[
|
|
98
|
+
{ label: 'HTML', lang: 'html', value: customStyleHtml },
|
|
99
|
+
{ label: 'TypeScript', lang: 'typescript', value: customStyleTs },
|
|
100
|
+
]"
|
|
101
|
+
title="Custom Style"
|
|
102
|
+
>
|
|
103
|
+
<app-modal-custom-style-example />
|
|
104
|
+
</doc-example-component>
|
|
105
|
+
</docs-layout>
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DocsLayoutComponent, DocApiProperty } from '../../layouts/doc.layout';
|
|
4
|
+
import { DocExampleComponent } from '../../components/doc-example.component';
|
|
5
|
+
|
|
6
|
+
import { ModalBasicExample } from './examples/basic/modal-basic.example';
|
|
7
|
+
import { ModalSizeExample } from './examples/size/modal-size.example';
|
|
8
|
+
import { ModalAppearanceExample } from './examples/appearance/modal-appearance.example';
|
|
9
|
+
import { ModalRadiusSpacingExample } from './examples/radius-spacing/modal-radius-spacing.example';
|
|
10
|
+
import { ModalWidthExample } from './examples/width/modal-width.example';
|
|
11
|
+
import { ModalSlotsExample } from './examples/slots/modal-slots.example';
|
|
12
|
+
import { ModalScrollExample } from './examples/scroll/modal-scroll.example';
|
|
13
|
+
import { ModalCloseBehaviorExample } from './examples/close-behavior/modal-close-behavior.example';
|
|
14
|
+
import { ModalOverlayExample } from './examples/overlay/modal-overlay.example';
|
|
15
|
+
import { ModalCustomStyleExample } from './examples/custom-style/modal-custom-style.example';
|
|
16
|
+
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import basicHtml from './examples/basic/modal-basic.example.html' with { loader: 'text' };
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import basicTs from './examples/basic/modal-basic.example.ts' with { loader: 'text' };
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import sizeHtml from './examples/size/modal-size.example.html' with { loader: 'text' };
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import sizeTs from './examples/size/modal-size.example.ts' with { loader: 'text' };
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import appearanceHtml from './examples/appearance/modal-appearance.example.html' with {
|
|
27
|
+
loader: 'text',
|
|
28
|
+
};
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import appearanceTs from './examples/appearance/modal-appearance.example.ts' with {
|
|
31
|
+
loader: 'text',
|
|
32
|
+
};
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import radiusSpacingHtml from './examples/radius-spacing/modal-radius-spacing.example.html' with {
|
|
35
|
+
loader: 'text',
|
|
36
|
+
};
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
import radiusSpacingTs from './examples/radius-spacing/modal-radius-spacing.example.ts' with {
|
|
39
|
+
loader: 'text',
|
|
40
|
+
};
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
import widthHtml from './examples/width/modal-width.example.html' with { loader: 'text' };
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
import widthTs from './examples/width/modal-width.example.ts' with { loader: 'text' };
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
import slotsHtml from './examples/slots/modal-slots.example.html' with { loader: 'text' };
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
import slotsTs from './examples/slots/modal-slots.example.ts' with { loader: 'text' };
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
import scrollHtml from './examples/scroll/modal-scroll.example.html' with { loader: 'text' };
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
import scrollTs from './examples/scroll/modal-scroll.example.ts' with { loader: 'text' };
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
import closeBehaviorHtml from './examples/close-behavior/modal-close-behavior.example.html' with {
|
|
55
|
+
loader: 'text',
|
|
56
|
+
};
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
import closeBehaviorTs from './examples/close-behavior/modal-close-behavior.example.ts' with {
|
|
59
|
+
loader: 'text',
|
|
60
|
+
};
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
import overlayHtml from './examples/overlay/modal-overlay.example.html' with { loader: 'text' };
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
import overlayTs from './examples/overlay/modal-overlay.example.ts' with { loader: 'text' };
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
import customStyleHtml from './examples/custom-style/modal-custom-style.example.html' with {
|
|
67
|
+
loader: 'text',
|
|
68
|
+
};
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
import customStyleTs from './examples/custom-style/modal-custom-style.example.ts' with {
|
|
71
|
+
loader: 'text',
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
@Component({
|
|
75
|
+
imports: [
|
|
76
|
+
CommonModule,
|
|
77
|
+
DocsLayoutComponent,
|
|
78
|
+
DocExampleComponent,
|
|
79
|
+
ModalBasicExample,
|
|
80
|
+
ModalSizeExample,
|
|
81
|
+
ModalAppearanceExample,
|
|
82
|
+
ModalRadiusSpacingExample,
|
|
83
|
+
ModalWidthExample,
|
|
84
|
+
ModalSlotsExample,
|
|
85
|
+
ModalScrollExample,
|
|
86
|
+
ModalCloseBehaviorExample,
|
|
87
|
+
ModalOverlayExample,
|
|
88
|
+
ModalCustomStyleExample,
|
|
89
|
+
],
|
|
90
|
+
templateUrl: './modal.page.html',
|
|
91
|
+
selector: 'app-modal-page',
|
|
92
|
+
standalone: true,
|
|
93
|
+
})
|
|
94
|
+
export class ModalDocPage {
|
|
95
|
+
protected basicHtml = basicHtml;
|
|
96
|
+
protected basicTs = basicTs;
|
|
97
|
+
|
|
98
|
+
protected sizeHtml = sizeHtml;
|
|
99
|
+
protected sizeTs = sizeTs;
|
|
100
|
+
|
|
101
|
+
protected appearanceHtml = appearanceHtml;
|
|
102
|
+
protected appearanceTs = appearanceTs;
|
|
103
|
+
|
|
104
|
+
protected radiusSpacingHtml = radiusSpacingHtml;
|
|
105
|
+
protected radiusSpacingTs = radiusSpacingTs;
|
|
106
|
+
|
|
107
|
+
protected widthHtml = widthHtml;
|
|
108
|
+
protected widthTs = widthTs;
|
|
109
|
+
|
|
110
|
+
protected slotsHtml = slotsHtml;
|
|
111
|
+
protected slotsTs = slotsTs;
|
|
112
|
+
|
|
113
|
+
protected scrollHtml = scrollHtml;
|
|
114
|
+
protected scrollTs = scrollTs;
|
|
115
|
+
|
|
116
|
+
protected closeBehaviorHtml = closeBehaviorHtml;
|
|
117
|
+
protected closeBehaviorTs = closeBehaviorTs;
|
|
118
|
+
|
|
119
|
+
protected overlayHtml = overlayHtml;
|
|
120
|
+
protected overlayTs = overlayTs;
|
|
121
|
+
|
|
122
|
+
protected customStyleHtml = customStyleHtml;
|
|
123
|
+
protected customStyleTs = customStyleTs;
|
|
124
|
+
|
|
125
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
126
|
+
{
|
|
127
|
+
name: 'open',
|
|
128
|
+
type: 'boolean',
|
|
129
|
+
defaultValue: 'false',
|
|
130
|
+
description: 'Shows the modal. The component never closes itself, the consumer controls it.',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'label',
|
|
134
|
+
type: 'string',
|
|
135
|
+
defaultValue: 'undefined',
|
|
136
|
+
description: 'Sets a simple string title for the header. Replaced by the [header-slot].',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'size',
|
|
140
|
+
type: "'sm' | 'md' | 'lg'",
|
|
141
|
+
defaultValue: "'md'",
|
|
142
|
+
description: 'Width preset and typographic scale: sm 400px, md 560px, lg 800px.',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'appearance',
|
|
146
|
+
type: "'outline' | 'borderless' | 'elevated'",
|
|
147
|
+
defaultValue: "'elevated'",
|
|
148
|
+
description: 'Defines the structural border and shadow style of the modal.',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'radius',
|
|
152
|
+
type: 'ScaleAttributeType',
|
|
153
|
+
defaultValue: "'lg'",
|
|
154
|
+
description: 'Sets the border radius of the modal.',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'spacing',
|
|
158
|
+
type: "'normal' | 'compact'",
|
|
159
|
+
defaultValue: "'normal'",
|
|
160
|
+
description: 'Controls the inner padding scale of the header, body and actions.',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'width',
|
|
164
|
+
type: 'string',
|
|
165
|
+
defaultValue: 'undefined',
|
|
166
|
+
description: 'Sets an explicit width and overrides the preset coming from size.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'full-width',
|
|
170
|
+
type: 'boolean',
|
|
171
|
+
defaultValue: 'false',
|
|
172
|
+
description:
|
|
173
|
+
'Stretches the modal to the viewport minus the overlay padding. Wins over width.',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'closable',
|
|
177
|
+
type: 'boolean',
|
|
178
|
+
defaultValue: 'true',
|
|
179
|
+
description: 'Displays the default dismiss button in the header.',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'close-on-overlay',
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
defaultValue: 'true',
|
|
185
|
+
description: 'A click on the backdrop emits (onClose).',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'close-on-escape',
|
|
189
|
+
type: 'boolean',
|
|
190
|
+
defaultValue: 'true',
|
|
191
|
+
description: 'Pressing Escape emits (onClose).',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'overlay-blur',
|
|
195
|
+
type: 'string',
|
|
196
|
+
defaultValue: "'4px'",
|
|
197
|
+
description: 'Backdrop blur radius, forwarded to the underlying dasar-overlay.',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'overlay-background',
|
|
201
|
+
type: 'string',
|
|
202
|
+
defaultValue: "'rgba(0, 0, 0, 0.45)'",
|
|
203
|
+
description: 'Backdrop color, forwarded to the underlying dasar-overlay.',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'fluid / ...-fluid',
|
|
207
|
+
type: 'boolean',
|
|
208
|
+
defaultValue: 'false',
|
|
209
|
+
description:
|
|
210
|
+
'Removes padding from a single section using header-fluid, body-fluid or action-fluid.',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: '...-style',
|
|
214
|
+
type: 'object',
|
|
215
|
+
defaultValue: 'null',
|
|
216
|
+
description: 'Inline style injection for container, header, close, body and actions.',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: '...-class',
|
|
220
|
+
type: 'string | object',
|
|
221
|
+
defaultValue: 'null',
|
|
222
|
+
description: 'Class injection for container, header, close, body and actions.',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: '(onClose)',
|
|
226
|
+
type: 'EventEmitter<void>',
|
|
227
|
+
defaultValue: '-',
|
|
228
|
+
description:
|
|
229
|
+
'Emitted when the close button, the backdrop or Escape is used. Set open to false in the handler.',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: '[header-slot]',
|
|
233
|
+
type: 'Content Slot',
|
|
234
|
+
defaultValue: '-',
|
|
235
|
+
description: 'Replaces the default label with custom HTML content.',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: '[close-slot]',
|
|
239
|
+
type: 'Content Slot',
|
|
240
|
+
defaultValue: '-',
|
|
241
|
+
description: 'Replaces the default dismiss button with a custom element.',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: '[action-slot]',
|
|
245
|
+
type: 'Content Slot',
|
|
246
|
+
defaultValue: '-',
|
|
247
|
+
description:
|
|
248
|
+
'Injects footer action elements. The actions stay visible while the body scrolls.',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'default slot',
|
|
252
|
+
type: 'Content Slot',
|
|
253
|
+
defaultValue: '-',
|
|
254
|
+
description: 'The modal body. Scrolls on its own when the content exceeds the viewport.',
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 32px; width: 100%">
|
|
2
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap">
|
|
3
|
+
<div style="flex: 1; min-width: 200px">
|
|
4
|
+
<dasar-number-input
|
|
5
|
+
label="Outline (Default)"
|
|
6
|
+
appearance="outline"
|
|
7
|
+
full-width
|
|
8
|
+
></dasar-number-input>
|
|
9
|
+
</div>
|
|
10
|
+
<div style="flex: 1; min-width: 200px">
|
|
11
|
+
<dasar-number-input
|
|
12
|
+
label="Filled Appearance"
|
|
13
|
+
appearance="filled"
|
|
14
|
+
full-width
|
|
15
|
+
></dasar-number-input>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div style="display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap">
|
|
20
|
+
<div style="flex: 1; min-width: 200px">
|
|
21
|
+
<dasar-number-input label="Small Size" size="sm" full-width></dasar-number-input>
|
|
22
|
+
</div>
|
|
23
|
+
<div style="flex: 1; min-width: 200px">
|
|
24
|
+
<dasar-number-input label="Medium Size" size="md" full-width></dasar-number-input>
|
|
25
|
+
</div>
|
|
26
|
+
<div style="flex: 1; min-width: 200px">
|
|
27
|
+
<dasar-number-input label="Large Size" size="lg" full-width></dasar-number-input>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DasarNumberInputComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './number-input-appearance.example.html',
|
|
6
|
+
selector: 'app-number-input-appearance-example',
|
|
7
|
+
imports: [DasarNumberInputComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class NumberInputAppearanceExample {}
|