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,15 @@
|
|
|
1
|
+
import { DasarSelectComponent, DasarSelectOption, DasarIconComponent, DasarChip } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
imports: [DasarSelectComponent, DasarIconComponent, DasarChip],
|
|
6
|
+
templateUrl: './select-slots.example.html',
|
|
7
|
+
selector: 'app-select-slots-example',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class SelectSlotsExample {
|
|
11
|
+
protected users: DasarSelectOption[] = [
|
|
12
|
+
{ label: 'Alice Williams', value: '1', email: 'alice@example.com' },
|
|
13
|
+
{ label: 'Bob Martin', value: '2', email: 'bob@example.com' },
|
|
14
|
+
];
|
|
15
|
+
}
|
package/projects/documentation/src/app/pages/select/examples/states/select-states.example.html
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; width: 100%">
|
|
2
|
+
<div style="flex: 1; min-width: 250px">
|
|
3
|
+
<dasar-select
|
|
4
|
+
label="Error State"
|
|
5
|
+
[error]="true"
|
|
6
|
+
hint="Please select a valid option."
|
|
7
|
+
[options]="options"
|
|
8
|
+
full-width
|
|
9
|
+
></dasar-select>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div style="flex: 1; min-width: 250px">
|
|
13
|
+
<dasar-select
|
|
14
|
+
label="Disabled State"
|
|
15
|
+
[disabled]="true"
|
|
16
|
+
hint="Field locked."
|
|
17
|
+
[options]="options"
|
|
18
|
+
full-width
|
|
19
|
+
></dasar-select>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div style="flex: 1; min-width: 250px">
|
|
23
|
+
<dasar-select
|
|
24
|
+
label="Loading State"
|
|
25
|
+
[loading]="true"
|
|
26
|
+
hint="Fetching data..."
|
|
27
|
+
[options]="[]"
|
|
28
|
+
full-width
|
|
29
|
+
></dasar-select>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './select-states.example.html',
|
|
6
|
+
selector: 'app-select-states-example',
|
|
7
|
+
imports: [DasarSelectComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class SelectStatesExample {
|
|
11
|
+
protected options: DasarSelectOption[] = [{ label: 'Valid Option', value: '1' }];
|
|
12
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<docs-layout
|
|
2
|
+
title="Select"
|
|
3
|
+
description="A customizable dropdown selection component supporting single and multiple values, inline searching, and rich custom templates."
|
|
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 Usage"
|
|
12
|
+
>
|
|
13
|
+
<app-select-basic-example></app-select-basic-example>
|
|
14
|
+
</doc-example-component>
|
|
15
|
+
|
|
16
|
+
<doc-example-component
|
|
17
|
+
[codes]="[
|
|
18
|
+
{ label: 'HTML', lang: 'html', value: appearanceHtml },
|
|
19
|
+
{ label: 'TypeScript', lang: 'typescript', value: appearanceTs },
|
|
20
|
+
]"
|
|
21
|
+
title="Appearance & Sizes"
|
|
22
|
+
>
|
|
23
|
+
<app-select-appearance-example></app-select-appearance-example>
|
|
24
|
+
</doc-example-component>
|
|
25
|
+
|
|
26
|
+
<doc-example-component
|
|
27
|
+
[codes]="[
|
|
28
|
+
{ label: 'HTML', lang: 'html', value: searchHtml },
|
|
29
|
+
{ label: 'TypeScript', lang: 'typescript', value: searchTs },
|
|
30
|
+
]"
|
|
31
|
+
title="Searchable List"
|
|
32
|
+
>
|
|
33
|
+
<app-select-search-example></app-select-search-example>
|
|
34
|
+
</doc-example-component>
|
|
35
|
+
|
|
36
|
+
<doc-example-component
|
|
37
|
+
[codes]="[
|
|
38
|
+
{ label: 'HTML', lang: 'html', value: multipleHtml },
|
|
39
|
+
{ label: 'TypeScript', lang: 'typescript', value: multipleTs },
|
|
40
|
+
]"
|
|
41
|
+
title="Multiple Selection Modes"
|
|
42
|
+
>
|
|
43
|
+
<app-select-multiple-example></app-select-multiple-example>
|
|
44
|
+
</doc-example-component>
|
|
45
|
+
|
|
46
|
+
<doc-example-component
|
|
47
|
+
[codes]="[
|
|
48
|
+
{ label: 'HTML', lang: 'html', value: statesHtml },
|
|
49
|
+
{ label: 'TypeScript', lang: 'typescript', value: statesTs },
|
|
50
|
+
]"
|
|
51
|
+
title="Validation & States"
|
|
52
|
+
>
|
|
53
|
+
<app-select-states-example></app-select-states-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="Custom Templates & Slots"
|
|
62
|
+
>
|
|
63
|
+
<app-select-slots-example></app-select-slots-example>
|
|
64
|
+
</doc-example-component>
|
|
65
|
+
|
|
66
|
+
<doc-example-component
|
|
67
|
+
[codes]="[
|
|
68
|
+
{ label: 'HTML', lang: 'html', value: placementHtml },
|
|
69
|
+
{ label: 'TypeScript', lang: 'typescript', value: placementTs },
|
|
70
|
+
]"
|
|
71
|
+
title="Placement"
|
|
72
|
+
>
|
|
73
|
+
<app-select-placement-example></app-select-placement-example>
|
|
74
|
+
</doc-example-component>
|
|
75
|
+
</docs-layout>
|
|
@@ -0,0 +1,195 @@
|
|
|
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 { SelectBasicExample } from './examples/basic/select-basic.example';
|
|
7
|
+
import { SelectAppearanceExample } from './examples/appearance/select-appearance.example';
|
|
8
|
+
import { SelectSearchExample } from './examples/search/select-search.example';
|
|
9
|
+
import { SelectMultipleExample } from './examples/multiple/select-multiple.example';
|
|
10
|
+
import { SelectStatesExample } from './examples/states/select-states.example';
|
|
11
|
+
import { SelectSlotsExample } from './examples/slots/select-slots.example';
|
|
12
|
+
import { SelectPlacementExample } from './examples/placement/select-placement.example';
|
|
13
|
+
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
import basicHtml from './examples/basic/select-basic.example.html' with { loader: 'text' };
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import basicTs from './examples/basic/select-basic.example.ts' with { loader: 'text' };
|
|
18
|
+
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import appearanceHtml from './examples/appearance/select-appearance.example.html' with {
|
|
21
|
+
loader: 'text',
|
|
22
|
+
};
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import appearanceTs from './examples/appearance/select-appearance.example.ts' with {
|
|
25
|
+
loader: 'text',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import searchHtml from './examples/search/select-search.example.html' with { loader: 'text' };
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import searchTs from './examples/search/select-search.example.ts' with { loader: 'text' };
|
|
32
|
+
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import multipleHtml from './examples/multiple/select-multiple.example.html' with { loader: 'text' };
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import multipleTs from './examples/multiple/select-multiple.example.ts' with { loader: 'text' };
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
import statesHtml from './examples/states/select-states.example.html' with { loader: 'text' };
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
import statesTs from './examples/states/select-states.example.ts' with { loader: 'text' };
|
|
42
|
+
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
import slotsHtml from './examples/slots/select-slots.example.html' with { loader: 'text' };
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
import slotsTs from './examples/slots/select-slots.example.ts' with { loader: 'text' };
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
import placementHtml from './examples/placement/select-placement.example.html' with {
|
|
49
|
+
loader: 'text',
|
|
50
|
+
};
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
import placementTs from './examples/placement/select-placement.example.ts' with {
|
|
53
|
+
loader: 'text',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
@Component({
|
|
57
|
+
imports: [
|
|
58
|
+
CommonModule,
|
|
59
|
+
DocsLayoutComponent,
|
|
60
|
+
DocExampleComponent,
|
|
61
|
+
SelectBasicExample,
|
|
62
|
+
SelectAppearanceExample,
|
|
63
|
+
SelectSearchExample,
|
|
64
|
+
SelectMultipleExample,
|
|
65
|
+
SelectStatesExample,
|
|
66
|
+
SelectSlotsExample,
|
|
67
|
+
SelectPlacementExample,
|
|
68
|
+
],
|
|
69
|
+
templateUrl: './select.page.html',
|
|
70
|
+
selector: 'app-select-page',
|
|
71
|
+
standalone: true,
|
|
72
|
+
})
|
|
73
|
+
export class SelectDocPage {
|
|
74
|
+
protected basicHtml = basicHtml;
|
|
75
|
+
protected basicTs = basicTs;
|
|
76
|
+
protected appearanceHtml = appearanceHtml;
|
|
77
|
+
protected appearanceTs = appearanceTs;
|
|
78
|
+
protected searchHtml = searchHtml;
|
|
79
|
+
protected searchTs = searchTs;
|
|
80
|
+
protected multipleHtml = multipleHtml;
|
|
81
|
+
protected multipleTs = multipleTs;
|
|
82
|
+
protected statesHtml = statesHtml;
|
|
83
|
+
protected statesTs = statesTs;
|
|
84
|
+
protected slotsHtml = slotsHtml;
|
|
85
|
+
protected slotsTs = slotsTs;
|
|
86
|
+
protected placementHtml = placementHtml;
|
|
87
|
+
protected placementTs = placementTs;
|
|
88
|
+
|
|
89
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
90
|
+
{
|
|
91
|
+
name: 'value',
|
|
92
|
+
type: 'any | any[]',
|
|
93
|
+
defaultValue: "'' | []",
|
|
94
|
+
description: 'The selected value(s). Supports [(ngModel)] and Reactive Forms.',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'options',
|
|
98
|
+
type: 'DasarSelectOption[]',
|
|
99
|
+
defaultValue: '[]',
|
|
100
|
+
description: 'Array of objects: { label, value, disabled?, iconName?, chipVariant? }.',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'multiple-type',
|
|
104
|
+
type: "'text' | 'chip' | null",
|
|
105
|
+
defaultValue: 'null',
|
|
106
|
+
description:
|
|
107
|
+
'Enables multi-select. Displays chosen items as comma-separated text or interactive chips.',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'searchable',
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
defaultValue: 'false',
|
|
113
|
+
description: 'Shows an inline text input to filter the options array.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'clearable',
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
defaultValue: 'false',
|
|
119
|
+
description: 'Shows an "x" icon to clear the selection.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'appearance',
|
|
123
|
+
type: "'outline' | 'filled'",
|
|
124
|
+
defaultValue: "'outline'",
|
|
125
|
+
description: 'Visual style of the main trigger container.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'placement',
|
|
129
|
+
type: "'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'",
|
|
130
|
+
defaultValue: "'bottom-start'",
|
|
131
|
+
description:
|
|
132
|
+
'Preferred side of the trigger for the dropdown. The panel flips to the other side automatically when the viewport has no room.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'size',
|
|
136
|
+
type: "'sm' | 'md' | 'lg'",
|
|
137
|
+
defaultValue: "'md'",
|
|
138
|
+
description: 'Sizing scale for the trigger, the panel and the options inside it.',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'radius',
|
|
142
|
+
type: 'ScaleAttributeType',
|
|
143
|
+
defaultValue: "'md'",
|
|
144
|
+
description: 'Border radius of the trigger and of the dropdown panel.',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'label / placeholder / hint',
|
|
148
|
+
type: 'string',
|
|
149
|
+
defaultValue: 'undefined',
|
|
150
|
+
description: 'Text elements for context.',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'loading',
|
|
154
|
+
type: 'boolean',
|
|
155
|
+
defaultValue: 'false',
|
|
156
|
+
description: 'Shows a spinner inside the trigger and dropdown.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'error',
|
|
160
|
+
type: 'boolean',
|
|
161
|
+
defaultValue: 'false',
|
|
162
|
+
description: 'Applies red validation styling.',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'disabled',
|
|
166
|
+
type: 'boolean',
|
|
167
|
+
defaultValue: 'false',
|
|
168
|
+
description: 'Prevents interaction.',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'full-width',
|
|
172
|
+
type: 'boolean',
|
|
173
|
+
defaultValue: 'false',
|
|
174
|
+
description: 'Expands component to 100% width.',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: '(valueChange) / (onSearchChange)',
|
|
178
|
+
type: 'EventEmitter',
|
|
179
|
+
defaultValue: '-',
|
|
180
|
+
description: 'Emitted when selection or search query updates.',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: '[...-slot]',
|
|
184
|
+
type: 'Content Slot',
|
|
185
|
+
defaultValue: '-',
|
|
186
|
+
description: 'Directives like [prefix-slot], [option-empty-slot], [option-loading-slot].',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: '*option-template / *chip-template',
|
|
190
|
+
type: 'TemplateRef<any>',
|
|
191
|
+
defaultValue: '-',
|
|
192
|
+
description: 'Structural directives to override rendering of options and chips.',
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="users" [columns]="columns">
|
|
3
|
+
<ng-template cell-slot="actions" let-row="row">
|
|
4
|
+
<div style="display: flex; gap: 8px; justify-content: flex-end">
|
|
5
|
+
<dasar-button variant="ghost" size="sm" icon-only>
|
|
6
|
+
<dasar-icon name="edit-2" size="sm"></dasar-icon>
|
|
7
|
+
</dasar-button>
|
|
8
|
+
<dasar-button variant="ghost" size="sm" icon-only>
|
|
9
|
+
<dasar-icon name="trash" size="sm" style="color: var(--theme-danger-color)"></dasar-icon>
|
|
10
|
+
</dasar-button>
|
|
11
|
+
</div>
|
|
12
|
+
</ng-template>
|
|
13
|
+
</dasar-table>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DasarTableComponent,
|
|
3
|
+
DasarTableColumn,
|
|
4
|
+
DasarButtonComponent,
|
|
5
|
+
DasarIconComponent,
|
|
6
|
+
} from 'dasar-ui';
|
|
7
|
+
import { Component } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
imports: [DasarTableComponent, DasarButtonComponent, DasarIconComponent],
|
|
11
|
+
templateUrl: './table-cell-actions.example.html',
|
|
12
|
+
selector: 'app-table-cell-actions',
|
|
13
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class TableCellActionsExample {
|
|
16
|
+
protected columns: DasarTableColumn[] = [
|
|
17
|
+
{ key: 'name', label: 'Product Name' },
|
|
18
|
+
{ key: 'price', label: 'Price' },
|
|
19
|
+
{ key: 'actions', label: '', align: 'right', width: '120px' },
|
|
20
|
+
];
|
|
21
|
+
protected users = [
|
|
22
|
+
{ name: 'Mechanical Keyboard', price: '$99.00' },
|
|
23
|
+
{ name: 'Wireless Mouse', price: '$49.00' },
|
|
24
|
+
];
|
|
25
|
+
}
|
package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.html
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="users" [columns]="columns">
|
|
3
|
+
<ng-template cell-slot="status" let-val>
|
|
4
|
+
<dasar-chip
|
|
5
|
+
[variant]="val === 'Active' ? 'success' : val === 'Pending' ? 'warning' : 'danger'"
|
|
6
|
+
size="sm"
|
|
7
|
+
>
|
|
8
|
+
{{ val }}
|
|
9
|
+
</dasar-chip>
|
|
10
|
+
</ng-template>
|
|
11
|
+
</dasar-table>
|
|
12
|
+
</div>
|
package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DasarTableComponent, DasarTableColumn, DasarChipComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
imports: [DasarTableComponent, DasarChipComponent],
|
|
6
|
+
templateUrl: './table-cell-badge.example.html',
|
|
7
|
+
selector: 'app-table-cell-badge',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TableCellBadgeExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'id', label: 'ID', width: '80px' },
|
|
13
|
+
{ key: 'name', label: 'Name' },
|
|
14
|
+
{ key: 'status', label: 'Account Status' },
|
|
15
|
+
];
|
|
16
|
+
protected users = [
|
|
17
|
+
{ id: '101', name: 'John Doe', status: 'Active' },
|
|
18
|
+
{ id: '102', name: 'Jane Smith', status: 'Pending' },
|
|
19
|
+
{ id: '103', name: 'Bob Johnson', status: 'Inactive' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="users" [columns]="columns">
|
|
3
|
+
<ng-template cell-slot="profile" let-row="row">
|
|
4
|
+
<div style="display: flex; gap: 12px; align-items: center">
|
|
5
|
+
<div
|
|
6
|
+
style="
|
|
7
|
+
width: 36px;
|
|
8
|
+
height: 36px;
|
|
9
|
+
border-radius: 50%;
|
|
10
|
+
background: var(--theme-primary-color);
|
|
11
|
+
color: white;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
{{ row.name.charAt(0) }}
|
|
19
|
+
</div>
|
|
20
|
+
<div style="display: flex; flex-direction: column">
|
|
21
|
+
<span style="font-weight: 600; line-height: 1.2">{{ row.name }}</span>
|
|
22
|
+
<span style="font-size: 12px; color: var(--theme-text-secondary-color)">{{
|
|
23
|
+
row.email
|
|
24
|
+
}}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</ng-template>
|
|
28
|
+
</dasar-table>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DasarTableComponent, DasarTableColumn } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
imports: [DasarTableComponent],
|
|
6
|
+
templateUrl: './table-cell-profile.example.html',
|
|
7
|
+
selector: 'app-table-cell-profile',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TableCellProfileExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'profile', label: 'User Profile' },
|
|
13
|
+
{ key: 'role', label: 'Role' },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
protected users = [
|
|
17
|
+
{ name: 'Alice Williams', email: 'alice@example.com', role: 'Admin' },
|
|
18
|
+
{ name: 'Charlie Brown', email: 'charlie@example.com', role: 'Editor' },
|
|
19
|
+
];
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="data" [columns]="columns" appearance="borderless">
|
|
3
|
+
<ng-container body-slot>
|
|
4
|
+
@for (row of data; track row.id) {
|
|
5
|
+
<tr style="border-bottom: 12px solid transparent">
|
|
6
|
+
<td colspan="3" style="padding: 0">
|
|
7
|
+
<div
|
|
8
|
+
style="
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
background: var(--theme-bg-surface-color);
|
|
13
|
+
padding: 16px 24px;
|
|
14
|
+
border-radius: 12px;
|
|
15
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
|
|
16
|
+
border: 1px solid var(--theme-border-subtle-color);
|
|
17
|
+
"
|
|
18
|
+
>
|
|
19
|
+
<div style="display: flex; gap: 16px; align-items: center">
|
|
20
|
+
<dasar-icon
|
|
21
|
+
name="file-text"
|
|
22
|
+
size="lg"
|
|
23
|
+
style="color: var(--theme-primary-color)"
|
|
24
|
+
></dasar-icon>
|
|
25
|
+
<div>
|
|
26
|
+
<div style="font-weight: 600; font-size: 16px">{{ row.title }}</div>
|
|
27
|
+
<div style="color: var(--theme-text-secondary-color); font-size: 14px">
|
|
28
|
+
{{ row.date }}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<dasar-button variant="secondary" size="sm">Download</dasar-button>
|
|
33
|
+
</div>
|
|
34
|
+
</td>
|
|
35
|
+
</tr>
|
|
36
|
+
}
|
|
37
|
+
</ng-container>
|
|
38
|
+
</dasar-table>
|
|
39
|
+
</div>
|
package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DasarTableComponent,
|
|
3
|
+
DasarTableColumn,
|
|
4
|
+
DasarButtonComponent,
|
|
5
|
+
DasarIconComponent,
|
|
6
|
+
} from 'dasar-ui';
|
|
7
|
+
import { Component } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
imports: [DasarTableComponent, DasarButtonComponent, DasarIconComponent],
|
|
11
|
+
templateUrl: './table-custom-body.example.html',
|
|
12
|
+
selector: 'app-table-custom-body',
|
|
13
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class TableCustomBodyExample {
|
|
16
|
+
protected columns: DasarTableColumn[] = [{ key: 'file', label: 'Files' }];
|
|
17
|
+
protected data = [
|
|
18
|
+
{ id: 1, title: 'Annual_Report_2026.pdf', date: 'Oct 1, 2026' },
|
|
19
|
+
{ id: 2, title: 'Q3_Financials.xlsx', date: 'Sep 28, 2026' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="data" [columns]="columns" size="sm"> </dasar-table>
|
|
3
|
+
<br />
|
|
4
|
+
<dasar-table [data]="data" [columns]="columns"> </dasar-table>
|
|
5
|
+
<br />
|
|
6
|
+
<dasar-table [data]="data" [columns]="columns" size="lg"> </dasar-table>
|
|
7
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DasarTableColumn, DasarTableComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './table-custom-sizes.example.html',
|
|
6
|
+
selector: 'app-table-custom-sizes',
|
|
7
|
+
imports: [DasarTableComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TableCustomSizesExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'firstName', label: 'First Name' },
|
|
13
|
+
{ key: 'lastName', label: 'Last Name' },
|
|
14
|
+
{ key: 'email', label: 'Email' },
|
|
15
|
+
{ key: 'phone', label: 'Phone Num' },
|
|
16
|
+
];
|
|
17
|
+
protected data = [
|
|
18
|
+
{ firstName: 'Alice', lastName: 'Wonder', email: 'alice@test.com', phone: '555-0100' },
|
|
19
|
+
{ firstName: 'Bob', lastName: 'Builder', email: 'bob@test.com', phone: '555-0200' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTableComponent, DasarTableColumn } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-table-dynamic-style',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [DasarTableComponent],
|
|
8
|
+
templateUrl: './table-dynamic-style.example.html',
|
|
9
|
+
})
|
|
10
|
+
export class TableDynamicStyleExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'ticker', label: 'Symbol', cellStyle: { fontWeight: 'bold' } },
|
|
13
|
+
{ key: 'price', label: 'Price', align: 'right' },
|
|
14
|
+
{
|
|
15
|
+
key: 'change',
|
|
16
|
+
label: '24h Change',
|
|
17
|
+
align: 'right',
|
|
18
|
+
cellStyle: (row: any) => ({
|
|
19
|
+
color: row.change >= 0 ? 'var(--theme-success-color)' : 'var(--theme-danger-color)',
|
|
20
|
+
fontWeight: '600',
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: 'status',
|
|
25
|
+
label: 'Market Status',
|
|
26
|
+
align: 'center',
|
|
27
|
+
cellStyle: (row: any) => ({
|
|
28
|
+
backgroundColor: row.isOpen ? 'rgba(16, 185, 129, 0.1)' : 'rgba(239, 68, 68, 0.1)',
|
|
29
|
+
color: row.isOpen ? 'var(--theme-success-color)' : 'var(--theme-danger-color)',
|
|
30
|
+
borderRadius: '4px',
|
|
31
|
+
padding: '4px 8px',
|
|
32
|
+
fontSize: '12px',
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
protected stocks = [
|
|
37
|
+
{ ticker: 'AAPL', price: '$150.25', change: 1.25, isOpen: true, status: 'Trading' },
|
|
38
|
+
{ ticker: 'TSLA', price: '$245.10', change: -5.4, isOpen: true, status: 'Trading' },
|
|
39
|
+
{ ticker: 'GOOGL', price: '$2750.00', change: 12.5, isOpen: false, status: 'Closed' },
|
|
40
|
+
];
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="[]" [columns]="columns">
|
|
3
|
+
<div
|
|
4
|
+
empty-slot
|
|
5
|
+
style="
|
|
6
|
+
padding: 60px 20px;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
style="
|
|
15
|
+
width: 64px;
|
|
16
|
+
height: 64px;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
background: var(--theme-primary-surface-color);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
color: var(--theme-primary-color);
|
|
23
|
+
"
|
|
24
|
+
>
|
|
25
|
+
<dasar-icon name="search" size="lg"></dasar-icon>
|
|
26
|
+
</div>
|
|
27
|
+
<div style="text-align: center">
|
|
28
|
+
<h4 style="margin: 0 0 8px 0; font-size: 18px">No results found</h4>
|
|
29
|
+
<p
|
|
30
|
+
style="
|
|
31
|
+
margin: 0;
|
|
32
|
+
color: var(--theme-text-secondary-color);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
max-width: 300px;
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
Try adjusting your search or filter to find what you're looking for.
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
<dasar-button appearance="outline">Clear Filters</dasar-button>
|
|
41
|
+
</div>
|
|
42
|
+
</dasar-table>
|
|
43
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DasarTableComponent,
|
|
3
|
+
DasarTableColumn,
|
|
4
|
+
DasarButtonComponent,
|
|
5
|
+
DasarIconComponent,
|
|
6
|
+
} from 'dasar-ui';
|
|
7
|
+
import { Component } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
imports: [DasarTableComponent, DasarButtonComponent, DasarIconComponent],
|
|
11
|
+
templateUrl: './table-empty.example.html',
|
|
12
|
+
selector: 'app-table-empty',
|
|
13
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class TableEmptyExample {
|
|
16
|
+
protected columns: DasarTableColumn[] = [
|
|
17
|
+
{ key: 'name', label: 'Document Name' },
|
|
18
|
+
{ key: 'size', label: 'Size' },
|
|
19
|
+
{ key: 'modified', label: 'Last Modified' },
|
|
20
|
+
];
|
|
21
|
+
}
|