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,368 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
EventEmitter,
|
|
4
|
-
Input,
|
|
5
|
-
OnChanges,
|
|
6
|
-
Output,
|
|
7
|
-
SimpleChanges,
|
|
8
|
-
inject,
|
|
9
|
-
signal,
|
|
10
|
-
} from '@angular/core';
|
|
11
|
-
import {
|
|
12
|
-
DOC_DEFAULT_SETTINGS,
|
|
13
|
-
DocCustomizeService,
|
|
14
|
-
DocCustomizeSettings,
|
|
15
|
-
} from '../services/doc-customize.service';
|
|
16
|
-
import { DasarModalComponent, DasarButtonComponent, DasarSelectComponent } from 'dasar-ui';
|
|
17
|
-
import { CommonModule } from '@angular/common';
|
|
18
|
-
import { FormsModule } from '@angular/forms';
|
|
19
|
-
|
|
20
|
-
interface DasarModalOption {
|
|
21
|
-
label: string;
|
|
22
|
-
value: string | null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const DEFAULT_SENTINEL = '__default__';
|
|
26
|
-
|
|
27
|
-
@Component({
|
|
28
|
-
selector: 'doc-customize-modal',
|
|
29
|
-
standalone: true,
|
|
30
|
-
imports: [
|
|
31
|
-
CommonModule,
|
|
32
|
-
FormsModule,
|
|
33
|
-
DasarModalComponent,
|
|
34
|
-
DasarButtonComponent,
|
|
35
|
-
DasarSelectComponent,
|
|
36
|
-
],
|
|
37
|
-
template: `
|
|
38
|
-
<dasar-modal [open]="open" label="Customize" (onClose)="cancel()">
|
|
39
|
-
<section class="cm-section">
|
|
40
|
-
<h3>Component defaults</h3>
|
|
41
|
-
<p class="cm-hint">Applies to every example that does not set the property explicitly.</p>
|
|
42
|
-
|
|
43
|
-
<dasar-select
|
|
44
|
-
full-width
|
|
45
|
-
label="Size"
|
|
46
|
-
[dropdown-panel-style]="panelStyle"
|
|
47
|
-
[options]="sizeOptions"
|
|
48
|
-
[ngModel]="draft().size ?? sentinel"
|
|
49
|
-
(ngModelChange)="setOption('size', $event)"
|
|
50
|
-
></dasar-select>
|
|
51
|
-
|
|
52
|
-
<dasar-select
|
|
53
|
-
full-width
|
|
54
|
-
label="Radius"
|
|
55
|
-
[dropdown-panel-style]="panelStyle"
|
|
56
|
-
[options]="radiusOptions"
|
|
57
|
-
[ngModel]="draft().radius ?? sentinel"
|
|
58
|
-
(ngModelChange)="setOption('radius', $event)"
|
|
59
|
-
></dasar-select>
|
|
60
|
-
|
|
61
|
-
<dasar-select
|
|
62
|
-
full-width
|
|
63
|
-
label="Button appearance"
|
|
64
|
-
[dropdown-panel-style]="panelStyle"
|
|
65
|
-
[options]="buttonAppearanceOptions"
|
|
66
|
-
[ngModel]="draft().buttonAppearance ?? sentinel"
|
|
67
|
-
(ngModelChange)="setOption('buttonAppearance', $event)"
|
|
68
|
-
></dasar-select>
|
|
69
|
-
|
|
70
|
-
<dasar-select
|
|
71
|
-
full-width
|
|
72
|
-
label="Input appearance"
|
|
73
|
-
[dropdown-panel-style]="panelStyle"
|
|
74
|
-
[options]="inputAppearanceOptions"
|
|
75
|
-
[ngModel]="draft().inputAppearance ?? sentinel"
|
|
76
|
-
(ngModelChange)="setOption('inputAppearance', $event)"
|
|
77
|
-
></dasar-select>
|
|
78
|
-
|
|
79
|
-
<dasar-select
|
|
80
|
-
full-width
|
|
81
|
-
label="Card appearance"
|
|
82
|
-
[dropdown-panel-style]="panelStyle"
|
|
83
|
-
[options]="cardAppearanceOptions"
|
|
84
|
-
[ngModel]="draft().cardAppearance ?? sentinel"
|
|
85
|
-
(ngModelChange)="setOption('cardAppearance', $event)"
|
|
86
|
-
></dasar-select>
|
|
87
|
-
|
|
88
|
-
<dasar-select
|
|
89
|
-
full-width
|
|
90
|
-
label="Tabs appearance"
|
|
91
|
-
[dropdown-panel-style]="panelStyle"
|
|
92
|
-
[options]="tabsAppearanceOptions"
|
|
93
|
-
[ngModel]="draft().tabsAppearance ?? sentinel"
|
|
94
|
-
(ngModelChange)="setOption('tabsAppearance', $event)"
|
|
95
|
-
></dasar-select>
|
|
96
|
-
|
|
97
|
-
<dasar-select
|
|
98
|
-
full-width
|
|
99
|
-
label="Tabs size"
|
|
100
|
-
[dropdown-panel-style]="panelStyle"
|
|
101
|
-
[options]="tabsSizeOptions"
|
|
102
|
-
[ngModel]="draft().tabsSize ?? sentinel"
|
|
103
|
-
(ngModelChange)="setOption('tabsSize', $event)"
|
|
104
|
-
></dasar-select>
|
|
105
|
-
|
|
106
|
-
<dasar-select
|
|
107
|
-
full-width
|
|
108
|
-
label="Tabs spacing"
|
|
109
|
-
[dropdown-panel-style]="panelStyle"
|
|
110
|
-
[options]="tabsSpacingOptions"
|
|
111
|
-
[ngModel]="draft().tabsSpacing ?? sentinel"
|
|
112
|
-
(ngModelChange)="setOption('tabsSpacing', $event)"
|
|
113
|
-
></dasar-select>
|
|
114
|
-
</section>
|
|
115
|
-
|
|
116
|
-
<section class="cm-section">
|
|
117
|
-
<h3>List</h3>
|
|
118
|
-
|
|
119
|
-
<dasar-select
|
|
120
|
-
full-width
|
|
121
|
-
label="List size"
|
|
122
|
-
[dropdown-panel-style]="panelStyle"
|
|
123
|
-
[options]="listSizeOptions"
|
|
124
|
-
[ngModel]="draft().listSize ?? sentinel"
|
|
125
|
-
(ngModelChange)="setOption('listSize', $event)"
|
|
126
|
-
></dasar-select>
|
|
127
|
-
|
|
128
|
-
<dasar-select
|
|
129
|
-
full-width
|
|
130
|
-
label="List bordered"
|
|
131
|
-
[dropdown-panel-style]="panelStyle"
|
|
132
|
-
[options]="booleanOptions"
|
|
133
|
-
[ngModel]="booleanSentinel(draft().listBordered)"
|
|
134
|
-
(ngModelChange)="setBooleanOption('listBordered', $event)"
|
|
135
|
-
></dasar-select>
|
|
136
|
-
|
|
137
|
-
<dasar-select
|
|
138
|
-
full-width
|
|
139
|
-
label="List show divider"
|
|
140
|
-
[dropdown-panel-style]="panelStyle"
|
|
141
|
-
[options]="booleanOptions"
|
|
142
|
-
[ngModel]="booleanSentinel(draft().listDivider)"
|
|
143
|
-
(ngModelChange)="setBooleanOption('listDivider', $event)"
|
|
144
|
-
></dasar-select>
|
|
145
|
-
</section>
|
|
146
|
-
|
|
147
|
-
<section class="cm-section">
|
|
148
|
-
<h3>Theme</h3>
|
|
149
|
-
|
|
150
|
-
<div class="cm-color">
|
|
151
|
-
<span>Primary color</span>
|
|
152
|
-
<input
|
|
153
|
-
type="color"
|
|
154
|
-
[ngModel]="draft().primaryColor ?? '#2563eb'"
|
|
155
|
-
(ngModelChange)="set('primaryColor', $event)"
|
|
156
|
-
/>
|
|
157
|
-
<dasar-button appearance="subtle" (click)="set('primaryColor', null)">
|
|
158
|
-
Use default
|
|
159
|
-
</dasar-button>
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<dasar-select
|
|
163
|
-
full-width
|
|
164
|
-
label="Base font size"
|
|
165
|
-
[dropdown-panel-style]="panelStyle"
|
|
166
|
-
[options]="fontSizeOptions"
|
|
167
|
-
[ngModel]="draft().fontSizeBase ?? sentinel"
|
|
168
|
-
(ngModelChange)="setOption('fontSizeBase', $event)"
|
|
169
|
-
></dasar-select>
|
|
170
|
-
|
|
171
|
-
<dasar-select
|
|
172
|
-
full-width
|
|
173
|
-
label="Font family"
|
|
174
|
-
[options]="fontOptions"
|
|
175
|
-
[dropdown-panel-style]="panelStyle"
|
|
176
|
-
[ngModel]="draft().fontSans ?? sentinel"
|
|
177
|
-
(ngModelChange)="setOption('fontSans', $event)"
|
|
178
|
-
></dasar-select>
|
|
179
|
-
</section>
|
|
180
|
-
|
|
181
|
-
<div
|
|
182
|
-
action-slot
|
|
183
|
-
style="width: 100%; display: flex; gap: var(--space-base); justify-content: space-between; align-items: center;"
|
|
184
|
-
>
|
|
185
|
-
<dasar-button appearance="outline" variant="danger" (click)="resetDraft()">
|
|
186
|
-
Reset to defaults
|
|
187
|
-
</dasar-button>
|
|
188
|
-
<span class="cm-spacer"></span>
|
|
189
|
-
<div style="display: flex; gap: var(--space-base); align-items: center;">
|
|
190
|
-
<dasar-button appearance="outline" variant="secondary" (click)="cancel()">
|
|
191
|
-
Cancel
|
|
192
|
-
</dasar-button>
|
|
193
|
-
<dasar-button appearance="solid" (click)="apply()">Apply</dasar-button>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
</dasar-modal>
|
|
197
|
-
`,
|
|
198
|
-
styles: [
|
|
199
|
-
`
|
|
200
|
-
.cm-section {
|
|
201
|
-
display: flex;
|
|
202
|
-
flex-direction: column;
|
|
203
|
-
gap: 12px;
|
|
204
|
-
}
|
|
205
|
-
.cm-section + .cm-section {
|
|
206
|
-
margin-top: 20px;
|
|
207
|
-
}
|
|
208
|
-
h3 {
|
|
209
|
-
margin: 0;
|
|
210
|
-
font-size: 13px;
|
|
211
|
-
text-transform: uppercase;
|
|
212
|
-
color: var(--theme-text-secondary-color);
|
|
213
|
-
}
|
|
214
|
-
.cm-hint {
|
|
215
|
-
margin: 0;
|
|
216
|
-
font-size: 12px;
|
|
217
|
-
color: var(--theme-text-secondary-color);
|
|
218
|
-
}
|
|
219
|
-
.cm-color {
|
|
220
|
-
display: flex;
|
|
221
|
-
align-items: center;
|
|
222
|
-
gap: 12px;
|
|
223
|
-
font-size: 14px;
|
|
224
|
-
}
|
|
225
|
-
.cm-color span {
|
|
226
|
-
flex: 1;
|
|
227
|
-
}
|
|
228
|
-
.cm-color input[type='color'] {
|
|
229
|
-
width: 48px;
|
|
230
|
-
height: 32px;
|
|
231
|
-
padding: 2px;
|
|
232
|
-
border: 1px solid var(--theme-border-strong-color);
|
|
233
|
-
border-radius: 6px;
|
|
234
|
-
background: var(--theme-bg-default-color);
|
|
235
|
-
}
|
|
236
|
-
.cm-spacer {
|
|
237
|
-
flex: 1;
|
|
238
|
-
}
|
|
239
|
-
`,
|
|
240
|
-
],
|
|
241
|
-
})
|
|
242
|
-
export class DocCustomizeModalComponent implements OnChanges {
|
|
243
|
-
@Input() open = false;
|
|
244
|
-
@Output() closed = new EventEmitter<void>();
|
|
245
|
-
|
|
246
|
-
private customize = inject(DocCustomizeService);
|
|
247
|
-
readonly draft = signal<DocCustomizeSettings>({ ...DOC_DEFAULT_SETTINGS });
|
|
248
|
-
readonly sentinel = DEFAULT_SENTINEL;
|
|
249
|
-
readonly panelStyle = { 'z-index': '1100' };
|
|
250
|
-
|
|
251
|
-
readonly sizeOptions: DasarModalOption[] = [
|
|
252
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
253
|
-
{ label: 'XS', value: 'xs' },
|
|
254
|
-
{ label: 'SM', value: 'sm' },
|
|
255
|
-
{ label: 'MD', value: 'md' },
|
|
256
|
-
{ label: 'LG', value: 'lg' },
|
|
257
|
-
{ label: 'XL', value: 'xl' },
|
|
258
|
-
];
|
|
259
|
-
readonly radiusOptions: DasarModalOption[] = [
|
|
260
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
261
|
-
{ label: 'None', value: 'none' },
|
|
262
|
-
{ label: 'XS', value: 'xs' },
|
|
263
|
-
{ label: 'SM', value: 'sm' },
|
|
264
|
-
{ label: 'MD', value: 'md' },
|
|
265
|
-
{ label: 'LG', value: 'lg' },
|
|
266
|
-
{ label: 'XL', value: 'xl' },
|
|
267
|
-
{ label: 'Full', value: 'full' },
|
|
268
|
-
];
|
|
269
|
-
readonly buttonAppearanceOptions: DasarModalOption[] = [
|
|
270
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
271
|
-
{ label: 'Solid', value: 'solid' },
|
|
272
|
-
{ label: 'Subtle', value: 'subtle' },
|
|
273
|
-
{ label: 'Outline', value: 'outline' },
|
|
274
|
-
];
|
|
275
|
-
readonly inputAppearanceOptions: DasarModalOption[] = [
|
|
276
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
277
|
-
{ label: 'Outline', value: 'outline' },
|
|
278
|
-
{ label: 'Filled', value: 'filled' },
|
|
279
|
-
];
|
|
280
|
-
readonly cardAppearanceOptions: DasarModalOption[] = [
|
|
281
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
282
|
-
{ label: 'Outline', value: 'outline' },
|
|
283
|
-
{ label: 'Borderless', value: 'borderless' },
|
|
284
|
-
{ label: 'Elevated', value: 'elevated' },
|
|
285
|
-
];
|
|
286
|
-
readonly tabsAppearanceOptions: DasarModalOption[] = [
|
|
287
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
288
|
-
{ label: 'Solid', value: 'solid' },
|
|
289
|
-
{ label: 'Subtle', value: 'subtle' },
|
|
290
|
-
{ label: 'Outline', value: 'outline' },
|
|
291
|
-
];
|
|
292
|
-
readonly tabsSizeOptions: DasarModalOption[] = [
|
|
293
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
294
|
-
{ label: 'None', value: 'none' },
|
|
295
|
-
{ label: 'Xs', value: 'xs' },
|
|
296
|
-
{ label: 'Sm', value: 'sm' },
|
|
297
|
-
{ label: 'Md', value: 'md' },
|
|
298
|
-
{ label: 'Lg', value: 'lg' },
|
|
299
|
-
{ label: 'Xl', value: 'xl' },
|
|
300
|
-
{ label: 'Full', value: 'full' },
|
|
301
|
-
];
|
|
302
|
-
readonly tabsSpacingOptions: DasarModalOption[] = [
|
|
303
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
304
|
-
{ label: 'Normal', value: 'normal' },
|
|
305
|
-
{ label: 'Compact', value: 'compact' },
|
|
306
|
-
];
|
|
307
|
-
readonly listSizeOptions: DasarModalOption[] = [
|
|
308
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
309
|
-
{ label: 'Sm', value: 'sm' },
|
|
310
|
-
{ label: 'Md', value: 'md' },
|
|
311
|
-
{ label: 'Lg', value: 'lg' },
|
|
312
|
-
];
|
|
313
|
-
readonly booleanOptions: DasarModalOption[] = [
|
|
314
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
315
|
-
{ label: 'On', value: 'true' },
|
|
316
|
-
{ label: 'Off', value: 'false' },
|
|
317
|
-
];
|
|
318
|
-
readonly fontSizeOptions: DasarModalOption[] = [
|
|
319
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
320
|
-
{ label: '12px', value: '12px' },
|
|
321
|
-
{ label: '13px', value: '13px' },
|
|
322
|
-
{ label: '14px', value: '14px' },
|
|
323
|
-
{ label: '15px', value: '15px' },
|
|
324
|
-
{ label: '16px', value: '16px' },
|
|
325
|
-
];
|
|
326
|
-
readonly fontOptions: DasarModalOption[] = [
|
|
327
|
-
{ label: 'Default', value: DEFAULT_SENTINEL },
|
|
328
|
-
{ label: 'System UI', value: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif' },
|
|
329
|
-
{ label: 'Serif', value: 'Georgia, "Times New Roman", serif' },
|
|
330
|
-
{ label: 'Monospace', value: 'Menlo, Monaco, "Courier New", monospace' },
|
|
331
|
-
];
|
|
332
|
-
|
|
333
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
334
|
-
if (changes['open'] && this.open) {
|
|
335
|
-
this.draft.set({ ...this.customize.settings() });
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
set<K extends keyof DocCustomizeSettings>(key: K, value: DocCustomizeSettings[K]) {
|
|
340
|
-
this.draft.update((d) => ({ ...d, [key]: value }));
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
setOption<K extends keyof DocCustomizeSettings>(key: K, value: unknown) {
|
|
344
|
-
this.set(key, (value === DEFAULT_SENTINEL ? null : value) as DocCustomizeSettings[K]);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
setBooleanOption<K extends keyof DocCustomizeSettings>(key: K, value: unknown) {
|
|
348
|
-
const parsed = value === DEFAULT_SENTINEL ? null : String(value) === 'true';
|
|
349
|
-
this.set(key, parsed as DocCustomizeSettings[K]);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
booleanSentinel(value: boolean | null): string {
|
|
353
|
-
return value === null ? DEFAULT_SENTINEL : String(value);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
resetDraft() {
|
|
357
|
-
this.draft.set({ ...DOC_DEFAULT_SETTINGS });
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
apply() {
|
|
361
|
-
this.customize.apply(this.draft());
|
|
362
|
-
this.closed.emit();
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
cancel() {
|
|
366
|
-
this.closed.emit();
|
|
367
|
-
}
|
|
368
|
-
}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { DasarButtonComponent, DasarCardComponent } from 'dasar-ui';
|
|
2
|
-
import { Component, Input, signal } from '@angular/core';
|
|
3
|
-
import { HighlightPipe } from '../utils/highlight.pipe';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
|
|
6
|
-
interface DocExampleCodeOption {
|
|
7
|
-
lang: 'html' | 'typescript' | 'scss' | 'css';
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'doc-example-component',
|
|
14
|
-
standalone: true,
|
|
15
|
-
imports: [CommonModule, DasarCardComponent, HighlightPipe, DasarButtonComponent],
|
|
16
|
-
template: `
|
|
17
|
-
<dasar-card [label]="title" class="doc-example-card">
|
|
18
|
-
<dasar-card
|
|
19
|
-
extra-header-slot
|
|
20
|
-
fluid
|
|
21
|
-
appearance="outline"
|
|
22
|
-
[container-style]="{
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
26
|
-
<dasar-button
|
|
27
|
-
[variant]="mode() === 'preview' ? 'primary' : 'secondary'"
|
|
28
|
-
(click)="mode.set('preview')"
|
|
29
|
-
appearance="subtle"
|
|
30
|
-
radius="none"
|
|
31
|
-
size="sm"
|
|
32
|
-
>
|
|
33
|
-
Preview
|
|
34
|
-
</dasar-button>
|
|
35
|
-
@if (codes.length > 0) {
|
|
36
|
-
@for (codeItem of codes; track $index) {
|
|
37
|
-
<dasar-button
|
|
38
|
-
[variant]="mode() === 'code' && selectedCode() == codeItem ? 'primary' : 'secondary'"
|
|
39
|
-
(click)="codeClicked(codeItem)"
|
|
40
|
-
appearance="subtle"
|
|
41
|
-
radius="none"
|
|
42
|
-
size="sm"
|
|
43
|
-
>
|
|
44
|
-
{{ codeItem.label }}
|
|
45
|
-
</dasar-button>
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
</dasar-card>
|
|
49
|
-
<div class="preview-area" [class.hidden]="mode() !== 'preview'" [ngStyle]="previewStyle">
|
|
50
|
-
<ng-content></ng-content>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="code-area" [class.hidden]="mode() !== 'code'">
|
|
53
|
-
@if (selectedCode() != null) {
|
|
54
|
-
<div class="code-header">
|
|
55
|
-
<div class="code-lang-badge">
|
|
56
|
-
<span class="lang-text">{{ selectedCode()?.lang | uppercase }}</span>
|
|
57
|
-
</div>
|
|
58
|
-
<button class="copy-btn" (click)="copyCode(selectedCode())" [class.copied]="isCopied()">
|
|
59
|
-
{{ isCopied() ? 'Copied!' : 'Copy' }}
|
|
60
|
-
</button>
|
|
61
|
-
</div>
|
|
62
|
-
@if (selectedCode()?.value != null && selectedCode()?.lang != null) {
|
|
63
|
-
<div class="code-content">
|
|
64
|
-
<pre><code
|
|
65
|
-
[class]="'language-' + selectedCode()?.lang"
|
|
66
|
-
[innerHTML]="selectedCode()!.value | highlight:selectedCode()!.lang"
|
|
67
|
-
></code></pre>
|
|
68
|
-
</div>
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</div>
|
|
72
|
-
</dasar-card>
|
|
73
|
-
`,
|
|
74
|
-
styles: [
|
|
75
|
-
`
|
|
76
|
-
.doc-example-card {
|
|
77
|
-
display: block;
|
|
78
|
-
margin-bottom: var(--space-8);
|
|
79
|
-
}
|
|
80
|
-
.example-toolbar {
|
|
81
|
-
display: flex;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
align-items: flex-start;
|
|
84
|
-
gap: var(--space-4);
|
|
85
|
-
margin-bottom: var(--space-6);
|
|
86
|
-
padding-bottom: var(--space-4);
|
|
87
|
-
border-bottom: 1px solid var(--theme-border-subtle-color);
|
|
88
|
-
}
|
|
89
|
-
.example-desc p {
|
|
90
|
-
margin: 0;
|
|
91
|
-
color: var(--theme-text-secondary-color);
|
|
92
|
-
line-height: 1.5;
|
|
93
|
-
}
|
|
94
|
-
.segmented-control {
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-shrink: 0;
|
|
97
|
-
gap: var(--space-1);
|
|
98
|
-
background: var(--theme-bg-hover-color);
|
|
99
|
-
padding: var(--space-1);
|
|
100
|
-
border-radius: var(--radius-sm);
|
|
101
|
-
border: 1px solid var(--theme-border-subtle-color);
|
|
102
|
-
}
|
|
103
|
-
.preview-area {
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
.code-area {
|
|
107
|
-
background: #1e1e1e;
|
|
108
|
-
border-radius: var(--radius-md);
|
|
109
|
-
border: 1px solid var(--theme-border-subtle-color);
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
}
|
|
114
|
-
.code-header {
|
|
115
|
-
display: flex;
|
|
116
|
-
justify-content: space-between;
|
|
117
|
-
align-items: center;
|
|
118
|
-
background: #2d2d2d;
|
|
119
|
-
padding: var(--space-base);
|
|
120
|
-
border-bottom: 1px solid #404040;
|
|
121
|
-
}
|
|
122
|
-
.code-lang-badge {
|
|
123
|
-
display: flex;
|
|
124
|
-
align-items: center;
|
|
125
|
-
|
|
126
|
-
gap: var(--space-2);
|
|
127
|
-
}
|
|
128
|
-
.lang-text {
|
|
129
|
-
color: #9cdcfe;
|
|
130
|
-
font-family: var(--font-sans);
|
|
131
|
-
font-weight: 600;
|
|
132
|
-
letter-spacing: 0.05em;
|
|
133
|
-
margin-left: var(--space-2);
|
|
134
|
-
}
|
|
135
|
-
.copy-btn {
|
|
136
|
-
background: transparent;
|
|
137
|
-
border: 1px solid #555;
|
|
138
|
-
color: #cccccc;
|
|
139
|
-
padding: 4px 12px;
|
|
140
|
-
border-radius: var(--radius-xs);
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
font-family: var(--font-sans);
|
|
143
|
-
}
|
|
144
|
-
.copy-btn:hover {
|
|
145
|
-
background: #444;
|
|
146
|
-
color: #ffffff;
|
|
147
|
-
}
|
|
148
|
-
.copy-btn.copied {
|
|
149
|
-
background: var(--theme-success-color);
|
|
150
|
-
border-color: var(--theme-success-color);
|
|
151
|
-
color: #ffffff;
|
|
152
|
-
}
|
|
153
|
-
.code-content {
|
|
154
|
-
padding: var(--space-base);
|
|
155
|
-
overflow-x: auto;
|
|
156
|
-
}
|
|
157
|
-
.code-content pre {
|
|
158
|
-
margin: 0;
|
|
159
|
-
}
|
|
160
|
-
.code-content code {
|
|
161
|
-
font-family: 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;
|
|
162
|
-
color: #d4d4d4;
|
|
163
|
-
line-height: 1.6;
|
|
164
|
-
white-space: pre-wrap;
|
|
165
|
-
}
|
|
166
|
-
.hidden {
|
|
167
|
-
display: none !important;
|
|
168
|
-
}
|
|
169
|
-
`,
|
|
170
|
-
],
|
|
171
|
-
})
|
|
172
|
-
export class DocExampleComponent {
|
|
173
|
-
@Input() previewStyle: Record<string, any> = {};
|
|
174
|
-
@Input() codes: DocExampleCodeOption[] = [];
|
|
175
|
-
@Input() description = '';
|
|
176
|
-
@Input() title = '';
|
|
177
|
-
|
|
178
|
-
selectedCode = signal<DocExampleCodeOption | null>(null);
|
|
179
|
-
mode = signal<'preview' | 'code'>('preview');
|
|
180
|
-
isCopied = signal<boolean>(false);
|
|
181
|
-
|
|
182
|
-
codeClicked(item: DocExampleCodeOption) {
|
|
183
|
-
this.mode.set('code');
|
|
184
|
-
this.selectedCode.set(item);
|
|
185
|
-
}
|
|
186
|
-
copyCode(item: DocExampleCodeOption | null) {
|
|
187
|
-
if (!item) return;
|
|
188
|
-
navigator.clipboard.writeText(item.value).then(() => {
|
|
189
|
-
this.isCopied.set(true);
|
|
190
|
-
setTimeout(() => {
|
|
191
|
-
this.isCopied.set(false);
|
|
192
|
-
}, 1000);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|