dasar-ui 1.3.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/.editorconfig +17 -0
- package/.github/workflows/npm-publish-github-packages.yml +36 -0
- package/.prettierrc +12 -0
- package/.versionrc.json +4 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/settings.json +4 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +48 -0
- package/Dockerfile +26 -0
- package/README.md +14 -19
- package/angular.json +114 -0
- package/package.json +56 -39
- package/projects/dasar-ui/README.md +64 -0
- package/projects/dasar-ui/ng-package.json +10 -0
- package/projects/dasar-ui/package.json +27 -0
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.html +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.scss +352 -0
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.ts +154 -0
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.scss +69 -0
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.ts +26 -0
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.html +158 -0
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.scss +371 -0
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.ts +458 -0
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.html +80 -0
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.scss +184 -0
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.ts +294 -0
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.html +42 -0
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.scss +38 -0
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.ts +205 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.html +111 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.scss +331 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.spec.ts +93 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.ts +527 -0
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.registry.ts +5087 -0
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.scss +24 -0
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.ts +97 -0
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.html +54 -0
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.scss +251 -0
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.ts +319 -0
- 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 +64 -0
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.scss +229 -0
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.spec.ts +93 -0
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.ts +278 -0
- 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.html +90 -0
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.scss +353 -0
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.ts +337 -0
- 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.html +98 -0
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.scss +51 -0
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.ts +99 -0
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.ts +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.html +150 -0
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.scss +272 -0
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.ts +228 -0
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.ts +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.html +189 -0
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.scss +387 -0
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.spec.ts +97 -0
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.ts +540 -0
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.ts +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.html +162 -0
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.scss +283 -0
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.ts +380 -0
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.html +103 -0
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.scss +238 -0
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.spec.ts +570 -0
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.ts +349 -0
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.html +43 -0
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.scss +189 -0
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.ts +139 -0
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +271 -0
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.ts +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.ts +9 -0
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.css +0 -0
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.html +1 -0
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.ts +9 -0
- package/projects/dasar-ui/src/lib/models/theme.model.ts +666 -0
- package/projects/dasar-ui/src/lib/models/type.model.ts +11 -0
- package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +65 -0
- package/projects/dasar-ui/src/lib/services/theme.service.ts +707 -0
- package/{styles → projects/dasar-ui/src/lib/styles}/theme.scss +47 -48
- package/projects/dasar-ui/src/lib/styles/theme.ts +70 -0
- package/projects/dasar-ui/src/lib/utils/common.ts +156 -0
- 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 +23 -0
- package/projects/dasar-ui/tsconfig.lib.json +21 -0
- package/projects/dasar-ui/tsconfig.lib.prod.json +11 -0
- package/projects/dasar-ui/tsconfig.spec.json +18 -0
- 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 +40 -0
- package/fesm2022/dasar-ui.mjs +0 -9664
- package/fesm2022/dasar-ui.mjs.map +0 -1
- package/types/dasar-ui.d.ts +0 -2114
package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.html
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="orders" [columns]="columns" [expandable]="true">
|
|
3
|
+
<ng-template expanded-slot let-row>
|
|
4
|
+
<div
|
|
5
|
+
style="
|
|
6
|
+
padding: 24px;
|
|
7
|
+
background: var(--theme-bg-hover-color);
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
margin: 8px;
|
|
10
|
+
"
|
|
11
|
+
>
|
|
12
|
+
<div style="font-weight: 600; margin-bottom: 12px; font-size: 16px">
|
|
13
|
+
Order Details: {{ row.id }}
|
|
14
|
+
</div>
|
|
15
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; font-size: 14px">
|
|
16
|
+
<div>
|
|
17
|
+
<div style="color: var(--theme-text-secondary-color); margin-bottom: 4px">
|
|
18
|
+
Shipping Address
|
|
19
|
+
</div>
|
|
20
|
+
<div>{{ row.address }}</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<div style="color: var(--theme-text-secondary-color); margin-bottom: 4px">
|
|
24
|
+
Tracking Number
|
|
25
|
+
</div>
|
|
26
|
+
<div style="font-family: monospace">{{ row.tracking }}</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div>
|
|
29
|
+
<div style="color: var(--theme-text-secondary-color); margin-bottom: 4px">Carrier</div>
|
|
30
|
+
<div>{{ row.carrier }}</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</ng-template>
|
|
35
|
+
</dasar-table>
|
|
36
|
+
</div>
|
package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarTableComponent, DasarTableColumn } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-table-expanded',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [DasarTableComponent],
|
|
8
|
+
templateUrl: './table-expanded.example.html',
|
|
9
|
+
})
|
|
10
|
+
export class TableExpandedExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'id', label: 'Order ID' },
|
|
13
|
+
{ key: 'date', label: 'Date' },
|
|
14
|
+
{ key: 'amount', label: 'Amount' },
|
|
15
|
+
];
|
|
16
|
+
protected orders = [
|
|
17
|
+
{
|
|
18
|
+
id: 'ORD-001',
|
|
19
|
+
date: '2026-10-01',
|
|
20
|
+
amount: '$120.50',
|
|
21
|
+
address: '123 Main St, NY',
|
|
22
|
+
tracking: 'TRK987654321',
|
|
23
|
+
carrier: 'FedEx',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'ORD-002',
|
|
27
|
+
date: '2026-10-02',
|
|
28
|
+
amount: '$45.00',
|
|
29
|
+
address: '456 Elm St, CA',
|
|
30
|
+
tracking: 'TRK123456789',
|
|
31
|
+
carrier: 'UPS',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DasarTableComponent, DasarTableColumn } from 'dasar-ui';
|
|
2
|
+
import { Component, OnInit } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './table-heatmap.example.html',
|
|
6
|
+
imports: [DasarTableComponent],
|
|
7
|
+
selector: 'app-table-heatmap',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TableHeatmapExample implements OnInit {
|
|
11
|
+
public columns: DasarTableColumn[] = [];
|
|
12
|
+
public heatmapData: any[] = [];
|
|
13
|
+
|
|
14
|
+
ngOnInit() {
|
|
15
|
+
const hours = ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00'];
|
|
16
|
+
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
|
|
17
|
+
this.columns = [
|
|
18
|
+
{
|
|
19
|
+
key: 'day',
|
|
20
|
+
label: 'Day',
|
|
21
|
+
width: '100px',
|
|
22
|
+
cellStyle: { fontWeight: '600', backgroundColor: 'var(--theme-bg-surface-color)' },
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
hours.forEach((hour) => {
|
|
26
|
+
this.columns.push({
|
|
27
|
+
key: hour,
|
|
28
|
+
label: hour,
|
|
29
|
+
align: 'center',
|
|
30
|
+
headerStyle: { fontSize: '11px', padding: '8px 4px' },
|
|
31
|
+
cellStyle: (row: any) => {
|
|
32
|
+
const val = row[hour];
|
|
33
|
+
const intensity = Math.min(1, val / 100);
|
|
34
|
+
return {
|
|
35
|
+
backgroundColor: `rgba(16, 185, 129, ${intensity})`,
|
|
36
|
+
color: intensity > 0.55 ? '#ffffff' : 'var(--theme-text-primary-color)',
|
|
37
|
+
border: '1px solid var(--theme-bg-default-color)',
|
|
38
|
+
fontSize: '12px',
|
|
39
|
+
fontWeight: '500',
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
this.heatmapData = days.map((day) => {
|
|
45
|
+
const rowData: any = { day };
|
|
46
|
+
hours.forEach((hour) => {
|
|
47
|
+
rowData[hour] = Math.floor(Math.random() * 101);
|
|
48
|
+
});
|
|
49
|
+
return rowData;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="employees" [columns]="columns">
|
|
3
|
+
<ng-template cell-slot="name" let-val let-row="row">
|
|
4
|
+
@if (row.isEditing) {
|
|
5
|
+
<input
|
|
6
|
+
type="text"
|
|
7
|
+
[(ngModel)]="row.editName"
|
|
8
|
+
style="
|
|
9
|
+
padding: 4px 8px;
|
|
10
|
+
border: 1px solid var(--theme-border-strong-color);
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
"
|
|
14
|
+
/>
|
|
15
|
+
} @else {
|
|
16
|
+
<span>{{ val }}</span>
|
|
17
|
+
}
|
|
18
|
+
</ng-template>
|
|
19
|
+
<ng-template cell-slot="role" let-val let-row="row">
|
|
20
|
+
@if (row.isEditing) {
|
|
21
|
+
<select
|
|
22
|
+
[(ngModel)]="row.editRole"
|
|
23
|
+
style="
|
|
24
|
+
padding: 4px 8px;
|
|
25
|
+
border: 1px solid var(--theme-border-strong-color);
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
width: 100%;
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<option value="Admin">Admin</option>
|
|
31
|
+
<option value="Editor">Editor</option>
|
|
32
|
+
<option value="Viewer">Viewer</option>
|
|
33
|
+
</select>
|
|
34
|
+
} @else {
|
|
35
|
+
<dasar-chip [variant]="val === 'Admin' ? 'primary' : 'ghost'" size="sm">{{
|
|
36
|
+
val
|
|
37
|
+
}}</dasar-chip>
|
|
38
|
+
}
|
|
39
|
+
</ng-template>
|
|
40
|
+
<ng-template cell-slot="actions" let-row="row">
|
|
41
|
+
<div style="display: flex; gap: 8px; justify-content: flex-end">
|
|
42
|
+
@if (row.isEditing) {
|
|
43
|
+
<dasar-button variant="primary" size="sm" (click)="saveEdit(row)">Save</dasar-button>
|
|
44
|
+
<dasar-button variant="ghost" size="sm" (click)="cancelEdit(row)">Cancel</dasar-button>
|
|
45
|
+
} @else {
|
|
46
|
+
<dasar-button appearance="outline" size="sm" icon-only (click)="startEdit(row)">
|
|
47
|
+
<dasar-icon name="edit-2" size="sm"></dasar-icon>
|
|
48
|
+
</dasar-button>
|
|
49
|
+
}
|
|
50
|
+
</div>
|
|
51
|
+
</ng-template>
|
|
52
|
+
</dasar-table>
|
|
53
|
+
</div>
|
package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DasarTableComponent,
|
|
3
|
+
DasarTableColumn,
|
|
4
|
+
DasarButtonComponent,
|
|
5
|
+
DasarIconComponent,
|
|
6
|
+
DasarChipComponent,
|
|
7
|
+
} from 'dasar-ui';
|
|
8
|
+
import { FormsModule } from '@angular/forms';
|
|
9
|
+
import { Component } from '@angular/core';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
imports: [
|
|
13
|
+
FormsModule,
|
|
14
|
+
DasarTableComponent,
|
|
15
|
+
DasarButtonComponent,
|
|
16
|
+
DasarIconComponent,
|
|
17
|
+
DasarChipComponent,
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './table-inline-edit.example.html',
|
|
20
|
+
selector: 'app-table-inline-edit',
|
|
21
|
+
standalone: true,
|
|
22
|
+
})
|
|
23
|
+
export class TableInlineEditExample {
|
|
24
|
+
protected columns: DasarTableColumn[] = [
|
|
25
|
+
{ key: 'id', label: 'ID', width: '60px' },
|
|
26
|
+
{ key: 'name', label: 'Employee Name' },
|
|
27
|
+
{ key: 'role', label: 'Role', width: '150px' },
|
|
28
|
+
{ key: 'actions', label: '', align: 'right', width: '160px' },
|
|
29
|
+
];
|
|
30
|
+
protected employees = [
|
|
31
|
+
{ id: '1', name: 'Alice Smith', role: 'Admin', isEditing: false },
|
|
32
|
+
{ id: '2', name: 'Bob Jones', role: 'Viewer', isEditing: false },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
startEdit(row: any) {
|
|
36
|
+
row.isEditing = true;
|
|
37
|
+
row.editName = row.name;
|
|
38
|
+
row.editRole = row.role;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
saveEdit(row: any) {
|
|
42
|
+
row.isEditing = false;
|
|
43
|
+
row.name = row.editName;
|
|
44
|
+
row.role = row.editRole;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
cancelEdit(row: any) {
|
|
48
|
+
row.isEditing = false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="departments" [columns]="columns" [expandable]="true" appearance="elevated">
|
|
3
|
+
<ng-template expanded-slot let-row>
|
|
4
|
+
<div
|
|
5
|
+
style="
|
|
6
|
+
padding: 16px;
|
|
7
|
+
background: var(--theme-bg-default-color);
|
|
8
|
+
border-top: 1px solid var(--theme-border-subtle-color);
|
|
9
|
+
"
|
|
10
|
+
>
|
|
11
|
+
<h5 style="margin: 0 0 12px 0; font-size: 14px; color: var(--theme-text-secondary-color)">
|
|
12
|
+
Employees in {{ row.name }}
|
|
13
|
+
</h5>
|
|
14
|
+
<dasar-table
|
|
15
|
+
[data]="row.employees"
|
|
16
|
+
[columns]="employeeColumns"
|
|
17
|
+
appearance="outline"
|
|
18
|
+
size="sm"
|
|
19
|
+
></dasar-table>
|
|
20
|
+
</div>
|
|
21
|
+
</ng-template>
|
|
22
|
+
</dasar-table>
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DasarTableComponent, DasarTableColumn } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-table-nested',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [DasarTableComponent],
|
|
8
|
+
templateUrl: './table-nested.example.html',
|
|
9
|
+
})
|
|
10
|
+
export class TableNestedExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'name', label: 'Department Name', cellStyle: { fontWeight: 'bold' } },
|
|
13
|
+
{ key: 'manager', label: 'Manager' },
|
|
14
|
+
{ key: 'headcount', label: 'Headcount', align: 'right' },
|
|
15
|
+
];
|
|
16
|
+
protected employeeColumns: DasarTableColumn[] = [
|
|
17
|
+
{ key: 'id', label: 'Emp ID', width: '80px' },
|
|
18
|
+
{ key: 'title', label: 'Job Title' },
|
|
19
|
+
{ key: 'name', label: 'Name' },
|
|
20
|
+
];
|
|
21
|
+
protected departments = [
|
|
22
|
+
{
|
|
23
|
+
name: 'Engineering',
|
|
24
|
+
manager: 'Sarah Connor',
|
|
25
|
+
headcount: 3,
|
|
26
|
+
employees: [
|
|
27
|
+
{ id: 'E101', name: 'John Doe', title: 'Frontend Developer' },
|
|
28
|
+
{ id: 'E102', name: 'Jane Smith', title: 'Backend Developer' },
|
|
29
|
+
{ id: 'E103', name: 'Mike Johnson', title: 'DevOps Engineer' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Design',
|
|
34
|
+
manager: 'Alan Turing',
|
|
35
|
+
headcount: 2,
|
|
36
|
+
employees: [
|
|
37
|
+
{ id: 'D201', name: 'Emily Davis', title: 'UI Designer' },
|
|
38
|
+
{ id: 'D202', name: 'Chris Lee', title: 'UX Researcher' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
}
|
package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.html
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div style="width: 100%; max-width: 800px">
|
|
2
|
+
<dasar-table [data]="data" [columns]="columns">
|
|
3
|
+
<div
|
|
4
|
+
pagination-slot
|
|
5
|
+
style="display: flex; justify-content: space-between; width: 100%; align-items: center"
|
|
6
|
+
>
|
|
7
|
+
<span style="font-size: 14px; color: var(--theme-text-secondary-color)"
|
|
8
|
+
>Showing 1 to 5 of 97 results</span
|
|
9
|
+
>
|
|
10
|
+
<div style="display: flex; gap: 8px">
|
|
11
|
+
<dasar-button appearance="outline" size="sm">Prev</dasar-button>
|
|
12
|
+
<dasar-button variant="primary" size="sm">1</dasar-button>
|
|
13
|
+
<dasar-button variant="ghost" size="sm">2</dasar-button>
|
|
14
|
+
<dasar-button variant="ghost" size="sm">3</dasar-button>
|
|
15
|
+
<dasar-button variant="ghost" size="sm">...</dasar-button>
|
|
16
|
+
<dasar-button appearance="outline" size="sm">Next</dasar-button>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</dasar-table>
|
|
20
|
+
</div>
|
package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DasarTableComponent, DasarTableColumn, DasarButtonComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
imports: [DasarTableComponent, DasarButtonComponent],
|
|
6
|
+
templateUrl: './table-pagination.example.html',
|
|
7
|
+
selector: 'app-table-pagination',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TablePaginationExample {
|
|
11
|
+
protected columns: DasarTableColumn[] = [
|
|
12
|
+
{ key: 'id', label: 'ID' },
|
|
13
|
+
{ key: 'event', label: 'Event Name' },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
protected data = [
|
|
17
|
+
{ id: '1', event: 'System Boot' },
|
|
18
|
+
{ id: '2', event: 'User Login' },
|
|
19
|
+
{ id: '3', event: 'Data Sync' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<docs-layout
|
|
2
|
+
title="Table"
|
|
3
|
+
description="Advanced examples demonstrating how to fully customize Dasar Table cells, headers, empty states, and expanded rows using Angular structural directives."
|
|
4
|
+
[apiData]="apiProps"
|
|
5
|
+
>
|
|
6
|
+
<doc-example-component
|
|
7
|
+
[codes]="[
|
|
8
|
+
{ label: 'HTML', lang: 'html', value: badgeHtml },
|
|
9
|
+
{ label: 'TypeScript', lang: 'typescript', value: badgeTs },
|
|
10
|
+
]"
|
|
11
|
+
title="Cell Slot: Status Badges"
|
|
12
|
+
>
|
|
13
|
+
<app-table-cell-badge></app-table-cell-badge>
|
|
14
|
+
</doc-example-component>
|
|
15
|
+
|
|
16
|
+
<doc-example-component
|
|
17
|
+
[codes]="[
|
|
18
|
+
{ label: 'HTML', lang: 'html', value: profileHtml },
|
|
19
|
+
{ label: 'TypeScript', lang: 'typescript', value: profileTs },
|
|
20
|
+
]"
|
|
21
|
+
title="Cell Slot: User Profiles"
|
|
22
|
+
>
|
|
23
|
+
<app-table-cell-profile></app-table-cell-profile>
|
|
24
|
+
</doc-example-component>
|
|
25
|
+
|
|
26
|
+
<doc-example-component
|
|
27
|
+
[codes]="[
|
|
28
|
+
{ label: 'HTML', lang: 'html', value: actionsHtml },
|
|
29
|
+
{ label: 'TypeScript', lang: 'typescript', value: actionsTs },
|
|
30
|
+
]"
|
|
31
|
+
title="Cell Slot: Action Buttons"
|
|
32
|
+
>
|
|
33
|
+
<app-table-cell-actions></app-table-cell-actions>
|
|
34
|
+
</doc-example-component>
|
|
35
|
+
|
|
36
|
+
<doc-example-component
|
|
37
|
+
[codes]="[
|
|
38
|
+
{ label: 'HTML', lang: 'html', value: expandedHtml },
|
|
39
|
+
{ label: 'TypeScript', lang: 'typescript', value: expandedTs },
|
|
40
|
+
]"
|
|
41
|
+
title="Expandable Rows"
|
|
42
|
+
>
|
|
43
|
+
<app-table-expanded></app-table-expanded>
|
|
44
|
+
</doc-example-component>
|
|
45
|
+
|
|
46
|
+
<doc-example-component
|
|
47
|
+
[codes]="[
|
|
48
|
+
{ label: 'HTML', lang: 'html', value: emptyHtml },
|
|
49
|
+
{ label: 'TypeScript', lang: 'typescript', value: emptyTs },
|
|
50
|
+
]"
|
|
51
|
+
title="Custom Empty State"
|
|
52
|
+
>
|
|
53
|
+
<app-table-empty></app-table-empty>
|
|
54
|
+
</doc-example-component>
|
|
55
|
+
|
|
56
|
+
<doc-example-component
|
|
57
|
+
[codes]="[
|
|
58
|
+
{ label: 'HTML', lang: 'html', value: paginationHtml },
|
|
59
|
+
{ label: 'TypeScript', lang: 'typescript', value: paginationTs },
|
|
60
|
+
]"
|
|
61
|
+
title="Custom Pagination Footer"
|
|
62
|
+
>
|
|
63
|
+
<app-table-pagination></app-table-pagination>
|
|
64
|
+
</doc-example-component>
|
|
65
|
+
|
|
66
|
+
<doc-example-component
|
|
67
|
+
[codes]="[
|
|
68
|
+
{ label: 'HTML', lang: 'html', value: customSizesHtml },
|
|
69
|
+
{ label: 'TypeScript', lang: 'typescript', value: customSizesTs },
|
|
70
|
+
]"
|
|
71
|
+
title="Custom Sizes"
|
|
72
|
+
>
|
|
73
|
+
<app-table-custom-sizes></app-table-custom-sizes>
|
|
74
|
+
</doc-example-component>
|
|
75
|
+
|
|
76
|
+
<doc-example-component
|
|
77
|
+
[codes]="[
|
|
78
|
+
{ label: 'HTML', lang: 'html', value: customBodyHtml },
|
|
79
|
+
{ label: 'TypeScript', lang: 'typescript', value: customBodyTs },
|
|
80
|
+
]"
|
|
81
|
+
title="Custom Body Layout"
|
|
82
|
+
>
|
|
83
|
+
<app-table-custom-body></app-table-custom-body>
|
|
84
|
+
</doc-example-component>
|
|
85
|
+
|
|
86
|
+
<doc-example-component
|
|
87
|
+
[codes]="[
|
|
88
|
+
{ label: 'HTML', lang: 'html', value: heatmapHtml },
|
|
89
|
+
{ label: 'TypeScript', lang: 'typescript', value: heatmapTs },
|
|
90
|
+
]"
|
|
91
|
+
title="Data Heatmap using Dynamic cellStyle"
|
|
92
|
+
>
|
|
93
|
+
<app-table-heatmap></app-table-heatmap>
|
|
94
|
+
</doc-example-component>
|
|
95
|
+
|
|
96
|
+
<doc-example-component
|
|
97
|
+
[codes]="[
|
|
98
|
+
{ label: 'HTML', lang: 'html', value: dynamicStyleHtml },
|
|
99
|
+
{ label: 'TypeScript', lang: 'typescript', value: dynamicStyleTs },
|
|
100
|
+
]"
|
|
101
|
+
title="Conditional Text & Status Styling"
|
|
102
|
+
>
|
|
103
|
+
<app-table-dynamic-style></app-table-dynamic-style>
|
|
104
|
+
</doc-example-component>
|
|
105
|
+
|
|
106
|
+
<doc-example-component
|
|
107
|
+
[codes]="[
|
|
108
|
+
{ label: 'HTML', lang: 'html', value: inlineEditHtml },
|
|
109
|
+
{ label: 'TypeScript', lang: 'typescript', value: inlineEditTs },
|
|
110
|
+
]"
|
|
111
|
+
title="Inline Editing with Cell Slots"
|
|
112
|
+
>
|
|
113
|
+
<app-table-inline-edit></app-table-inline-edit>
|
|
114
|
+
</doc-example-component>
|
|
115
|
+
|
|
116
|
+
<doc-example-component
|
|
117
|
+
[codes]="[
|
|
118
|
+
{ label: 'HTML', lang: 'html', value: nestedHtml },
|
|
119
|
+
{ label: 'TypeScript', lang: 'typescript', value: nestedTs },
|
|
120
|
+
]"
|
|
121
|
+
title="Nested Tables in Expanded Rows"
|
|
122
|
+
>
|
|
123
|
+
<app-table-nested></app-table-nested>
|
|
124
|
+
</doc-example-component>
|
|
125
|
+
</docs-layout>
|