@kirbydesign/designsystem 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/karma.conf.js +34 -0
- package/ng-package.json +32 -0
- package/ngcc.config.js +3 -0
- package/package.json +27 -0
- package/src/index.ts +1 -0
- package/src/lib/animation/kirby-animation.ts +12 -0
- package/src/lib/components/accordion/accordion-item.component.html +25 -0
- package/src/lib/components/accordion/accordion-item.component.scss +64 -0
- package/src/lib/components/accordion/accordion-item.component.spec.ts +52 -0
- package/src/lib/components/accordion/accordion-item.component.ts +27 -0
- package/src/lib/components/accordion/accordion.directive.ts +7 -0
- package/src/lib/components/accordion/index.ts +2 -0
- package/src/lib/components/angular-component-lib/utils.ts +43 -0
- package/src/lib/components/app/app.component.html +3 -0
- package/src/lib/components/app/app.component.scss +10 -0
- package/src/lib/components/app/app.component.spec.ts +52 -0
- package/src/lib/components/app/app.component.ts +50 -0
- package/src/lib/components/app/app.module.ts +12 -0
- package/src/lib/components/app/index.ts +2 -0
- package/src/lib/components/avatar/avatar.component.html +6 -0
- package/src/lib/components/avatar/avatar.component.scss +153 -0
- package/src/lib/components/avatar/avatar.component.spec.ts +207 -0
- package/src/lib/components/avatar/avatar.component.ts +32 -0
- package/src/lib/components/badge/badge.component.spec.ts +78 -0
- package/src/lib/components/button/button.component.html +1 -0
- package/src/lib/components/button/button.component.integration.spec.ts +576 -0
- package/src/lib/components/button/button.component.scss +286 -0
- package/src/lib/components/button/button.component.spec.ts +404 -0
- package/src/lib/components/button/button.component.ts +96 -0
- package/src/lib/components/calendar/calendar.component.html +49 -0
- package/src/lib/components/calendar/calendar.component.initialization.spec.ts +93 -0
- package/src/lib/components/calendar/calendar.component.scss +132 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +470 -0
- package/src/lib/components/calendar/calendar.component.ts +513 -0
- package/src/lib/components/calendar/helpers/calendar-cell.model.ts +7 -0
- package/src/lib/components/calendar/helpers/calendar-options.model.ts +10 -0
- package/src/lib/components/calendar/helpers/calendar.helper.ts +108 -0
- package/src/lib/components/calendar/index.ts +2 -0
- package/src/lib/components/calendar/options/calendar-year-navigator-config.ts +4 -0
- package/src/lib/components/card/card-footer/card-footer.component.html +3 -0
- package/src/lib/components/card/card-footer/card-footer.component.scss +19 -0
- package/src/lib/components/card/card-footer/card-footer.component.ts +13 -0
- package/src/lib/components/card/card-header/card-header.component.html +5 -0
- package/src/lib/components/card/card-header/card-header.component.scss +63 -0
- package/src/lib/components/card/card-header/card-header.component.ts +20 -0
- package/src/lib/components/card/card.component.html +5 -0
- package/src/lib/components/card/card.component.scss +56 -0
- package/src/lib/components/card/card.component.spec.ts +81 -0
- package/src/lib/components/card/card.component.ts +95 -0
- package/src/lib/components/card/index.ts +3 -0
- package/src/lib/components/chart/chart-js/chart-js.service.integration.spec.ts +320 -0
- package/src/lib/components/chart/chart-js/chart-js.service.spec.ts +1004 -0
- package/src/lib/components/chart/chart-js/chart-js.service.ts +445 -0
- package/src/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.ts +254 -0
- package/src/lib/components/chart/chart-js/configured-chart-js.ts +39 -0
- package/src/lib/components/chart/chart-js/test-utils.ts +171 -0
- package/src/lib/components/chart/chart.component.html +7 -0
- package/src/lib/components/chart/chart.component.scss +6 -0
- package/src/lib/components/chart/chart.component.spec.ts +188 -0
- package/src/lib/components/chart/chart.component.ts +148 -0
- package/src/lib/components/chart/chart.module.ts +11 -0
- package/src/lib/components/chart/chart.types.ts +34 -0
- package/src/lib/components/chart/configs/annotations.config.ts +36 -0
- package/src/lib/components/chart/configs/chart-config.service.spec.ts +21 -0
- package/src/lib/components/chart/configs/chart-config.service.ts +34 -0
- package/src/lib/components/chart/configs/global-defaults.config.ts +50 -0
- package/src/lib/components/chart/configs/interaction-functions-extensions.config.ts +19 -0
- package/src/lib/components/chart/configs/shared.utils.ts +28 -0
- package/src/lib/components/chart/configs/type.config.ts +214 -0
- package/src/lib/components/chart/index.ts +5 -0
- package/src/lib/components/chart-deprecated/chart-deprecated-helper.ts +25 -0
- package/src/lib/components/chart-deprecated/chart-deprecated-type.ts +10 -0
- package/src/lib/components/chart-deprecated/chart-deprecated.component.scss +3 -0
- package/src/lib/components/chart-deprecated/chart-deprecated.component.spec.ts +271 -0
- package/src/lib/components/chart-deprecated/chart-deprecated.component.ts +233 -0
- package/src/lib/components/chart-deprecated/index.ts +2 -0
- package/src/lib/components/chart-deprecated/options/activitygauge.ts +87 -0
- package/src/lib/components/chart-deprecated/options/areaspline.ts +95 -0
- package/src/lib/components/chart-deprecated/options/bar.ts +93 -0
- package/src/lib/components/chart-deprecated/options/column.ts +101 -0
- package/src/lib/components/chart-deprecated/options/donut.ts +118 -0
- package/src/lib/components/chart-deprecated/options/timeseries.ts +96 -0
- package/src/lib/components/checkbox/checkbox.component.html +10 -0
- package/src/lib/components/checkbox/checkbox.component.integration.spec.ts +59 -0
- package/src/lib/components/checkbox/checkbox.component.scss +130 -0
- package/src/lib/components/checkbox/checkbox.component.spec.ts +205 -0
- package/src/lib/components/checkbox/checkbox.component.ts +56 -0
- package/src/lib/components/chip/chip.component.html +1 -0
- package/src/lib/components/chip/chip.component.integration.spec.ts +111 -0
- package/src/lib/components/chip/chip.component.scss +49 -0
- package/src/lib/components/chip/chip.component.spec.ts +84 -0
- package/src/lib/components/chip/chip.component.ts +16 -0
- package/src/lib/components/divider/divider.component.html +1 -0
- package/src/lib/components/divider/divider.component.scss +22 -0
- package/src/lib/components/divider/divider.component.spec.ts +24 -0
- package/src/lib/components/divider/divider.component.ts +12 -0
- package/src/lib/components/dropdown/dropdown-popover.component.integration.spec.ts +177 -0
- package/src/lib/components/dropdown/dropdown-popover.component.spec.ts +1154 -0
- package/src/lib/components/dropdown/dropdown.component.html +42 -0
- package/src/lib/components/dropdown/dropdown.component.scss +142 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +1215 -0
- package/src/lib/components/dropdown/dropdown.component.ts +538 -0
- package/src/lib/components/dropdown/dropdown.types.ts +10 -0
- package/src/lib/components/dropdown/keyboard-handler.service.ts +38 -0
- package/src/lib/components/empty-state/empty-state.component.html +10 -0
- package/src/lib/components/empty-state/empty-state.component.integration.spec.ts +110 -0
- package/src/lib/components/empty-state/empty-state.component.scss +50 -0
- package/src/lib/components/empty-state/empty-state.component.spec.ts +40 -0
- package/src/lib/components/empty-state/empty-state.component.ts +50 -0
- package/src/lib/components/fab-sheet/fab-sheet.component.html +13 -0
- package/src/lib/components/fab-sheet/fab-sheet.component.scss +67 -0
- package/src/lib/components/fab-sheet/fab-sheet.component.spec.ts +29 -0
- package/src/lib/components/fab-sheet/fab-sheet.component.ts +100 -0
- package/src/lib/components/flag/flag.component.scss +40 -0
- package/src/lib/components/flag/flag.component.spec.ts +152 -0
- package/src/lib/components/flag/flag.component.ts +18 -0
- package/src/lib/components/form-field/_form-field-inputs.shared.scss +62 -0
- package/src/lib/components/form-field/directives/date/date-input.directive.spec.ts +127 -0
- package/src/lib/components/form-field/directives/date/date-input.directive.ts +94 -0
- package/src/lib/components/form-field/directives/decimal-mask/decimal-mask.directive.spec.ts +231 -0
- package/src/lib/components/form-field/directives/decimal-mask/decimal-mask.directive.ts +113 -0
- package/src/lib/components/form-field/form-field-message/form-field-message.component.html +1 -0
- package/src/lib/components/form-field/form-field-message/form-field-message.component.scss +11 -0
- package/src/lib/components/form-field/form-field-message/form-field-message.component.ts +12 -0
- package/src/lib/components/form-field/form-field.component.html +39 -0
- package/src/lib/components/form-field/form-field.component.scss +43 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +521 -0
- package/src/lib/components/form-field/form-field.component.ts +141 -0
- package/src/lib/components/form-field/index.ts +7 -0
- package/src/lib/components/form-field/input/input.component.integration.spec.ts +83 -0
- package/src/lib/components/form-field/input/input.component.scss +54 -0
- package/src/lib/components/form-field/input/input.component.spec.ts +159 -0
- package/src/lib/components/form-field/input/input.component.ts +91 -0
- package/src/lib/components/form-field/input-counter/input-counter.component.html +1 -0
- package/src/lib/components/form-field/input-counter/input-counter.component.spec.ts +184 -0
- package/src/lib/components/form-field/input-counter/input-counter.component.ts +41 -0
- package/src/lib/components/form-field/textarea/textarea.component.html +2 -0
- package/src/lib/components/form-field/textarea/textarea.component.scss +11 -0
- package/src/lib/components/form-field/textarea/textarea.component.spec.ts +100 -0
- package/src/lib/components/form-field/textarea/textarea.component.ts +64 -0
- package/src/lib/components/grid/breakpoint-helper.service.ts +27 -0
- package/src/lib/components/grid/grid-card-configuration.ts +7 -0
- package/src/lib/components/grid/grid.component.html +6 -0
- package/src/lib/components/grid/grid.component.scss +26 -0
- package/src/lib/components/grid/grid.component.ts +106 -0
- package/src/lib/components/icon/icon-registry.service.spec.ts +107 -0
- package/src/lib/components/icon/icon-registry.service.ts +39 -0
- package/src/lib/components/icon/icon-settings.ts +8 -0
- package/src/lib/components/icon/icon.component.html +1 -0
- package/src/lib/components/icon/icon.component.scss +47 -0
- package/src/lib/components/icon/icon.component.spec.ts +254 -0
- package/src/lib/components/icon/icon.component.ts +89 -0
- package/src/lib/components/icon/icon.module.ts +11 -0
- package/src/lib/components/icon/index.ts +5 -0
- package/src/lib/components/icon/kirby-icon-settings.ts +65 -0
- package/src/lib/components/icon/readme.md +16 -0
- package/src/lib/components/icon/selection.json +1776 -0
- package/src/lib/components/index.ts +67 -0
- package/src/lib/components/item/_item.utils.scss +36 -0
- package/src/lib/components/item/index.ts +3 -0
- package/src/lib/components/item/item.component.html +16 -0
- package/src/lib/components/item/item.component.integration.spec.ts +64 -0
- package/src/lib/components/item/item.component.scss +156 -0
- package/src/lib/components/item/item.component.spec.ts +85 -0
- package/src/lib/components/item/item.component.ts +37 -0
- package/src/lib/components/item/item.module.ts +14 -0
- package/src/lib/components/item/label/label.component.html +3 -0
- package/src/lib/components/item/label/label.component.scss +36 -0
- package/src/lib/components/item/label/label.component.spec.ts +23 -0
- package/src/lib/components/item/label/label.component.ts +16 -0
- package/src/lib/components/item-group/item-group.component.html +1 -0
- package/src/lib/components/item-group/item-group.component.scss +3 -0
- package/src/lib/components/item-group/item-group.component.spec.ts +42 -0
- package/src/lib/components/item-group/item-group.component.ts +10 -0
- package/src/lib/components/item-sliding/index.ts +2 -0
- package/src/lib/components/item-sliding/item-sliding.component.html +20 -0
- package/src/lib/components/item-sliding/item-sliding.component.scss +9 -0
- package/src/lib/components/item-sliding/item-sliding.component.spec.ts +174 -0
- package/src/lib/components/item-sliding/item-sliding.component.ts +23 -0
- package/src/lib/components/item-sliding/item-sliding.shared.scss +18 -0
- package/src/lib/components/item-sliding/item-sliding.types.ts +13 -0
- package/src/lib/components/list/directives/infinite-scroll.directive.spec.ts +131 -0
- package/src/lib/components/list/directives/infinite-scroll.directive.ts +137 -0
- package/src/lib/components/list/directives/list-item-color.directive.ts +27 -0
- package/src/lib/components/list/directives/scroll.model.ts +5 -0
- package/src/lib/components/list/helpers/list-helper.spec.ts +109 -0
- package/src/lib/components/list/helpers/list-helper.ts +19 -0
- package/src/lib/components/list/index.ts +21 -0
- package/src/lib/components/list/list-experimental/list-experimental.component.html +4 -0
- package/src/lib/components/list/list-experimental/list-experimental.component.scss +6 -0
- package/src/lib/components/list/list-experimental/list-experimental.component.spec.ts +112 -0
- package/src/lib/components/list/list-experimental/list-experimental.component.ts +21 -0
- package/src/lib/components/list/list-header/list-header.component.html +1 -0
- package/src/lib/components/list/list-header/list-header.component.scss +10 -0
- package/src/lib/components/list/list-header/list-header.component.spec.ts +24 -0
- package/src/lib/components/list/list-header/list-header.component.ts +11 -0
- package/src/lib/components/list/list-item/list-item.component.html +39 -0
- package/src/lib/components/list/list-item/list-item.component.scss +13 -0
- package/src/lib/components/list/list-item/list-item.component.ts +144 -0
- package/src/lib/components/list/list-section-header/list-section-header.component.html +3 -0
- package/src/lib/components/list/list-section-header/list-section-header.component.spec.ts +24 -0
- package/src/lib/components/list/list-section-header/list-section-header.component.ts +13 -0
- package/src/lib/components/list/list-swipe-action.ts +2 -0
- package/src/lib/components/list/list-swipe-action.type.ts +23 -0
- package/src/lib/components/list/list.component.html +65 -0
- package/src/lib/components/list/list.component.integration.spec.ts +177 -0
- package/src/lib/components/list/list.component.scss +243 -0
- package/src/lib/components/list/list.component.spec.ts +219 -0
- package/src/lib/components/list/list.component.ts +213 -0
- package/src/lib/components/list/list.directive.ts +21 -0
- package/src/lib/components/list/list.event.ts +8 -0
- package/src/lib/components/list/list.module.ts +47 -0
- package/src/lib/components/list/pipes/group-by.pipe.spec.ts +71 -0
- package/src/lib/components/list/pipes/group-by.pipe.ts +34 -0
- package/src/lib/components/loading-overlay/index.ts +2 -0
- package/src/lib/components/loading-overlay/loading-overlay.component.html +8 -0
- package/src/lib/components/loading-overlay/loading-overlay.component.scss +37 -0
- package/src/lib/components/loading-overlay/loading-overlay.component.ts +12 -0
- package/src/lib/components/loading-overlay/loading-overlay.service.ts +44 -0
- package/src/lib/components/modal/action-sheet/action-sheet.component.html +24 -0
- package/src/lib/components/modal/action-sheet/action-sheet.component.scss +47 -0
- package/src/lib/components/modal/action-sheet/action-sheet.component.spec.ts +153 -0
- package/src/lib/components/modal/action-sheet/action-sheet.component.ts +27 -0
- package/src/lib/components/modal/action-sheet/config/action-sheet-config.ts +8 -0
- package/src/lib/components/modal/action-sheet/config/action-sheet-item.ts +4 -0
- package/src/lib/components/modal/alert/alert.component.html +29 -0
- package/src/lib/components/modal/alert/alert.component.scss +21 -0
- package/src/lib/components/modal/alert/alert.component.spec.ts +104 -0
- package/src/lib/components/modal/alert/alert.component.ts +67 -0
- package/src/lib/components/modal/alert/config/alert-config.ts +19 -0
- package/src/lib/components/modal/footer/modal-footer.component.html +3 -0
- package/src/lib/components/modal/footer/modal-footer.component.scss +57 -0
- package/src/lib/components/modal/footer/modal-footer.component.spec.ts +209 -0
- package/src/lib/components/modal/footer/modal-footer.component.ts +17 -0
- package/src/lib/components/modal/index.ts +9 -0
- package/src/lib/components/modal/modal-wrapper/compact/modal-compact-wrapper.component.html +3 -0
- package/src/lib/components/modal/modal-wrapper/compact/modal-compact-wrapper.component.scss +8 -0
- package/src/lib/components/modal/modal-wrapper/compact/modal-compact-wrapper.component.ts +79 -0
- package/src/lib/components/modal/modal-wrapper/config/drawer-supplementary-action.ts +4 -0
- package/src/lib/components/modal/modal-wrapper/config/modal-config.helper.ts +3 -0
- package/src/lib/components/modal/modal-wrapper/config/modal-config.ts +22 -0
- package/src/lib/components/modal/modal-wrapper/modal-wrapper.component.html +43 -0
- package/src/lib/components/modal/modal-wrapper/modal-wrapper.component.scss +159 -0
- package/src/lib/components/modal/modal-wrapper/modal-wrapper.component.spec.ts +942 -0
- package/src/lib/components/modal/modal-wrapper/modal-wrapper.component.ts +587 -0
- package/src/lib/components/modal/modal-wrapper/modal-wrapper.testbuilder.ts +155 -0
- package/src/lib/components/modal/services/action-sheet.helper.spec.ts +86 -0
- package/src/lib/components/modal/services/action-sheet.helper.ts +47 -0
- package/src/lib/components/modal/services/alert.helper.spec.ts +89 -0
- package/src/lib/components/modal/services/alert.helper.ts +57 -0
- package/src/lib/components/modal/services/modal-animation-builder.service.ts +276 -0
- package/src/lib/components/modal/services/modal-navigation.service.spec.ts +543 -0
- package/src/lib/components/modal/services/modal-navigation.service.ts +331 -0
- package/src/lib/components/modal/services/modal.controller.spec.ts +212 -0
- package/src/lib/components/modal/services/modal.controller.ts +194 -0
- package/src/lib/components/modal/services/modal.helper.spec.ts +828 -0
- package/src/lib/components/modal/services/modal.helper.ts +128 -0
- package/src/lib/components/modal/services/modal.interfaces.ts +28 -0
- package/src/lib/components/page/index.ts +13 -0
- package/src/lib/components/page/page-footer/page-footer.component.html +3 -0
- package/src/lib/components/page/page-footer/page-footer.component.scss +23 -0
- package/src/lib/components/page/page-footer/page-footer.component.spec.ts +52 -0
- package/src/lib/components/page/page-footer/page-footer.component.ts +46 -0
- package/src/lib/components/page/page.component.html +101 -0
- package/src/lib/components/page/page.component.scss +141 -0
- package/src/lib/components/page/page.component.spec.ts +224 -0
- package/src/lib/components/page/page.component.ts +415 -0
- package/src/lib/components/page/page.module.ts +52 -0
- package/src/lib/components/popover/popover.component.scss +26 -0
- package/src/lib/components/popover/popover.component.spec.ts +0 -0
- package/src/lib/components/popover/popover.component.ts +221 -0
- package/src/lib/components/progress-circle/progress-circle-ring.component.scss +22 -0
- package/src/lib/components/progress-circle/progress-circle-ring.component.spec.ts +143 -0
- package/src/lib/components/progress-circle/progress-circle-ring.component.svg +23 -0
- package/src/lib/components/progress-circle/progress-circle-ring.component.ts +42 -0
- package/src/lib/components/progress-circle/progress-circle.component.html +11 -0
- package/src/lib/components/progress-circle/progress-circle.component.scss +28 -0
- package/src/lib/components/progress-circle/progress-circle.component.spec.ts +339 -0
- package/src/lib/components/progress-circle/progress-circle.component.ts +96 -0
- package/src/lib/components/radio/index.ts +2 -0
- package/src/lib/components/radio/radio-group/radio-group.component.html +24 -0
- package/src/lib/components/radio/radio-group/radio-group.component.spec.ts +1328 -0
- package/src/lib/components/radio/radio-group/radio-group.component.ts +272 -0
- package/src/lib/components/radio/radio.component.html +9 -0
- package/src/lib/components/radio/radio.component.integration.spec.ts +93 -0
- package/src/lib/components/radio/radio.component.scss +133 -0
- package/src/lib/components/radio/radio.component.spec.ts +244 -0
- package/src/lib/components/radio/radio.component.ts +50 -0
- package/src/lib/components/range/range.component.html +16 -0
- package/src/lib/components/range/range.component.scss +81 -0
- package/src/lib/components/range/range.component.ts +105 -0
- package/src/lib/components/reorder-list/index.ts +3 -0
- package/src/lib/components/reorder-list/reorder-event.ts +17 -0
- package/src/lib/components/reorder-list/reorder-list.component.html +30 -0
- package/src/lib/components/reorder-list/reorder-list.component.scss +90 -0
- package/src/lib/components/reorder-list/reorder-list.component.spec.ts +123 -0
- package/src/lib/components/reorder-list/reorder-list.component.ts +86 -0
- package/src/lib/components/router-outlet/index.ts +5 -0
- package/src/lib/components/router-outlet/router-outlet.component.html +6 -0
- package/src/lib/components/router-outlet/router-outlet.component.scss +13 -0
- package/src/lib/components/router-outlet/router-outlet.component.spec.ts +28 -0
- package/src/lib/components/router-outlet/router-outlet.component.ts +11 -0
- package/src/lib/components/router-outlet/router-outlet.module.ts +12 -0
- package/src/lib/components/section-header/_section-header.utils.scss +34 -0
- package/src/lib/components/section-header/section-header.component.html +3 -0
- package/src/lib/components/section-header/section-header.component.scss +15 -0
- package/src/lib/components/section-header/section-header.component.spec.ts +59 -0
- package/src/lib/components/section-header/section-header.component.ts +9 -0
- package/src/lib/components/section-header/section-header.integration.spec.ts +67 -0
- package/src/lib/components/segmented-control/segment-item.ts +18 -0
- package/src/lib/components/segmented-control/segmented-control.component.html +39 -0
- package/src/lib/components/segmented-control/segmented-control.component.scss +84 -0
- package/src/lib/components/segmented-control/segmented-control.component.spec.ts +247 -0
- package/src/lib/components/segmented-control/segmented-control.component.ts +96 -0
- package/src/lib/components/shared/component-configuration.ts +6 -0
- package/src/lib/components/shared/component-loader.directive.ts +42 -0
- package/src/lib/components/shared/dynamic-component.ts +3 -0
- package/src/lib/components/shared/index.ts +9 -0
- package/src/lib/components/shared/resize-observer/resize-observer.factory.ts +20 -0
- package/src/lib/components/shared/resize-observer/resize-observer.service.ts +65 -0
- package/src/lib/components/shared/resize-observer/types/resize-observer-callback.ts +7 -0
- package/src/lib/components/shared/resize-observer/types/resize-observer-entry.ts +14 -0
- package/src/lib/components/shared/resize-observer/types/resize-observer.ts +17 -0
- package/src/lib/components/slide-button/slide-button.component.html +14 -0
- package/src/lib/components/slide-button/slide-button.component.scss +81 -0
- package/src/lib/components/slide-button/slide-button.component.shared.scss +12 -0
- package/src/lib/components/slide-button/slide-button.component.spec.ts +75 -0
- package/src/lib/components/slide-button/slide-button.component.ts +81 -0
- package/src/lib/components/slides/slides.component.spec.ts +76 -0
- package/src/lib/components/slides/slides.component.ts +57 -0
- package/src/lib/components/spinner/index.ts +2 -0
- package/src/lib/components/spinner/spinner.component.html +4 -0
- package/src/lib/components/spinner/spinner.component.scss +37 -0
- package/src/lib/components/spinner/spinner.component.ts +13 -0
- package/src/lib/components/spinner/spinner.module.ts +12 -0
- package/src/lib/components/stock-chart-deprecated/index.ts +2 -0
- package/src/lib/components/stock-chart-deprecated/options/stock-chart-deprecated-options.ts +220 -0
- package/src/lib/components/stock-chart-deprecated/stock-chart-deprecated.component.scss +3 -0
- package/src/lib/components/stock-chart-deprecated/stock-chart-deprecated.component.spec.ts +32 -0
- package/src/lib/components/stock-chart-deprecated/stock-chart-deprecated.component.ts +92 -0
- package/src/lib/components/tabs/index.ts +5 -0
- package/src/lib/components/tabs/tab-button/tab-button.component.html +13 -0
- package/src/lib/components/tabs/tab-button/tab-button.component.scss +48 -0
- package/src/lib/components/tabs/tab-button/tab-button.component.spec.ts +24 -0
- package/src/lib/components/tabs/tab-button/tab-button.component.ts +47 -0
- package/src/lib/components/tabs/tab-button/tab-button.events.ts +1 -0
- package/src/lib/components/tabs/tabs.component.html +5 -0
- package/src/lib/components/tabs/tabs.component.scss +52 -0
- package/src/lib/components/tabs/tabs.component.spec.ts +125 -0
- package/src/lib/components/tabs/tabs.component.ts +21 -0
- package/src/lib/components/tabs/tabs.module.ts +16 -0
- package/src/lib/components/tabs/tabs.service.ts +17 -0
- package/src/lib/components/toast/config/toast-config.ts +8 -0
- package/src/lib/components/toast/index.ts +2 -0
- package/src/lib/components/toast/services/toast.controller.ts +18 -0
- package/src/lib/components/toast/services/toast.helper.spec.ts +89 -0
- package/src/lib/components/toast/services/toast.helper.ts +39 -0
- package/src/lib/components/toggle/toggle.component.html +5 -0
- package/src/lib/components/toggle/toggle.component.scss +5 -0
- package/src/lib/components/toggle/toggle.component.spec.ts +62 -0
- package/src/lib/components/toggle/toggle.component.ts +17 -0
- package/src/lib/components/toggle-button/index.ts +2 -0
- package/src/lib/components/toggle-button/toggle-button.component.html +6 -0
- package/src/lib/components/toggle-button/toggle-button.component.spec.ts +23 -0
- package/src/lib/components/toggle-button/toggle-button.component.ts +24 -0
- package/src/lib/components/toggle-button/toggle-button.module.ts +13 -0
- package/src/lib/components/web-component-proxies.component.ts +25 -0
- package/src/lib/custom-elements-initializer.ts +19 -0
- package/src/lib/directives/element-as-button/element-as-button.directive.spec.ts +31 -0
- package/src/lib/directives/element-as-button/element-as-button.directive.ts +26 -0
- package/src/lib/directives/fit-heading/fit-heading.directive.ts +131 -0
- package/src/lib/directives/fit-heading/fit-heading.module.ts +9 -0
- package/src/lib/directives/index.ts +9 -0
- package/src/lib/directives/key-handler/key-handler.directive.ts +20 -0
- package/src/lib/directives/modal-router-link/modal-router-link.directive.ts +24 -0
- package/src/lib/directives/theme-color/theme-color.directive.ts +117 -0
- package/src/lib/helpers/color-helper.styles.ts +193 -0
- package/src/lib/helpers/color-helper.ts +1 -0
- package/src/lib/helpers/deep-copy.ts +13 -0
- package/src/lib/helpers/design-token-helper.styles.ts +78 -0
- package/src/lib/helpers/design-token-helper.ts +6 -0
- package/src/lib/helpers/element-has-ancestor.ts +28 -0
- package/src/lib/helpers/index.ts +8 -0
- package/src/lib/helpers/line-clamp-helper.ts +28 -0
- package/src/lib/helpers/merge-deep.spec.ts +11 -0
- package/src/lib/helpers/merge-deep.ts +41 -0
- package/src/lib/helpers/platform.service.ts +22 -0
- package/src/lib/helpers/string-helper.ts +6 -0
- package/src/lib/helpers/theme-color.type.ts +1 -0
- package/src/lib/helpers/unique-id-generator.helper.spec.ts +58 -0
- package/src/lib/helpers/unique-id-generator.helper.ts +19 -0
- package/src/lib/icons/svg/QR.svg +7 -0
- package/src/lib/icons/svg/accounts-outline.svg +9 -0
- package/src/lib/icons/svg/accounts.svg +9 -0
- package/src/lib/icons/svg/add.svg +7 -0
- package/src/lib/icons/svg/arrow-back.svg +7 -0
- package/src/lib/icons/svg/arrow-down.svg +7 -0
- package/src/lib/icons/svg/arrow-more.svg +7 -0
- package/src/lib/icons/svg/arrow-up.svg +7 -0
- package/src/lib/icons/svg/attach.svg +7 -0
- package/src/lib/icons/svg/backspace.svg +9 -0
- package/src/lib/icons/svg/calendar.svg +7 -0
- package/src/lib/icons/svg/camera.svg +9 -0
- package/src/lib/icons/svg/checkbox-outline.svg +7 -0
- package/src/lib/icons/svg/checkbox.svg +7 -0
- package/src/lib/icons/svg/checkmark-selected.svg +3 -0
- package/src/lib/icons/svg/clock.svg +7 -0
- package/src/lib/icons/svg/close.svg +7 -0
- package/src/lib/icons/svg/cog.svg +7 -0
- package/src/lib/icons/svg/copy.svg +9 -0
- package/src/lib/icons/svg/edit.svg +7 -0
- package/src/lib/icons/svg/filter.svg +7 -0
- package/src/lib/icons/svg/flag.svg +9 -0
- package/src/lib/icons/svg/flash-off.svg +7 -0
- package/src/lib/icons/svg/flash.svg +7 -0
- package/src/lib/icons/svg/foreign-payment.svg +7 -0
- package/src/lib/icons/svg/help.svg +7 -0
- package/src/lib/icons/svg/home.svg +5 -0
- package/src/lib/icons/svg/inbox-outline.svg +9 -0
- package/src/lib/icons/svg/inbox.svg +9 -0
- package/src/lib/icons/svg/information.svg +9 -0
- package/src/lib/icons/svg/investment.svg +5 -0
- package/src/lib/icons/svg/kirby.svg +3 -0
- package/src/lib/icons/svg/link.svg +7 -0
- package/src/lib/icons/svg/log-out.svg +7 -0
- package/src/lib/icons/svg/menu-outline.svg +9 -0
- package/src/lib/icons/svg/menu.svg +9 -0
- package/src/lib/icons/svg/misc.svg +5 -0
- package/src/lib/icons/svg/moneybag.svg +7 -0
- package/src/lib/icons/svg/more.svg +5 -0
- package/src/lib/icons/svg/move.svg +7 -0
- package/src/lib/icons/svg/payment-card.svg +6 -0
- package/src/lib/icons/svg/pension.svg +7 -0
- package/src/lib/icons/svg/person-outline.svg +9 -0
- package/src/lib/icons/svg/person.svg +9 -0
- package/src/lib/icons/svg/remove.svg +6 -0
- package/src/lib/icons/svg/reorder.svg +9 -0
- package/src/lib/icons/svg/search.svg +7 -0
- package/src/lib/icons/svg/share.svg +7 -0
- package/src/lib/icons/svg/sort.svg +7 -0
- package/src/lib/icons/svg/support.svg +9 -0
- package/src/lib/icons/svg/swap.svg +7 -0
- package/src/lib/icons/svg/trash.svg +7 -0
- package/src/lib/icons/svg/unsubscribe.svg +7 -0
- package/src/lib/icons/svg/verify.svg +7 -0
- package/src/lib/icons/svg/warning.svg +7 -0
- package/src/lib/icons/svg/write-message.svg +7 -0
- package/src/lib/index.ts +8 -0
- package/src/lib/kirby.module.spec.ts +20 -0
- package/src/lib/kirby.module.ts +219 -0
- package/src/lib/polyfills/intersection-observer-polyfill-loader.js +14 -0
- package/src/lib/polyfills/intersection-observer-polyfill-loader.min.js +1 -0
- package/src/lib/polyfills/intersection-observer-polyfill.js +2 -0
- package/src/lib/polyfills/intersection-observer-polyfill.min.js +1 -0
- package/src/lib/polyfills/resize-observer-polyfill-loader.js +14 -0
- package/src/lib/polyfills/resize-observer-polyfill-loader.min.js +1 -0
- package/src/lib/polyfills/resize-observer-polyfill.js +2 -0
- package/src/lib/polyfills/resize-observer-polyfill.min.js +1 -0
- package/src/lib/scss/link.spec.ts +47 -0
- package/src/lib/scss/scss-helper.ts +8 -0
- package/src/lib/scss/typography.spec.ts +241 -0
- package/src/lib/testing/element-css-custom-matchers.d.ts +7 -0
- package/src/lib/testing/element-css-custom-matchers.ts +139 -0
- package/src/lib/testing/styles.scss +13 -0
- package/src/lib/testing/test-helper.ts +158 -0
- package/src/lib/types/index.ts +1 -0
- package/src/lib/types/window-ref.ts +10 -0
- package/src/test.ts +34 -0
- package/src/typings.test.d.ts +1 -0
- package/testing-base/ng-package.json +3 -0
- package/testing-base/src/lib/components/index.ts +66 -0
- package/testing-base/src/lib/components/mock.accordion-item.component.ts +21 -0
- package/testing-base/src/lib/components/mock.action-sheet.component.ts +27 -0
- package/testing-base/src/lib/components/mock.app.component.ts +18 -0
- package/testing-base/src/lib/components/mock.avatar.component.ts +38 -0
- package/testing-base/src/lib/components/mock.badge.component.ts +20 -0
- package/testing-base/src/lib/components/mock.button.component.ts +26 -0
- package/testing-base/src/lib/components/mock.calendar.component.ts +36 -0
- package/testing-base/src/lib/components/mock.card-footer.component.ts +18 -0
- package/testing-base/src/lib/components/mock.card-header.component.ts +23 -0
- package/testing-base/src/lib/components/mock.card.component.ts +25 -0
- package/testing-base/src/lib/components/mock.chart-deprecated.component.ts +28 -0
- package/testing-base/src/lib/components/mock.chart.component.ts +36 -0
- package/testing-base/src/lib/components/mock.checkbox.component.ts +26 -0
- package/testing-base/src/lib/components/mock.chip.component.ts +21 -0
- package/testing-base/src/lib/components/mock.divider.component.ts +20 -0
- package/testing-base/src/lib/components/mock.dropdown.component.ts +32 -0
- package/testing-base/src/lib/components/mock.empty-state.component.ts +23 -0
- package/testing-base/src/lib/components/mock.fab-sheet.component.ts +21 -0
- package/testing-base/src/lib/components/mock.flag.component.ts +21 -0
- package/testing-base/src/lib/components/mock.form-field-message.component.ts +21 -0
- package/testing-base/src/lib/components/mock.form-field.component.ts +23 -0
- package/testing-base/src/lib/components/mock.grid.component.ts +21 -0
- package/testing-base/src/lib/components/mock.icon.component.ts +22 -0
- package/testing-base/src/lib/components/mock.input-counter.component.ts +24 -0
- package/testing-base/src/lib/components/mock.input.component.ts +29 -0
- package/testing-base/src/lib/components/mock.item-group.component.ts +18 -0
- package/testing-base/src/lib/components/mock.item-sliding.component.ts +21 -0
- package/testing-base/src/lib/components/mock.item.component.ts +24 -0
- package/testing-base/src/lib/components/mock.label.component.ts +20 -0
- package/testing-base/src/lib/components/mock.list-experimental.component.ts +18 -0
- package/testing-base/src/lib/components/mock.list-header.component.ts +18 -0
- package/testing-base/src/lib/components/mock.list-item.component.ts +33 -0
- package/testing-base/src/lib/components/mock.list-section-header.component.ts +20 -0
- package/testing-base/src/lib/components/mock.list.component.ts +39 -0
- package/testing-base/src/lib/components/mock.loading-overlay.component.ts +21 -0
- package/testing-base/src/lib/components/mock.modal-footer.component.ts +21 -0
- package/testing-base/src/lib/components/mock.page-footer.component.ts +20 -0
- package/testing-base/src/lib/components/mock.page.component.ts +152 -0
- package/testing-base/src/lib/components/mock.popover.component.ts +22 -0
- package/testing-base/src/lib/components/mock.progress-circle.component.ts +22 -0
- package/testing-base/src/lib/components/mock.radio-group.component.ts +27 -0
- package/testing-base/src/lib/components/mock.radio.component.ts +23 -0
- package/testing-base/src/lib/components/mock.range.component.ts +35 -0
- package/testing-base/src/lib/components/mock.reorder-list.component.ts +25 -0
- package/testing-base/src/lib/components/mock.router-outlet.component.ts +20 -0
- package/testing-base/src/lib/components/mock.section-header.component.ts +18 -0
- package/testing-base/src/lib/components/mock.segmented-control.component.ts +29 -0
- package/testing-base/src/lib/components/mock.slide-button.component.ts +23 -0
- package/testing-base/src/lib/components/mock.slides.component.ts +29 -0
- package/testing-base/src/lib/components/mock.spinner.component.ts +18 -0
- package/testing-base/src/lib/components/mock.tab-button.component.ts +21 -0
- package/testing-base/src/lib/components/mock.tabs.component.ts +18 -0
- package/testing-base/src/lib/components/mock.textarea.component.ts +26 -0
- package/testing-base/src/lib/components/mock.toggle-button.component.ts +21 -0
- package/testing-base/src/lib/components/mock.toggle.component.ts +22 -0
- package/testing-base/src/lib/components/mock.web-component-proxies.component.ts +32 -0
- package/testing-base/src/lib/directives/index.ts +3 -0
- package/testing-base/src/lib/directives/mock.accordion.directive.ts +15 -0
- package/testing-base/src/lib/directives/mock.fit-heading.directive.ts +19 -0
- package/testing-base/src/lib/directives/mock.theme-color.directive.ts +19 -0
- package/testing-base/src/lib/index.ts +4 -0
- package/testing-base/src/lib/kirby-testing-base.module.ts +10 -0
- package/testing-base/src/lib/mock-components.ts +133 -0
- package/testing-base/src/lib/mock-directives.ts +9 -0
- package/testing-base/src/public_api.ts +1 -0
- package/testing-base/src/tsconfig.json +9 -0
- package/testing-jasmine/ng-package.json +3 -0
- package/testing-jasmine/src/lib/kirby-testing.module.ts +14 -0
- package/testing-jasmine/src/lib/mock-providers.ts +68 -0
- package/testing-jasmine/src/public_api.ts +1 -0
- package/testing-jasmine/src/tsconfig.json +10 -0
- package/testing-jest/ng-package.json +3 -0
- package/testing-jest/src/lib/kirby-testing.module.ts +14 -0
- package/testing-jest/src/lib/mock-providers.ts +76 -0
- package/testing-jest/src/public_api.ts +1 -0
- package/testing-jest/src/tsconfig.json +10 -0
- package/tsconfig.json +17 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.spec.json +9 -0
- package/tslint.json +10 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Inject, InjectionToken, ModuleWithProviders, NgModule, Optional } from '@angular/core';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { IonicModule } from '@ionic/angular';
|
|
5
|
+
|
|
6
|
+
import { AccordionItemComponent } from './components/accordion/accordion-item.component';
|
|
7
|
+
import { AccordionDirective } from './components/accordion/accordion.directive';
|
|
8
|
+
import { AppModule } from './components/app/app.module';
|
|
9
|
+
import { AvatarComponent } from './components/avatar/avatar.component';
|
|
10
|
+
import { ButtonComponent } from './components/button/button.component';
|
|
11
|
+
import { CalendarComponent } from './components/calendar/calendar.component';
|
|
12
|
+
import { CardFooterComponent } from './components/card/card-footer/card-footer.component';
|
|
13
|
+
import { CardHeaderComponent } from './components/card/card-header/card-header.component';
|
|
14
|
+
import { CardComponent } from './components/card/card.component';
|
|
15
|
+
import { ChartDeprecatedComponent } from './components/chart-deprecated/chart-deprecated.component';
|
|
16
|
+
import { ChartModule } from './components/chart/chart.module';
|
|
17
|
+
import { CheckboxComponent } from './components/checkbox/checkbox.component';
|
|
18
|
+
import { ChipComponent } from './components/chip/chip.component';
|
|
19
|
+
import { DividerComponent } from './components/divider/divider.component';
|
|
20
|
+
import { DropdownComponent } from './components/dropdown/dropdown.component';
|
|
21
|
+
import { EmptyStateComponent } from './components/empty-state/empty-state.component';
|
|
22
|
+
import { FabSheetComponent } from './components/fab-sheet/fab-sheet.component';
|
|
23
|
+
import { FlagComponent } from './components/flag/flag.component';
|
|
24
|
+
import { DateInputDirective } from './components/form-field/directives/date/date-input.directive';
|
|
25
|
+
import { DecimalMaskDirective } from './components/form-field/directives/decimal-mask/decimal-mask.directive';
|
|
26
|
+
import { FormFieldMessageComponent } from './components/form-field/form-field-message/form-field-message.component';
|
|
27
|
+
import { FormFieldComponent } from './components/form-field/form-field.component';
|
|
28
|
+
import { InputCounterComponent } from './components/form-field/input-counter/input-counter.component';
|
|
29
|
+
import { InputComponent } from './components/form-field/input/input.component';
|
|
30
|
+
import { TextareaComponent } from './components/form-field/textarea/textarea.component';
|
|
31
|
+
import { BreakpointHelperService } from './components/grid/breakpoint-helper.service';
|
|
32
|
+
import { GridComponent } from './components/grid/grid.component';
|
|
33
|
+
import { IconModule } from './components/icon/icon.module';
|
|
34
|
+
import { ItemGroupComponent } from './components/item-group/item-group.component';
|
|
35
|
+
import { ItemSlidingComponent } from './components/item-sliding/item-sliding.component';
|
|
36
|
+
import { ItemModule } from './components/item/item.module';
|
|
37
|
+
import { ListModule } from './components/list/list.module';
|
|
38
|
+
import { GroupByPipe } from './components/list/pipes/group-by.pipe';
|
|
39
|
+
import { LoadingOverlayComponent } from './components/loading-overlay/loading-overlay.component';
|
|
40
|
+
import { LoadingOverlayService } from './components/loading-overlay/loading-overlay.service';
|
|
41
|
+
import { ActionSheetComponent } from './components/modal/action-sheet/action-sheet.component';
|
|
42
|
+
import { AlertComponent } from './components/modal/alert/alert.component';
|
|
43
|
+
import { ModalFooterComponent } from './components/modal/footer/modal-footer.component';
|
|
44
|
+
import { ModalCompactWrapperComponent } from './components/modal/modal-wrapper/compact/modal-compact-wrapper.component';
|
|
45
|
+
import { ModalWrapperComponent } from './components/modal/modal-wrapper/modal-wrapper.component';
|
|
46
|
+
import { ActionSheetHelper } from './components/modal/services/action-sheet.helper';
|
|
47
|
+
import { AlertHelper } from './components/modal/services/alert.helper';
|
|
48
|
+
import { ModalController } from './components/modal/services/modal.controller';
|
|
49
|
+
import { ModalHelper } from './components/modal/services/modal.helper';
|
|
50
|
+
import { PageModule } from './components/page/page.module';
|
|
51
|
+
import { PopoverComponent } from './components/popover/popover.component';
|
|
52
|
+
import { ProgressCircleRingComponent } from './components/progress-circle/progress-circle-ring.component';
|
|
53
|
+
import { ProgressCircleComponent } from './components/progress-circle/progress-circle.component';
|
|
54
|
+
import { RadioGroupComponent } from './components/radio/radio-group/radio-group.component';
|
|
55
|
+
import { RadioComponent } from './components/radio/radio.component';
|
|
56
|
+
import { RangeComponent } from './components/range/range.component';
|
|
57
|
+
import { ReorderListComponent } from './components/reorder-list/reorder-list.component';
|
|
58
|
+
import { RouterOutletModule } from './components/router-outlet/router-outlet.module';
|
|
59
|
+
import { SectionHeaderComponent } from './components/section-header/section-header.component';
|
|
60
|
+
import { SegmentedControlComponent } from './components/segmented-control/segmented-control.component';
|
|
61
|
+
import { ComponentLoaderDirective } from './components/shared/component-loader.directive';
|
|
62
|
+
import { ResizeObserverFactory } from './components/shared/resize-observer/resize-observer.factory';
|
|
63
|
+
import { ResizeObserverService } from './components/shared/resize-observer/resize-observer.service';
|
|
64
|
+
import { SlideButtonComponent } from './components/slide-button/slide-button.component';
|
|
65
|
+
import { SlideDirective, SlidesComponent } from './components/slides/slides.component';
|
|
66
|
+
import { SpinnerModule } from './components/spinner/spinner.module';
|
|
67
|
+
import { StockChartDeprecatedComponent } from './components/stock-chart-deprecated/stock-chart-deprecated.component';
|
|
68
|
+
import { TabsModule } from './components/tabs/tabs.module';
|
|
69
|
+
import { ToastController } from './components/toast/services/toast.controller';
|
|
70
|
+
import { ToastHelper } from './components/toast/services/toast.helper';
|
|
71
|
+
import { ToggleButtonModule } from './components/toggle-button/toggle-button.module';
|
|
72
|
+
import { ToggleComponent } from './components/toggle/toggle.component';
|
|
73
|
+
import { KirbyBadge as BadgeComponent } from './components/web-component-proxies.component';
|
|
74
|
+
import { customElementsInitializer } from './custom-elements-initializer';
|
|
75
|
+
import { ElementAsButtonDirective } from './directives/element-as-button/element-as-button.directive';
|
|
76
|
+
import { KeyHandlerDirective } from './directives/key-handler/key-handler.directive';
|
|
77
|
+
import { ModalRouterLinkDirective } from './directives/modal-router-link/modal-router-link.directive';
|
|
78
|
+
import { ThemeColorDirective } from './directives/theme-color/theme-color.directive';
|
|
79
|
+
|
|
80
|
+
const exportedDeclarations = [
|
|
81
|
+
CardComponent,
|
|
82
|
+
CardHeaderComponent,
|
|
83
|
+
CardFooterComponent,
|
|
84
|
+
ButtonComponent,
|
|
85
|
+
ChartDeprecatedComponent,
|
|
86
|
+
StockChartDeprecatedComponent,
|
|
87
|
+
GridComponent,
|
|
88
|
+
ComponentLoaderDirective,
|
|
89
|
+
AvatarComponent,
|
|
90
|
+
GroupByPipe,
|
|
91
|
+
CalendarComponent,
|
|
92
|
+
CheckboxComponent,
|
|
93
|
+
ActionSheetComponent,
|
|
94
|
+
ModalFooterComponent,
|
|
95
|
+
ModalRouterLinkDirective,
|
|
96
|
+
SegmentedControlComponent,
|
|
97
|
+
ChipComponent,
|
|
98
|
+
BadgeComponent,
|
|
99
|
+
ThemeColorDirective,
|
|
100
|
+
DateInputDirective,
|
|
101
|
+
DecimalMaskDirective,
|
|
102
|
+
SlideButtonComponent,
|
|
103
|
+
ToggleComponent,
|
|
104
|
+
EmptyStateComponent,
|
|
105
|
+
FormFieldComponent,
|
|
106
|
+
InputComponent,
|
|
107
|
+
InputCounterComponent,
|
|
108
|
+
TextareaComponent,
|
|
109
|
+
FabSheetComponent,
|
|
110
|
+
DividerComponent,
|
|
111
|
+
ReorderListComponent,
|
|
112
|
+
DropdownComponent,
|
|
113
|
+
LoadingOverlayComponent,
|
|
114
|
+
ProgressCircleComponent,
|
|
115
|
+
FlagComponent,
|
|
116
|
+
SlidesComponent,
|
|
117
|
+
SlideDirective,
|
|
118
|
+
AccordionDirective,
|
|
119
|
+
AccordionItemComponent,
|
|
120
|
+
ItemSlidingComponent,
|
|
121
|
+
RadioComponent,
|
|
122
|
+
RadioGroupComponent,
|
|
123
|
+
RangeComponent,
|
|
124
|
+
ElementAsButtonDirective,
|
|
125
|
+
ItemGroupComponent,
|
|
126
|
+
SectionHeaderComponent,
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
const declarations = [
|
|
130
|
+
...exportedDeclarations,
|
|
131
|
+
KeyHandlerDirective,
|
|
132
|
+
FormFieldMessageComponent,
|
|
133
|
+
AlertComponent,
|
|
134
|
+
ModalWrapperComponent,
|
|
135
|
+
ModalCompactWrapperComponent,
|
|
136
|
+
ProgressCircleRingComponent,
|
|
137
|
+
PopoverComponent,
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
const exportedModules = [
|
|
141
|
+
AppModule,
|
|
142
|
+
RouterOutletModule,
|
|
143
|
+
PageModule,
|
|
144
|
+
TabsModule,
|
|
145
|
+
IconModule,
|
|
146
|
+
ItemModule,
|
|
147
|
+
ToggleButtonModule,
|
|
148
|
+
ListModule,
|
|
149
|
+
ChartModule,
|
|
150
|
+
SpinnerModule,
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
const exports = [...exportedModules, ...exportedDeclarations];
|
|
154
|
+
|
|
155
|
+
const importedModules = [...exportedModules];
|
|
156
|
+
|
|
157
|
+
const providers = [
|
|
158
|
+
ModalController,
|
|
159
|
+
ActionSheetHelper,
|
|
160
|
+
ModalHelper,
|
|
161
|
+
AlertHelper,
|
|
162
|
+
ToastHelper,
|
|
163
|
+
ToastController,
|
|
164
|
+
BreakpointHelperService,
|
|
165
|
+
LoadingOverlayService,
|
|
166
|
+
ResizeObserverFactory,
|
|
167
|
+
ResizeObserverService,
|
|
168
|
+
customElementsInitializer(),
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
const entryComponents = [
|
|
172
|
+
ModalWrapperComponent,
|
|
173
|
+
ModalCompactWrapperComponent,
|
|
174
|
+
ActionSheetComponent,
|
|
175
|
+
AlertComponent,
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
const ConfigToken = new InjectionToken<any>('USERCONFIG');
|
|
179
|
+
export interface KirbyConfig {
|
|
180
|
+
moduleRootRoutePath?: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@NgModule({
|
|
184
|
+
imports: [
|
|
185
|
+
CommonModule,
|
|
186
|
+
RouterModule,
|
|
187
|
+
IonicModule.forRoot({
|
|
188
|
+
mode: 'ios',
|
|
189
|
+
inputShims: true,
|
|
190
|
+
scrollAssist: true,
|
|
191
|
+
scrollPadding: false,
|
|
192
|
+
}),
|
|
193
|
+
...importedModules,
|
|
194
|
+
],
|
|
195
|
+
declarations: declarations,
|
|
196
|
+
providers: providers,
|
|
197
|
+
entryComponents: entryComponents,
|
|
198
|
+
exports: exports,
|
|
199
|
+
})
|
|
200
|
+
export class KirbyModule {
|
|
201
|
+
static forChild(config?: KirbyConfig): ModuleWithProviders<KirbyModule> {
|
|
202
|
+
return {
|
|
203
|
+
ngModule: KirbyModule,
|
|
204
|
+
providers: [
|
|
205
|
+
{
|
|
206
|
+
provide: ConfigToken,
|
|
207
|
+
useValue: config,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
constructor(
|
|
214
|
+
modalController: ModalController,
|
|
215
|
+
@Optional() @Inject(ConfigToken) config?: KirbyConfig
|
|
216
|
+
) {
|
|
217
|
+
modalController.initialize(config && config.moduleRootRoutePath);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
// A technique for loading polyfills only when needed. Details here:
|
|
3
|
+
// https://philipwalton.com/articles/loading-polyfills-only-when-needed/
|
|
4
|
+
if (polyfillNeeded()) {
|
|
5
|
+
// Browsers that doesn't support IntersectionObserver must load the polyfills first:
|
|
6
|
+
var script = document.createElement('script');
|
|
7
|
+
script.src = 'kirby/polyfills/intersection-observer-polyfill.min.js';
|
|
8
|
+
document.head.appendChild(script);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function polyfillNeeded() {
|
|
12
|
+
return typeof IntersectionObserver === 'undefined';
|
|
13
|
+
}
|
|
14
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}({6:function(e,t){!function(){if("undefined"==typeof IntersectionObserver){var e=document.createElement("script");e.src="kirby/polyfills/intersection-observer-polyfill.min.js",document.head.appendChild(e)}}()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}({1:function(t,e){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=window.document,e=[];o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},o.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},o.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(i(window,"resize",this._checkForIntersections,!0),i(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,r(window,"resize",this._checkForIntersections,!0),r(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(o){var i=o.element,r=s(i),c=this._rootContainsTarget(i),h=o.entry,u=t&&c&&this._computeTargetAndRootIntersection(i,e),a=o.entry=new n({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:r,rootBounds:e,intersectionRect:u});h?t&&c?this._hasCrossedThreshold(h,a)&&this._queuedEntries.push(a):h&&h.isIntersecting&&this._queuedEntries.push(a):this._queuedEntries.push(a)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(e,n){if("none"!=window.getComputedStyle(e).display){for(var o,i,r,c,u,a,l,d,p=s(e),f=h(e),g=!1;!g;){var v=null,_=1==f.nodeType?window.getComputedStyle(f):{};if("none"==_.display)return;if(f==this.root||f==t?(g=!0,v=n):f!=t.body&&f!=t.documentElement&&"visible"!=_.overflow&&(v=s(f)),v&&(o=v,i=p,r=void 0,c=void 0,u=void 0,a=void 0,l=void 0,d=void 0,r=Math.max(o.top,i.top),c=Math.min(o.bottom,i.bottom),u=Math.max(o.left,i.left),a=Math.min(o.right,i.right),d=c-r,!(p=(l=a-u)>=0&&d>=0&&{top:r,bottom:c,left:u,right:a,width:l,height:d})))break;f=h(f)}return p}},o.prototype._getRootRect=function(){var e;if(this.root)e=s(this.root);else{var n=t.documentElement,o=t.body;e={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==n||r==o||r<n!=r<o)return!0}},o.prototype._rootIsInDom=function(){return!this.root||c(t,this.root)},o.prototype._rootContainsTarget=function(e){return c(this.root||t,e)},o.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},o.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=n}function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function o(t,e){var n,o,i,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" ")}function i(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function r(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function s(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(t,e){for(var n=e;n;){if(n==t)return!0;n=h(n)}return!1}function h(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}}()},5:function(t,e,n){"use strict";n.r(e);var o=n(1),i=n.n(o);window.IntersectionObserver=i.a}});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
// A technique for loading polyfills only when needed. Details here:
|
|
3
|
+
// https://philipwalton.com/articles/loading-polyfills-only-when-needed/
|
|
4
|
+
if (polyfillNeeded()) {
|
|
5
|
+
// Browsers that doesn't support ResizeObserver must load the polyfill first:
|
|
6
|
+
var script = document.createElement('script');
|
|
7
|
+
script.src = 'kirby/polyfills/resize-observer-polyfill.min.js';
|
|
8
|
+
document.head.appendChild(script);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function polyfillNeeded() {
|
|
12
|
+
return typeof ResizeObserver === 'undefined';
|
|
13
|
+
}
|
|
14
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=4)}({4:function(e,r){!function(){if("undefined"==typeof ResizeObserver){var e=document.createElement("script");e.src="kirby/polyfills/resize-observer-polyfill.min.js",document.head.appendChild(e)}}()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,a=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function s(){n&&(n=!1,t()),r&&a()}function c(){o(s)}function a(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(c,e);i=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),u=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=b(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function l(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=h(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,s=i.top+i.bottom,c=d(r.width),a=d(r.height);if("border-box"===r.boxSizing&&(Math.round(c+o)!==e&&(c-=p(r,"left","right")+o),Math.round(a+s)!==n&&(a-=p(r,"top","bottom")+s)),!function(t){return t===h(t).document.documentElement}(t)){var u=Math.round(c+o)-e,l=Math.round(a+s)-n;1!==Math.abs(u)&&(c-=u),1!==Math.abs(l)&&(a-=l)}return b(i.left,i.top,c,a)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof h(t).SVGGraphicsElement}:function(t){return t instanceof h(t).SVGElement&&"function"==typeof t.getBBox};function _(t){return r?v(t)?function(t){var e=t.getBBox();return b(0,0,e.width,e.height)}(t):l(t):f}function b(t,e,n,r){return{x:t,y:e,width:n,height:r}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=_(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),m=function(t,e){var n,r,i,o,s,c,a,h=(r=(n=e).x,i=n.y,o=n.width,s=n.height,c="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(c.prototype),u(a,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),a);u(this,{target:t,contentRect:h})},w=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new m(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),g="undefined"!=typeof WeakMap?new WeakMap:new n,O=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=a.getInstance(),r=new w(e,n,this);g.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){O.prototype[t]=function(){var e;return(e=g.get(this))[t].apply(e,arguments)}}));var E=void 0!==i.ResizeObserver?i.ResizeObserver:O;e.a=E}).call(this,n(3))},,function(t,e,n){"use strict";n.r(e);var r=n(0);window.ResizeObserver=r.a},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n}]);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DesignTokenHelper } from '@kirbydesign/core';
|
|
2
|
+
|
|
3
|
+
const { getColor } = DesignTokenHelper;
|
|
4
|
+
|
|
5
|
+
describe('Anchor tag', () => {
|
|
6
|
+
let element: HTMLElement;
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
document.body.removeChild(element);
|
|
10
|
+
});
|
|
11
|
+
describe(`by default`, () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
const fixture = `<a href="/test/" id="fixture">Text</a>`;
|
|
14
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
15
|
+
document.body.style.color = getColor('black').value;
|
|
16
|
+
element = document.body.querySelector('#fixture');
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it(`should inherit its color`, () => {
|
|
20
|
+
expect(element).toHaveComputedStyle({ color: getColor('black') });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it(`should be styled with an underline`, () => {
|
|
24
|
+
expect(element).toHaveComputedStyle({ 'text-decoration-line': 'underline' });
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it(`should be styled with a pointer as the cursor`, () => {
|
|
28
|
+
expect(element).toHaveComputedStyle({ cursor: 'pointer' });
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe(`with class for link-icon applied`, () => {
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
const fixture = `<a href="/test/" class="kirby-external-icon" id="fixture">Text</a>`;
|
|
35
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
36
|
+
element = document.body.querySelector('#fixture');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it(`should have a link icon`, () => {
|
|
40
|
+
const baseURI = window.document.baseURI;
|
|
41
|
+
|
|
42
|
+
expect(element).toHaveComputedStyle({
|
|
43
|
+
'background-image': `url("${baseURI}assets/kirby/icons/svg/link.svg")`,
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
describe('Typography', () => {
|
|
2
|
+
let element: HTMLElement;
|
|
3
|
+
|
|
4
|
+
afterEach(() => {
|
|
5
|
+
document.body.removeChild(element);
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
describe('default paragraph', () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
const fixture = `<p id="fixture">Text</p>`;
|
|
11
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
12
|
+
element = document.body.querySelector('#fixture');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it(`should be rendered with font-size: 16px`, () => {
|
|
16
|
+
expect(element).toHaveComputedStyle({ 'font-size': '16px' });
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it(`should be rendered with font-weight: 400`, () => {
|
|
20
|
+
expect(element).toHaveComputedStyle({ 'font-weight': '400' });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it(`should be rendered with line-height: 24px`, () => {
|
|
24
|
+
expect(element).toHaveComputedStyle({ 'line-height': '24px' });
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it(`should be rendered with correct margin`, () => {
|
|
28
|
+
expect(element).toHaveComputedStyle({
|
|
29
|
+
'margin-top': '0px',
|
|
30
|
+
'margin-right': '0px',
|
|
31
|
+
'margin-left': '0px',
|
|
32
|
+
'margin-bottom': '16px',
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe('display font', () => {
|
|
38
|
+
const displayFonts = {
|
|
39
|
+
'display 1': {
|
|
40
|
+
cssClass: 'kirby-text-display-1',
|
|
41
|
+
fontSize: '72px',
|
|
42
|
+
fontWeight: '900',
|
|
43
|
+
lineHeight: 'normal',
|
|
44
|
+
},
|
|
45
|
+
'display 2': {
|
|
46
|
+
cssClass: 'kirby-text-display-2',
|
|
47
|
+
fontSize: '56px',
|
|
48
|
+
fontWeight: '900',
|
|
49
|
+
lineHeight: 'normal',
|
|
50
|
+
},
|
|
51
|
+
'display 3': {
|
|
52
|
+
cssClass: 'kirby-text-display-3',
|
|
53
|
+
fontSize: '40px',
|
|
54
|
+
fontWeight: '900',
|
|
55
|
+
lineHeight: 'normal',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
for (const displayFontName in displayFonts) {
|
|
60
|
+
const displayFont = displayFonts[displayFontName];
|
|
61
|
+
describe(`${displayFontName} set by applying class '${displayFont.cssClass}' to parapgraph`, () => {
|
|
62
|
+
beforeEach(() => {
|
|
63
|
+
const fixture = `<p class="${displayFont.cssClass}" id="fixture">Text</p>`;
|
|
64
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
65
|
+
element = document.body.querySelector('#fixture');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it(`should be rendered with font-size: ${displayFont.fontSize}`, () => {
|
|
69
|
+
expect(element).toHaveComputedStyle({ 'font-size': displayFont.fontSize });
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it(`should be rendered with font-weight: ${displayFont.fontWeight}`, () => {
|
|
73
|
+
expect(element).toHaveComputedStyle({ 'font-weight': displayFont.fontWeight });
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it(`should be rendered with line-height: ${displayFont.lineHeight}`, () => {
|
|
77
|
+
expect(element).toHaveComputedStyle({ 'line-height': displayFont.lineHeight });
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it(`should be rendered with correct margin`, () => {
|
|
81
|
+
expect(element).toHaveComputedStyle({
|
|
82
|
+
'margin-top': '0px',
|
|
83
|
+
'margin-right': '0px',
|
|
84
|
+
'margin-left': '0px',
|
|
85
|
+
'margin-bottom': '16px',
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
describe('heading', () => {
|
|
93
|
+
const headings = {
|
|
94
|
+
'heading 1': {
|
|
95
|
+
tag: 'h1',
|
|
96
|
+
cssClasses: ['h1', 'kirby-text-xlarge'],
|
|
97
|
+
fontSize: '32px',
|
|
98
|
+
fontWeight: '900',
|
|
99
|
+
lineHeight: '38px',
|
|
100
|
+
},
|
|
101
|
+
'heading 2': {
|
|
102
|
+
tag: 'h2',
|
|
103
|
+
cssClasses: ['h2', 'kirby-text-large'],
|
|
104
|
+
fontSize: '22px',
|
|
105
|
+
fontWeight: '700',
|
|
106
|
+
lineHeight: '28px',
|
|
107
|
+
},
|
|
108
|
+
'heading 3': {
|
|
109
|
+
tag: 'h3',
|
|
110
|
+
cssClasses: ['h3', 'kirby-text-medium'],
|
|
111
|
+
fontSize: '18px',
|
|
112
|
+
fontWeight: '700',
|
|
113
|
+
lineHeight: '24px',
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
for (const headingName in headings) {
|
|
118
|
+
const heading = headings[headingName];
|
|
119
|
+
describe(`${headingName} set by tag '<${heading.tag}>'`, () => {
|
|
120
|
+
beforeEach(() => {
|
|
121
|
+
const fixture = `<${heading.tag} id="fixture">Text</${heading.tag}>`;
|
|
122
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
123
|
+
element = document.body.querySelector('#fixture');
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it(`should be rendered with font-size: ${heading.fontSize}`, () => {
|
|
127
|
+
expect(element).toHaveComputedStyle({ 'font-size': heading.fontSize });
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it(`should be rendered with font-weight: ${heading.fontWeight}`, () => {
|
|
131
|
+
expect(element).toHaveComputedStyle({ 'font-weight': heading.fontWeight });
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it(`should be rendered with line-height: ${heading.lineHeight}`, () => {
|
|
135
|
+
expect(element).toHaveComputedStyle({ 'line-height': heading.lineHeight });
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it(`should be rendered with correct margin`, () => {
|
|
139
|
+
expect(element).toHaveComputedStyle({
|
|
140
|
+
'margin-top': '0px',
|
|
141
|
+
'margin-right': '0px',
|
|
142
|
+
'margin-left': '0px',
|
|
143
|
+
'margin-bottom': '16px',
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
for (const cssClass of heading.cssClasses) {
|
|
149
|
+
describe(`${headingName} set by applying class '${cssClass}' to parapgraph`, () => {
|
|
150
|
+
beforeEach(() => {
|
|
151
|
+
const fixture = `<p class="${cssClass}" id="fixture">Text</p>`;
|
|
152
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
153
|
+
element = document.body.querySelector('#fixture');
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it(`should be rendered with font-size: ${heading.fontSize}`, () => {
|
|
157
|
+
expect(element).toHaveComputedStyle({ 'font-size': heading.fontSize });
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it(`should be rendered with font-weight: ${heading.fontWeight}`, () => {
|
|
161
|
+
expect(element).toHaveComputedStyle({ 'font-weight': heading.fontWeight });
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it(`should be rendered with line-height: ${heading.lineHeight}`, () => {
|
|
165
|
+
expect(element).toHaveComputedStyle({ 'line-height': heading.lineHeight });
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it(`should be rendered with correct margin`, () => {
|
|
169
|
+
expect(element).toHaveComputedStyle({
|
|
170
|
+
'margin-top': '0px',
|
|
171
|
+
'margin-right': '0px',
|
|
172
|
+
'margin-left': '0px',
|
|
173
|
+
'margin-bottom': '16px',
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
describe('text', () => {
|
|
182
|
+
const texts = {
|
|
183
|
+
'small text': {
|
|
184
|
+
cssClass: 'kirby-text-small',
|
|
185
|
+
fontSize: '14px',
|
|
186
|
+
fontWeight: '400',
|
|
187
|
+
lineHeight: '20px',
|
|
188
|
+
},
|
|
189
|
+
'small text light': {
|
|
190
|
+
cssClass: 'kirby-text-small-light',
|
|
191
|
+
fontSize: '14px',
|
|
192
|
+
fontWeight: '300',
|
|
193
|
+
lineHeight: '20px',
|
|
194
|
+
},
|
|
195
|
+
'x-small text': {
|
|
196
|
+
cssClass: 'kirby-text-xsmall',
|
|
197
|
+
fontSize: '12px',
|
|
198
|
+
fontWeight: '400',
|
|
199
|
+
lineHeight: '16px',
|
|
200
|
+
},
|
|
201
|
+
'xx-small text': {
|
|
202
|
+
cssClass: 'kirby-text-xxsmall',
|
|
203
|
+
fontSize: '10px',
|
|
204
|
+
fontWeight: '400',
|
|
205
|
+
lineHeight: '11px',
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
for (const textName in texts) {
|
|
210
|
+
const text = texts[textName];
|
|
211
|
+
describe(`${textName} set by applying class '${text.cssClass}' to parapgraph`, () => {
|
|
212
|
+
beforeEach(() => {
|
|
213
|
+
const fixture = `<p class="${text.cssClass}" id="fixture">Text</p>`;
|
|
214
|
+
document.body.insertAdjacentHTML('afterbegin', fixture);
|
|
215
|
+
element = document.body.querySelector('#fixture');
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it(`should be rendered with font-size: ${text.fontSize}`, () => {
|
|
219
|
+
expect(element).toHaveComputedStyle({ 'font-size': text.fontSize });
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
it(`should be rendered with font-weight: ${text.fontWeight}`, () => {
|
|
223
|
+
expect(element).toHaveComputedStyle({ 'font-weight': text.fontWeight });
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it(`should be rendered with line-height: ${text.lineHeight}`, () => {
|
|
227
|
+
expect(element).toHaveComputedStyle({ 'line-height': text.lineHeight });
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
it(`should be rendered with correct margin`, () => {
|
|
231
|
+
expect(element).toHaveComputedStyle({
|
|
232
|
+
'margin-top': '0px',
|
|
233
|
+
'margin-right': '0px',
|
|
234
|
+
'margin-left': '0px',
|
|
235
|
+
'margin-bottom': '16px',
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
});
|