dasar-ui 1.1.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +31 -0
- package/.github/workflows/npm-publish-github-packages.yml +36 -0
- package/.versionrc.json +4 -0
- package/CHANGELOG.md +30 -0
- package/Dockerfile +26 -0
- package/angular.json +77 -0
- package/package.json +38 -24
- package/projects/dasar-ui/package.json +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.ts +3 -7
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.ts +2 -2
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.html +11 -2
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.scss +30 -0
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.spec.ts +78 -6
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.ts +32 -32
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.registry.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.scss +0 -30
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.ts +0 -4
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list-item.html +17 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.html +25 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.scss +122 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.spec.ts +21 -0
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.ts +166 -0
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.html +6 -5
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.scss +39 -5
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.spec.ts +78 -6
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.ts +41 -3
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.html +72 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.scss +170 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.spec.ts +267 -0
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.ts +305 -0
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.scss +2 -7
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.html +11 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.scss +18 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.spec.ts +104 -0
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.ts +87 -0
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.ts +1 -1
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.html +1 -14
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.scss +0 -11
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.ts +0 -2
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.html +9 -5
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.scss +62 -22
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.spec.ts +82 -6
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.ts +47 -4
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.html +92 -30
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.scss +137 -25
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.spec.ts +554 -5
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.ts +312 -35
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +6 -21
- package/projects/dasar-ui/src/lib/models/theme.model.ts +35 -12
- package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +65 -0
- package/projects/dasar-ui/src/lib/services/theme.service.ts +68 -4
- package/projects/dasar-ui/src/lib/styles/theme.scss +47 -48
- package/projects/dasar-ui/src/lib/utils/common.ts +5 -24
- package/projects/dasar-ui/src/lib/utils/icon-size.spec.ts +23 -0
- package/projects/dasar-ui/src/lib/utils/icon-size.ts +16 -0
- package/projects/dasar-ui/src/lib/utils/panel-placement.spec.ts +90 -0
- package/projects/dasar-ui/src/lib/utils/panel-placement.ts +53 -0
- package/projects/dasar-ui/src/public-api.ts +4 -4
- package/projects/dasar-ui/tsconfig.spec.json +8 -1
- package/projects/documentation/public/favicon.ico +0 -0
- package/projects/documentation/src/app/app.html +51 -0
- package/projects/documentation/src/app/app.spec.ts +23 -0
- package/projects/documentation/src/app/app.ts +23 -0
- package/projects/documentation/src/app/components/doc-customize-modal.component.ts +314 -0
- package/projects/documentation/src/app/components/doc-example.component.ts +195 -0
- package/projects/documentation/src/app/config/app.config.server.ts +10 -0
- package/projects/documentation/src/app/config/app.config.ts +17 -0
- package/projects/documentation/src/app/layouts/doc.layout.ts +229 -0
- package/projects/documentation/src/app/pages/button/button.page.html +65 -0
- package/projects/documentation/src/app/pages/button/button.page.ts +139 -0
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.html +7 -0
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.html +19 -0
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.html +9 -0
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.html +7 -0
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.html +10 -0
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.ts +10 -0
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.html +9 -0
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.ts +10 -0
- package/projects/documentation/src/app/pages/calendar/calendar.page.html +75 -0
- package/projects/documentation/src/app/pages/calendar/calendar.page.ts +165 -0
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.html +21 -0
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.ts +10 -0
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.html +11 -0
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.html +36 -0
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.ts +11 -0
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.html +10 -0
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.ts +12 -0
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.html +15 -0
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.ts +12 -0
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.html +34 -0
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.ts +14 -0
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.html +20 -0
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.ts +37 -0
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.html +16 -0
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/card.page.html +75 -0
- package/projects/documentation/src/app/pages/card/card.page.ts +182 -0
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.html +13 -0
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.html +30 -0
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.ts +19 -0
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.html +173 -0
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.html +27 -0
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.html +13 -0
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.html +20 -0
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.html +11 -0
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/chip.page.html +55 -0
- package/projects/documentation/src/app/pages/chip/chip.page.ts +158 -0
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.html +7 -0
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.html +13 -0
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.ts +17 -0
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.html +9 -0
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.html +6 -0
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.ts +10 -0
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.html +8 -0
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.html +75 -0
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.ts +181 -0
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.html +29 -0
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.html +12 -0
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.ts +12 -0
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.html +23 -0
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.ts +17 -0
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.html +30 -0
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.ts +13 -0
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.html +24 -0
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.html +19 -0
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.html +28 -0
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.ts +12 -0
- package/projects/documentation/src/app/pages/icon/icon.page.html +15 -0
- package/projects/documentation/src/app/pages/icon/icon.page.ts +60 -0
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.html +27 -0
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.html +31 -0
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.ts +19 -0
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.html +68 -0
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.ts +18 -0
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.html +52 -0
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.html +29 -0
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.ts +10 -0
- package/projects/documentation/src/app/pages/input/input.page.html +65 -0
- package/projects/documentation/src/app/pages/input/input.page.ts +170 -0
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.html +5 -0
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.ts +17 -0
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.html +35 -0
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.ts +57 -0
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.html +12 -0
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.ts +16 -0
- package/projects/documentation/src/app/pages/menu/menu.page.html +35 -0
- package/projects/documentation/src/app/pages/menu/menu.page.ts +149 -0
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.html +18 -0
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.ts +21 -0
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.html +8 -0
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.html +44 -0
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.ts +14 -0
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.html +36 -0
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.html +29 -0
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.ts +14 -0
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.html +27 -0
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.ts +27 -0
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.html +14 -0
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.ts +13 -0
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.html +17 -0
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.ts +21 -0
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.html +30 -0
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.ts +12 -0
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.html +23 -0
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.ts +13 -0
- package/projects/documentation/src/app/pages/modal/modal.page.html +105 -0
- package/projects/documentation/src/app/pages/modal/modal.page.ts +257 -0
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.html +30 -0
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.html +12 -0
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.html +30 -0
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.ts +14 -0
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.html +49 -0
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.html +21 -0
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.ts +10 -0
- package/projects/documentation/src/app/pages/number-input/number-input.page.html +55 -0
- package/projects/documentation/src/app/pages/number-input/number-input.page.ts +142 -0
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.html +32 -0
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.ts +15 -0
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.ts +20 -0
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.html +24 -0
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.ts +59 -0
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.html +20 -0
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.ts +20 -0
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.html +13 -0
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.ts +22 -0
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.html +44 -0
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.ts +15 -0
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.html +31 -0
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.ts +12 -0
- package/projects/documentation/src/app/pages/select/select.page.html +75 -0
- package/projects/documentation/src/app/pages/select/select.page.ts +195 -0
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.html +14 -0
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.ts +25 -0
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.html +12 -0
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.html +29 -0
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.ts +20 -0
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.html +39 -0
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.html +7 -0
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.html +3 -0
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.ts +41 -0
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.html +43 -0
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.html +36 -0
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.ts +34 -0
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.html +8 -0
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.ts +52 -0
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.html +53 -0
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.ts +50 -0
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.html +23 -0
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.ts +42 -0
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.html +20 -0
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.ts +21 -0
- package/projects/documentation/src/app/pages/table/table.page.html +125 -0
- package/projects/documentation/src/app/pages/table/table.page.ts +261 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.html +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.ts +27 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.html +27 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.ts +36 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.html +5 -0
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.ts +20 -0
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.html +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.html +19 -0
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.html +16 -0
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.ts +23 -0
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.html +5 -0
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.ts +12 -0
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.html +20 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.ts +30 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.html +16 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.ts +26 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.html +22 -0
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.ts +26 -0
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.html +25 -0
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.ts +10 -0
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.html +6 -0
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.ts +13 -0
- package/projects/documentation/src/app/pages/tabs/tabs.page.html +165 -0
- package/projects/documentation/src/app/pages/tabs/tabs.page.ts +340 -0
- package/projects/documentation/src/app/routes/app.routes.server.ts +8 -0
- package/projects/documentation/src/app/routes/app.routes.ts +87 -0
- package/projects/documentation/src/app/services/doc-customize.service.ts +107 -0
- package/projects/documentation/src/app/utils/highlight.pipe.ts +43 -0
- package/projects/documentation/src/index.html +13 -0
- package/projects/documentation/src/main.server.ts +7 -0
- package/projects/documentation/src/main.ts +5 -0
- package/projects/documentation/src/server.ts +47 -0
- package/projects/documentation/src/styles.scss +7 -0
- package/projects/documentation/tsconfig.app.json +11 -0
- package/projects/documentation/tsconfig.spec.json +10 -0
- package/tsconfig.json +6 -3
- package/.nvmrc +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 320px">
|
|
2
|
+
<dasar-number-input
|
|
3
|
+
label="Item Quantity"
|
|
4
|
+
placeholder="0"
|
|
5
|
+
[(ngModel)]="qty"
|
|
6
|
+
full-width
|
|
7
|
+
></dasar-number-input>
|
|
8
|
+
|
|
9
|
+
<p style="margin: 0; font-size: 14px; color: var(--theme-text-secondary-color)">
|
|
10
|
+
Bound Value: <strong>{{ qty }}</strong>
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { DasarNumberInputComponent } from 'dasar-ui';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-number-input-basic-example',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [FormsModule, DasarNumberInputComponent],
|
|
9
|
+
templateUrl: './number-input-basic.example.html',
|
|
10
|
+
})
|
|
11
|
+
export class NumberInputBasicExample {
|
|
12
|
+
public qty: number = 1;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 32px; width: 100%">
|
|
2
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap">
|
|
3
|
+
<div style="flex: 1; min-width: 200px">
|
|
4
|
+
<dasar-number-input
|
|
5
|
+
label="Outline (Default)"
|
|
6
|
+
appearance="outline"
|
|
7
|
+
full-width
|
|
8
|
+
></dasar-number-input>
|
|
9
|
+
</div>
|
|
10
|
+
<div style="flex: 1; min-width: 200px">
|
|
11
|
+
<dasar-number-input
|
|
12
|
+
label="Filled Appearance"
|
|
13
|
+
appearance="filled"
|
|
14
|
+
full-width
|
|
15
|
+
></dasar-number-input>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div style="display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap">
|
|
20
|
+
<div style="flex: 1; min-width: 200px">
|
|
21
|
+
<dasar-number-input label="Small Size" size="sm" full-width></dasar-number-input>
|
|
22
|
+
</div>
|
|
23
|
+
<div style="flex: 1; min-width: 200px">
|
|
24
|
+
<dasar-number-input label="Medium Size" size="md" full-width></dasar-number-input>
|
|
25
|
+
</div>
|
|
26
|
+
<div style="flex: 1; min-width: 200px">
|
|
27
|
+
<dasar-number-input label="Large Size" size="lg" full-width></dasar-number-input>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DasarNumberInputComponent } from 'dasar-ui';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { Component } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarNumberInputComponent],
|
|
7
|
+
templateUrl: './number-input-limits.example.html',
|
|
8
|
+
selector: 'app-number-input-limits-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class NumberInputLimitsExample {
|
|
12
|
+
public percentage: number = 50;
|
|
13
|
+
public temperature: number = 36.5;
|
|
14
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 400px">
|
|
2
|
+
<dasar-number-input label="Price" placeholder="0" full-width>
|
|
3
|
+
<div
|
|
4
|
+
prefix
|
|
5
|
+
style="
|
|
6
|
+
padding: 0 16px;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
background: var(--theme-bg-hover-color);
|
|
11
|
+
border-right: 1px solid var(--theme-border-strong-color);
|
|
12
|
+
height: 100%;
|
|
13
|
+
"
|
|
14
|
+
>
|
|
15
|
+
$
|
|
16
|
+
</div>
|
|
17
|
+
</dasar-number-input>
|
|
18
|
+
|
|
19
|
+
<dasar-number-input label="Custom Action Buttons" [value]="1" full-width>
|
|
20
|
+
<div
|
|
21
|
+
decrement-slot
|
|
22
|
+
style="
|
|
23
|
+
padding: 0 16px;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background: var(--theme-danger-color);
|
|
27
|
+
color: white;
|
|
28
|
+
height: 100%;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
"
|
|
31
|
+
>
|
|
32
|
+
MINUS
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
increment-slot
|
|
36
|
+
style="
|
|
37
|
+
padding: 0 16px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
background: var(--theme-success-color);
|
|
41
|
+
color: white;
|
|
42
|
+
height: 100%;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
"
|
|
45
|
+
>
|
|
46
|
+
PLUS
|
|
47
|
+
</div>
|
|
48
|
+
</dasar-number-input>
|
|
49
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarNumberInputComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './number-input-slots.example.html',
|
|
6
|
+
selector: 'app-number-input-slots-example',
|
|
7
|
+
imports: [DasarNumberInputComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class NumberInputSlotsExample {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; width: 100%">
|
|
2
|
+
<div style="flex: 1; min-width: 200px">
|
|
3
|
+
<dasar-number-input
|
|
4
|
+
label="Error State"
|
|
5
|
+
[error]="true"
|
|
6
|
+
hint="Value exceeds available stock."
|
|
7
|
+
[value]="999"
|
|
8
|
+
full-width
|
|
9
|
+
></dasar-number-input>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div style="flex: 1; min-width: 200px">
|
|
13
|
+
<dasar-number-input
|
|
14
|
+
label="Disabled State"
|
|
15
|
+
[disabled]="true"
|
|
16
|
+
hint="Out of stock."
|
|
17
|
+
[value]="0"
|
|
18
|
+
full-width
|
|
19
|
+
></dasar-number-input>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DasarNumberInputComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './number-input-states.example.html',
|
|
6
|
+
selector: 'app-number-input-states-example',
|
|
7
|
+
imports: [DasarNumberInputComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class NumberInputStatesExample {}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<docs-layout
|
|
2
|
+
title="Number Input"
|
|
3
|
+
description="A numeric input field with built-in increment and decrement stepper controls."
|
|
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-number-input-basic-example></app-number-input-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-number-input-appearance-example></app-number-input-appearance-example>
|
|
24
|
+
</doc-example-component>
|
|
25
|
+
|
|
26
|
+
<doc-example-component
|
|
27
|
+
[codes]="[
|
|
28
|
+
{ label: 'HTML', lang: 'html', value: limitsHtml },
|
|
29
|
+
{ label: 'TypeScript', lang: 'typescript', value: limitsTs },
|
|
30
|
+
]"
|
|
31
|
+
title="Min, Max & Step Limits"
|
|
32
|
+
>
|
|
33
|
+
<app-number-input-limits-example></app-number-input-limits-example>
|
|
34
|
+
</doc-example-component>
|
|
35
|
+
|
|
36
|
+
<doc-example-component
|
|
37
|
+
[codes]="[
|
|
38
|
+
{ label: 'HTML', lang: 'html', value: statesHtml },
|
|
39
|
+
{ label: 'TypeScript', lang: 'typescript', value: statesTs },
|
|
40
|
+
]"
|
|
41
|
+
title="Validation & States"
|
|
42
|
+
>
|
|
43
|
+
<app-number-input-states-example></app-number-input-states-example>
|
|
44
|
+
</doc-example-component>
|
|
45
|
+
|
|
46
|
+
<doc-example-component
|
|
47
|
+
[codes]="[
|
|
48
|
+
{ label: 'HTML', lang: 'html', value: slotsHtml },
|
|
49
|
+
{ label: 'TypeScript', lang: 'typescript', value: slotsTs },
|
|
50
|
+
]"
|
|
51
|
+
title="Prefix & Action Slots"
|
|
52
|
+
>
|
|
53
|
+
<app-number-input-slots-example></app-number-input-slots-example>
|
|
54
|
+
</doc-example-component>
|
|
55
|
+
</docs-layout>
|
|
@@ -0,0 +1,142 @@
|
|
|
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 { NumberInputBasicExample } from './examples/basic/number-input-basic.example';
|
|
7
|
+
import { NumberInputAppearanceExample } from './examples/appearance/number-input-appearance.example';
|
|
8
|
+
import { NumberInputLimitsExample } from './examples/limits/number-input-limits.example';
|
|
9
|
+
import { NumberInputStatesExample } from './examples/states/number-input-states.example';
|
|
10
|
+
import { NumberInputSlotsExample } from './examples/slots/number-input-slots.example';
|
|
11
|
+
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import basicHtml from './examples/basic/number-input-basic.example.html' with { loader: 'text' };
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
import basicTs from './examples/basic/number-input-basic.example.ts' with { loader: 'text' };
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import appearanceHtml from './examples/appearance/number-input-appearance.example.html' with {
|
|
18
|
+
loader: 'text',
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import appearanceTs from './examples/appearance/number-input-appearance.example.ts' with {
|
|
22
|
+
loader: 'text',
|
|
23
|
+
};
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import limitsHtml from './examples/limits/number-input-limits.example.html' with { loader: 'text' };
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import limitsTs from './examples/limits/number-input-limits.example.ts' with { loader: 'text' };
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import statesHtml from './examples/states/number-input-states.example.html' with { loader: 'text' };
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import statesTs from './examples/states/number-input-states.example.ts' with { loader: 'text' };
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import slotsHtml from './examples/slots/number-input-slots.example.html' with { loader: 'text' };
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
import slotsTs from './examples/slots/number-input-slots.example.ts' with { loader: 'text' };
|
|
36
|
+
|
|
37
|
+
@Component({
|
|
38
|
+
imports: [
|
|
39
|
+
CommonModule,
|
|
40
|
+
DocsLayoutComponent,
|
|
41
|
+
DocExampleComponent,
|
|
42
|
+
NumberInputBasicExample,
|
|
43
|
+
NumberInputAppearanceExample,
|
|
44
|
+
NumberInputLimitsExample,
|
|
45
|
+
NumberInputStatesExample,
|
|
46
|
+
NumberInputSlotsExample,
|
|
47
|
+
],
|
|
48
|
+
templateUrl: './number-input.page.html',
|
|
49
|
+
selector: 'app-number-input-page',
|
|
50
|
+
standalone: true,
|
|
51
|
+
})
|
|
52
|
+
export class NumberInputDocPage {
|
|
53
|
+
protected basicHtml = basicHtml;
|
|
54
|
+
protected basicTs = basicTs;
|
|
55
|
+
protected appearanceHtml = appearanceHtml;
|
|
56
|
+
protected appearanceTs = appearanceTs;
|
|
57
|
+
protected limitsHtml = limitsHtml;
|
|
58
|
+
protected limitsTs = limitsTs;
|
|
59
|
+
protected statesHtml = statesHtml;
|
|
60
|
+
protected statesTs = statesTs;
|
|
61
|
+
protected slotsHtml = slotsHtml;
|
|
62
|
+
protected slotsTs = slotsTs;
|
|
63
|
+
|
|
64
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
65
|
+
{
|
|
66
|
+
name: 'value',
|
|
67
|
+
type: 'number | null',
|
|
68
|
+
defaultValue: 'null',
|
|
69
|
+
description: 'The current numeric value.',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'appearance',
|
|
73
|
+
type: "'outline' | 'filled'",
|
|
74
|
+
defaultValue: "'outline'",
|
|
75
|
+
description: 'Visual container style.',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'size',
|
|
79
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
|
|
80
|
+
defaultValue: "'md'",
|
|
81
|
+
description: 'Sizing scale.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'radius',
|
|
85
|
+
type: 'ScaleAttributeType',
|
|
86
|
+
defaultValue: "'md'",
|
|
87
|
+
description: 'Border radius.',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'step',
|
|
91
|
+
type: 'number',
|
|
92
|
+
defaultValue: '1',
|
|
93
|
+
description: 'Increment/decrement value step.',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'min / max',
|
|
97
|
+
type: 'number',
|
|
98
|
+
defaultValue: 'undefined',
|
|
99
|
+
description: 'Constraint limits.',
|
|
100
|
+
},
|
|
101
|
+
{ name: 'label', type: 'string', defaultValue: 'undefined', description: 'Text label.' },
|
|
102
|
+
{ name: 'hint', type: 'string', defaultValue: 'undefined', description: 'Helper text.' },
|
|
103
|
+
{ name: 'placeholder', type: 'string', defaultValue: "''", description: 'Placeholder string.' },
|
|
104
|
+
{
|
|
105
|
+
name: 'full-width',
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
defaultValue: 'false',
|
|
108
|
+
description: 'Forces full width.',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'disabled',
|
|
112
|
+
type: 'boolean',
|
|
113
|
+
defaultValue: 'false',
|
|
114
|
+
description: 'Disables input and actions.',
|
|
115
|
+
},
|
|
116
|
+
{ name: 'error', type: 'boolean', defaultValue: 'false', description: 'Error styling.' },
|
|
117
|
+
{
|
|
118
|
+
name: '(valueChange)',
|
|
119
|
+
type: 'EventEmitter<number | null>',
|
|
120
|
+
defaultValue: '-',
|
|
121
|
+
description: 'Emitted on change.',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: '(onIncrementClick) / (onDecrementClick)',
|
|
125
|
+
type: 'EventEmitter<number>',
|
|
126
|
+
defaultValue: '-',
|
|
127
|
+
description: 'Action button events.',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: '[prefix]',
|
|
131
|
+
type: 'Content Slot',
|
|
132
|
+
defaultValue: '-',
|
|
133
|
+
description: 'Custom prefix content.',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: '[increment-slot] / [decrement-slot]',
|
|
137
|
+
type: 'Content Slot',
|
|
138
|
+
defaultValue: '-',
|
|
139
|
+
description: 'Custom action button templates.',
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 32px; width: 100%">
|
|
2
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap">
|
|
3
|
+
<div style="flex: 1; min-width: 200px">
|
|
4
|
+
<dasar-select
|
|
5
|
+
label="Outline (Default)"
|
|
6
|
+
appearance="outline"
|
|
7
|
+
[options]="options"
|
|
8
|
+
full-width
|
|
9
|
+
></dasar-select>
|
|
10
|
+
</div>
|
|
11
|
+
<div style="flex: 1; min-width: 200px">
|
|
12
|
+
<dasar-select
|
|
13
|
+
label="Filled Appearance"
|
|
14
|
+
appearance="filled"
|
|
15
|
+
[options]="options"
|
|
16
|
+
full-width
|
|
17
|
+
></dasar-select>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div style="display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap">
|
|
22
|
+
<div style="flex: 1; min-width: 200px">
|
|
23
|
+
<dasar-select label="Small Size" size="sm" [options]="options" full-width></dasar-select>
|
|
24
|
+
</div>
|
|
25
|
+
<div style="flex: 1; min-width: 200px">
|
|
26
|
+
<dasar-select label="Medium Size" size="md" [options]="options" full-width></dasar-select>
|
|
27
|
+
</div>
|
|
28
|
+
<div style="flex: 1; min-width: 200px">
|
|
29
|
+
<dasar-select label="Large Size" size="lg" [options]="options" full-width></dasar-select>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './select-appearance.example.html',
|
|
6
|
+
selector: 'app-select-appearance-example',
|
|
7
|
+
imports: [DasarSelectComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class SelectAppearanceExample {
|
|
11
|
+
protected options: DasarSelectOption[] = [
|
|
12
|
+
{ label: 'Option 1', value: '1' },
|
|
13
|
+
{ label: 'Option 2', value: '2' },
|
|
14
|
+
];
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 320px">
|
|
2
|
+
<dasar-select
|
|
3
|
+
label="Country"
|
|
4
|
+
placeholder="Select your country"
|
|
5
|
+
[options]="countries"
|
|
6
|
+
[(ngModel)]="selectedCountry"
|
|
7
|
+
full-width
|
|
8
|
+
></dasar-select>
|
|
9
|
+
|
|
10
|
+
<p style="margin: 0; font-size: 14px; color: var(--theme-text-secondary-color)">
|
|
11
|
+
Bound Value: <strong>{{ selectedCountry || 'None' }}</strong>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarSelectComponent],
|
|
7
|
+
templateUrl: './select-basic.example.html',
|
|
8
|
+
selector: 'app-select-basic-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class SelectBasicExample {
|
|
12
|
+
protected selectedCountry = signal<string | null>(null);
|
|
13
|
+
|
|
14
|
+
protected countries: DasarSelectOption[] = [
|
|
15
|
+
{ label: 'Indonesia', value: 'id' },
|
|
16
|
+
{ label: 'United States', value: 'us' },
|
|
17
|
+
{ label: 'Japan', value: 'jp' },
|
|
18
|
+
{ label: 'Germany', value: 'de' },
|
|
19
|
+
];
|
|
20
|
+
}
|
package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; width: 100%">
|
|
2
|
+
<div style="flex: 1; min-width: 300px">
|
|
3
|
+
<dasar-select
|
|
4
|
+
label="Multiple (Text Display)"
|
|
5
|
+
multiple-type="text"
|
|
6
|
+
placeholder="Select members"
|
|
7
|
+
[searchable]="true"
|
|
8
|
+
[options]="users"
|
|
9
|
+
[(ngModel)]="selectedUsersText"
|
|
10
|
+
full-width
|
|
11
|
+
></dasar-select>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div style="flex: 1; min-width: 300px">
|
|
15
|
+
<dasar-select
|
|
16
|
+
label="Multiple (Chip Display)"
|
|
17
|
+
multiple-type="chip"
|
|
18
|
+
placeholder="Assign roles"
|
|
19
|
+
[options]="roles"
|
|
20
|
+
[(ngModel)]="selectedRoles"
|
|
21
|
+
full-width
|
|
22
|
+
></dasar-select>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { Component } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarSelectComponent],
|
|
7
|
+
templateUrl: './select-multiple.example.html',
|
|
8
|
+
selector: 'app-select-multiple-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class SelectMultipleExample {
|
|
12
|
+
protected selectedUsersText: string[] = ['2'];
|
|
13
|
+
protected selectedRoles: string[] = ['admin', 'editor'];
|
|
14
|
+
|
|
15
|
+
protected users: DasarSelectOption[] = [
|
|
16
|
+
{ label: 'Alice Johnson', value: '1' },
|
|
17
|
+
{ label: 'Bob Smith', value: '2' },
|
|
18
|
+
{ label: 'Charlie Davis', value: '3' },
|
|
19
|
+
{ label: 'Diana Prince', value: '4' },
|
|
20
|
+
{ label: 'Evan Wright', value: '5' },
|
|
21
|
+
{ label: 'Fiona Gallagher', value: '6' },
|
|
22
|
+
{ label: 'George Washington', value: '7' },
|
|
23
|
+
{ label: 'Hannah Abbott', value: '8' },
|
|
24
|
+
{ label: 'Ian Malcolm', value: '9' },
|
|
25
|
+
{ label: 'Julia Roberts', value: '10' },
|
|
26
|
+
{ label: 'Kevin Hart', value: '11' },
|
|
27
|
+
{ label: 'Laura Croft', value: '12' },
|
|
28
|
+
{ label: 'Michael Scott', value: '13' },
|
|
29
|
+
{ label: 'Natalie Portman', value: '14' },
|
|
30
|
+
{ label: 'Oscar Martinez', value: '15' },
|
|
31
|
+
{ label: 'Penelope Cruz', value: '16' },
|
|
32
|
+
{ label: 'Quentin Tarantino', value: '17' },
|
|
33
|
+
{ label: 'Rachel Green', value: '18' },
|
|
34
|
+
{ label: 'Steve Rogers', value: '19' },
|
|
35
|
+
{ label: 'Taylor Swift', value: '20' },
|
|
36
|
+
];
|
|
37
|
+
protected roles: DasarSelectOption[] = [
|
|
38
|
+
{ label: 'Admin', value: 'admin', chipVariant: 'danger' },
|
|
39
|
+
{ label: 'Editor', value: 'editor', chipVariant: 'warning' },
|
|
40
|
+
{ label: 'Viewer', value: 'viewer', chipVariant: 'ghost' },
|
|
41
|
+
{ label: 'Super Admin', value: 'super_admin', chipVariant: 'danger' },
|
|
42
|
+
{ label: 'Content Manager', value: 'content_manager', chipVariant: 'warning' },
|
|
43
|
+
{ label: 'Moderator', value: 'moderator', chipVariant: 'secondary' },
|
|
44
|
+
{ label: 'Contributor', value: 'contributor', chipVariant: 'primary' },
|
|
45
|
+
{ label: 'Subscriber', value: 'subscriber', chipVariant: 'ghost' },
|
|
46
|
+
{ label: 'Billing Manager', value: 'billing_manager', chipVariant: 'success' },
|
|
47
|
+
{ label: 'Support Agent', value: 'support_agent', chipVariant: 'secondary' },
|
|
48
|
+
{ label: 'Developer', value: 'developer', chipVariant: 'primary' },
|
|
49
|
+
{ label: 'QA Engineer', value: 'qa_engineer', chipVariant: 'warning' },
|
|
50
|
+
{ label: 'Product Owner', value: 'product_owner', chipVariant: 'success' },
|
|
51
|
+
{ label: 'Data Analyst', value: 'data_analyst', chipVariant: 'secondary' },
|
|
52
|
+
{ label: 'Marketing Lead', value: 'marketing_lead', chipVariant: 'primary' },
|
|
53
|
+
{ label: 'Sales Rep', value: 'sales_rep', chipVariant: 'success' },
|
|
54
|
+
{ label: 'Guest', value: 'guest', chipVariant: 'ghost' },
|
|
55
|
+
{ label: 'Auditor', value: 'auditor', chipVariant: 'warning' },
|
|
56
|
+
{ label: 'Security Officer', value: 'security_officer', chipVariant: 'danger' },
|
|
57
|
+
{ label: 'System Operator', value: 'system_operator', chipVariant: 'primary' },
|
|
58
|
+
];
|
|
59
|
+
}
|
package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.html
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap">
|
|
2
|
+
<dasar-select
|
|
3
|
+
label="Bottom Start (Default)"
|
|
4
|
+
placement="bottom-start"
|
|
5
|
+
[options]="options"
|
|
6
|
+
[(ngModel)]="value"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<dasar-select label="Bottom End" placement="bottom-end" [options]="options" [(ngModel)]="value" />
|
|
10
|
+
|
|
11
|
+
<dasar-select label="Top Start" placement="top-start" [options]="options" [(ngModel)]="value" />
|
|
12
|
+
|
|
13
|
+
<dasar-select label="Top End" placement="top-end" [options]="options" [(ngModel)]="value" />
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<p style="margin: 12px 0 0; font-size: 14px; color: var(--theme-text-secondary-color)">
|
|
17
|
+
<code>placement</code> is the <em>preferred</em> side of the trigger. When the preferred side has
|
|
18
|
+
no room left in the viewport, the panel automatically flips to the side with more space, both
|
|
19
|
+
vertically and horizontally, and it re-checks while you scroll or resize.
|
|
20
|
+
</p>
|
package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
templateUrl: './select-placement.example.html',
|
|
8
|
+
selector: 'app-select-placement-example',
|
|
9
|
+
imports: [CommonModule, FormsModule, DasarSelectComponent],
|
|
10
|
+
standalone: true,
|
|
11
|
+
})
|
|
12
|
+
export class SelectPlacementExample {
|
|
13
|
+
protected options: DasarSelectOption[] = [
|
|
14
|
+
{ label: 'Alpha', value: 'alpha' },
|
|
15
|
+
{ label: 'Beta', value: 'beta' },
|
|
16
|
+
{ label: 'Gamma', value: 'gamma' },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
protected value: string | null = null;
|
|
20
|
+
}
|
package/projects/documentation/src/app/pages/select/examples/search/select-search.example.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div style="display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; width: 100%">
|
|
2
|
+
<div style="flex: 1; min-width: 300px">
|
|
3
|
+
<dasar-select
|
|
4
|
+
label="Searchable Select"
|
|
5
|
+
placeholder="Type to filter..."
|
|
6
|
+
[searchable]="true"
|
|
7
|
+
[clearable]="true"
|
|
8
|
+
[options]="frameworks"
|
|
9
|
+
[(ngModel)]="selectedFramework"
|
|
10
|
+
full-width
|
|
11
|
+
></dasar-select>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DasarSelectComponent, DasarSelectOption } from 'dasar-ui';
|
|
2
|
+
import { Component, signal } from '@angular/core';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarSelectComponent],
|
|
7
|
+
templateUrl: './select-search.example.html',
|
|
8
|
+
selector: 'app-select-search-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class SelectSearchExample {
|
|
12
|
+
protected selectedFramework = signal<string | null>(null);
|
|
13
|
+
|
|
14
|
+
protected frameworks: DasarSelectOption[] = [
|
|
15
|
+
{ label: 'Angular', value: 'angular' },
|
|
16
|
+
{ label: 'React', value: 'react' },
|
|
17
|
+
{ label: 'Vue', value: 'vue' },
|
|
18
|
+
{ label: 'Svelte', value: 'svelte' },
|
|
19
|
+
{ label: 'Solid', value: 'solid' },
|
|
20
|
+
{ label: 'Qwik', value: 'qwik' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 32px; width: 100%; max-width: 450px">
|
|
2
|
+
<dasar-select label="Custom Option Rendering" [options]="users" full-width>
|
|
3
|
+
<ng-container *chip-template="let opt">
|
|
4
|
+
<div style="display: flex; align-items: center; gap: 12px; width: 100%">
|
|
5
|
+
<div
|
|
6
|
+
style="
|
|
7
|
+
background: var(--theme-primary-color);
|
|
8
|
+
width: 32px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
color: white;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
"
|
|
16
|
+
>
|
|
17
|
+
{{ opt.label.charAt(0) }}
|
|
18
|
+
</div>
|
|
19
|
+
<div style="display: flex; flex-direction: column">
|
|
20
|
+
<span style="font-weight: 600; font-size: 14px; line-height: 1">{{ opt.label }}</span>
|
|
21
|
+
<span style="font-size: 12px; color: gray">{{ opt['email'] }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</ng-container>
|
|
25
|
+
</dasar-select>
|
|
26
|
+
|
|
27
|
+
<dasar-select label="Custom Slot Rendering" [options]="users" full-width multiple-type="chip">
|
|
28
|
+
<ng-template chip-template let-option let-select="selectInstance">
|
|
29
|
+
<dasar-chip size="sm">{{ option.label }}</dasar-chip>
|
|
30
|
+
</ng-template>
|
|
31
|
+
</dasar-select>
|
|
32
|
+
|
|
33
|
+
<dasar-select placeholder="Filter by status" [options]="[]" full-width>
|
|
34
|
+
<div label-slot style="display: flex; align-items: center">
|
|
35
|
+
<dasar-icon name="filter" size="sm"></dasar-icon>
|
|
36
|
+
<span style="font-weight: 600">Status Filter</span>
|
|
37
|
+
</div>
|
|
38
|
+
<div extra-label-slot style="color: var(--theme-primary-color); cursor: pointer">Clear All</div>
|
|
39
|
+
<div option-empty-slot style="padding: 24px; text-align: center; color: gray">
|
|
40
|
+
<dasar-icon name="inbox" size="lg" style="margin-bottom: 8px; opacity: 0.5"></dasar-icon>
|
|
41
|
+
<div>No statuses matched your criteria.</div>
|
|
42
|
+
</div>
|
|
43
|
+
</dasar-select>
|
|
44
|
+
</div>
|