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,540 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanAttribute,
|
|
3
|
-
Component,
|
|
4
|
-
HostBinding,
|
|
5
|
-
Input,
|
|
6
|
-
Output,
|
|
7
|
-
EventEmitter,
|
|
8
|
-
forwardRef,
|
|
9
|
-
ViewEncapsulation,
|
|
10
|
-
TemplateRef,
|
|
11
|
-
ChangeDetectorRef,
|
|
12
|
-
inject,
|
|
13
|
-
HostListener,
|
|
14
|
-
ElementRef,
|
|
15
|
-
ViewChild,
|
|
16
|
-
AfterViewInit,
|
|
17
|
-
Directive,
|
|
18
|
-
ContentChild,
|
|
19
|
-
} from '@angular/core';
|
|
20
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
21
|
-
import { CommonModule } from '@angular/common';
|
|
22
|
-
|
|
23
|
-
import { DASAR_THEME_PROVIDER } from '../dasar-theme-provider/dasar-theme-provider';
|
|
24
|
-
import { DasarChipComponent, DasarChipVariantType } from '../dasar-chip/dasar-chip';
|
|
25
|
-
import { ClassType, StyleType, ScaleAttributeType } from '../../models/type.model';
|
|
26
|
-
import { DasarButtonComponent } from '../dasar-button/dasar-button';
|
|
27
|
-
import { DasarThemeService } from '../../services/theme.service';
|
|
28
|
-
import { DasarIconComponent } from '../dasar-icon/dasar-icon';
|
|
29
|
-
import { resolveThemeDefault } from '../../utils/common';
|
|
30
|
-
import { computeSmartPlacement, DasarPanelPlacement } from '../../utils/panel-placement';
|
|
31
|
-
import { fieldIconSize } from '../../utils/icon-size';
|
|
32
|
-
|
|
33
|
-
export type DasarSelectSizeType = Extract<ScaleAttributeType, 'sm' | 'md' | 'lg'>;
|
|
34
|
-
export type DasarSelectPlacementType = DasarPanelPlacement;
|
|
35
|
-
export type DasarSelectChipSizeType = Extract<ScaleAttributeType, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
|
|
36
|
-
export type DasarSelectMultipleDisplayType = 'text' | 'chip' | null;
|
|
37
|
-
export type DasarSelectAppearanceType = 'outline' | 'filled';
|
|
38
|
-
export type DasarSelectRadiusType = ScaleAttributeType;
|
|
39
|
-
|
|
40
|
-
export interface DasarSelectConfig {
|
|
41
|
-
multipleType?: DasarSelectMultipleDisplayType;
|
|
42
|
-
arrowIconName?: string;
|
|
43
|
-
debounceTime?: number;
|
|
44
|
-
appearance?: DasarSelectAppearanceType;
|
|
45
|
-
radius?: DasarSelectRadiusType;
|
|
46
|
-
options?: DasarSelectOption[];
|
|
47
|
-
chipSize?: DasarSelectChipSizeType;
|
|
48
|
-
size?: DasarSelectSizeType;
|
|
49
|
-
hint?: string;
|
|
50
|
-
placeholder?: string;
|
|
51
|
-
labelRight?: string;
|
|
52
|
-
label?: string;
|
|
53
|
-
dropdownPanelClass?: ClassType;
|
|
54
|
-
containerClass?: ClassType;
|
|
55
|
-
optionClass?: ClassType;
|
|
56
|
-
placement?: DasarPanelPlacement;
|
|
57
|
-
dropdownPanelStyle?: StyleType;
|
|
58
|
-
containerStyle?: StyleType;
|
|
59
|
-
fullWidth?: boolean;
|
|
60
|
-
clearable?: boolean;
|
|
61
|
-
searchable?: boolean;
|
|
62
|
-
disabled?: boolean;
|
|
63
|
-
loading?: boolean;
|
|
64
|
-
error?: boolean;
|
|
65
|
-
hideOverflow?: boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@Directive({ selector: '[prefix-slot]', standalone: true })
|
|
69
|
-
export class DasarSelectPrefixSlot {}
|
|
70
|
-
@Directive({ selector: '[suffix-slot]', standalone: true })
|
|
71
|
-
export class DasarSelectSuffixSlot {}
|
|
72
|
-
@Directive({ selector: '[label-slot]', standalone: true })
|
|
73
|
-
export class DasarSelectLabelSlot {}
|
|
74
|
-
@Directive({ selector: '[extra-label-slot]', standalone: true })
|
|
75
|
-
export class DasarSelectExtraLabelSlot {}
|
|
76
|
-
@Directive({ selector: '[option-loading-slot]', standalone: true })
|
|
77
|
-
export class DasarSelectOptionLoadingSlot {}
|
|
78
|
-
@Directive({ selector: '[option-empty-slot]', standalone: true })
|
|
79
|
-
export class DasarSelectOptionEmptySlot {}
|
|
80
|
-
@Directive({ selector: '[chip-template]', standalone: true })
|
|
81
|
-
export class DasarSelectChipTemplate {
|
|
82
|
-
constructor(public templateRef: TemplateRef<any>) {}
|
|
83
|
-
}
|
|
84
|
-
@Directive({ selector: '[option-template]', standalone: true })
|
|
85
|
-
export class DasarSelectOptionTemplate {
|
|
86
|
-
constructor(public templateRef: TemplateRef<any>) {}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface DasarSelectOption {
|
|
90
|
-
chipVariant?: DasarChipVariantType;
|
|
91
|
-
chipClass?: ClassType;
|
|
92
|
-
chipStyle?: StyleType;
|
|
93
|
-
disabled?: boolean;
|
|
94
|
-
iconName?: string;
|
|
95
|
-
label: string;
|
|
96
|
-
value: any;
|
|
97
|
-
[key: string]: any;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@Component({
|
|
101
|
-
providers: [
|
|
102
|
-
{
|
|
103
|
-
provide: NG_VALUE_ACCESSOR,
|
|
104
|
-
useExisting: forwardRef(() => DasarSelect),
|
|
105
|
-
multi: true,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
imports: [
|
|
109
|
-
CommonModule,
|
|
110
|
-
FormsModule,
|
|
111
|
-
DasarIconComponent,
|
|
112
|
-
DasarButtonComponent,
|
|
113
|
-
DasarChipComponent,
|
|
114
|
-
],
|
|
115
|
-
encapsulation: ViewEncapsulation.None,
|
|
116
|
-
templateUrl: './dasar-select.html',
|
|
117
|
-
styleUrls: ['./dasar-select.scss'],
|
|
118
|
-
selector: 'dasar-select',
|
|
119
|
-
standalone: true,
|
|
120
|
-
})
|
|
121
|
-
export class DasarSelect implements ControlValueAccessor {
|
|
122
|
-
@ViewChild('searchInput') searchInput?: ElementRef<HTMLInputElement>;
|
|
123
|
-
@ViewChild('triggerEl') triggerEl?: ElementRef<HTMLElement>;
|
|
124
|
-
@ViewChild('panelEl') panelEl?: ElementRef<HTMLElement>;
|
|
125
|
-
|
|
126
|
-
@ContentChild(DasarSelectOptionLoadingSlot) optionLoadingSlot?: DasarSelectOptionLoadingSlot;
|
|
127
|
-
@ContentChild(DasarSelectOptionEmptySlot) optionEmptySlot?: DasarSelectOptionEmptySlot;
|
|
128
|
-
@ContentChild(DasarSelectOptionTemplate) optionTemplate?: DasarSelectOptionTemplate;
|
|
129
|
-
@ContentChild(DasarSelectExtraLabelSlot) extraLabelSlot?: DasarSelectExtraLabelSlot;
|
|
130
|
-
@ContentChild(DasarSelectChipTemplate) chipTemplate?: DasarSelectChipTemplate;
|
|
131
|
-
@ContentChild(DasarSelectPrefixSlot) prefixSlot?: DasarSelectPrefixSlot;
|
|
132
|
-
@ContentChild(DasarSelectSuffixSlot) suffixSlot?: DasarSelectSuffixSlot;
|
|
133
|
-
@ContentChild(DasarSelectLabelSlot) labelSlot?: DasarSelectLabelSlot;
|
|
134
|
-
|
|
135
|
-
private themeProvider = inject(DASAR_THEME_PROVIDER, { optional: true });
|
|
136
|
-
private themeService = inject(DasarThemeService, { optional: true });
|
|
137
|
-
private cdr = inject(ChangeDetectorRef);
|
|
138
|
-
private elementRef = inject(ElementRef);
|
|
139
|
-
private debounceTimer: any = null;
|
|
140
|
-
searchQuery = '';
|
|
141
|
-
isOpen = false;
|
|
142
|
-
|
|
143
|
-
@Input({ alias: 'multiple-type' }) multipleType: DasarSelectMultipleDisplayType =
|
|
144
|
-
resolveThemeDefault('select', 'multipleType', null, this.themeProvider, this.themeService);
|
|
145
|
-
@Input({ alias: 'chip-size' }) chipSize: DasarSelectChipSizeType = resolveThemeDefault(
|
|
146
|
-
'select',
|
|
147
|
-
'chipSize',
|
|
148
|
-
'xs',
|
|
149
|
-
this.themeProvider,
|
|
150
|
-
this.themeService,
|
|
151
|
-
);
|
|
152
|
-
@Input({ alias: 'arrow-icon-name' }) arrowIconName = resolveThemeDefault(
|
|
153
|
-
'select',
|
|
154
|
-
'arrowIconName',
|
|
155
|
-
'chevron-down',
|
|
156
|
-
this.themeProvider,
|
|
157
|
-
this.themeService,
|
|
158
|
-
);
|
|
159
|
-
@Input({ alias: 'debounce-time' }) debounceTime = resolveThemeDefault(
|
|
160
|
-
'select',
|
|
161
|
-
'debounceTime',
|
|
162
|
-
300,
|
|
163
|
-
this.themeProvider,
|
|
164
|
-
this.themeService,
|
|
165
|
-
);
|
|
166
|
-
@Input() appearance = resolveThemeDefault(
|
|
167
|
-
'select',
|
|
168
|
-
'appearance',
|
|
169
|
-
'outline',
|
|
170
|
-
this.themeProvider,
|
|
171
|
-
this.themeService,
|
|
172
|
-
);
|
|
173
|
-
@Input() radius = resolveThemeDefault(
|
|
174
|
-
'select',
|
|
175
|
-
'radius',
|
|
176
|
-
'md',
|
|
177
|
-
this.themeProvider,
|
|
178
|
-
this.themeService,
|
|
179
|
-
);
|
|
180
|
-
private _placement: DasarSelectPlacementType = resolveThemeDefault(
|
|
181
|
-
'select',
|
|
182
|
-
'placement',
|
|
183
|
-
'bottom-start' as DasarSelectPlacementType,
|
|
184
|
-
this.themeProvider,
|
|
185
|
-
this.themeService,
|
|
186
|
-
);
|
|
187
|
-
@Input()
|
|
188
|
-
set placement(value: DasarSelectPlacementType) {
|
|
189
|
-
this._placement = value;
|
|
190
|
-
this.currentPlacement = value;
|
|
191
|
-
}
|
|
192
|
-
get placement(): DasarSelectPlacementType {
|
|
193
|
-
return this._placement;
|
|
194
|
-
}
|
|
195
|
-
currentPlacement: DasarSelectPlacementType = this._placement;
|
|
196
|
-
get iconSize(): number {
|
|
197
|
-
return fieldIconSize(this.size);
|
|
198
|
-
}
|
|
199
|
-
@Input() options = resolveThemeDefault(
|
|
200
|
-
'select',
|
|
201
|
-
'options',
|
|
202
|
-
[],
|
|
203
|
-
this.themeProvider,
|
|
204
|
-
this.themeService,
|
|
205
|
-
);
|
|
206
|
-
@Input() size = resolveThemeDefault(
|
|
207
|
-
'select',
|
|
208
|
-
'size',
|
|
209
|
-
'md',
|
|
210
|
-
this.themeProvider,
|
|
211
|
-
this.themeService,
|
|
212
|
-
);
|
|
213
|
-
@Input() hint = resolveThemeDefault(
|
|
214
|
-
'select',
|
|
215
|
-
'hint',
|
|
216
|
-
undefined,
|
|
217
|
-
this.themeProvider,
|
|
218
|
-
this.themeService,
|
|
219
|
-
);
|
|
220
|
-
@Input() placeholder = resolveThemeDefault(
|
|
221
|
-
'select',
|
|
222
|
-
'placeholder',
|
|
223
|
-
'Select item',
|
|
224
|
-
this.themeProvider,
|
|
225
|
-
this.themeService,
|
|
226
|
-
);
|
|
227
|
-
@Input() label = resolveThemeDefault(
|
|
228
|
-
'select',
|
|
229
|
-
'label',
|
|
230
|
-
undefined,
|
|
231
|
-
this.themeProvider,
|
|
232
|
-
this.themeService,
|
|
233
|
-
);
|
|
234
|
-
@Input() labelRight = resolveThemeDefault(
|
|
235
|
-
'select',
|
|
236
|
-
'labelRight',
|
|
237
|
-
undefined,
|
|
238
|
-
this.themeProvider,
|
|
239
|
-
this.themeService,
|
|
240
|
-
);
|
|
241
|
-
@Input({ alias: 'dropdown-panel-class' }) dropdownPanelClass = resolveThemeDefault(
|
|
242
|
-
'select',
|
|
243
|
-
'dropdownPanelClass',
|
|
244
|
-
null,
|
|
245
|
-
this.themeProvider,
|
|
246
|
-
this.themeService,
|
|
247
|
-
);
|
|
248
|
-
@Input({ alias: 'container-class' }) containerClass = resolveThemeDefault(
|
|
249
|
-
'select',
|
|
250
|
-
'containerClass',
|
|
251
|
-
null,
|
|
252
|
-
this.themeProvider,
|
|
253
|
-
this.themeService,
|
|
254
|
-
);
|
|
255
|
-
@Input({ alias: 'option-class' }) optionClass = resolveThemeDefault(
|
|
256
|
-
'select',
|
|
257
|
-
'optionClass',
|
|
258
|
-
null,
|
|
259
|
-
this.themeProvider,
|
|
260
|
-
this.themeService,
|
|
261
|
-
);
|
|
262
|
-
@Input({ alias: 'dropdown-panel-style' }) dropdownPanelStyle = resolveThemeDefault(
|
|
263
|
-
'select',
|
|
264
|
-
'dropdownPanelStyle',
|
|
265
|
-
null,
|
|
266
|
-
this.themeProvider,
|
|
267
|
-
this.themeService,
|
|
268
|
-
);
|
|
269
|
-
@Input({ alias: 'container-style' }) containerStyle = resolveThemeDefault(
|
|
270
|
-
'select',
|
|
271
|
-
'containerStyle',
|
|
272
|
-
null,
|
|
273
|
-
this.themeProvider,
|
|
274
|
-
this.themeService,
|
|
275
|
-
);
|
|
276
|
-
@Input({ alias: 'full-width', transform: booleanAttribute }) fullWidth = resolveThemeDefault(
|
|
277
|
-
'select',
|
|
278
|
-
'fullWidth',
|
|
279
|
-
false,
|
|
280
|
-
this.themeProvider,
|
|
281
|
-
this.themeService,
|
|
282
|
-
);
|
|
283
|
-
@Input({ transform: booleanAttribute }) clearable = resolveThemeDefault(
|
|
284
|
-
'select',
|
|
285
|
-
'clearable',
|
|
286
|
-
false,
|
|
287
|
-
this.themeProvider,
|
|
288
|
-
this.themeService,
|
|
289
|
-
);
|
|
290
|
-
@Input({ transform: booleanAttribute }) searchable = resolveThemeDefault(
|
|
291
|
-
'select',
|
|
292
|
-
'searchable',
|
|
293
|
-
false,
|
|
294
|
-
this.themeProvider,
|
|
295
|
-
this.themeService,
|
|
296
|
-
);
|
|
297
|
-
@Input({ transform: booleanAttribute }) disabled = resolveThemeDefault(
|
|
298
|
-
'select',
|
|
299
|
-
'disabled',
|
|
300
|
-
false,
|
|
301
|
-
this.themeProvider,
|
|
302
|
-
this.themeService,
|
|
303
|
-
);
|
|
304
|
-
@Input({ transform: booleanAttribute }) loading = resolveThemeDefault(
|
|
305
|
-
'select',
|
|
306
|
-
'loading',
|
|
307
|
-
false,
|
|
308
|
-
this.themeProvider,
|
|
309
|
-
this.themeService,
|
|
310
|
-
);
|
|
311
|
-
@Input({ transform: booleanAttribute }) error = resolveThemeDefault(
|
|
312
|
-
'select',
|
|
313
|
-
'error',
|
|
314
|
-
false,
|
|
315
|
-
this.themeProvider,
|
|
316
|
-
this.themeService,
|
|
317
|
-
);
|
|
318
|
-
@Input({ alias: 'hide-overflow', transform: booleanAttribute }) hideOverflow =
|
|
319
|
-
resolveThemeDefault('card', 'hideOverflow', false, this.themeProvider, this.themeService);
|
|
320
|
-
|
|
321
|
-
@Output() valueChange = new EventEmitter<any>();
|
|
322
|
-
@Output() onBlurEvent = new EventEmitter<FocusEvent>();
|
|
323
|
-
@Output() onSearchChange = new EventEmitter<string>();
|
|
324
|
-
@Output() onFocus = new EventEmitter<FocusEvent>();
|
|
325
|
-
@Output() onPanelOpened = new EventEmitter<void>();
|
|
326
|
-
@Output() onPanelClosed = new EventEmitter<void>();
|
|
327
|
-
@Output() onCleared = new EventEmitter<void>();
|
|
328
|
-
|
|
329
|
-
@HostBinding('class.dasar-select') readonly baseClass = true;
|
|
330
|
-
@HostBinding('class.full-width') get hasFullWidth(): boolean {
|
|
331
|
-
return this.fullWidth;
|
|
332
|
-
}
|
|
333
|
-
@HostBinding('class.disabled') get isDisabled(): boolean {
|
|
334
|
-
return this.disabled;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
_value: any = '';
|
|
338
|
-
@Input()
|
|
339
|
-
get value(): any {
|
|
340
|
-
return this._value;
|
|
341
|
-
}
|
|
342
|
-
set value(val: any) {
|
|
343
|
-
if (this._value !== val) {
|
|
344
|
-
this._value = val;
|
|
345
|
-
this.cdr.markForCheck();
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
onChange: any = () => {};
|
|
350
|
-
onTouched: any = () => {};
|
|
351
|
-
|
|
352
|
-
writeValue(val: any): void {
|
|
353
|
-
this._value = val ?? (this.multipleType ? [] : '');
|
|
354
|
-
this.cdr.markForCheck();
|
|
355
|
-
}
|
|
356
|
-
registerOnChange(fn: any): void {
|
|
357
|
-
this.onChange = fn;
|
|
358
|
-
}
|
|
359
|
-
registerOnTouched(fn: any): void {
|
|
360
|
-
this.onTouched = fn;
|
|
361
|
-
}
|
|
362
|
-
setDisabledState(isDisabled: boolean): void {
|
|
363
|
-
this.disabled = isDisabled;
|
|
364
|
-
this.cdr.markForCheck();
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
get hasValue(): boolean {
|
|
368
|
-
const val = this.value;
|
|
369
|
-
if (this.multipleType) {
|
|
370
|
-
return Array.isArray(val) && val.length > 0;
|
|
371
|
-
}
|
|
372
|
-
return val !== null && val !== undefined && val !== '';
|
|
373
|
-
}
|
|
374
|
-
get isMultiple(): boolean {
|
|
375
|
-
return this.multipleType != null;
|
|
376
|
-
}
|
|
377
|
-
get selectedOption(): DasarSelectOption | undefined {
|
|
378
|
-
return this.options.find((opt) => opt.value === this._value);
|
|
379
|
-
}
|
|
380
|
-
get selectedOptions(): DasarSelectOption[] {
|
|
381
|
-
if (!Array.isArray(this._value)) return [];
|
|
382
|
-
return this.options.filter((opt) => this._value.includes(opt.value));
|
|
383
|
-
}
|
|
384
|
-
get filteredOptions(): DasarSelectOption[] {
|
|
385
|
-
if (!this.searchable || !this.searchQuery.trim()) {
|
|
386
|
-
return this.options;
|
|
387
|
-
}
|
|
388
|
-
const query = this.searchQuery.toLowerCase();
|
|
389
|
-
return this.options.filter((opt) => opt.label.toLowerCase().includes(query));
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
@HostListener('document:click', ['$event'])
|
|
393
|
-
onDocumentClick(event: MouseEvent): void {
|
|
394
|
-
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
395
|
-
if (this.isOpen) {
|
|
396
|
-
this.closePanel();
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
@HostListener('document:dasar-select:opened', ['$event'])
|
|
401
|
-
onGlobalSelectOpened(event: any): void {
|
|
402
|
-
if (event.detail !== this && this.isOpen) {
|
|
403
|
-
this.closePanel();
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
removeOption(option: DasarSelectOption, event: Event): void {
|
|
408
|
-
event.stopPropagation();
|
|
409
|
-
if (this.disabled) return;
|
|
410
|
-
|
|
411
|
-
if (this.multipleType && Array.isArray(this._value)) {
|
|
412
|
-
this._value = this._value.filter((val) => val !== option.value);
|
|
413
|
-
this.onChange(this._value);
|
|
414
|
-
this.valueChange.emit(this._value);
|
|
415
|
-
this.cdr.detectChanges();
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
clearSelection(event: Event): void {
|
|
419
|
-
event.stopPropagation();
|
|
420
|
-
const emptyVal = this.multipleType ? [] : '';
|
|
421
|
-
this.value = emptyVal;
|
|
422
|
-
this.onChange(emptyVal);
|
|
423
|
-
this.valueChange.emit(emptyVal);
|
|
424
|
-
this.onCleared.emit();
|
|
425
|
-
if (this.isOpen) {
|
|
426
|
-
this.closePanel();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
toggleDropdown(): void {
|
|
430
|
-
if (this.disabled) return;
|
|
431
|
-
if (this.isOpen) {
|
|
432
|
-
this.closePanel();
|
|
433
|
-
} else {
|
|
434
|
-
this.openPanel();
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
openPanel(): void {
|
|
438
|
-
if (this.disabled || this.isOpen) return;
|
|
439
|
-
this.currentPlacement = this.placement;
|
|
440
|
-
this.isOpen = true;
|
|
441
|
-
this.onPanelOpened.emit();
|
|
442
|
-
const openEvent = new CustomEvent('dasar-select:opened', { detail: this });
|
|
443
|
-
document.dispatchEvent(openEvent);
|
|
444
|
-
setTimeout(() => this.recalculatePlacement(), 0);
|
|
445
|
-
if (this.searchable) {
|
|
446
|
-
setTimeout(() => {
|
|
447
|
-
this.searchInput?.nativeElement.focus();
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
@HostListener('window:resize')
|
|
453
|
-
@HostListener('window:scroll')
|
|
454
|
-
onViewportChange(): void {
|
|
455
|
-
if (this.isOpen) this.recalculatePlacement();
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
private recalculatePlacement(): void {
|
|
459
|
-
if (!this.triggerEl?.nativeElement || !this.panelEl?.nativeElement) return;
|
|
460
|
-
const next = computeSmartPlacement(
|
|
461
|
-
this.triggerEl.nativeElement,
|
|
462
|
-
this.panelEl.nativeElement,
|
|
463
|
-
this.placement,
|
|
464
|
-
);
|
|
465
|
-
if (next !== this.currentPlacement) {
|
|
466
|
-
this.currentPlacement = next;
|
|
467
|
-
this.cdr.markForCheck();
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
closePanel(): void {
|
|
471
|
-
if (!this.isOpen) return;
|
|
472
|
-
this.isOpen = false;
|
|
473
|
-
this.searchQuery = '';
|
|
474
|
-
this.onPanelClosed.emit();
|
|
475
|
-
this.onTouched();
|
|
476
|
-
}
|
|
477
|
-
isOptionSelected(option: DasarSelectOption): boolean {
|
|
478
|
-
if (this.multipleType) {
|
|
479
|
-
return Array.isArray(this._value) && this._value.includes(option.value);
|
|
480
|
-
}
|
|
481
|
-
return this._value === option.value;
|
|
482
|
-
}
|
|
483
|
-
selectOption(option: DasarSelectOption, event: Event): void {
|
|
484
|
-
event.stopPropagation();
|
|
485
|
-
if (option.disabled) return;
|
|
486
|
-
|
|
487
|
-
if (this.multipleType) {
|
|
488
|
-
let currentVal = Array.isArray(this._value) ? [...this._value] : [];
|
|
489
|
-
const index = currentVal.indexOf(option.value);
|
|
490
|
-
if (index > -1) {
|
|
491
|
-
currentVal.splice(index, 1);
|
|
492
|
-
} else {
|
|
493
|
-
currentVal.push(option.value);
|
|
494
|
-
}
|
|
495
|
-
this._value = currentVal;
|
|
496
|
-
this.onChange(this._value);
|
|
497
|
-
this.valueChange.emit(this._value);
|
|
498
|
-
|
|
499
|
-
if (this.searchable) {
|
|
500
|
-
this.searchQuery = '';
|
|
501
|
-
this.searchInput?.nativeElement.focus();
|
|
502
|
-
}
|
|
503
|
-
} else {
|
|
504
|
-
this._value = option.value;
|
|
505
|
-
this.onChange(this._value);
|
|
506
|
-
this.valueChange.emit(this._value);
|
|
507
|
-
this.closePanel();
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
getMultipleDisplayText(): string {
|
|
511
|
-
const selected = this.selectedOptions;
|
|
512
|
-
if (selected.length === 0) return '';
|
|
513
|
-
return selected.map((s) => s.label).join(', ');
|
|
514
|
-
}
|
|
515
|
-
onSearchInput(query: string): void {
|
|
516
|
-
if (this.debounceTimer) {
|
|
517
|
-
clearTimeout(this.debounceTimer);
|
|
518
|
-
}
|
|
519
|
-
this.debounceTimer = setTimeout(() => {
|
|
520
|
-
this.onSearchChange.emit(query);
|
|
521
|
-
}, this.debounceTime);
|
|
522
|
-
}
|
|
523
|
-
onInputFocus(event?: FocusEvent): void {
|
|
524
|
-
if (event) this.onFocus.emit(event);
|
|
525
|
-
}
|
|
526
|
-
onInputBlur(event?: FocusEvent): void {
|
|
527
|
-
if (event) this.onBlurEvent.emit(event);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
export const DasarSelectComponent = [
|
|
531
|
-
DasarSelect,
|
|
532
|
-
DasarSelectLabelSlot,
|
|
533
|
-
DasarSelectSuffixSlot,
|
|
534
|
-
DasarSelectChipTemplate,
|
|
535
|
-
DasarSelectOptionTemplate,
|
|
536
|
-
DasarSelectExtraLabelSlot,
|
|
537
|
-
DasarSelectOptionEmptySlot,
|
|
538
|
-
DasarSelectOptionLoadingSlot,
|
|
539
|
-
DasarSelectPrefixSlot,
|
|
540
|
-
] as const;
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>dasar-slider works!</p>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { DasarSlider } from './dasar-slider';
|
|
3
|
-
|
|
4
|
-
describe('DasarSlider', () => {
|
|
5
|
-
let component: DasarSlider;
|
|
6
|
-
let fixture: ComponentFixture<DasarSlider>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [DasarSlider],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(DasarSlider);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
await fixture.whenStable();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|