dasar-ui 1.3.0 → 1.9.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 +92 -0
- package/Dockerfile +26 -0
- package/README.md +41 -40
- package/angular.json +114 -0
- package/docs/_config.yml +3 -0
- package/docs/getting-started.md +89 -0
- package/docs/index.md +9 -0
- package/docs/installation.md +46 -0
- package/package.json +57 -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 +112 -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.spec.ts +89 -0
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +294 -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 +730 -0
- package/projects/dasar-ui/src/lib/models/type.model.ts +11 -0
- package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +130 -0
- package/projects/dasar-ui/src/lib/services/theme.service.ts +777 -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 +24 -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 +78 -0
- package/projects/documentation/src/app/app.spec.ts +23 -0
- package/projects/documentation/src/app/app.ts +57 -0
- package/projects/documentation/src/app/components/doc-customize-modal.component.ts +368 -0
- package/projects/documentation/src/app/components/doc-example.component.ts +195 -0
- package/projects/documentation/src/app/components/doc-markdown.component.ts +154 -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 +249 -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/getting-started/getting-started.page.ts +21 -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/installation/installation.page.ts +18 -0
- package/projects/documentation/src/app/pages/introduction/introduction.page.ts +18 -0
- package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.html +29 -0
- package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.ts +33 -0
- package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.html +13 -0
- package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.ts +30 -0
- package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.html +5 -0
- package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.ts +12 -0
- package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.html +20 -0
- package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.ts +12 -0
- package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.html +11 -0
- package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.ts +19 -0
- package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.html +7 -0
- package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.ts +12 -0
- package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.html +20 -0
- package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.ts +22 -0
- package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.html +9 -0
- package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.ts +16 -0
- package/projects/documentation/src/app/pages/list/examples/size/list-size.example.html +20 -0
- package/projects/documentation/src/app/pages/list/examples/size/list-size.example.ts +12 -0
- package/projects/documentation/src/app/pages/list/list.page.html +95 -0
- package/projects/documentation/src/app/pages/list/list.page.ts +238 -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 +266 -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 +347 -0
- package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.html +13 -0
- package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.ts +20 -0
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.html +8 -0
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.scss +4 -0
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.ts +11 -0
- package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.html +13 -0
- package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.ts +33 -0
- package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.html +6 -0
- package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.ts +20 -0
- package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.html +15 -0
- package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.ts +31 -0
- package/projects/documentation/src/app/pages/theming/theming-component-config.page.ts +52 -0
- package/projects/documentation/src/app/pages/theming/theming-css-variables.page.ts +71 -0
- package/projects/documentation/src/app/pages/theming/theming-tokens.page.ts +56 -0
- package/projects/documentation/src/app/pages/theming/theming.data.ts +947 -0
- package/projects/documentation/src/app/pages/theming/theming.page.html +56 -0
- package/projects/documentation/src/app/pages/theming/theming.page.ts +144 -0
- package/projects/documentation/src/app/routes/app.routes.server.ts +8 -0
- package/projects/documentation/src/app/routes/app.routes.ts +135 -0
- package/projects/documentation/src/app/services/doc-customize.service.ts +119 -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 +19 -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
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { DocsLayoutComponent, DocApiProperty } from '../../layouts/doc.layout';
|
|
2
|
+
import { DocExampleComponent } from '../../components/doc-example.component';
|
|
3
|
+
import { DasarCardComponent, DasarIconComponent } from 'dasar-ui';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { Component } from '@angular/core';
|
|
6
|
+
|
|
7
|
+
import { MenuCustomTemplateExample } from './examples/custom-template/menu-custom-template.example';
|
|
8
|
+
import { MenuPlacementExample } from './examples/placement/menu-placement.example';
|
|
9
|
+
import { MenuBasicExample } from './examples/basic/menu-basic.example';
|
|
10
|
+
|
|
11
|
+
// @ts-ignore - raw example
|
|
12
|
+
import basicHtml from './examples/basic/menu-basic.example.html' with { loader: 'text' };
|
|
13
|
+
// @ts-ignore - raw example
|
|
14
|
+
import basicTs from './examples/basic/menu-basic.example.ts' with { loader: 'text' };
|
|
15
|
+
// @ts-ignore - raw example
|
|
16
|
+
import placementHtml from './examples/placement/menu-placement.example.html' with {
|
|
17
|
+
loader: 'text',
|
|
18
|
+
};
|
|
19
|
+
// @ts-ignore - raw example
|
|
20
|
+
import placementTs from './examples/placement/menu-placement.example.ts' with { loader: 'text' };
|
|
21
|
+
// @ts-ignore - raw example
|
|
22
|
+
import templateHtml from './examples/custom-template/menu-custom-template.example.html' with {
|
|
23
|
+
loader: 'text',
|
|
24
|
+
};
|
|
25
|
+
// @ts-ignore - raw example
|
|
26
|
+
import templateTs from './examples/custom-template/menu-custom-template.example.ts' with {
|
|
27
|
+
loader: 'text',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
@Component({
|
|
31
|
+
imports: [
|
|
32
|
+
MenuCustomTemplateExample,
|
|
33
|
+
MenuPlacementExample,
|
|
34
|
+
DocExampleComponent,
|
|
35
|
+
DocsLayoutComponent,
|
|
36
|
+
MenuBasicExample,
|
|
37
|
+
CommonModule,
|
|
38
|
+
],
|
|
39
|
+
templateUrl: './menu.page.html',
|
|
40
|
+
selector: 'app-menu-page',
|
|
41
|
+
standalone: true,
|
|
42
|
+
})
|
|
43
|
+
export class MenuDocPage {
|
|
44
|
+
protected basicHtml = basicHtml;
|
|
45
|
+
protected basicTs = basicTs;
|
|
46
|
+
protected placementHtml = placementHtml;
|
|
47
|
+
protected placementTs = placementTs;
|
|
48
|
+
protected templateHtml = templateHtml;
|
|
49
|
+
protected templateTs = templateTs;
|
|
50
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
51
|
+
{
|
|
52
|
+
name: 'items',
|
|
53
|
+
type: 'DasarMenuItem[]',
|
|
54
|
+
defaultValue: '[]',
|
|
55
|
+
description:
|
|
56
|
+
'Array of objects representing the menu items. Each item can have a label, value, iconName, disabled, or divider property.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'label',
|
|
60
|
+
type: 'string',
|
|
61
|
+
defaultValue: 'undefined',
|
|
62
|
+
description: 'The text label displayed on the menu trigger button.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'appearance',
|
|
66
|
+
type: "'none' | 'outline' | 'filled'",
|
|
67
|
+
defaultValue: "'outline'",
|
|
68
|
+
description: 'Defines the visual appearance style of the trigger button.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'placement',
|
|
72
|
+
type: "'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'",
|
|
73
|
+
defaultValue: "'bottom-start'",
|
|
74
|
+
description:
|
|
75
|
+
'Preferred side of the trigger for the panel. It flips to the other side automatically when the viewport has no room.',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'size',
|
|
79
|
+
type: "'sm' | 'md' | 'lg'",
|
|
80
|
+
defaultValue: "'md'",
|
|
81
|
+
description: 'Sets the sizing of the menu trigger, the panel and the items inside it.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'radius',
|
|
85
|
+
type: 'ScaleAttributeType',
|
|
86
|
+
defaultValue: "'md'",
|
|
87
|
+
description: 'Controls the border radius of the trigger button and of the dropdown panel.',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'disabled',
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
defaultValue: 'false',
|
|
93
|
+
description: 'Disables user interactions and prevents the menu from opening.',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'fluid',
|
|
97
|
+
type: 'boolean',
|
|
98
|
+
defaultValue: 'false',
|
|
99
|
+
description: 'Allows the trigger button to expand to the full width of its container.',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'container-class / panel-class / item-class',
|
|
103
|
+
type: 'ClassType',
|
|
104
|
+
defaultValue: 'null',
|
|
105
|
+
description:
|
|
106
|
+
'Injects custom CSS classes into the root wrapper, panel, or individual menu items.',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'container-style / panel-style / item-style',
|
|
110
|
+
type: 'StyleType',
|
|
111
|
+
defaultValue: 'null',
|
|
112
|
+
description:
|
|
113
|
+
'Injects custom inline styles into the root wrapper, panel, or individual menu items.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: '(onItemClick)',
|
|
117
|
+
type: 'EventEmitter<DasarMenuItem>',
|
|
118
|
+
defaultValue: '-',
|
|
119
|
+
description: 'Emitted when a user clicks on an active menu item. Returns the item object.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: '(opened) / (closed)',
|
|
123
|
+
type: 'EventEmitter<void>',
|
|
124
|
+
defaultValue: '-',
|
|
125
|
+
description: 'Emitted when the menu panel opens or closes.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: '[prefix] / [suffix] (Directives)',
|
|
129
|
+
type: 'Content Slot',
|
|
130
|
+
defaultValue: '-',
|
|
131
|
+
description:
|
|
132
|
+
'Projects content (like icons) to the left (prefix) or right (suffix) of the trigger label.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: '[menu-label] (Directive)',
|
|
136
|
+
type: 'Content Slot',
|
|
137
|
+
defaultValue: '-',
|
|
138
|
+
description:
|
|
139
|
+
'Completely replaces the default text label with custom HTML content inside the trigger.',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: '*menu-item (Structural Directive)',
|
|
143
|
+
type: 'TemplateRef<any>',
|
|
144
|
+
defaultValue: '-',
|
|
145
|
+
description:
|
|
146
|
+
'Allows custom rendering of menu items. Exposes the item object via `let-item` and the loop index via `let-index`.',
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
}
|
package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
@for (a of appearances; track a) {
|
|
3
|
+
<dasar-button (click)="show(a)">Appearance: {{ a }}</dasar-button>
|
|
4
|
+
}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<dasar-modal
|
|
8
|
+
[open]="open()"
|
|
9
|
+
[appearance]="appearance()"
|
|
10
|
+
[label]="'Appearance: ' + appearance()"
|
|
11
|
+
(onClose)="open.set(false)"
|
|
12
|
+
>
|
|
13
|
+
<p>
|
|
14
|
+
The <code>appearance</code> input mirrors <code>dasar-card</code>: <code>elevated</code> draws a
|
|
15
|
+
border and a shadow, <code>outline</code> draws only a border, and <code>borderless</code> draws
|
|
16
|
+
neither.
|
|
17
|
+
</p>
|
|
18
|
+
</dasar-modal>
|
package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
type Appearance = 'elevated' | 'outline' | 'borderless';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
templateUrl: './modal-appearance.example.html',
|
|
8
|
+
selector: 'app-modal-appearance-example',
|
|
9
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
10
|
+
standalone: true,
|
|
11
|
+
})
|
|
12
|
+
export class ModalAppearanceExample {
|
|
13
|
+
protected open = signal(false);
|
|
14
|
+
protected appearance = signal<Appearance>('elevated');
|
|
15
|
+
protected appearances: Appearance[] = ['elevated', 'outline', 'borderless'];
|
|
16
|
+
|
|
17
|
+
show(appearance: Appearance) {
|
|
18
|
+
this.appearance.set(appearance);
|
|
19
|
+
this.open.set(true);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open modal</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal [open]="open()" label="Basic modal" (onClose)="open.set(false)">
|
|
4
|
+
<p>
|
|
5
|
+
Modal body content. Press <strong>Esc</strong>, click the backdrop, or use the ✕ button to close
|
|
6
|
+
this dialog.
|
|
7
|
+
</p>
|
|
8
|
+
</dasar-modal>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-basic.example.html',
|
|
6
|
+
selector: 'app-modal-basic-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalBasicExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
<dasar-button (click)="openNotClosable.set(true)">closable = false</dasar-button>
|
|
3
|
+
<dasar-button (click)="openNoOverlay.set(true)">close-on-overlay = false</dasar-button>
|
|
4
|
+
<dasar-button (click)="openNoEscape.set(true)">close-on-escape = false</dasar-button>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<dasar-modal
|
|
8
|
+
[open]="openNotClosable()"
|
|
9
|
+
label="Not closable"
|
|
10
|
+
closable="false"
|
|
11
|
+
(onClose)="openNotClosable.set(false)"
|
|
12
|
+
>
|
|
13
|
+
<p>
|
|
14
|
+
With <code>closable="false"</code> the default ✕ button is not rendered, so the dialog can only
|
|
15
|
+
be closed from the action below.
|
|
16
|
+
</p>
|
|
17
|
+
<div action-slot>
|
|
18
|
+
<dasar-button size="md" radius="md" (click)="openNotClosable.set(false)">Close</dasar-button>
|
|
19
|
+
</div>
|
|
20
|
+
</dasar-modal>
|
|
21
|
+
|
|
22
|
+
<dasar-modal
|
|
23
|
+
[open]="openNoOverlay()"
|
|
24
|
+
label="Backdrop click does nothing"
|
|
25
|
+
close-on-overlay="false"
|
|
26
|
+
(onClose)="openNoOverlay.set(false)"
|
|
27
|
+
>
|
|
28
|
+
<p>
|
|
29
|
+
With <code>close-on-overlay="false"</code> clicking the backdrop no longer emits
|
|
30
|
+
<code>(onClose)</code>. The ✕ button and Esc still work.
|
|
31
|
+
</p>
|
|
32
|
+
</dasar-modal>
|
|
33
|
+
|
|
34
|
+
<dasar-modal
|
|
35
|
+
[open]="openNoEscape()"
|
|
36
|
+
label="Esc does nothing"
|
|
37
|
+
close-on-escape="false"
|
|
38
|
+
(onClose)="openNoEscape.set(false)"
|
|
39
|
+
>
|
|
40
|
+
<p>
|
|
41
|
+
With <code>close-on-escape="false"</code> pressing Esc no longer emits <code>(onClose)</code>.
|
|
42
|
+
The ✕ button and a backdrop click still work.
|
|
43
|
+
</p>
|
|
44
|
+
</dasar-modal>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-close-behavior.example.html',
|
|
6
|
+
selector: 'app-modal-close-behavior-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalCloseBehaviorExample {
|
|
11
|
+
protected openNotClosable = signal(false);
|
|
12
|
+
protected openNoOverlay = signal(false);
|
|
13
|
+
protected openNoEscape = signal(false);
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open a styled modal</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal
|
|
4
|
+
[open]="open()"
|
|
5
|
+
label="Custom styles"
|
|
6
|
+
(onClose)="open.set(false)"
|
|
7
|
+
[header-style]="{ background: 'var(--theme-primary-color)', color: '#fff' }"
|
|
8
|
+
[action-style]="{ 'justify-content': 'space-between' }"
|
|
9
|
+
body-fluid
|
|
10
|
+
>
|
|
11
|
+
<img src="https://picsum.photos/800/300" alt="Placeholder" style="display: block; width: 100%" />
|
|
12
|
+
<div style="padding: 16px">
|
|
13
|
+
<p>
|
|
14
|
+
<code>body-fluid</code> removes the body padding so the image reaches the modal edges. The
|
|
15
|
+
<code>header-style</code> paints the header, and <code>action-style</code> pushes the footer
|
|
16
|
+
buttons apart.
|
|
17
|
+
</p>
|
|
18
|
+
<p>
|
|
19
|
+
Every section also accepts a <code>-style</code> and a <code>-class</code> input: container,
|
|
20
|
+
header, close, body and actions.
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div action-slot>
|
|
25
|
+
<dasar-button
|
|
26
|
+
appearance="outline"
|
|
27
|
+
variant="secondary"
|
|
28
|
+
size="md"
|
|
29
|
+
radius="md"
|
|
30
|
+
(click)="open.set(false)"
|
|
31
|
+
>
|
|
32
|
+
Cancel
|
|
33
|
+
</dasar-button>
|
|
34
|
+
<dasar-button size="md" radius="md" (click)="open.set(false)">Save</dasar-button>
|
|
35
|
+
</div>
|
|
36
|
+
</dasar-modal>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-custom-style.example.html',
|
|
6
|
+
selector: 'app-modal-custom-style-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalCustomStyleExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
}
|
package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<p style="margin: 0 0 8px">
|
|
2
|
+
This text sits behind the overlay, so you can see how much of it stays readable.
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
6
|
+
<dasar-button (click)="blur.set('0px'); open.set(true)">No blur</dasar-button>
|
|
7
|
+
<dasar-button (click)="blur.set('4px'); open.set(true)">Default blur</dasar-button>
|
|
8
|
+
<dasar-button (click)="blur.set('12px'); open.set(true)">Heavy blur</dasar-button>
|
|
9
|
+
<dasar-button
|
|
10
|
+
(click)="blur.set('6px'); background.set('rgba(37, 99, 235, 0.35)'); open.set(true)"
|
|
11
|
+
>
|
|
12
|
+
Tinted backdrop
|
|
13
|
+
</dasar-button>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<dasar-modal
|
|
17
|
+
[open]="open()"
|
|
18
|
+
label="Overlay"
|
|
19
|
+
[overlay-blur]="blur()"
|
|
20
|
+
[overlay-background]="background()"
|
|
21
|
+
(onClose)="open.set(false)"
|
|
22
|
+
>
|
|
23
|
+
<p>
|
|
24
|
+
<code>overlay-blur</code> controls the backdrop blur radius and
|
|
25
|
+
<code>overlay-background</code> its color. Both are passed down to the underlying
|
|
26
|
+
<code>dasar-overlay</code>.
|
|
27
|
+
</p>
|
|
28
|
+
<p>Current blur: {{ blur() }}. Current background: {{ background() }}.</p>
|
|
29
|
+
</dasar-modal>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-overlay.example.html',
|
|
6
|
+
selector: 'app-modal-overlay-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalOverlayExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected blur = signal('4px');
|
|
13
|
+
protected background = signal('rgba(0, 0, 0, 0.45)');
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<h4 style="margin: 0 0 8px">Radius</h4>
|
|
2
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px">
|
|
3
|
+
@for (r of radii; track r) {
|
|
4
|
+
<dasar-button size="sm" radius="md" (click)="showRadius(r)">{{ r }}</dasar-button>
|
|
5
|
+
}
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<h4 style="margin: 0 0 8px">Spacing</h4>
|
|
9
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
10
|
+
@for (s of spacings; track s) {
|
|
11
|
+
<dasar-button size="sm" radius="md" (click)="showSpacing(s)">{{ s }}</dasar-button>
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<dasar-modal
|
|
16
|
+
[open]="open()"
|
|
17
|
+
[radius]="radius()"
|
|
18
|
+
[spacing]="spacing()"
|
|
19
|
+
[label]="'radius: ' + radius() + ' / spacing: ' + spacing()"
|
|
20
|
+
(onClose)="open.set(false)"
|
|
21
|
+
>
|
|
22
|
+
<p>
|
|
23
|
+
<code>radius</code> uses the shared scale from <code>dasar-card</code>.
|
|
24
|
+
<code>spacing</code> switches the padding of the header, body and actions between
|
|
25
|
+
<code>normal</code> and <code>compact</code>.
|
|
26
|
+
</p>
|
|
27
|
+
</dasar-modal>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent, DasarModalRadius } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-radius-spacing.example.html',
|
|
6
|
+
selector: 'app-modal-radius-spacing-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalRadiusSpacingExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected radius = signal<DasarModalRadius>('lg');
|
|
13
|
+
protected spacing = signal<'normal' | 'compact'>('normal');
|
|
14
|
+
|
|
15
|
+
protected radii: DasarModalRadius[] = ['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'];
|
|
16
|
+
protected spacings: Array<'normal' | 'compact'> = ['normal', 'compact'];
|
|
17
|
+
|
|
18
|
+
showRadius(radius: DasarModalRadius) {
|
|
19
|
+
this.radius.set(radius);
|
|
20
|
+
this.open.set(true);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
showSpacing(spacing: 'normal' | 'compact') {
|
|
24
|
+
this.spacing.set(spacing);
|
|
25
|
+
this.open.set(true);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open a tall modal</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal [open]="open()" label="Scrollable body" (onClose)="open.set(false)">
|
|
4
|
+
@for (p of paragraphs; track p) {
|
|
5
|
+
<p>
|
|
6
|
+
Paragraph {{ p }}. When the content is taller than the viewport, only the body scrolls while
|
|
7
|
+
the header and the actions stay visible.
|
|
8
|
+
</p>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
<div action-slot>
|
|
12
|
+
<dasar-button size="md" radius="md" (click)="open.set(false)">Close</dasar-button>
|
|
13
|
+
</div>
|
|
14
|
+
</dasar-modal>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-scroll.example.html',
|
|
6
|
+
selector: 'app-modal-scroll-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalScrollExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
protected paragraphs = Array.from({ length: 40 }, (_, i) => i + 1);
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
@for (s of sizes; track s) {
|
|
3
|
+
<dasar-button (click)="show(s)">Size: {{ s }}</dasar-button>
|
|
4
|
+
}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<dasar-modal
|
|
8
|
+
[open]="open()"
|
|
9
|
+
[size]="size()"
|
|
10
|
+
[label]="'Size: ' + size()"
|
|
11
|
+
(onClose)="open.set(false)"
|
|
12
|
+
>
|
|
13
|
+
<p>
|
|
14
|
+
The <code>size</code> input controls both the width preset and the typographic scale inside the
|
|
15
|
+
modal: <code>sm</code> is 400px, <code>md</code> is 560px and <code>lg</code> is 800px.
|
|
16
|
+
</p>
|
|
17
|
+
</dasar-modal>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
templateUrl: './modal-size.example.html',
|
|
8
|
+
selector: 'app-modal-size-example',
|
|
9
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
10
|
+
standalone: true,
|
|
11
|
+
})
|
|
12
|
+
export class ModalSizeExample {
|
|
13
|
+
protected open = signal(false);
|
|
14
|
+
protected size = signal<Size>('md');
|
|
15
|
+
protected sizes: Size[] = ['sm', 'md', 'lg'];
|
|
16
|
+
|
|
17
|
+
show(size: Size) {
|
|
18
|
+
this.size.set(size);
|
|
19
|
+
this.open.set(true);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<dasar-button (click)="open.set(true)">Open with slots</dasar-button>
|
|
2
|
+
|
|
3
|
+
<dasar-modal [open]="open()" (onClose)="open.set(false)">
|
|
4
|
+
<div header-slot style="display: flex; align-items: center; gap: 8px">
|
|
5
|
+
<dasar-icon name="info-circle"></dasar-icon>
|
|
6
|
+
<strong>Custom header content</strong>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<dasar-button close-slot variant="ghost" size="sm" radius="md" (click)="open.set(false)">
|
|
10
|
+
Dismiss
|
|
11
|
+
</dasar-button>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
The <code>header-slot</code> replaces the <code>label</code>, the <code>close-slot</code>
|
|
15
|
+
replaces the default ✕ button, and the default slot is the body.
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<div action-slot>
|
|
19
|
+
<dasar-button
|
|
20
|
+
appearance="outline"
|
|
21
|
+
variant="secondary"
|
|
22
|
+
size="md"
|
|
23
|
+
radius="md"
|
|
24
|
+
(click)="open.set(false)"
|
|
25
|
+
>
|
|
26
|
+
Cancel
|
|
27
|
+
</dasar-button>
|
|
28
|
+
<dasar-button size="md" radius="md" (click)="open.set(false)">Confirm</dasar-button>
|
|
29
|
+
</div>
|
|
30
|
+
</dasar-modal>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent, DasarIconComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-slots.example.html',
|
|
6
|
+
selector: 'app-modal-slots-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent, DasarIconComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalSlotsExample {
|
|
11
|
+
protected open = signal(false);
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
2
|
+
<dasar-button (click)="openCustom.set(true)">Custom width (720px)</dasar-button>
|
|
3
|
+
<dasar-button (click)="openFull.set(true)">Full width</dasar-button>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<dasar-modal
|
|
7
|
+
[open]="openCustom()"
|
|
8
|
+
label="Custom width"
|
|
9
|
+
width="720px"
|
|
10
|
+
(onClose)="openCustom.set(false)"
|
|
11
|
+
>
|
|
12
|
+
<p>
|
|
13
|
+
The <code>width</code> input sets an explicit width and overrides the preset that comes from
|
|
14
|
+
<code>size</code>.
|
|
15
|
+
</p>
|
|
16
|
+
</dasar-modal>
|
|
17
|
+
|
|
18
|
+
<dasar-modal [open]="openFull()" label="Full width" full-width (onClose)="openFull.set(false)">
|
|
19
|
+
<p>
|
|
20
|
+
<code>full-width</code> makes the modal span the viewport minus the overlay padding, and it wins
|
|
21
|
+
over an explicit <code>width</code>.
|
|
22
|
+
</p>
|
|
23
|
+
</dasar-modal>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarModalComponent, DasarButtonComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './modal-width.example.html',
|
|
6
|
+
selector: 'app-modal-width-example',
|
|
7
|
+
imports: [DasarModalComponent, DasarButtonComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ModalWidthExample {
|
|
11
|
+
protected openCustom = signal(false);
|
|
12
|
+
protected openFull = signal(false);
|
|
13
|
+
}
|