dasar-ui 1.9.2 → 1.9.3
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/README.md +40 -41
- package/fesm2022/dasar-ui.mjs +10444 -0
- package/fesm2022/dasar-ui.mjs.map +1 -0
- package/package.json +39 -57
- package/types/dasar-ui.d.ts +2498 -0
- package/.dockerignore +0 -31
- package/.editorconfig +0 -17
- package/.github/workflows/npm-publish-github-packages.yml +0 -36
- package/.prettierrc +0 -12
- package/.versionrc.json +0 -4
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/settings.json +0 -4
- package/.vscode/tasks.json +0 -42
- package/CHANGELOG.md +0 -101
- package/Dockerfile +0 -26
- package/angular.json +0 -114
- package/docs/_config.yml +0 -3
- package/docs/getting-started.md +0 -89
- package/docs/index.md +0 -9
- package/docs/installation.md +0 -46
- package/projects/dasar-ui/README.md +0 -64
- package/projects/dasar-ui/ng-package.json +0 -10
- package/projects/dasar-ui/package.json +0 -27
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.html +0 -9
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.scss +0 -352
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-button/dasar-button.ts +0 -154
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.html +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.scss +0 -69
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-button-group/dasar-button-group.ts +0 -26
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.html +0 -158
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.scss +0 -371
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-calendar/dasar-calendar.ts +0 -458
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.html +0 -80
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.scss +0 -184
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-card/dasar-card.ts +0 -294
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.html +0 -42
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.scss +0 -38
- package/projects/dasar-ui/src/lib/components/dasar-chip/dasar-chip.ts +0 -205
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.html +0 -111
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.scss +0 -331
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.spec.ts +0 -93
- package/projects/dasar-ui/src/lib/components/dasar-datepicker/dasar-datepicker.ts +0 -527
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.html +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.registry.ts +0 -5087
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.scss +0 -24
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-icon/dasar-icon.ts +0 -97
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.html +0 -54
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.scss +0 -251
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-input/dasar-input.ts +0 -319
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list-item.html +0 -17
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.html +0 -25
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.scss +0 -122
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-list/dasar-list.ts +0 -166
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.html +0 -64
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.scss +0 -229
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.spec.ts +0 -93
- package/projects/dasar-ui/src/lib/components/dasar-menu/dasar-menu.ts +0 -278
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.html +0 -72
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.scss +0 -170
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.spec.ts +0 -267
- package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.ts +0 -305
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.html +0 -90
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.scss +0 -353
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-number-input/dasar-number-input.ts +0 -337
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.html +0 -11
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.scss +0 -18
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.spec.ts +0 -112
- package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.ts +0 -87
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.html +0 -98
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.scss +0 -51
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-pagination/dasar-pagination.ts +0 -99
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-pin/dasar-pin.ts +0 -9
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.html +0 -150
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.scss +0 -272
- package/projects/dasar-ui/src/lib/components/dasar-pivot-table/dasar-pivot-table.ts +0 -228
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-radio/dasar-radio.ts +0 -9
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.html +0 -189
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.scss +0 -387
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.spec.ts +0 -97
- package/projects/dasar-ui/src/lib/components/dasar-select/dasar-select.ts +0 -540
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-slider/dasar-slider.ts +0 -9
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.html +0 -162
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.scss +0 -283
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-table/dasar-table.ts +0 -380
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.html +0 -103
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.scss +0 -238
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.spec.ts +0 -570
- package/projects/dasar-ui/src/lib/components/dasar-tabs/dasar-tabs.ts +0 -349
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.html +0 -43
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.scss +0 -189
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-textarea/dasar-textarea.ts +0 -139
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.spec.ts +0 -89
- package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +0 -294
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-toast/dasar-toast.ts +0 -9
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-toggle/dasar-toggle.ts +0 -9
- 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 +0 -1
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.spec.ts +0 -21
- package/projects/dasar-ui/src/lib/components/dasar-tooltip/dasar-tooltip.ts +0 -9
- package/projects/dasar-ui/src/lib/models/theme.model.ts +0 -730
- package/projects/dasar-ui/src/lib/models/type.model.ts +0 -11
- package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +0 -130
- package/projects/dasar-ui/src/lib/services/theme.service.ts +0 -777
- package/projects/dasar-ui/src/lib/styles/theme.ts +0 -70
- package/projects/dasar-ui/src/lib/utils/common.ts +0 -156
- package/projects/dasar-ui/src/lib/utils/icon-size.spec.ts +0 -23
- package/projects/dasar-ui/src/lib/utils/icon-size.ts +0 -16
- package/projects/dasar-ui/src/lib/utils/panel-placement.spec.ts +0 -90
- package/projects/dasar-ui/src/lib/utils/panel-placement.ts +0 -53
- package/projects/dasar-ui/src/public-api.ts +0 -24
- package/projects/dasar-ui/tsconfig.lib.json +0 -21
- package/projects/dasar-ui/tsconfig.lib.prod.json +0 -11
- package/projects/dasar-ui/tsconfig.spec.json +0 -18
- package/projects/documentation/public/favicon.ico +0 -0
- package/projects/documentation/src/app/app.html +0 -78
- package/projects/documentation/src/app/app.spec.ts +0 -23
- package/projects/documentation/src/app/app.ts +0 -57
- package/projects/documentation/src/app/components/doc-customize-modal.component.ts +0 -368
- package/projects/documentation/src/app/components/doc-example.component.ts +0 -195
- package/projects/documentation/src/app/components/doc-markdown.component.ts +0 -154
- package/projects/documentation/src/app/config/app.config.server.ts +0 -10
- package/projects/documentation/src/app/config/app.config.ts +0 -17
- package/projects/documentation/src/app/layouts/doc.layout.ts +0 -249
- package/projects/documentation/src/app/pages/button/button.page.html +0 -65
- package/projects/documentation/src/app/pages/button/button.page.ts +0 -139
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.html +0 -7
- package/projects/documentation/src/app/pages/button/examples/appearance/button-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.html +0 -19
- package/projects/documentation/src/app/pages/button/examples/icon/button-icon.example.ts +0 -10
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.html +0 -9
- package/projects/documentation/src/app/pages/button/examples/radius/button-radius.example.ts +0 -10
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.html +0 -7
- package/projects/documentation/src/app/pages/button/examples/sizes/button-sizes.example.ts +0 -10
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.html +0 -10
- package/projects/documentation/src/app/pages/button/examples/state/button-state.example.ts +0 -10
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.html +0 -9
- package/projects/documentation/src/app/pages/button/examples/variant/button-variant.example.ts +0 -10
- package/projects/documentation/src/app/pages/calendar/calendar.page.html +0 -75
- package/projects/documentation/src/app/pages/calendar/calendar.page.ts +0 -165
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.html +0 -21
- package/projects/documentation/src/app/pages/calendar/examples/actions/calendar-actions.example.ts +0 -10
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.html +0 -11
- package/projects/documentation/src/app/pages/calendar/examples/basic/calendar-basic.example.ts +0 -13
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.html +0 -36
- package/projects/documentation/src/app/pages/calendar/examples/custom-header/calendar-custom-header.example.ts +0 -11
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.html +0 -10
- package/projects/documentation/src/app/pages/calendar/examples/dropdown/calendar-dropdown.example.ts +0 -12
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.html +0 -15
- package/projects/documentation/src/app/pages/calendar/examples/format/calendar-format.example.ts +0 -12
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.html +0 -34
- package/projects/documentation/src/app/pages/calendar/examples/locale/calendar-locale.example.ts +0 -14
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.html +0 -20
- package/projects/documentation/src/app/pages/calendar/examples/more/calendar.more.example.ts +0 -37
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.html +0 -16
- package/projects/documentation/src/app/pages/calendar/examples/styles/calendar-styles.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/card.page.html +0 -75
- package/projects/documentation/src/app/pages/card/card.page.ts +0 -182
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.html +0 -13
- package/projects/documentation/src/app/pages/card/examples/appearance/card-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.html +0 -30
- package/projects/documentation/src/app/pages/card/examples/closable/card-closable.example.ts +0 -19
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.html +0 -173
- package/projects/documentation/src/app/pages/card/examples/custom-style/card-custom-style.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.html +0 -27
- package/projects/documentation/src/app/pages/card/examples/media/card-media.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.html +0 -13
- package/projects/documentation/src/app/pages/card/examples/radius/card-radius.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.html +0 -20
- package/projects/documentation/src/app/pages/card/examples/slots/card-slots.example.ts +0 -10
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.html +0 -11
- package/projects/documentation/src/app/pages/card/examples/spacing/card-spacing.example.ts +0 -10
- package/projects/documentation/src/app/pages/chip/chip.page.html +0 -55
- package/projects/documentation/src/app/pages/chip/chip.page.ts +0 -158
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.html +0 -7
- package/projects/documentation/src/app/pages/chip/examples/appearance/chip-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.html +0 -13
- package/projects/documentation/src/app/pages/chip/examples/more/chip-more.example.ts +0 -17
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.html +0 -9
- package/projects/documentation/src/app/pages/chip/examples/radius/chip-radius.example.ts +0 -10
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.html +0 -6
- package/projects/documentation/src/app/pages/chip/examples/sizes/chip-sizes.example.ts +0 -10
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.html +0 -8
- package/projects/documentation/src/app/pages/chip/examples/variant/chip-variant.example.ts +0 -10
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.html +0 -75
- package/projects/documentation/src/app/pages/datepicker/datepicker.page.ts +0 -181
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.html +0 -29
- package/projects/documentation/src/app/pages/datepicker/examples/appearance/datepicker-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.html +0 -12
- package/projects/documentation/src/app/pages/datepicker/examples/basic/datepicker-basic.example.ts +0 -12
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.html +0 -23
- package/projects/documentation/src/app/pages/datepicker/examples/footer/datepicker-footer.example.ts +0 -17
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.html +0 -30
- package/projects/documentation/src/app/pages/datepicker/examples/format/datepicker-format.example.ts +0 -13
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.html +0 -24
- package/projects/documentation/src/app/pages/datepicker/examples/placement/datepicker-placement.example.ts +0 -10
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.html +0 -19
- package/projects/documentation/src/app/pages/datepicker/examples/slots/datepicker-slots.example.ts +0 -10
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.html +0 -28
- package/projects/documentation/src/app/pages/datepicker/examples/states/datepicker-states.example.ts +0 -12
- package/projects/documentation/src/app/pages/getting-started/getting-started.page.ts +0 -21
- package/projects/documentation/src/app/pages/icon/icon.page.html +0 -15
- package/projects/documentation/src/app/pages/icon/icon.page.ts +0 -60
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.html +0 -27
- package/projects/documentation/src/app/pages/input/examples/appearance/input-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.html +0 -13
- package/projects/documentation/src/app/pages/input/examples/basic/input-basic.example.ts +0 -13
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.html +0 -31
- package/projects/documentation/src/app/pages/input/examples/mask/input-mask.example.ts +0 -19
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.html +0 -68
- package/projects/documentation/src/app/pages/input/examples/more/input-more.example.ts +0 -18
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.html +0 -52
- package/projects/documentation/src/app/pages/input/examples/slots/input-slots.example.ts +0 -10
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.html +0 -29
- package/projects/documentation/src/app/pages/input/examples/states/input-states.example.ts +0 -10
- package/projects/documentation/src/app/pages/input/input.page.html +0 -65
- package/projects/documentation/src/app/pages/input/input.page.ts +0 -170
- package/projects/documentation/src/app/pages/installation/installation.page.ts +0 -18
- package/projects/documentation/src/app/pages/introduction/introduction.page.ts +0 -18
- package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.html +0 -29
- package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.ts +0 -33
- package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.html +0 -13
- package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.ts +0 -30
- package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.html +0 -5
- package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.ts +0 -12
- package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.html +0 -20
- package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.ts +0 -12
- package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.html +0 -11
- package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.ts +0 -19
- package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.html +0 -7
- package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.ts +0 -12
- package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.html +0 -20
- package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.ts +0 -22
- package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.html +0 -9
- package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.ts +0 -16
- package/projects/documentation/src/app/pages/list/examples/size/list-size.example.html +0 -20
- package/projects/documentation/src/app/pages/list/examples/size/list-size.example.ts +0 -12
- package/projects/documentation/src/app/pages/list/list.page.html +0 -95
- package/projects/documentation/src/app/pages/list/list.page.ts +0 -238
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.html +0 -5
- package/projects/documentation/src/app/pages/menu/examples/basic/menu-basic.example.ts +0 -17
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.html +0 -35
- package/projects/documentation/src/app/pages/menu/examples/custom-template/menu-custom-template.example.ts +0 -57
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.html +0 -12
- package/projects/documentation/src/app/pages/menu/examples/placement/menu-placement.example.ts +0 -16
- package/projects/documentation/src/app/pages/menu/menu.page.html +0 -35
- package/projects/documentation/src/app/pages/menu/menu.page.ts +0 -149
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.html +0 -18
- package/projects/documentation/src/app/pages/modal/examples/appearance/modal-appearance.example.ts +0 -21
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.html +0 -8
- package/projects/documentation/src/app/pages/modal/examples/basic/modal-basic.example.ts +0 -12
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.html +0 -44
- package/projects/documentation/src/app/pages/modal/examples/close-behavior/modal-close-behavior.example.ts +0 -14
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.html +0 -36
- package/projects/documentation/src/app/pages/modal/examples/custom-style/modal-custom-style.example.ts +0 -12
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.html +0 -29
- package/projects/documentation/src/app/pages/modal/examples/overlay/modal-overlay.example.ts +0 -14
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.html +0 -27
- package/projects/documentation/src/app/pages/modal/examples/radius-spacing/modal-radius-spacing.example.ts +0 -27
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.html +0 -14
- package/projects/documentation/src/app/pages/modal/examples/scroll/modal-scroll.example.ts +0 -13
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.html +0 -17
- package/projects/documentation/src/app/pages/modal/examples/size/modal-size.example.ts +0 -21
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.html +0 -30
- package/projects/documentation/src/app/pages/modal/examples/slots/modal-slots.example.ts +0 -12
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.html +0 -23
- package/projects/documentation/src/app/pages/modal/examples/width/modal-width.example.ts +0 -13
- package/projects/documentation/src/app/pages/modal/modal.page.html +0 -105
- package/projects/documentation/src/app/pages/modal/modal.page.ts +0 -266
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.html +0 -30
- package/projects/documentation/src/app/pages/number-input/examples/appearance/number-input-appearance.example.ts +0 -10
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.html +0 -12
- package/projects/documentation/src/app/pages/number-input/examples/basic/number-input-basic.example.ts +0 -13
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.html +0 -30
- package/projects/documentation/src/app/pages/number-input/examples/limits/number-input-limits.example.ts +0 -14
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.html +0 -49
- package/projects/documentation/src/app/pages/number-input/examples/slots/number-input-slots.example.ts +0 -10
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.html +0 -21
- package/projects/documentation/src/app/pages/number-input/examples/states/number-input-states.example.ts +0 -10
- package/projects/documentation/src/app/pages/number-input/number-input.page.html +0 -55
- package/projects/documentation/src/app/pages/number-input/number-input.page.ts +0 -142
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.html +0 -32
- package/projects/documentation/src/app/pages/select/examples/appearance/select-appearance.example.ts +0 -15
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.html +0 -13
- package/projects/documentation/src/app/pages/select/examples/basic/select-basic.example.ts +0 -20
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.html +0 -24
- package/projects/documentation/src/app/pages/select/examples/multiple/select-multiple.example.ts +0 -59
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.html +0 -20
- package/projects/documentation/src/app/pages/select/examples/placement/select-placement.example.ts +0 -20
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.html +0 -13
- package/projects/documentation/src/app/pages/select/examples/search/select-search.example.ts +0 -22
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.html +0 -44
- package/projects/documentation/src/app/pages/select/examples/slots/select-slots.example.ts +0 -15
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.html +0 -31
- package/projects/documentation/src/app/pages/select/examples/states/select-states.example.ts +0 -12
- package/projects/documentation/src/app/pages/select/select.page.html +0 -75
- package/projects/documentation/src/app/pages/select/select.page.ts +0 -195
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.html +0 -14
- package/projects/documentation/src/app/pages/table/examples/cell-actions/table-cell-actions.example.ts +0 -25
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.html +0 -12
- package/projects/documentation/src/app/pages/table/examples/cell-badge/table-cell-badge.example.ts +0 -21
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.html +0 -29
- package/projects/documentation/src/app/pages/table/examples/cell-profile/table-cell-profile.example.ts +0 -20
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.html +0 -39
- package/projects/documentation/src/app/pages/table/examples/custom-body/table-custom-body.example.ts +0 -21
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.html +0 -7
- package/projects/documentation/src/app/pages/table/examples/custom-sizes/table-custom-sizes.example.ts +0 -21
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.html +0 -3
- package/projects/documentation/src/app/pages/table/examples/dynamic-style/table-dynamic-style.example.ts +0 -41
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.html +0 -43
- package/projects/documentation/src/app/pages/table/examples/empty/table-empty.example.ts +0 -21
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.html +0 -36
- package/projects/documentation/src/app/pages/table/examples/expanded/table-expanded.example.ts +0 -34
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.html +0 -8
- package/projects/documentation/src/app/pages/table/examples/heatmap/table-heatmap.example.ts +0 -52
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.html +0 -53
- package/projects/documentation/src/app/pages/table/examples/inline-edit/table-inline-edit.example.ts +0 -50
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.html +0 -23
- package/projects/documentation/src/app/pages/table/examples/nested/table-nested.example.ts +0 -42
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.html +0 -20
- package/projects/documentation/src/app/pages/table/examples/pagination/table-pagination.example.ts +0 -21
- package/projects/documentation/src/app/pages/table/table.page.html +0 -125
- package/projects/documentation/src/app/pages/table/table.page.ts +0 -261
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.html +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/advanced-dynamic/tabs-advanced-dynamic.example.ts +0 -27
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.html +0 -27
- package/projects/documentation/src/app/pages/tabs/examples/advanced-form/tabs-advanced-form.example.ts +0 -36
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.html +0 -5
- package/projects/documentation/src/app/pages/tabs/examples/advanced-theme/tabs-advanced-theme.example.ts +0 -20
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.html +0 -6
- package/projects/documentation/src/app/pages/tabs/examples/appearance/tabs-appearance.example.ts +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.html +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/basic/tabs-basic.example.ts +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.html +0 -19
- package/projects/documentation/src/app/pages/tabs/examples/custom-style/tabs-custom-style.example.ts +0 -12
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.html +0 -16
- package/projects/documentation/src/app/pages/tabs/examples/events/tabs-events.example.ts +0 -23
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.html +0 -5
- package/projects/documentation/src/app/pages/tabs/examples/fluid/tabs-fluid.example.ts +0 -12
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.html +0 -6
- package/projects/documentation/src/app/pages/tabs/examples/no-body/tabs-no-body.example.ts +0 -12
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.html +0 -6
- package/projects/documentation/src/app/pages/tabs/examples/radius/tabs-radius.example.ts +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.html +0 -20
- package/projects/documentation/src/app/pages/tabs/examples/scroll/tabs-scroll.example.ts +0 -30
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.html +0 -16
- package/projects/documentation/src/app/pages/tabs/examples/scroll-icon/tabs-scroll-icon.example.ts +0 -26
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.html +0 -22
- package/projects/documentation/src/app/pages/tabs/examples/scroll-slot/tabs-scroll-slot.example.ts +0 -26
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.html +0 -6
- package/projects/documentation/src/app/pages/tabs/examples/size/tabs-size.example.ts +0 -13
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.html +0 -25
- package/projects/documentation/src/app/pages/tabs/examples/slots/tabs-slots.example.ts +0 -10
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.html +0 -6
- package/projects/documentation/src/app/pages/tabs/examples/spacing/tabs-spacing.example.ts +0 -13
- package/projects/documentation/src/app/pages/tabs/tabs.page.html +0 -165
- package/projects/documentation/src/app/pages/tabs/tabs.page.ts +0 -347
- package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.html +0 -13
- package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.ts +0 -20
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.html +0 -8
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.scss +0 -4
- package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.ts +0 -11
- package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.html +0 -13
- package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.ts +0 -33
- package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.html +0 -6
- package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.ts +0 -20
- package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.html +0 -15
- package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.ts +0 -31
- package/projects/documentation/src/app/pages/theming/theming-component-config.page.ts +0 -52
- package/projects/documentation/src/app/pages/theming/theming-css-variables.page.ts +0 -71
- package/projects/documentation/src/app/pages/theming/theming-tokens.page.ts +0 -56
- package/projects/documentation/src/app/pages/theming/theming.data.ts +0 -947
- package/projects/documentation/src/app/pages/theming/theming.page.html +0 -56
- package/projects/documentation/src/app/pages/theming/theming.page.ts +0 -144
- package/projects/documentation/src/app/routes/app.routes.server.ts +0 -8
- package/projects/documentation/src/app/routes/app.routes.ts +0 -135
- package/projects/documentation/src/app/services/doc-customize.service.ts +0 -119
- package/projects/documentation/src/app/utils/highlight.pipe.ts +0 -43
- package/projects/documentation/src/index.html +0 -13
- package/projects/documentation/src/main.server.ts +0 -7
- package/projects/documentation/src/main.ts +0 -5
- package/projects/documentation/src/server.ts +0 -47
- package/projects/documentation/src/styles.scss +0 -19
- package/projects/documentation/tsconfig.app.json +0 -11
- package/projects/documentation/tsconfig.spec.json +0 -10
- package/tsconfig.json +0 -40
- /package/{projects/dasar-ui/src/lib/styles → styles}/theme.scss +0 -0
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanAttribute,
|
|
3
|
-
Component,
|
|
4
|
-
HostBinding,
|
|
5
|
-
Input,
|
|
6
|
-
forwardRef,
|
|
7
|
-
ViewEncapsulation,
|
|
8
|
-
TemplateRef,
|
|
9
|
-
EventEmitter,
|
|
10
|
-
Output,
|
|
11
|
-
inject,
|
|
12
|
-
ChangeDetectorRef,
|
|
13
|
-
Directive,
|
|
14
|
-
ContentChild,
|
|
15
|
-
} from '@angular/core';
|
|
16
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
17
|
-
import { CommonModule } from '@angular/common';
|
|
18
|
-
|
|
19
|
-
import { DASAR_THEME_PROVIDER } from '../dasar-theme-provider/dasar-theme-provider';
|
|
20
|
-
import { ClassType, StyleType, ScaleAttributeType } from '../../models/type.model';
|
|
21
|
-
import { DasarThemeService } from '../../services/theme.service';
|
|
22
|
-
import { resolveThemeDefault } from '../../utils/common';
|
|
23
|
-
|
|
24
|
-
export type DasarInputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'url' | 'tel';
|
|
25
|
-
export type DasarInputMaskType = 'thousand' | 'date' | 'decimal' | ((val: string) => string);
|
|
26
|
-
export type DasarInputSizeType = Extract<ScaleAttributeType, 'sm' | 'md' | 'lg'>;
|
|
27
|
-
export type DasarInputAppearanceType = 'outline' | 'filled';
|
|
28
|
-
export type DasarInputRadiusType = ScaleAttributeType;
|
|
29
|
-
|
|
30
|
-
export interface DasarInputConfig {
|
|
31
|
-
appearance?: DasarInputAppearanceType;
|
|
32
|
-
labelRight?: string;
|
|
33
|
-
radius?: DasarInputRadiusType;
|
|
34
|
-
size?: DasarInputSizeType;
|
|
35
|
-
type?: DasarInputType;
|
|
36
|
-
mask?: DasarInputMaskType;
|
|
37
|
-
hint?: string;
|
|
38
|
-
placeholder?: string;
|
|
39
|
-
label?: string;
|
|
40
|
-
fullWidth?: boolean;
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
readonly?: boolean;
|
|
43
|
-
fluid?: boolean;
|
|
44
|
-
error?: boolean;
|
|
45
|
-
containerClass?: ClassType;
|
|
46
|
-
inputClass?: ClassType;
|
|
47
|
-
hostClass?: ClassType;
|
|
48
|
-
hintClass?: ClassType;
|
|
49
|
-
containerStyle?: StyleType;
|
|
50
|
-
inputStyle?: StyleType;
|
|
51
|
-
hostStyle?: StyleType;
|
|
52
|
-
hintStyle?: StyleType;
|
|
53
|
-
hideOverflow?: boolean;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@Directive({ selector: '[extra-label-slot]', standalone: true })
|
|
57
|
-
export class DasarInputExtraLabelSlot {}
|
|
58
|
-
@Directive({ selector: '[prefix-slot]', standalone: true })
|
|
59
|
-
export class DasarInputPrefixSlot {}
|
|
60
|
-
@Directive({ selector: '[suffix-slot]', standalone: true })
|
|
61
|
-
export class DasarInputSuffixSlot {}
|
|
62
|
-
|
|
63
|
-
@Component({
|
|
64
|
-
providers: [
|
|
65
|
-
{
|
|
66
|
-
provide: NG_VALUE_ACCESSOR,
|
|
67
|
-
useExisting: forwardRef(() => DasarInput),
|
|
68
|
-
multi: true,
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
encapsulation: ViewEncapsulation.None,
|
|
72
|
-
imports: [CommonModule, FormsModule],
|
|
73
|
-
templateUrl: './dasar-input.html',
|
|
74
|
-
styleUrls: ['./dasar-input.scss'],
|
|
75
|
-
selector: 'dasar-input',
|
|
76
|
-
standalone: true,
|
|
77
|
-
})
|
|
78
|
-
export class DasarInput implements ControlValueAccessor {
|
|
79
|
-
@ContentChild(DasarInputExtraLabelSlot) extraLabelSlot?: DasarInputExtraLabelSlot;
|
|
80
|
-
|
|
81
|
-
private themeProvider = inject(DASAR_THEME_PROVIDER, { optional: true });
|
|
82
|
-
private themeService = inject(DasarThemeService, { optional: true });
|
|
83
|
-
private cdr = inject(ChangeDetectorRef);
|
|
84
|
-
|
|
85
|
-
@Input() appearance: DasarInputAppearanceType = resolveThemeDefault(
|
|
86
|
-
'input',
|
|
87
|
-
'appearance',
|
|
88
|
-
'outline',
|
|
89
|
-
this.themeProvider,
|
|
90
|
-
this.themeService,
|
|
91
|
-
);
|
|
92
|
-
@Input({ alias: 'label-right' }) labelRight = resolveThemeDefault(
|
|
93
|
-
'input',
|
|
94
|
-
'labelRight',
|
|
95
|
-
undefined,
|
|
96
|
-
this.themeProvider,
|
|
97
|
-
this.themeService,
|
|
98
|
-
);
|
|
99
|
-
@Input() radius = resolveThemeDefault(
|
|
100
|
-
'input',
|
|
101
|
-
'radius',
|
|
102
|
-
'md',
|
|
103
|
-
this.themeProvider,
|
|
104
|
-
this.themeService,
|
|
105
|
-
);
|
|
106
|
-
@Input() size = resolveThemeDefault('input', 'size', 'md', this.themeProvider, this.themeService);
|
|
107
|
-
@Input() type = resolveThemeDefault(
|
|
108
|
-
'input',
|
|
109
|
-
'type',
|
|
110
|
-
'text',
|
|
111
|
-
this.themeProvider,
|
|
112
|
-
this.themeService,
|
|
113
|
-
);
|
|
114
|
-
@Input() mask = resolveThemeDefault(
|
|
115
|
-
'input',
|
|
116
|
-
'mask',
|
|
117
|
-
undefined,
|
|
118
|
-
this.themeProvider,
|
|
119
|
-
this.themeService,
|
|
120
|
-
);
|
|
121
|
-
@Input() hint = resolveThemeDefault('input', 'hint', '', this.themeProvider, this.themeService);
|
|
122
|
-
@Input() placeholder = resolveThemeDefault(
|
|
123
|
-
'input',
|
|
124
|
-
'placeholder',
|
|
125
|
-
'',
|
|
126
|
-
this.themeProvider,
|
|
127
|
-
this.themeService,
|
|
128
|
-
);
|
|
129
|
-
@Input() label = resolveThemeDefault(
|
|
130
|
-
'input',
|
|
131
|
-
'label',
|
|
132
|
-
undefined,
|
|
133
|
-
this.themeProvider,
|
|
134
|
-
this.themeService,
|
|
135
|
-
);
|
|
136
|
-
@Input({ alias: 'full-width', transform: booleanAttribute }) fullWidth = resolveThemeDefault(
|
|
137
|
-
'input',
|
|
138
|
-
'fullWidth',
|
|
139
|
-
false,
|
|
140
|
-
this.themeProvider,
|
|
141
|
-
this.themeService,
|
|
142
|
-
);
|
|
143
|
-
@Input({ transform: booleanAttribute }) disabled = resolveThemeDefault(
|
|
144
|
-
'input',
|
|
145
|
-
'disabled',
|
|
146
|
-
false,
|
|
147
|
-
this.themeProvider,
|
|
148
|
-
this.themeService,
|
|
149
|
-
);
|
|
150
|
-
@Input({ transform: booleanAttribute }) readonly = resolveThemeDefault(
|
|
151
|
-
'input',
|
|
152
|
-
'readonly',
|
|
153
|
-
false,
|
|
154
|
-
this.themeProvider,
|
|
155
|
-
this.themeService,
|
|
156
|
-
);
|
|
157
|
-
@Input({ transform: booleanAttribute }) fluid = resolveThemeDefault(
|
|
158
|
-
'input',
|
|
159
|
-
'fluid',
|
|
160
|
-
false,
|
|
161
|
-
this.themeProvider,
|
|
162
|
-
this.themeService,
|
|
163
|
-
);
|
|
164
|
-
@Input({ transform: booleanAttribute }) error = resolveThemeDefault(
|
|
165
|
-
'input',
|
|
166
|
-
'error',
|
|
167
|
-
false,
|
|
168
|
-
this.themeProvider,
|
|
169
|
-
this.themeService,
|
|
170
|
-
);
|
|
171
|
-
@Input({ alias: 'container-class' }) containerClass = resolveThemeDefault(
|
|
172
|
-
'input',
|
|
173
|
-
'containerClass',
|
|
174
|
-
null,
|
|
175
|
-
this.themeProvider,
|
|
176
|
-
this.themeService,
|
|
177
|
-
);
|
|
178
|
-
@Input({ alias: 'input-class' }) inputClass = resolveThemeDefault(
|
|
179
|
-
'input',
|
|
180
|
-
'inputClass',
|
|
181
|
-
null,
|
|
182
|
-
this.themeProvider,
|
|
183
|
-
this.themeService,
|
|
184
|
-
);
|
|
185
|
-
@Input({ alias: 'host-class' }) hostClass = resolveThemeDefault(
|
|
186
|
-
'input',
|
|
187
|
-
'hostClass',
|
|
188
|
-
null,
|
|
189
|
-
this.themeProvider,
|
|
190
|
-
this.themeService,
|
|
191
|
-
);
|
|
192
|
-
@Input({ alias: 'hint-class' }) hintClass = resolveThemeDefault(
|
|
193
|
-
'input',
|
|
194
|
-
'hintClass',
|
|
195
|
-
null,
|
|
196
|
-
this.themeProvider,
|
|
197
|
-
this.themeService,
|
|
198
|
-
);
|
|
199
|
-
@Input({ alias: 'container-style' }) containerStyle = resolveThemeDefault(
|
|
200
|
-
'input',
|
|
201
|
-
'containerStyle',
|
|
202
|
-
null,
|
|
203
|
-
this.themeProvider,
|
|
204
|
-
this.themeService,
|
|
205
|
-
);
|
|
206
|
-
@Input({ alias: 'input-style' }) inputStyle = resolveThemeDefault(
|
|
207
|
-
'input',
|
|
208
|
-
'inputStyle',
|
|
209
|
-
null,
|
|
210
|
-
this.themeProvider,
|
|
211
|
-
this.themeService,
|
|
212
|
-
);
|
|
213
|
-
@Input({ alias: 'host-style' }) hostStyle = resolveThemeDefault(
|
|
214
|
-
'input',
|
|
215
|
-
'hostStyle',
|
|
216
|
-
null,
|
|
217
|
-
this.themeProvider,
|
|
218
|
-
this.themeService,
|
|
219
|
-
);
|
|
220
|
-
@Input({ alias: 'hint-style' }) hintStyle = resolveThemeDefault(
|
|
221
|
-
'input',
|
|
222
|
-
'hintStyle',
|
|
223
|
-
null,
|
|
224
|
-
this.themeProvider,
|
|
225
|
-
this.themeService,
|
|
226
|
-
);
|
|
227
|
-
@Input({ alias: 'hide-overflow', transform: booleanAttribute }) hideOverflow =
|
|
228
|
-
resolveThemeDefault('card', 'hideOverflow', false, this.themeProvider, this.themeService);
|
|
229
|
-
|
|
230
|
-
onTouched: any = () => {};
|
|
231
|
-
onChange: any = () => {};
|
|
232
|
-
private _value: any = '';
|
|
233
|
-
|
|
234
|
-
@Input()
|
|
235
|
-
get value(): any {
|
|
236
|
-
return this._value;
|
|
237
|
-
}
|
|
238
|
-
set value(val: any) {
|
|
239
|
-
if (this._value !== val) {
|
|
240
|
-
this._value = val ?? '';
|
|
241
|
-
this.cdr.markForCheck();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
@Output() valueChange = new EventEmitter<any>();
|
|
245
|
-
|
|
246
|
-
@HostBinding('class')
|
|
247
|
-
get hostClasses(): string {
|
|
248
|
-
const classes = ['dasar-input'];
|
|
249
|
-
if (this.fullWidth) classes.push('full-width');
|
|
250
|
-
if (this.disabled) classes.push('disabled');
|
|
251
|
-
return classes.join(' ');
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
private formatValue(val: string): string {
|
|
255
|
-
if (!this.mask || val === null || val === undefined) {
|
|
256
|
-
return val;
|
|
257
|
-
}
|
|
258
|
-
const stringVal = String(val);
|
|
259
|
-
if (typeof this.mask === 'function') {
|
|
260
|
-
return this.mask(stringVal);
|
|
261
|
-
}
|
|
262
|
-
if (this.mask === 'thousand') {
|
|
263
|
-
const digits = stringVal.replace(/\D/g, '');
|
|
264
|
-
return digits.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
265
|
-
}
|
|
266
|
-
if (this.mask === 'decimal') {
|
|
267
|
-
let clean = stringVal.replace(/[^0-9,]/g, '');
|
|
268
|
-
const parts = clean.split(',');
|
|
269
|
-
let integerPart = parts[0];
|
|
270
|
-
let decimalPart = parts.length > 1 ? ',' + parts[1].substring(0, 5) : '';
|
|
271
|
-
if (integerPart) {
|
|
272
|
-
integerPart = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
273
|
-
}
|
|
274
|
-
return integerPart + decimalPart;
|
|
275
|
-
}
|
|
276
|
-
if (this.mask === 'date') {
|
|
277
|
-
const digits = stringVal.replace(/\D/g, '').substring(0, 8);
|
|
278
|
-
if (digits.length >= 5) {
|
|
279
|
-
return `${digits.substring(0, 2)}/${digits.substring(2, 4)}/${digits.substring(4)}`;
|
|
280
|
-
} else if (digits.length >= 3) {
|
|
281
|
-
return `${digits.substring(0, 2)}/${digits.substring(2)}`;
|
|
282
|
-
}
|
|
283
|
-
return digits;
|
|
284
|
-
}
|
|
285
|
-
return stringVal;
|
|
286
|
-
}
|
|
287
|
-
writeValue(value: any): void {
|
|
288
|
-
const rawString = value !== null && value !== undefined ? String(value) : '';
|
|
289
|
-
this._value = this.formatValue(rawString);
|
|
290
|
-
this.cdr.markForCheck();
|
|
291
|
-
}
|
|
292
|
-
registerOnChange(fn: any): void {
|
|
293
|
-
this.onChange = fn;
|
|
294
|
-
}
|
|
295
|
-
registerOnTouched(fn: any): void {
|
|
296
|
-
this.onTouched = fn;
|
|
297
|
-
}
|
|
298
|
-
setDisabledState(isDisabled: boolean): void {
|
|
299
|
-
this.disabled = isDisabled;
|
|
300
|
-
}
|
|
301
|
-
onInput(event: Event): void {
|
|
302
|
-
const inputEl = event.target as HTMLInputElement;
|
|
303
|
-
const formattedVal = this.formatValue(inputEl.value);
|
|
304
|
-
inputEl.value = formattedVal;
|
|
305
|
-
this._value = formattedVal;
|
|
306
|
-
this.onChange(formattedVal);
|
|
307
|
-
this.valueChange.emit(formattedVal);
|
|
308
|
-
}
|
|
309
|
-
onBlur(): void {
|
|
310
|
-
this.onTouched();
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
export const DasarInputComponent = [
|
|
315
|
-
DasarInput,
|
|
316
|
-
DasarInputExtraLabelSlot,
|
|
317
|
-
DasarInputPrefixSlot,
|
|
318
|
-
DasarInputSuffixSlot,
|
|
319
|
-
] as const;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="dasar-list-item" [ngClass]="itemClass" [ngStyle]="itemStyle">
|
|
2
|
-
@if (hasPrefix) {
|
|
3
|
-
<div class="dasar-list-item-prefix">
|
|
4
|
-
<ng-content select="[prefix-slot]"></ng-content>
|
|
5
|
-
</div>
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
<div class="dasar-list-item-body">
|
|
9
|
-
<ng-content></ng-content>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
@if (hasSuffix) {
|
|
13
|
-
<div class="dasar-list-item-suffix">
|
|
14
|
-
<ng-content select="[suffix-slot]"></ng-content>
|
|
15
|
-
</div>
|
|
16
|
-
}
|
|
17
|
-
</div>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="dasar-list-container size-{{ size }}"
|
|
3
|
-
[class.bordered]="bordered"
|
|
4
|
-
[class.show-divider]="showDivider"
|
|
5
|
-
[class.hoverable]="hoverable"
|
|
6
|
-
[class.clickable]="clickable"
|
|
7
|
-
[ngClass]="containerClass"
|
|
8
|
-
[ngStyle]="containerStyle"
|
|
9
|
-
>
|
|
10
|
-
@if (hasHeader) {
|
|
11
|
-
<div class="dasar-list-header">
|
|
12
|
-
<ng-content select="[header-slot]"></ng-content>
|
|
13
|
-
</div>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
<div class="dasar-list-content">
|
|
17
|
-
<ng-content></ng-content>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
@if (hasFooter) {
|
|
21
|
-
<div class="dasar-list-footer">
|
|
22
|
-
<ng-content select="[footer-slot]"></ng-content>
|
|
23
|
-
</div>
|
|
24
|
-
}
|
|
25
|
-
</div>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
@use '../../styles/theme.scss' as *;
|
|
2
|
-
|
|
3
|
-
.dasar-list {
|
|
4
|
-
display: block;
|
|
5
|
-
width: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.dasar-list-item-wrapper {
|
|
9
|
-
display: block;
|
|
10
|
-
width: 100%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dasar-list-container {
|
|
14
|
-
background-color: var(--list-background, var(--theme-bg-surface-color));
|
|
15
|
-
color: var(--list-color, var(--theme-text-primary-color));
|
|
16
|
-
border-radius: var(--list-radius, var(--radius-md));
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
display: flex;
|
|
20
|
-
width: 100%;
|
|
21
|
-
margin: 0;
|
|
22
|
-
padding: 0;
|
|
23
|
-
|
|
24
|
-
&.bordered {
|
|
25
|
-
border: 1px solid var(--list-border, var(--theme-border-strong-color));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.size-sm {
|
|
29
|
-
font-size: var(--list-font-size-sm, var(--font-size-sm));
|
|
30
|
-
--list-item-padding: var(--space-base) var(--space-3);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.size-md {
|
|
34
|
-
font-size: var(--list-font-size-md, var(--font-size-base));
|
|
35
|
-
--list-item-padding: var(--space-3) var(--space-4);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.size-lg {
|
|
39
|
-
font-size: var(--list-font-size-lg, var(--font-size-lg));
|
|
40
|
-
--list-item-padding: var(--space-4) var(--space-5);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.show-divider {
|
|
44
|
-
.dasar-list-item-wrapper:not(:last-child) .dasar-list-item {
|
|
45
|
-
border-bottom: 1px solid var(--list-divider, var(--theme-border-subtle-color));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.hoverable {
|
|
50
|
-
.dasar-list-item {
|
|
51
|
-
transition: background-color 0.2s ease;
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background-color: var(--list-hover-background, var(--theme-bg-hover-color));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.clickable {
|
|
60
|
-
.dasar-list-item {
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
user-select: none;
|
|
63
|
-
|
|
64
|
-
&:active {
|
|
65
|
-
background-color: var(--list-active-background, var(--theme-border-subtle-color));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dasar-list-header {
|
|
72
|
-
padding: var(--list-header-padding, var(--space-3) var(--space-4));
|
|
73
|
-
font-weight: var(--list-header-font-weight, var(--font-weight-semibold));
|
|
74
|
-
border-bottom: 1px solid var(--list-header-border, var(--theme-border-strong-color));
|
|
75
|
-
background-color: var(--list-header-background, var(--theme-bg-default-color));
|
|
76
|
-
border-top-left-radius: inherit;
|
|
77
|
-
border-top-right-radius: inherit;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.dasar-list-footer {
|
|
81
|
-
padding: var(--list-footer-padding, var(--space-3) var(--space-4));
|
|
82
|
-
font-size: var(--list-footer-font-size, var(--font-size-sm));
|
|
83
|
-
color: var(--list-footer-color, var(--theme-text-secondary-color));
|
|
84
|
-
border-top: 1px solid var(--list-footer-border, var(--theme-border-strong-color));
|
|
85
|
-
background-color: var(--list-footer-background, var(--theme-bg-default-color));
|
|
86
|
-
border-bottom-left-radius: inherit;
|
|
87
|
-
border-bottom-right-radius: inherit;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.dasar-list-content {
|
|
91
|
-
display: flex;
|
|
92
|
-
flex-direction: column;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.dasar-list-item {
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
padding: var(--list-item-padding, var(--space-3) var(--space-4));
|
|
99
|
-
gap: var(--space-3);
|
|
100
|
-
color: inherit;
|
|
101
|
-
|
|
102
|
-
.dasar-list-item-prefix {
|
|
103
|
-
color: var(--list-prefix-color, var(--theme-text-secondary-color));
|
|
104
|
-
align-items: center;
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-shrink: 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.dasar-list-item-body {
|
|
110
|
-
flex-direction: column;
|
|
111
|
-
display: flex;
|
|
112
|
-
min-width: 0;
|
|
113
|
-
flex: 1;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.dasar-list-item-suffix {
|
|
117
|
-
color: var(--list-suffix-color, var(--theme-text-secondary-color));
|
|
118
|
-
align-items: center;
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-shrink: 0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { DasarList } from './dasar-list';
|
|
3
|
-
|
|
4
|
-
describe('DasarList', () => {
|
|
5
|
-
let component: DasarList;
|
|
6
|
-
let fixture: ComponentFixture<DasarList>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [DasarList],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(DasarList);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
await fixture.whenStable();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanAttribute,
|
|
3
|
-
ViewEncapsulation,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
|
-
ContentChild,
|
|
6
|
-
HostBinding,
|
|
7
|
-
Component,
|
|
8
|
-
Directive,
|
|
9
|
-
inject,
|
|
10
|
-
Input,
|
|
11
|
-
} from '@angular/core';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import { DASAR_THEME_PROVIDER } from '../dasar-theme-provider/dasar-theme-provider';
|
|
14
|
-
import { ClassType, ScaleAttributeType, StyleType } from '../../models/type.model';
|
|
15
|
-
import { DasarThemeService } from '../../services/theme.service';
|
|
16
|
-
import { resolveThemeDefault } from '../../utils/common';
|
|
17
|
-
|
|
18
|
-
export interface DasarListConfig {
|
|
19
|
-
size?: DasarListSize;
|
|
20
|
-
bordered?: boolean;
|
|
21
|
-
showDivider?: boolean;
|
|
22
|
-
hoverable?: boolean;
|
|
23
|
-
clickable?: boolean;
|
|
24
|
-
containerClass?: ClassType;
|
|
25
|
-
containerStyle?: StyleType;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface DasarListItemConfig {
|
|
29
|
-
itemClass?: ClassType;
|
|
30
|
-
itemStyle?: StyleType;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type DasarListSize = Extract<ScaleAttributeType, 'sm' | 'md' | 'lg'>;
|
|
34
|
-
|
|
35
|
-
@Directive({ selector: '[header-slot]', standalone: true })
|
|
36
|
-
export class DasarListHeaderSlot {}
|
|
37
|
-
|
|
38
|
-
@Directive({ selector: '[footer-slot]', standalone: true })
|
|
39
|
-
export class DasarListFooterSlot {}
|
|
40
|
-
|
|
41
|
-
@Directive({ selector: '[prefix-slot]', standalone: true })
|
|
42
|
-
export class DasarListItemPrefixSlot {}
|
|
43
|
-
|
|
44
|
-
@Directive({ selector: '[suffix-slot]', standalone: true })
|
|
45
|
-
export class DasarListItemSuffixSlot {}
|
|
46
|
-
|
|
47
|
-
@Component({
|
|
48
|
-
imports: [CommonModule],
|
|
49
|
-
encapsulation: ViewEncapsulation.None,
|
|
50
|
-
templateUrl: './dasar-list.html',
|
|
51
|
-
styleUrls: ['./dasar-list.scss'],
|
|
52
|
-
selector: 'dasar-list',
|
|
53
|
-
standalone: true,
|
|
54
|
-
})
|
|
55
|
-
export class DasarList {
|
|
56
|
-
@ContentChild(DasarListHeaderSlot) providedHeader?: DasarListHeaderSlot;
|
|
57
|
-
@ContentChild(DasarListFooterSlot) providedFooter?: DasarListFooterSlot;
|
|
58
|
-
|
|
59
|
-
private themeProvider = inject(DASAR_THEME_PROVIDER, { optional: true });
|
|
60
|
-
private themeService = inject(DasarThemeService, { optional: true });
|
|
61
|
-
|
|
62
|
-
@Input() size = resolveThemeDefault('list', 'size', 'md', this.themeProvider, this.themeService);
|
|
63
|
-
|
|
64
|
-
@Input({ transform: booleanAttribute }) bordered = resolveThemeDefault(
|
|
65
|
-
'list',
|
|
66
|
-
'bordered',
|
|
67
|
-
false,
|
|
68
|
-
this.themeProvider,
|
|
69
|
-
this.themeService,
|
|
70
|
-
);
|
|
71
|
-
@Input({ alias: 'show-divider', transform: booleanAttribute }) showDivider = resolveThemeDefault(
|
|
72
|
-
'list',
|
|
73
|
-
'showDivider',
|
|
74
|
-
false,
|
|
75
|
-
this.themeProvider,
|
|
76
|
-
this.themeService,
|
|
77
|
-
);
|
|
78
|
-
@Input({ transform: booleanAttribute }) hoverable = resolveThemeDefault(
|
|
79
|
-
'list',
|
|
80
|
-
'hoverable',
|
|
81
|
-
false,
|
|
82
|
-
this.themeProvider,
|
|
83
|
-
this.themeService,
|
|
84
|
-
);
|
|
85
|
-
@Input({ transform: booleanAttribute }) clickable = resolveThemeDefault(
|
|
86
|
-
'list',
|
|
87
|
-
'clickable',
|
|
88
|
-
false,
|
|
89
|
-
this.themeProvider,
|
|
90
|
-
this.themeService,
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
@Input({ alias: 'container-class' }) containerClass = resolveThemeDefault(
|
|
94
|
-
'list',
|
|
95
|
-
'containerClass',
|
|
96
|
-
null,
|
|
97
|
-
this.themeProvider,
|
|
98
|
-
this.themeService,
|
|
99
|
-
);
|
|
100
|
-
@Input({ alias: 'container-style' }) containerStyle = resolveThemeDefault(
|
|
101
|
-
'list',
|
|
102
|
-
'containerStyle',
|
|
103
|
-
null,
|
|
104
|
-
this.themeProvider,
|
|
105
|
-
this.themeService,
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
@HostBinding('class.dasar-list') readonly baseClass = true;
|
|
109
|
-
|
|
110
|
-
get hasHeader(): boolean {
|
|
111
|
-
return !!this.providedHeader;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
get hasFooter(): boolean {
|
|
115
|
-
return !!this.providedFooter;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@Component({
|
|
120
|
-
imports: [CommonModule],
|
|
121
|
-
encapsulation: ViewEncapsulation.None,
|
|
122
|
-
templateUrl: './dasar-list-item.html',
|
|
123
|
-
selector: 'dasar-list-item',
|
|
124
|
-
standalone: true,
|
|
125
|
-
})
|
|
126
|
-
export class DasarListItem {
|
|
127
|
-
@ContentChild(DasarListItemPrefixSlot) providedPrefix?: DasarListItemPrefixSlot;
|
|
128
|
-
@ContentChild(DasarListItemSuffixSlot) providedSuffix?: DasarListItemSuffixSlot;
|
|
129
|
-
|
|
130
|
-
private themeProvider = inject(DASAR_THEME_PROVIDER, { optional: true });
|
|
131
|
-
private themeService = inject(DasarThemeService, { optional: true });
|
|
132
|
-
|
|
133
|
-
@Input({ alias: 'item-class' }) itemClass = resolveThemeDefault(
|
|
134
|
-
'listItem',
|
|
135
|
-
'itemClass',
|
|
136
|
-
null,
|
|
137
|
-
this.themeProvider,
|
|
138
|
-
this.themeService,
|
|
139
|
-
);
|
|
140
|
-
@Input({ alias: 'item-style' }) itemStyle = resolveThemeDefault(
|
|
141
|
-
'listItem',
|
|
142
|
-
'itemStyle',
|
|
143
|
-
null,
|
|
144
|
-
this.themeProvider,
|
|
145
|
-
this.themeService,
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
@HostBinding('class.dasar-list-item-wrapper') readonly baseClass = true;
|
|
149
|
-
|
|
150
|
-
get hasPrefix(): boolean {
|
|
151
|
-
return !!this.providedPrefix;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
get hasSuffix(): boolean {
|
|
155
|
-
return !!this.providedSuffix;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export const DasarListComponent = [
|
|
160
|
-
DasarListHeaderSlot,
|
|
161
|
-
DasarListFooterSlot,
|
|
162
|
-
DasarListItemPrefixSlot,
|
|
163
|
-
DasarListItemSuffixSlot,
|
|
164
|
-
DasarList,
|
|
165
|
-
DasarListItem,
|
|
166
|
-
] as const;
|