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,261 @@
|
|
|
1
|
+
import { DocsLayoutComponent, DocApiProperty } from '../../layouts/doc.layout';
|
|
2
|
+
import { DocExampleComponent } from '../../components/doc-example.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { Component } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
import { TableCustomSizesExample } from './examples/custom-sizes/table-custom-sizes.example';
|
|
7
|
+
import { TableDynamicStyleExample } from './examples/dynamic-style/table-dynamic-style.example';
|
|
8
|
+
import { TableCellProfileExample } from './examples/cell-profile/table-cell-profile.example';
|
|
9
|
+
import { TableCellActionsExample } from './examples/cell-actions/table-cell-actions.example';
|
|
10
|
+
import { TableCustomBodyExample } from './examples/custom-body/table-custom-body.example';
|
|
11
|
+
import { TableInlineEditExample } from './examples/inline-edit/table-inline-edit.example';
|
|
12
|
+
import { TablePaginationExample } from './examples/pagination/table-pagination.example';
|
|
13
|
+
import { TableCellBadgeExample } from './examples/cell-badge/table-cell-badge.example';
|
|
14
|
+
import { TableExpandedExample } from './examples/expanded/table-expanded.example';
|
|
15
|
+
import { TableHeatmapExample } from './examples/heatmap/table-heatmap.example';
|
|
16
|
+
import { TableNestedExample } from './examples/nested/table-nested.example';
|
|
17
|
+
import { TableEmptyExample } from './examples/empty/table-empty.example';
|
|
18
|
+
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import profileHtml from './examples/cell-profile/table-cell-profile.example.html' with {
|
|
21
|
+
loader: 'text',
|
|
22
|
+
};
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import profileTs from './examples/cell-profile/table-cell-profile.example.ts' with {
|
|
25
|
+
loader: 'text',
|
|
26
|
+
};
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import actionsHtml from './examples/cell-actions/table-cell-actions.example.html' with {
|
|
29
|
+
loader: 'text',
|
|
30
|
+
};
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import paginationHtml from './examples/pagination/table-pagination.example.html' with {
|
|
33
|
+
loader: 'text',
|
|
34
|
+
};
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import paginationTs from './examples/pagination/table-pagination.example.ts' with {
|
|
37
|
+
loader: 'text',
|
|
38
|
+
};
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
import customSizesHtml from './examples/custom-sizes/table-custom-sizes.example.html' with {
|
|
41
|
+
loader: 'text',
|
|
42
|
+
};
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
import customSizesTs from './examples/custom-sizes/table-custom-sizes.example' with {
|
|
45
|
+
loader: 'text',
|
|
46
|
+
};
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
import customBodyHtml from './examples/custom-body/table-custom-body.example.html' with {
|
|
49
|
+
loader: 'text',
|
|
50
|
+
};
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
import customBodyTs from './examples/custom-body/table-custom-body.example.ts' with {
|
|
53
|
+
loader: 'text',
|
|
54
|
+
};
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
import badgeHtml from './examples/cell-badge/table-cell-badge.example.html' with { loader: 'text' };
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
import badgeTs from './examples/cell-badge/table-cell-badge.example.ts' with { loader: 'text' };
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
import actionsTs from './examples/cell-actions/table-cell-actions.example.ts' with {
|
|
61
|
+
loader: 'text',
|
|
62
|
+
};
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
import expandedHtml from './examples/expanded/table-expanded.example.html' with { loader: 'text' };
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
import expandedTs from './examples/expanded/table-expanded.example.ts' with { loader: 'text' };
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
import emptyHtml from './examples/empty/table-empty.example.html' with { loader: 'text' };
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
import emptyTs from './examples/empty/table-empty.example.ts' with { loader: 'text' };
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
import heatmapHtml from './examples/heatmap/table-heatmap.example.html' with { loader: 'text' };
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
import heatmapTs from './examples/heatmap/table-heatmap.example.ts' with { loader: 'text' };
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
import dynamicStyleHtml from './examples/dynamic-style/table-dynamic-style.example.html' with {
|
|
77
|
+
loader: 'text',
|
|
78
|
+
};
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
import dynamicStyleTs from './examples/dynamic-style/table-dynamic-style.example.ts' with {
|
|
81
|
+
loader: 'text',
|
|
82
|
+
};
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
import inlineEditHtml from './examples/inline-edit/table-inline-edit.example.html' with {
|
|
85
|
+
loader: 'text',
|
|
86
|
+
};
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
import inlineEditTs from './examples/inline-edit/table-inline-edit.example.ts' with {
|
|
89
|
+
loader: 'text',
|
|
90
|
+
};
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
import nestedHtml from './examples/nested/table-nested.example.html' with { loader: 'text' };
|
|
93
|
+
// @ts-ignore
|
|
94
|
+
import nestedTs from './examples/nested/table-nested.example.ts' with { loader: 'text' };
|
|
95
|
+
|
|
96
|
+
@Component({
|
|
97
|
+
imports: [
|
|
98
|
+
CommonModule,
|
|
99
|
+
DocsLayoutComponent,
|
|
100
|
+
DocExampleComponent,
|
|
101
|
+
TableHeatmapExample,
|
|
102
|
+
TableDynamicStyleExample,
|
|
103
|
+
TableInlineEditExample,
|
|
104
|
+
TableNestedExample,
|
|
105
|
+
TableCellBadgeExample,
|
|
106
|
+
TableCellProfileExample,
|
|
107
|
+
TableCellActionsExample,
|
|
108
|
+
TableExpandedExample,
|
|
109
|
+
TableEmptyExample,
|
|
110
|
+
TablePaginationExample,
|
|
111
|
+
TableCustomSizesExample,
|
|
112
|
+
TableCustomBodyExample,
|
|
113
|
+
],
|
|
114
|
+
templateUrl: './table.page.html',
|
|
115
|
+
selector: 'app-table-page',
|
|
116
|
+
standalone: true,
|
|
117
|
+
})
|
|
118
|
+
export class TableDocPage {
|
|
119
|
+
protected badgeHtml = badgeHtml;
|
|
120
|
+
protected badgeTs = badgeTs;
|
|
121
|
+
protected profileHtml = profileHtml;
|
|
122
|
+
protected profileTs = profileTs;
|
|
123
|
+
protected actionsHtml = actionsHtml;
|
|
124
|
+
protected actionsTs = actionsTs;
|
|
125
|
+
protected expandedHtml = expandedHtml;
|
|
126
|
+
protected expandedTs = expandedTs;
|
|
127
|
+
protected emptyHtml = emptyHtml;
|
|
128
|
+
protected emptyTs = emptyTs;
|
|
129
|
+
protected paginationHtml = paginationHtml;
|
|
130
|
+
protected paginationTs = paginationTs;
|
|
131
|
+
protected customSizesHtml = customSizesHtml;
|
|
132
|
+
protected customSizesTs = customSizesTs;
|
|
133
|
+
protected customBodyHtml = customBodyHtml;
|
|
134
|
+
protected customBodyTs = customBodyTs;
|
|
135
|
+
protected heatmapHtml = heatmapHtml;
|
|
136
|
+
protected heatmapTs = heatmapTs;
|
|
137
|
+
protected dynamicStyleHtml = dynamicStyleHtml;
|
|
138
|
+
protected dynamicStyleTs = dynamicStyleTs;
|
|
139
|
+
protected inlineEditHtml = inlineEditHtml;
|
|
140
|
+
protected inlineEditTs = inlineEditTs;
|
|
141
|
+
protected nestedHtml = nestedHtml;
|
|
142
|
+
protected nestedTs = nestedTs;
|
|
143
|
+
|
|
144
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
145
|
+
{
|
|
146
|
+
name: 'data',
|
|
147
|
+
type: 'any[]',
|
|
148
|
+
defaultValue: '[]',
|
|
149
|
+
description: 'Array of data objects to render.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'columns',
|
|
153
|
+
type: 'DasarTableColumn[]',
|
|
154
|
+
defaultValue: '[]',
|
|
155
|
+
description: 'Configuration array for table columns.',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'appearance',
|
|
159
|
+
type: "'outline' | 'filled' | 'elevated' | 'borderless'",
|
|
160
|
+
defaultValue: "'outline'",
|
|
161
|
+
description: 'Visual style of the table container.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'size',
|
|
165
|
+
type: "'sm' | 'md' | 'lg'",
|
|
166
|
+
defaultValue: "'md'",
|
|
167
|
+
description: 'Typographic scale of the table contents.',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'spacing',
|
|
171
|
+
type: "'compact' | 'normal' | 'relaxed'",
|
|
172
|
+
defaultValue: "'normal'",
|
|
173
|
+
description: 'Controls the cell padding.',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'expandable',
|
|
177
|
+
type: 'boolean',
|
|
178
|
+
defaultValue: 'false',
|
|
179
|
+
description: 'Enables row expansion and renders the expand chevron column.',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'striped',
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
defaultValue: 'false',
|
|
185
|
+
description: 'Applies alternating background colors to rows.',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'hoverable',
|
|
189
|
+
type: 'boolean',
|
|
190
|
+
defaultValue: 'true',
|
|
191
|
+
description: 'Applies hover effects to rows.',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'loading',
|
|
195
|
+
type: 'boolean',
|
|
196
|
+
defaultValue: 'false',
|
|
197
|
+
description: 'Displays the loading state overlay.',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'fluid',
|
|
201
|
+
type: 'boolean',
|
|
202
|
+
defaultValue: 'true',
|
|
203
|
+
description: 'Forces the table to 100% width.',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'sortKey',
|
|
207
|
+
type: 'string | null',
|
|
208
|
+
defaultValue: 'null',
|
|
209
|
+
description: 'The currently active sorting column key.',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'sortDirection',
|
|
213
|
+
type: "'asc' | 'desc' | null",
|
|
214
|
+
defaultValue: 'null',
|
|
215
|
+
description: 'The current sorting direction.',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: '(onSortChange)',
|
|
219
|
+
type: 'EventEmitter<DasarTableSortEvent>',
|
|
220
|
+
defaultValue: '-',
|
|
221
|
+
description: 'Emitted when a sortable column header is clicked.',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: '(onRowClick) / (onRowDblClick)',
|
|
225
|
+
type: 'EventEmitter<any>',
|
|
226
|
+
defaultValue: '-',
|
|
227
|
+
description: 'Mouse events on table rows.',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: '[cell-slot]="key"',
|
|
231
|
+
type: 'TemplateRef',
|
|
232
|
+
defaultValue: '-',
|
|
233
|
+
description:
|
|
234
|
+
'Overrides rendering for a specific column. Provides let-val, let-row, and let-index.',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: '[expanded-slot]',
|
|
238
|
+
type: 'TemplateRef',
|
|
239
|
+
defaultValue: '-',
|
|
240
|
+
description: 'Template rendered inside an expanded row. Provides let-row and let-index.',
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: '[empty-slot]',
|
|
244
|
+
type: 'Content Slot',
|
|
245
|
+
defaultValue: '-',
|
|
246
|
+
description: 'Completely replaces the default empty state UI.',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: '[pagination-slot]',
|
|
250
|
+
type: 'Content Slot',
|
|
251
|
+
defaultValue: '-',
|
|
252
|
+
description: 'Injects pagination controls at the bottom of the table.',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: '[header-slot] / [body-slot]',
|
|
256
|
+
type: 'Content Slot',
|
|
257
|
+
defaultValue: '-',
|
|
258
|
+
description: 'Completely replaces the thead or tbody elements for ultimate control.',
|
|
259
|
+
},
|
|
260
|
+
];
|
|
261
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<dasar-tabs appearance="outline" [active-index]="active()" (onTabsChange)="active.set($event)">
|
|
2
|
+
@for (tab of tabs(); track tab) {
|
|
3
|
+
<ng-template tab-item-slot>
|
|
4
|
+
<span style="display: inline-flex; align-items: center; gap: 4px">
|
|
5
|
+
{{ tab }}
|
|
6
|
+
<dasar-icon name="x" [size]="12" (click)="closeTab(tab, $event)" />
|
|
7
|
+
</span>
|
|
8
|
+
</ng-template>
|
|
9
|
+
}
|
|
10
|
+
<p>Settings for {{ tabs()[active()] ?? 'nothing' }}.</p>
|
|
11
|
+
</dasar-tabs>
|
|
12
|
+
|
|
13
|
+
<dasar-button size="sm" variant="ghost" (click)="addTab()">Add tab</dasar-button>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent, DasarIconComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-advanced-dynamic.example.html',
|
|
6
|
+
selector: 'app-tabs-advanced-dynamic-example',
|
|
7
|
+
imports: [DasarTabsComponent, DasarIconComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsAdvancedDynamicExample {
|
|
11
|
+
protected tabs = signal(['General', 'Profile', 'Billing', 'Team']);
|
|
12
|
+
protected active = signal(0);
|
|
13
|
+
|
|
14
|
+
protected addTab() {
|
|
15
|
+
this.tabs.update((list) => [...list, `Tab ${list.length + 1}`]);
|
|
16
|
+
this.active.set(this.tabs().length - 1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
protected closeTab(name: string, event: Event) {
|
|
20
|
+
event.stopPropagation();
|
|
21
|
+
const removedIndex = this.tabs().indexOf(name);
|
|
22
|
+
this.tabs.update((list) => list.filter((tab) => tab !== name));
|
|
23
|
+
if (removedIndex <= this.active()) {
|
|
24
|
+
this.active.set(Math.max(0, this.active() - 1));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<dasar-card label="Workspace settings" size="sm" spacing="compact">
|
|
2
|
+
<dasar-tabs
|
|
3
|
+
size="sm"
|
|
4
|
+
spacing="compact"
|
|
5
|
+
[active-index]="active"
|
|
6
|
+
(onTabsChange)="active = $event"
|
|
7
|
+
[items]="['Profile', 'Access', 'Billing']"
|
|
8
|
+
>
|
|
9
|
+
@switch (active) {
|
|
10
|
+
@case (0) {
|
|
11
|
+
<div style="display: flex; gap: 12px; flex-wrap: wrap">
|
|
12
|
+
<dasar-input label="Full name" [(ngModel)]="name" />
|
|
13
|
+
</div>
|
|
14
|
+
}
|
|
15
|
+
@case (1) {
|
|
16
|
+
<div style="display: flex; gap: 12px; flex-wrap: wrap">
|
|
17
|
+
<dasar-select label="Role" [options]="roles" [(ngModel)]="role" />
|
|
18
|
+
</div>
|
|
19
|
+
}
|
|
20
|
+
@case (2) {
|
|
21
|
+
<div style="display: flex; gap: 12px; flex-wrap: wrap">
|
|
22
|
+
<dasar-datepicker label="Renewal date" [(ngModel)]="renewal" clearable />
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</dasar-tabs>
|
|
27
|
+
</dasar-card>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import {
|
|
4
|
+
DasarCardComponent,
|
|
5
|
+
DasarTabsComponent,
|
|
6
|
+
DasarInputComponent,
|
|
7
|
+
DasarSelectComponent,
|
|
8
|
+
DasarDatepickerComponent,
|
|
9
|
+
DasarSelectOption,
|
|
10
|
+
} from 'dasar-ui';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
templateUrl: './tabs-advanced-form.example.html',
|
|
14
|
+
selector: 'app-tabs-advanced-form-example',
|
|
15
|
+
imports: [
|
|
16
|
+
FormsModule,
|
|
17
|
+
DasarCardComponent,
|
|
18
|
+
DasarTabsComponent,
|
|
19
|
+
DasarInputComponent,
|
|
20
|
+
DasarSelectComponent,
|
|
21
|
+
DasarDatepickerComponent,
|
|
22
|
+
],
|
|
23
|
+
standalone: true,
|
|
24
|
+
})
|
|
25
|
+
export class TabsAdvancedFormExample {
|
|
26
|
+
protected active = 0;
|
|
27
|
+
protected name = 'Ada Lovelace';
|
|
28
|
+
protected role = 'admin';
|
|
29
|
+
protected renewal = '2026-12-31';
|
|
30
|
+
|
|
31
|
+
protected roles: DasarSelectOption[] = [
|
|
32
|
+
{ label: 'Admin', value: 'admin' },
|
|
33
|
+
{ label: 'Editor', value: 'editor' },
|
|
34
|
+
{ label: 'Viewer', value: 'viewer' },
|
|
35
|
+
];
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarThemeProviderComponent, DasarTabsComponent, DasarComponentConfig } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-advanced-theme.example.html',
|
|
6
|
+
selector: 'app-tabs-advanced-theme-example',
|
|
7
|
+
imports: [DasarThemeProviderComponent, DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsAdvancedThemeExample {
|
|
11
|
+
protected items = ['Design', 'Engineering', 'Product'];
|
|
12
|
+
|
|
13
|
+
protected componentConfig: DasarComponentConfig = {
|
|
14
|
+
tabs: {
|
|
15
|
+
appearance: 'outline',
|
|
16
|
+
size: 'sm',
|
|
17
|
+
spacing: 'compact',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent, DasarTabsAppearanceType } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-appearance.example.html',
|
|
6
|
+
selector: 'app-tabs-appearance-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsAppearanceExample {
|
|
11
|
+
protected appearances: DasarTabsAppearanceType[] = ['solid', 'subtle', 'outline'];
|
|
12
|
+
protected items = ['Home', 'Search', 'Profile'];
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<dasar-tabs [items]="items" [active-index]="active()" (onTabsChange)="active.set($event)">
|
|
2
|
+
@switch (active()) {
|
|
3
|
+
@case (0) {
|
|
4
|
+
<p>Overview body content.</p>
|
|
5
|
+
}
|
|
6
|
+
@case (1) {
|
|
7
|
+
<p>Details body content.</p>
|
|
8
|
+
}
|
|
9
|
+
@case (2) {
|
|
10
|
+
<p>Reviews body content.</p>
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
</dasar-tabs>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-basic.example.html',
|
|
6
|
+
selector: 'app-tabs-basic-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsBasicExample {
|
|
11
|
+
protected items = ['Overview', 'Details', 'Reviews'];
|
|
12
|
+
protected active = signal(0);
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<dasar-tabs
|
|
2
|
+
[items]="items"
|
|
3
|
+
container-class="demo-tabs-container"
|
|
4
|
+
list-class="demo-tabs-list"
|
|
5
|
+
content-class="demo-tabs-content"
|
|
6
|
+
[container-style]="{
|
|
7
|
+
border: '1px dashed var(--theme-border-strong-color)',
|
|
8
|
+
padding: '4px',
|
|
9
|
+
'border-radius': 'var(--radius-lg)',
|
|
10
|
+
}"
|
|
11
|
+
[list-style]="{ 'justify-content': 'center' }"
|
|
12
|
+
[content-style]="{ 'font-style': 'italic', 'text-align': 'center' }"
|
|
13
|
+
>
|
|
14
|
+
<p>The container is dashed, the list is centered and the body is italic.</p>
|
|
15
|
+
</dasar-tabs>
|
|
16
|
+
|
|
17
|
+
<dasar-tabs [items]="items" [container-style]="{ '--tabs-gap-normal': '20px' }">
|
|
18
|
+
<p>The tab gap is widened to 20px through the --tabs-gap-normal variable.</p>
|
|
19
|
+
</dasar-tabs>
|
package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-custom-style.example.html',
|
|
6
|
+
selector: 'app-tabs-custom-style-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsCustomStyleExample {
|
|
11
|
+
protected items = ['General', 'Advanced', 'Danger Zone'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<dasar-tabs
|
|
2
|
+
[items]="items"
|
|
3
|
+
[active-index]="active()"
|
|
4
|
+
(onTabsClick)="onClick($event)"
|
|
5
|
+
(onTabsChange)="onChange($event)"
|
|
6
|
+
>
|
|
7
|
+
<p>Body of tab {{ active() + 1 }}.</p>
|
|
8
|
+
</dasar-tabs>
|
|
9
|
+
|
|
10
|
+
<ul style="margin: 12px 0 0; padding-left: 18px; font-family: monospace; font-size: 12px">
|
|
11
|
+
@for (event of events(); track $index) {
|
|
12
|
+
<li>{{ event }}</li>
|
|
13
|
+
} @empty {
|
|
14
|
+
<li>Click a tab to log its events.</li>
|
|
15
|
+
}
|
|
16
|
+
</ul>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-events.example.html',
|
|
6
|
+
selector: 'app-tabs-events-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsEventsExample {
|
|
11
|
+
protected items = ['First', 'Second', 'Third'];
|
|
12
|
+
protected active = signal(0);
|
|
13
|
+
protected events = signal<string[]>([]);
|
|
14
|
+
|
|
15
|
+
protected onClick(index: number) {
|
|
16
|
+
this.events.update((list) => [...list, `onTabsClick(${index})`]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
protected onChange(index: number) {
|
|
20
|
+
this.active.set(index);
|
|
21
|
+
this.events.update((list) => [...list, `onTabsChange(${index})`]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-fluid.example.html',
|
|
6
|
+
selector: 'app-tabs-fluid-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsFluidExample {
|
|
11
|
+
protected items = ['All', 'Active', 'Archived'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<dasar-tabs appearance="outline" size="sm" [items]="items" />
|
|
2
|
+
|
|
3
|
+
<div style="border: 1px solid var(--theme-border-subtle-color); border-top: none; padding: 12px">
|
|
4
|
+
Content that follows the tabs directly. The tabs project no body, so the component leaves no
|
|
5
|
+
padding behind between the tab strip and the content below it.
|
|
6
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-no-body.example.html',
|
|
6
|
+
selector: 'app-tabs-no-body-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsNoBodyExample {
|
|
11
|
+
protected items = ['Monthly', 'Quarterly', 'Yearly'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent, DasarTabsRadiusType } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-radius.example.html',
|
|
6
|
+
selector: 'app-tabs-radius-example',
|
|
7
|
+
imports: [DasarTabsComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsRadiusExample {
|
|
11
|
+
protected radii: DasarTabsRadiusType[] = ['none', 'sm', 'md', 'lg', 'full'];
|
|
12
|
+
protected items = ['Day', 'Week', 'Quarter'];
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<dasar-button size="sm" appearance="subtle" (click)="narrow.set(!narrow())">
|
|
2
|
+
{{ narrow() ? 'Widen container' : 'Narrow container' }}
|
|
3
|
+
</dasar-button>
|
|
4
|
+
|
|
5
|
+
<div [style.width]="narrow() ? '360px' : '100%'" style="margin-top: 12px">
|
|
6
|
+
<dasar-tabs
|
|
7
|
+
appearance="outline"
|
|
8
|
+
size="sm"
|
|
9
|
+
[items]="items"
|
|
10
|
+
[active-index]="active()"
|
|
11
|
+
(onTabsChange)="active.set($event)"
|
|
12
|
+
>
|
|
13
|
+
<p>Tab {{ active() + 1 }} of {{ items.length }}: {{ items[active()] }}.</p>
|
|
14
|
+
</dasar-tabs>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<p style="font-size: 12px; margin-top: 8px; color: gray">
|
|
18
|
+
Narrow the window or the container until the strip no longer fits. The arrow buttons appear,
|
|
19
|
+
disappear and disable on their own.
|
|
20
|
+
</p>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarTabsComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './tabs-scroll.example.html',
|
|
6
|
+
selector: 'app-tabs-scroll-example',
|
|
7
|
+
imports: [DasarTabsComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TabsScrollExample {
|
|
11
|
+
protected items = [
|
|
12
|
+
'Overview',
|
|
13
|
+
'Activity',
|
|
14
|
+
'Members',
|
|
15
|
+
'Billing',
|
|
16
|
+
'Usage',
|
|
17
|
+
'Integrations',
|
|
18
|
+
'Security',
|
|
19
|
+
'Audit logs',
|
|
20
|
+
'Support',
|
|
21
|
+
'Settings',
|
|
22
|
+
'Profile',
|
|
23
|
+
'Notifications',
|
|
24
|
+
'Templates',
|
|
25
|
+
'Exports',
|
|
26
|
+
'Archive',
|
|
27
|
+
];
|
|
28
|
+
protected active = signal(0);
|
|
29
|
+
protected narrow = signal(true);
|
|
30
|
+
}
|
package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.html
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div style="width: 340px">
|
|
2
|
+
<dasar-tabs
|
|
3
|
+
size="sm"
|
|
4
|
+
scroll-left-icon-name="arrow-left"
|
|
5
|
+
scroll-right-icon-name="arrow-right"
|
|
6
|
+
[items]="items"
|
|
7
|
+
[active-index]="active()"
|
|
8
|
+
(onTabsChange)="active.set($event)"
|
|
9
|
+
>
|
|
10
|
+
<p>{{ items[active()] }}.</p>
|
|
11
|
+
</dasar-tabs>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<p style="font-size: 12px; margin-top: 8px; color: gray">
|
|
15
|
+
The arrow icons are plain icon names, so any name from the icon registry works.
|
|
16
|
+
</p>
|