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,19 @@
|
|
|
1
|
+
import { DasarInputComponent } from 'dasar-ui';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { Component } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarInputComponent],
|
|
7
|
+
templateUrl: './input-mask.example.html',
|
|
8
|
+
selector: 'app-input-mask-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class InputMaskExample {
|
|
12
|
+
protected amount: string = '5000000';
|
|
13
|
+
protected dateStr: string = '';
|
|
14
|
+
protected promoCode: string = '';
|
|
15
|
+
|
|
16
|
+
protected customUpperMask = (val: string): string => {
|
|
17
|
+
return val ? val.toUpperCase() : '';
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 32px; width: 100%; max-width: 450px">
|
|
2
|
+
<dasar-input label="Salary Expectation" placeholder="0" mask="thousand" 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
|
+
Rp
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
suffix
|
|
19
|
+
style="
|
|
20
|
+
padding: 0 16px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
color: var(--theme-text-secondary-color);
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
/ month
|
|
28
|
+
</div>
|
|
29
|
+
</dasar-input>
|
|
30
|
+
|
|
31
|
+
<dasar-input
|
|
32
|
+
label="Newsletter Subscription"
|
|
33
|
+
placeholder="Enter your email"
|
|
34
|
+
type="email"
|
|
35
|
+
full-width
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
prefix
|
|
39
|
+
style="
|
|
40
|
+
padding: 0 12px;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
color: var(--theme-text-secondary-color);
|
|
44
|
+
"
|
|
45
|
+
>
|
|
46
|
+
<dasar-icon name="mail" size="sm"></dasar-icon>
|
|
47
|
+
</div>
|
|
48
|
+
<div suffix style="height: 100%; display: flex; align-items: center; padding-right: 4px">
|
|
49
|
+
<dasar-button variant="primary" size="sm" radius="sm">Subscribe</dasar-button>
|
|
50
|
+
</div>
|
|
51
|
+
</dasar-input>
|
|
52
|
+
|
|
53
|
+
<dasar-input
|
|
54
|
+
label="Short Bio"
|
|
55
|
+
placeholder="Tell us about yourself"
|
|
56
|
+
[(ngModel)]="bioText"
|
|
57
|
+
full-width
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
extra-label-slot
|
|
61
|
+
[style.color]="
|
|
62
|
+
bioText.length > 50 ? 'var(--theme-danger-color)' : 'var(--theme-text-secondary-color)'
|
|
63
|
+
"
|
|
64
|
+
>
|
|
65
|
+
{{ bioText.length }} / 50
|
|
66
|
+
</div>
|
|
67
|
+
</dasar-input>
|
|
68
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DasarInputComponent, DasarIconComponent, DasarButtonComponent } from 'dasar-ui';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { Component } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
imports: [FormsModule, DasarInputComponent, DasarIconComponent, DasarButtonComponent],
|
|
7
|
+
templateUrl: './input-more.example.html',
|
|
8
|
+
selector: 'app-input-more-example',
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class InputMoreExample {
|
|
12
|
+
protected searchQuery: string = '';
|
|
13
|
+
protected bioText: string = '';
|
|
14
|
+
|
|
15
|
+
clearSearch() {
|
|
16
|
+
this.searchQuery = '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div style="display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 400px">
|
|
2
|
+
<dasar-input label="Search Users" placeholder="Search..." full-width>
|
|
3
|
+
<div prefix-slot style="padding: 0 12px; display: flex; align-items: center; color: gray">
|
|
4
|
+
<dasar-icon name="search" size="sm"></dasar-icon>
|
|
5
|
+
</div>
|
|
6
|
+
</dasar-input>
|
|
7
|
+
|
|
8
|
+
<dasar-input label="Website URL" placeholder="mysite" full-width fluid hide-overflow>
|
|
9
|
+
<div
|
|
10
|
+
prefix-slot
|
|
11
|
+
style="
|
|
12
|
+
padding: 0 12px;
|
|
13
|
+
background: var(--theme-bg-hover-color);
|
|
14
|
+
border-right: 1px solid var(--theme-border-strong-color);
|
|
15
|
+
height: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
color: gray;
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
https://
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
suffix-slot
|
|
26
|
+
style="padding: 0 12px; display: flex; align-items: center; color: gray; font-size: 14px"
|
|
27
|
+
>
|
|
28
|
+
.com
|
|
29
|
+
</div>
|
|
30
|
+
</dasar-input>
|
|
31
|
+
|
|
32
|
+
<dasar-input
|
|
33
|
+
label="Password"
|
|
34
|
+
type="password"
|
|
35
|
+
placeholder="Enter password"
|
|
36
|
+
label-right="Forgot?"
|
|
37
|
+
full-width
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
extra-label-slot
|
|
41
|
+
style="color: var(--theme-primary-color); cursor: pointer; text-decoration: underline"
|
|
42
|
+
>
|
|
43
|
+
Need help?
|
|
44
|
+
</div>
|
|
45
|
+
<div
|
|
46
|
+
suffix-slot
|
|
47
|
+
style="padding: 0 12px; display: flex; align-items: center; cursor: pointer; color: gray"
|
|
48
|
+
>
|
|
49
|
+
<dasar-icon name="eye" size="sm"></dasar-icon>
|
|
50
|
+
</div>
|
|
51
|
+
</dasar-input>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DasarInputComponent, DasarIconComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
imports: [DasarInputComponent, DasarIconComponent],
|
|
6
|
+
templateUrl: './input-slots.example.html',
|
|
7
|
+
selector: 'app-input-slots-example',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class InputSlotsExample {}
|
|
@@ -0,0 +1,29 @@
|
|
|
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-input
|
|
4
|
+
label="Readonly Field"
|
|
5
|
+
[readonly]="true"
|
|
6
|
+
value="Cannot edit this text"
|
|
7
|
+
full-width
|
|
8
|
+
></dasar-input>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div style="flex: 1; min-width: 200px">
|
|
12
|
+
<dasar-input
|
|
13
|
+
label="Error State"
|
|
14
|
+
[error]="true"
|
|
15
|
+
hint="Invalid username format."
|
|
16
|
+
value="admin_@"
|
|
17
|
+
full-width
|
|
18
|
+
></dasar-input>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div style="flex: 1; min-width: 200px">
|
|
22
|
+
<dasar-input
|
|
23
|
+
label="Disabled State"
|
|
24
|
+
[disabled]="true"
|
|
25
|
+
hint="This field is currently disabled."
|
|
26
|
+
full-width
|
|
27
|
+
></dasar-input>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DasarInputComponent } from 'dasar-ui';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './input-states.example.html',
|
|
6
|
+
selector: 'app-input-states-example',
|
|
7
|
+
imports: [DasarInputComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class InputStatesExample {}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<docs-layout
|
|
2
|
+
title="Input"
|
|
3
|
+
description="A foundational text input component that supports theming, custom masking, validation states, and rich content slots."
|
|
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-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-input-appearance-example />
|
|
24
|
+
</doc-example-component>
|
|
25
|
+
|
|
26
|
+
<doc-example-component
|
|
27
|
+
[codes]="[
|
|
28
|
+
{ label: 'HTML', lang: 'html', value: slotsHtml },
|
|
29
|
+
{ label: 'TypeScript', lang: 'typescript', value: slotsTs },
|
|
30
|
+
]"
|
|
31
|
+
title="Prefix, Suffix & Slots"
|
|
32
|
+
>
|
|
33
|
+
<app-input-slots-example />
|
|
34
|
+
</doc-example-component>
|
|
35
|
+
|
|
36
|
+
<doc-example-component
|
|
37
|
+
[codes]="[
|
|
38
|
+
{ label: 'HTML', lang: 'html', value: maskHtml },
|
|
39
|
+
{ label: 'TypeScript', lang: 'typescript', value: maskTs },
|
|
40
|
+
]"
|
|
41
|
+
title="Input Masks"
|
|
42
|
+
>
|
|
43
|
+
<app-input-mask-example />
|
|
44
|
+
</doc-example-component>
|
|
45
|
+
|
|
46
|
+
<doc-example-component
|
|
47
|
+
[codes]="[
|
|
48
|
+
{ label: 'HTML', lang: 'html', value: statesHtml },
|
|
49
|
+
{ label: 'TypeScript', lang: 'typescript', value: statesTs },
|
|
50
|
+
]"
|
|
51
|
+
title="Validation & States"
|
|
52
|
+
>
|
|
53
|
+
<app-input-states-example />
|
|
54
|
+
</doc-example-component>
|
|
55
|
+
|
|
56
|
+
<doc-example-component
|
|
57
|
+
[codes]="[
|
|
58
|
+
{ label: 'HTML', lang: 'html', value: searchHtml },
|
|
59
|
+
{ label: 'TypeScript', lang: 'typescript', value: searchTs },
|
|
60
|
+
]"
|
|
61
|
+
title="More Example"
|
|
62
|
+
>
|
|
63
|
+
<app-input-more-example />
|
|
64
|
+
</doc-example-component>
|
|
65
|
+
</docs-layout>
|
|
@@ -0,0 +1,170 @@
|
|
|
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 { InputBasicExample } from './examples/basic/input-basic.example';
|
|
7
|
+
import { InputAppearanceExample } from './examples/appearance/input-appearance.example';
|
|
8
|
+
import { InputMaskExample } from './examples/mask/input-mask.example';
|
|
9
|
+
import { InputStatesExample } from './examples/states/input-states.example';
|
|
10
|
+
import { InputSlotsExample } from './examples/slots/input-slots.example';
|
|
11
|
+
import { InputMoreExample } from './examples/more/input-more.example';
|
|
12
|
+
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import basicHtml from './examples/basic/input-basic.example.html' with { loader: 'text' };
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import basicTs from './examples/basic/input-basic.example.ts' with { loader: 'text' };
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import appearanceHtml from './examples/appearance/input-appearance.example.html' with {
|
|
19
|
+
loader: 'text',
|
|
20
|
+
};
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import appearanceTs from './examples/appearance/input-appearance.example.ts' with {
|
|
23
|
+
loader: 'text',
|
|
24
|
+
};
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import maskHtml from './examples/mask/input-mask.example.html' with { loader: 'text' };
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import maskTs from './examples/mask/input-mask.example.ts' with { loader: 'text' };
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import statesHtml from './examples/states/input-states.example.html' with { loader: 'text' };
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import statesTs from './examples/states/input-states.example.ts' with { loader: 'text' };
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import slotsHtml from './examples/slots/input-slots.example.html' with { loader: 'text' };
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import slotsTs from './examples/slots/input-slots.example.ts' with { loader: 'text' };
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
import searchHtml from './examples/more/input-more.example.html' with { loader: 'text' };
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
import searchTs from './examples/more/input-more.example.ts' with { loader: 'text' };
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
imports: [
|
|
44
|
+
CommonModule,
|
|
45
|
+
DocsLayoutComponent,
|
|
46
|
+
DocExampleComponent,
|
|
47
|
+
InputBasicExample,
|
|
48
|
+
InputAppearanceExample,
|
|
49
|
+
InputMaskExample,
|
|
50
|
+
InputStatesExample,
|
|
51
|
+
InputSlotsExample,
|
|
52
|
+
InputMoreExample,
|
|
53
|
+
],
|
|
54
|
+
templateUrl: './input.page.html',
|
|
55
|
+
selector: 'app-input-page',
|
|
56
|
+
standalone: true,
|
|
57
|
+
})
|
|
58
|
+
export class InputDocPage {
|
|
59
|
+
protected basicHtml = basicHtml;
|
|
60
|
+
protected basicTs = basicTs;
|
|
61
|
+
protected appearanceHtml = appearanceHtml;
|
|
62
|
+
protected appearanceTs = appearanceTs;
|
|
63
|
+
protected maskHtml = maskHtml;
|
|
64
|
+
protected maskTs = maskTs;
|
|
65
|
+
protected statesHtml = statesHtml;
|
|
66
|
+
protected statesTs = statesTs;
|
|
67
|
+
protected slotsHtml = slotsHtml;
|
|
68
|
+
protected slotsTs = slotsTs;
|
|
69
|
+
protected searchHtml = searchHtml;
|
|
70
|
+
protected searchTs = searchTs;
|
|
71
|
+
protected readonly apiProps: DocApiProperty[] = [
|
|
72
|
+
{
|
|
73
|
+
name: 'value',
|
|
74
|
+
type: 'any',
|
|
75
|
+
defaultValue: "''",
|
|
76
|
+
description: 'The input value. Supports two-way binding [(ngModel)] and Reactive Forms.',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'type',
|
|
80
|
+
type: 'DasarInputType',
|
|
81
|
+
defaultValue: "'text'",
|
|
82
|
+
description: 'Native HTML input type (text, password, email, number, search, url, tel).',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'mask',
|
|
86
|
+
type: 'DasarInputMaskType',
|
|
87
|
+
defaultValue: 'undefined',
|
|
88
|
+
description:
|
|
89
|
+
'Built-in masks ("thousand", "decimal", "date") or a custom formatting function.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'appearance',
|
|
93
|
+
type: "'outline' | 'filled'",
|
|
94
|
+
defaultValue: "'outline'",
|
|
95
|
+
description: 'Visual style of the input container.',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'size',
|
|
99
|
+
type: "'sm' | 'md' | 'lg'",
|
|
100
|
+
defaultValue: "'md'",
|
|
101
|
+
description: 'Controls height, padding, and font size.',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'radius',
|
|
105
|
+
type: 'ScaleAttributeType',
|
|
106
|
+
defaultValue: "'md'",
|
|
107
|
+
description: 'Border radius.',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'label / label-right',
|
|
111
|
+
type: 'string',
|
|
112
|
+
defaultValue: 'undefined',
|
|
113
|
+
description: 'Text labels rendered above the input.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'hint',
|
|
117
|
+
type: 'string',
|
|
118
|
+
defaultValue: 'undefined',
|
|
119
|
+
description: 'Helper text rendered below the input.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'placeholder',
|
|
123
|
+
type: 'string',
|
|
124
|
+
defaultValue: "''",
|
|
125
|
+
description: 'Native placeholder attribute.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'full-width',
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
defaultValue: 'false',
|
|
131
|
+
description: 'Expands the component to 100% width.',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'disabled / readonly',
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
defaultValue: 'false',
|
|
137
|
+
description: 'Standard HTML disabled and readonly states.',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'error',
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
defaultValue: 'false',
|
|
143
|
+
description: 'Applies red validation styling.',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'fluid',
|
|
147
|
+
type: 'boolean',
|
|
148
|
+
defaultValue: 'false',
|
|
149
|
+
description: 'Removes all padding from the input container.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: '(valueChange)',
|
|
153
|
+
type: 'EventEmitter<any>',
|
|
154
|
+
defaultValue: '-',
|
|
155
|
+
description: 'Emits whenever the input value changes.',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: '[prefix] / [suffix]',
|
|
159
|
+
type: 'Content Slot',
|
|
160
|
+
defaultValue: '-',
|
|
161
|
+
description: 'Directives to project content inside the left or right of the input container.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: '[extra-label-slot]',
|
|
165
|
+
type: 'Content Slot',
|
|
166
|
+
defaultValue: '-',
|
|
167
|
+
description: 'Replaces the label-right text with custom HTML content.',
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DocsLayoutComponent } from '../../layouts/doc.layout';
|
|
3
|
+
import { DocMarkdownComponent } from '../../components/doc-markdown.component';
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import source from '../../../../../../docs/installation.md' with { loader: 'text' };
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
imports: [DocsLayoutComponent, DocMarkdownComponent],
|
|
10
|
+
template: `<docs-layout title="Installation" description="Add dasar-ui to an Angular project.">
|
|
11
|
+
<doc-markdown [source]="source" />
|
|
12
|
+
</docs-layout>`,
|
|
13
|
+
selector: 'app-installation-page',
|
|
14
|
+
standalone: true,
|
|
15
|
+
})
|
|
16
|
+
export class InstallationDocPage {
|
|
17
|
+
protected source = source;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DocsLayoutComponent } from '../../layouts/doc.layout';
|
|
3
|
+
import { DocMarkdownComponent } from '../../components/doc-markdown.component';
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import source from '../../../../../../README.md' with { loader: 'text' };
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
imports: [DocsLayoutComponent, DocMarkdownComponent],
|
|
10
|
+
template: `<docs-layout title="Introduction" description="What dasar-ui is and where to go next.">
|
|
11
|
+
<doc-markdown [source]="source" />
|
|
12
|
+
</docs-layout>`,
|
|
13
|
+
selector: 'app-introduction-page',
|
|
14
|
+
standalone: true,
|
|
15
|
+
})
|
|
16
|
+
export class IntroductionDocPage {
|
|
17
|
+
protected source = source;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<dasar-list clickable hoverable bordered show-divider>
|
|
2
|
+
@if (tasks().length > 0) {
|
|
3
|
+
@for (task of tasks(); track task.id) {
|
|
4
|
+
<dasar-list-item (click)="addTask()">
|
|
5
|
+
<dasar-icon prefix-slot name="list" size="sm" />
|
|
6
|
+
<div class="dasar-list-item-body">
|
|
7
|
+
<span>{{ task.title }}</span>
|
|
8
|
+
<span style="font-size: 12px; color: gray">{{ task.owner }}</span>
|
|
9
|
+
</div>
|
|
10
|
+
<dasar-button
|
|
11
|
+
suffix-slot
|
|
12
|
+
size="xs"
|
|
13
|
+
variant="ghost"
|
|
14
|
+
appearance="subtle"
|
|
15
|
+
(click)="removeTask(task.id, $event)"
|
|
16
|
+
aria-label="Remove task"
|
|
17
|
+
>
|
|
18
|
+
<dasar-icon name="trash" size="sm" />
|
|
19
|
+
</dasar-button>
|
|
20
|
+
</dasar-list-item>
|
|
21
|
+
}
|
|
22
|
+
} @else {
|
|
23
|
+
<dasar-list-item>No tasks yet. Click anywhere to add one.</dasar-list-item>
|
|
24
|
+
}
|
|
25
|
+
</dasar-list>
|
|
26
|
+
|
|
27
|
+
<p style="font-size: 12px; margin-top: 8px; color: gray">
|
|
28
|
+
Clicking a row adds a task. The remove button stops the event from bubbling to the row.
|
|
29
|
+
</p>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { DasarButtonComponent, DasarIconComponent, DasarListComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
interface DocTask {
|
|
5
|
+
id: number;
|
|
6
|
+
title: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
templateUrl: './list-advanced-dynamic.example.html',
|
|
12
|
+
selector: 'app-list-advanced-dynamic-example',
|
|
13
|
+
imports: [DasarIconComponent, DasarButtonComponent, DasarListComponent],
|
|
14
|
+
standalone: true,
|
|
15
|
+
})
|
|
16
|
+
export class ListAdvancedDynamicExample {
|
|
17
|
+
private nextId = 3;
|
|
18
|
+
|
|
19
|
+
protected tasks = signal<DocTask[]>([
|
|
20
|
+
{ id: 1, title: 'Draft the API contract', owner: 'Ada' },
|
|
21
|
+
{ id: 2, title: 'Review the token names', owner: 'Grace' },
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
addTask() {
|
|
25
|
+
const id = this.nextId++;
|
|
26
|
+
this.tasks.update((current) => [...current, { id, title: `Task #${id}`, owner: 'Unassigned' }]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
removeTask(id: number, event: MouseEvent) {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
this.tasks.update((current) => current.filter((task) => task.id !== id));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<dasar-theme-provider [componentConfig]="componentConfig" [tokenConfig]="tokenConfig">
|
|
2
|
+
<dasar-list>
|
|
3
|
+
<div header-slot>From the theme provider</div>
|
|
4
|
+
@for (item of items; track item) {
|
|
5
|
+
<dasar-list-item>{{ item }}</dasar-list-item>
|
|
6
|
+
}
|
|
7
|
+
</dasar-list>
|
|
8
|
+
</dasar-theme-provider>
|
|
9
|
+
|
|
10
|
+
<p style="font-size: 12px; margin-top: 8px; color: gray">
|
|
11
|
+
components.list sets size, bordered and show-divider. tokens.light.list sets the radius and the
|
|
12
|
+
header background.
|
|
13
|
+
</p>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
DasarComponentConfig,
|
|
4
|
+
DasarThemeProviderComponent,
|
|
5
|
+
DasarThemeConfig,
|
|
6
|
+
DasarListComponent,
|
|
7
|
+
} from 'dasar-ui';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
templateUrl: './list-advanced-theme.example.html',
|
|
11
|
+
selector: 'app-list-advanced-theme-example',
|
|
12
|
+
imports: [DasarThemeProviderComponent, DasarListComponent],
|
|
13
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class ListAdvancedThemeExample {
|
|
16
|
+
protected items = ['Design', 'Engineering', 'Product'];
|
|
17
|
+
|
|
18
|
+
protected componentConfig: DasarComponentConfig = {
|
|
19
|
+
list: { size: 'sm', bordered: true, showDivider: true },
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
protected tokenConfig: DasarThemeConfig['tokens'] = {
|
|
23
|
+
light: {
|
|
24
|
+
list: {
|
|
25
|
+
radius: '12px',
|
|
26
|
+
headerBackground: 'var(--theme-primary-surface-color)',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarListComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './list-basic.example.html',
|
|
6
|
+
selector: 'app-list-basic-example',
|
|
7
|
+
imports: [DasarListComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ListBasicExample {
|
|
11
|
+
protected members = ['Ada Lovelace', 'Grace Hopper', 'Katherine Johnson'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<p style="font-size: 12px; margin: 8px 0 4px; color: gray">bordered</p>
|
|
2
|
+
<dasar-list bordered>
|
|
3
|
+
@for (item of items; track item) {
|
|
4
|
+
<dasar-list-item>{{ item }}</dasar-list-item>
|
|
5
|
+
}
|
|
6
|
+
</dasar-list>
|
|
7
|
+
|
|
8
|
+
<p style="font-size: 12px; margin: 8px 0 4px; color: gray">show-divider</p>
|
|
9
|
+
<dasar-list show-divider>
|
|
10
|
+
@for (item of items; track item) {
|
|
11
|
+
<dasar-list-item>{{ item }}</dasar-list-item>
|
|
12
|
+
}
|
|
13
|
+
</dasar-list>
|
|
14
|
+
|
|
15
|
+
<p style="font-size: 12px; margin: 8px 0 4px; color: gray">bordered + show-divider</p>
|
|
16
|
+
<dasar-list bordered show-divider>
|
|
17
|
+
@for (item of items; track item) {
|
|
18
|
+
<dasar-list-item>{{ item }}</dasar-list-item>
|
|
19
|
+
}
|
|
20
|
+
</dasar-list>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { DasarListComponent } from 'dasar-ui';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './list-bordered-divider.example.html',
|
|
6
|
+
selector: 'app-list-bordered-divider-example',
|
|
7
|
+
imports: [DasarListComponent],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class ListBorderedDividerExample {
|
|
11
|
+
protected items = ['Design system', 'Component library', 'Documentation'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<dasar-list bordered show-divider container-class="my-list" [container-style]="containerStyle">
|
|
2
|
+
@for (item of items; track item; let i = $index) {
|
|
3
|
+
<dasar-list-item [item-style]="i === 1 ? highlightStyle : null">
|
|
4
|
+
<span class="my-list-label">{{ item }}</span>
|
|
5
|
+
</dasar-list-item>
|
|
6
|
+
}
|
|
7
|
+
</dasar-list>
|
|
8
|
+
|
|
9
|
+
<p style="font-size: 12px; margin-top: 8px; color: gray">
|
|
10
|
+
container-style caps the width at 320px, and the second row uses item-style for a highlight.
|
|
11
|
+
</p>
|