design-angular-kit 1.2.1 → 1.2.2
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 +461 -0
- package/esm2022/design-angular-kit.mjs +5 -0
- package/esm2022/lib/abstracts/abstract-form.component.mjs +186 -0
- package/esm2022/lib/abstracts/abstract.component.mjs +46 -0
- package/esm2022/lib/components/core/accordion/accordion.component.mjs +39 -0
- package/esm2022/lib/components/core/alert/alert.component.mjs +71 -0
- package/esm2022/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.mjs +43 -0
- package/esm2022/lib/components/core/avatar/avatar-group/avatar-group.component.mjs +40 -0
- package/esm2022/lib/components/core/avatar/avatar.directive.mjs +78 -0
- package/esm2022/lib/components/core/avatar/avatar.module.mjs +33 -0
- package/esm2022/lib/components/core/badge/badge.directive.mjs +39 -0
- package/esm2022/lib/components/core/button/button.directive.mjs +80 -0
- package/esm2022/lib/components/core/callout/callout.component.mjs +64 -0
- package/esm2022/lib/components/core/card/card.component.mjs +59 -0
- package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +84 -0
- package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +19 -0
- package/esm2022/lib/components/core/carousel/carousel.module.mjs +18 -0
- package/esm2022/lib/components/core/chip/chip.component.mjs +136 -0
- package/esm2022/lib/components/core/collapse/collapse.component.mjs +116 -0
- package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +27 -0
- package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +11 -0
- package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +55 -0
- package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +19 -0
- package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +147 -0
- package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +70 -0
- package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +18 -0
- package/esm2022/lib/components/core/forward/forward.directive.mjs +57 -0
- package/esm2022/lib/components/core/link/link.component.mjs +42 -0
- package/esm2022/lib/components/core/list/list/list.component.mjs +22 -0
- package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +56 -0
- package/esm2022/lib/components/core/list/list.module.mjs +18 -0
- package/esm2022/lib/components/core/modal/modal.component.mjs +194 -0
- package/esm2022/lib/components/core/notifications/notifications.component.mjs +111 -0
- package/esm2022/lib/components/core/pagination/pagination.component.mjs +130 -0
- package/esm2022/lib/components/core/popover/popover.directive.mjs +176 -0
- package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +34 -0
- package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +25 -0
- package/esm2022/lib/components/core/spinner/spinner.component.mjs +30 -0
- package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +116 -0
- package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +22 -0
- package/esm2022/lib/components/core/steppers/steppers.module.mjs +18 -0
- package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +97 -0
- package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +39 -0
- package/esm2022/lib/components/core/tab/tab.module.mjs +18 -0
- package/esm2022/lib/components/core/table/sort/sort-header/sort-header.component.mjs +134 -0
- package/esm2022/lib/components/core/table/sort/sort.directive.mjs +123 -0
- package/esm2022/lib/components/core/table/table.component.mjs +45 -0
- package/esm2022/lib/components/core/table/table.module.mjs +19 -0
- package/esm2022/lib/components/core/timeline/timeline-item/timeline-item.component.mjs +90 -0
- package/esm2022/lib/components/core/timeline/timeline.component.mjs +36 -0
- package/esm2022/lib/components/core/timeline/timeline.module.mjs +18 -0
- package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +143 -0
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +112 -0
- package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +48 -0
- package/esm2022/lib/components/form/form.module.mjs +63 -0
- package/esm2022/lib/components/form/input/input.component.mjs +190 -0
- package/esm2022/lib/components/form/password-input/password-input.component.mjs +149 -0
- package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +60 -0
- package/esm2022/lib/components/form/range/range.component.mjs +64 -0
- package/esm2022/lib/components/form/rating/rating.component.mjs +50 -0
- package/esm2022/lib/components/form/select/select.component.mjs +70 -0
- package/esm2022/lib/components/form/textarea/textarea.component.mjs +55 -0
- package/esm2022/lib/components/form/transfer/store/transfer.reducers.mjs +191 -0
- package/esm2022/lib/components/form/transfer/store/transfer.state.mjs +2 -0
- package/esm2022/lib/components/form/transfer/store/transfer.store.mjs +70 -0
- package/esm2022/lib/components/form/transfer/transfer-list/transfer-list.component.mjs +72 -0
- package/esm2022/lib/components/form/transfer/transfer.component.mjs +149 -0
- package/esm2022/lib/components/form/transfer/transfer.model.mjs +6 -0
- package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +142 -0
- package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +107 -0
- package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +67 -0
- package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +68 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +51 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +21 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +18 -0
- package/esm2022/lib/components/navigation/header/header.component.mjs +103 -0
- package/esm2022/lib/components/navigation/megamenu/megamenu.component.mjs +27 -0
- package/esm2022/lib/components/navigation/navbar/navbar/navbar.component.mjs +49 -0
- package/esm2022/lib/components/navigation/navbar/navbar-item/navbar-item.component.mjs +11 -0
- package/esm2022/lib/components/navigation/navbar/navbar.module.mjs +18 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +98 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll-list-items.component.mjs +44 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.component.mjs +116 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.model.mjs +2 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.store.mjs +68 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.utils.mjs +23 -0
- package/esm2022/lib/components/navigation/sidebar/sidebar.component.mjs +50 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink/skiplink.component.mjs +27 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.mjs +26 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink.module.mjs +18 -0
- package/esm2022/lib/components/utils/error-page/error-page.component.mjs +74 -0
- package/esm2022/lib/components/utils/icon/icon.component.mjs +63 -0
- package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +50 -0
- package/esm2022/lib/design-angular-kit.module.mjs +233 -0
- package/esm2022/lib/enums/colors.enums.mjs +12 -0
- package/esm2022/lib/enums/sizes.enum.mjs +9 -0
- package/esm2022/lib/interfaces/core.mjs +16 -0
- package/esm2022/lib/interfaces/design-angular-kit-config.mjs +7 -0
- package/esm2022/lib/interfaces/form.mjs +2 -0
- package/esm2022/lib/interfaces/icon.mjs +168 -0
- package/esm2022/lib/interfaces/sortable-table.mjs +6 -0
- package/esm2022/lib/interfaces/utils.mjs +2 -0
- package/esm2022/lib/pipes/date-ago.pipe.mjs +56 -0
- package/esm2022/lib/pipes/duration.pipe.mjs +115 -0
- package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +48 -0
- package/esm2022/lib/provide-design-angular-kit.mjs +64 -0
- package/esm2022/lib/services/notification/notification.service.mjs +120 -0
- package/esm2022/lib/utils/coercion.mjs +18 -0
- package/esm2022/lib/utils/date-utils.mjs +162 -0
- package/esm2022/lib/utils/file-utils.mjs +73 -0
- package/esm2022/lib/utils/regex.mjs +35 -0
- package/esm2022/lib/validators/it-validators.mjs +156 -0
- package/esm2022/public_api.mjs +110 -0
- package/fesm2022/design-angular-kit.mjs +6731 -0
- package/fesm2022/design-angular-kit.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/abstracts/abstract-form.component.d.ts +87 -0
- package/lib/abstracts/abstract.component.d.ts +30 -0
- package/lib/components/core/accordion/accordion.component.d.ts +18 -0
- package/lib/components/core/alert/alert.component.d.ts +44 -0
- package/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.d.ts +29 -0
- package/lib/components/core/avatar/avatar-group/avatar-group.component.d.ts +15 -0
- package/lib/components/core/avatar/avatar.directive.d.ts +33 -0
- package/lib/components/core/avatar/avatar.module.d.ts +9 -0
- package/lib/components/core/badge/badge.directive.d.ts +23 -0
- package/lib/components/core/button/button.directive.d.ts +48 -0
- package/lib/components/core/callout/callout.component.d.ts +50 -0
- package/lib/components/core/card/card.component.d.ts +69 -0
- package/lib/components/core/carousel/carousel/carousel.component.d.ts +65 -0
- package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +15 -0
- package/lib/components/core/carousel/carousel.module.d.ts +8 -0
- package/lib/components/core/chip/chip.component.d.ts +76 -0
- package/lib/components/core/collapse/collapse.component.d.ts +67 -0
- package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +12 -0
- package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +5 -0
- package/lib/components/core/dimmer/dimmer.component.d.ts +24 -0
- package/lib/components/core/dimmer/dimmer.module.d.ts +9 -0
- package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +94 -0
- package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +46 -0
- package/lib/components/core/dropdown/dropdown.module.d.ts +8 -0
- package/lib/components/core/forward/forward.directive.d.ts +14 -0
- package/lib/components/core/link/link.component.d.ts +35 -0
- package/lib/components/core/list/list/list.component.d.ts +24 -0
- package/lib/components/core/list/list-item/list-item.component.d.ts +41 -0
- package/lib/components/core/list/list.module.d.ts +8 -0
- package/lib/components/core/modal/modal.component.d.ts +135 -0
- package/lib/components/core/notifications/notifications.component.d.ts +45 -0
- package/lib/components/core/pagination/pagination.component.d.ts +92 -0
- package/lib/components/core/popover/popover.directive.d.ts +99 -0
- package/lib/components/core/progress-bar/progress-bar.component.d.ts +31 -0
- package/lib/components/core/progress-button/progress-button.component.d.ts +21 -0
- package/lib/components/core/spinner/spinner.component.d.ts +24 -0
- package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +130 -0
- package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +24 -0
- package/lib/components/core/steppers/steppers.module.d.ts +8 -0
- package/lib/components/core/tab/tab-container/tab-container.component.d.ts +60 -0
- package/lib/components/core/tab/tab-item/tab-item.component.d.ts +38 -0
- package/lib/components/core/tab/tab.module.d.ts +8 -0
- package/lib/components/core/table/sort/sort-header/sort-header.component.d.ts +72 -0
- package/lib/components/core/table/sort/sort.directive.d.ts +53 -0
- package/lib/components/core/table/table.component.d.ts +60 -0
- package/lib/components/core/table/table.module.d.ts +9 -0
- package/lib/components/core/timeline/timeline-item/timeline-item.component.d.ts +79 -0
- package/lib/components/core/timeline/timeline.component.d.ts +21 -0
- package/lib/components/core/timeline/timeline.module.d.ts +8 -0
- package/lib/components/core/tooltip/tooltip.directive.d.ts +82 -0
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +59 -0
- package/lib/components/form/checkbox/checkbox.component.d.ts +41 -0
- package/lib/components/form/form.module.d.ts +18 -0
- package/lib/components/form/input/input.component.d.ts +95 -0
- package/lib/components/form/password-input/password-input.component.d.ts +80 -0
- package/lib/components/form/radio-button/radio-button.component.d.ts +38 -0
- package/lib/components/form/range/range.component.d.ts +42 -0
- package/lib/components/form/rating/rating.component.d.ts +24 -0
- package/lib/components/form/select/select.component.d.ts +36 -0
- package/lib/components/form/textarea/textarea.component.d.ts +34 -0
- package/lib/components/form/transfer/store/transfer.reducers.d.ts +103 -0
- package/lib/components/form/transfer/store/transfer.state.d.ts +18 -0
- package/lib/components/form/transfer/store/transfer.store.d.ts +23 -0
- package/lib/components/form/transfer/transfer-list/transfer-list.component.d.ts +48 -0
- package/lib/components/form/transfer/transfer.component.d.ts +75 -0
- package/{src/lib/components/form/transfer/transfer.model.ts → lib/components/form/transfer/transfer.model.d.ts} +2 -9
- package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +60 -0
- package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +62 -0
- package/lib/components/navigation/back-button/back-button.component.d.ts +47 -0
- package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +50 -0
- package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +28 -0
- package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +23 -0
- package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +8 -0
- package/lib/components/navigation/header/header.component.d.ts +38 -0
- package/lib/components/navigation/megamenu/megamenu.component.d.ts +22 -0
- package/lib/components/navigation/navbar/navbar/navbar.component.d.ts +19 -0
- package/lib/components/navigation/navbar/navbar-item/navbar-item.component.d.ts +5 -0
- package/lib/components/navigation/navbar/navbar.module.d.ts +8 -0
- package/lib/components/navigation/navscroll/navscroll-list-item.component.d.ts +16 -0
- package/lib/components/navigation/navscroll/navscroll-list-items.component.d.ts +7 -0
- package/lib/components/navigation/navscroll/navscroll.component.d.ts +47 -0
- package/{src/lib/components/navigation/navscroll/navscroll.model.ts → lib/components/navigation/navscroll/navscroll.model.d.ts} +5 -7
- package/lib/components/navigation/navscroll/navscroll.store.d.ts +16 -0
- package/lib/components/navigation/navscroll/navscroll.utils.d.ts +6 -0
- package/lib/components/navigation/sidebar/sidebar.component.d.ts +26 -0
- package/lib/components/navigation/skiplink/skiplink/skiplink.component.d.ts +17 -0
- package/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.d.ts +24 -0
- package/lib/components/navigation/skiplink/skiplink.module.d.ts +8 -0
- package/lib/components/utils/error-page/error-page.component.d.ts +44 -0
- package/lib/components/utils/icon/icon.component.d.ts +53 -0
- package/lib/components/utils/language-switcher/language-switcher.component.d.ts +27 -0
- package/lib/design-angular-kit.module.d.ts +53 -0
- package/lib/enums/colors.enums.d.ts +10 -0
- package/lib/enums/sizes.enum.d.ts +7 -0
- package/{src/lib/interfaces/core.ts → lib/interfaces/core.d.ts} +53 -95
- package/lib/interfaces/design-angular-kit-config.d.ts +30 -0
- package/lib/interfaces/form.d.ts +67 -0
- package/lib/interfaces/icon.d.ts +4 -0
- package/lib/interfaces/sortable-table.d.ts +33 -0
- package/lib/interfaces/utils.d.ts +10 -0
- package/lib/pipes/date-ago.pipe.d.ts +17 -0
- package/lib/pipes/duration.pipe.d.ts +35 -0
- package/lib/pipes/mark-matching-text.pipe.d.ts +18 -0
- package/lib/provide-design-angular-kit.d.ts +7 -0
- package/lib/services/notification/notification.service.d.ts +63 -0
- package/{src/lib/utils/coercion.ts → lib/utils/coercion.d.ts} +1 -7
- package/lib/utils/date-utils.d.ts +79 -0
- package/lib/utils/file-utils.d.ts +32 -0
- package/lib/utils/regex.d.ts +34 -0
- package/lib/validators/it-validators.d.ts +69 -0
- package/package.json +14 -9
- package/{src/public_api.ts → public_api.d.ts} +0 -43
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +29 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/index.spec.d.ts +1 -0
- package/schematics/ng-add/index.spec.js +43 -0
- package/schematics/ng-add/index.spec.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-animations.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/add-animations.js +11 -0
- package/schematics/ng-add/rules/setup-project/add-animations.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-assets.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-assets.js +50 -0
- package/schematics/ng-add/rules/setup-project/add-assets.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js +43 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.js +11 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.d.ts +11 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js +112 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.js +50 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.js +13 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/exceptions.d.ts +7 -0
- package/schematics/ng-add/rules/setup-project/exceptions.js +17 -0
- package/schematics/ng-add/rules/setup-project/exceptions.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/index.js +23 -0
- package/schematics/ng-add/rules/setup-project/index.js.map +1 -0
- package/schematics/ng-add/{schema.ts → schema.d.ts} +1 -1
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/setup-project.d.ts +3 -0
- package/schematics/ng-add/setup-project.js +37 -0
- package/schematics/ng-add/setup-project.js.map +1 -0
- package/schematics/ng-add/setup-project.spec.d.ts +1 -0
- package/schematics/ng-add/setup-project.spec.js +139 -0
- package/schematics/ng-add/setup-project.spec.js.map +1 -0
- package/schematics/ng-add/utils.d.ts +14 -0
- package/schematics/ng-add/utils.js +49 -0
- package/schematics/ng-add/utils.js.map +1 -0
- package/schematics/ng-add/versions-helper.d.ts +3 -0
- package/schematics/ng-add/versions-helper.js +40 -0
- package/schematics/ng-add/versions-helper.js.map +1 -0
- package/.eslintrc.json +0 -31
- package/karma.conf.js +0 -38
- package/ng-package.json +0 -9
- package/ng-package.prod.json +0 -8
- package/schematics/ng-add/index.spec.ts +0 -45
- package/schematics/ng-add/index.ts +0 -36
- package/schematics/ng-add/rules/setup-project/add-animations.ts +0 -7
- package/schematics/ng-add/rules/setup-project/add-assets.ts +0 -45
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.ts +0 -40
- package/schematics/ng-add/rules/setup-project/add-http-client.ts +0 -7
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.ts +0 -120
- package/schematics/ng-add/rules/setup-project/add-localisation.ts +0 -45
- package/schematics/ng-add/rules/setup-project/angular-json-helper.ts +0 -11
- package/schematics/ng-add/rules/setup-project/exceptions.ts +0 -13
- package/schematics/ng-add/setup-project.spec.ts +0 -166
- package/schematics/ng-add/setup-project.ts +0 -31
- package/schematics/ng-add/utils.ts +0 -71
- package/schematics/ng-add/versions-helper.ts +0 -41
- package/src/lib/abstracts/abstract-form.component.ts +0 -200
- package/src/lib/abstracts/abstract.component.ts +0 -63
- package/src/lib/components/core/accordion/accordion.component.html +0 -27
- package/src/lib/components/core/accordion/accordion.component.spec.ts +0 -21
- package/src/lib/components/core/accordion/accordion.component.ts +0 -40
- package/src/lib/components/core/alert/alert.component.html +0 -19
- package/src/lib/components/core/alert/alert.component.scss +0 -3
- package/src/lib/components/core/alert/alert.component.spec.ts +0 -62
- package/src/lib/components/core/alert/alert.component.ts +0 -75
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.html +0 -23
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.scss +0 -17
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.spec.ts +0 -21
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.ts +0 -50
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.html +0 -7
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.spec.ts +0 -38
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.ts +0 -25
- package/src/lib/components/core/avatar/avatar.directive.ts +0 -73
- package/src/lib/components/core/avatar/avatar.module.ts +0 -18
- package/src/lib/components/core/badge/badge.directive.spec.ts +0 -59
- package/src/lib/components/core/badge/badge.directive.ts +0 -39
- package/src/lib/components/core/button/button.directive.spec.ts +0 -96
- package/src/lib/components/core/button/button.directive.ts +0 -89
- package/src/lib/components/core/callout/callout.component.html +0 -25
- package/src/lib/components/core/callout/callout.component.spec.ts +0 -138
- package/src/lib/components/core/callout/callout.component.ts +0 -92
- package/src/lib/components/core/card/card.component.html +0 -35
- package/src/lib/components/core/card/card.component.scss +0 -30
- package/src/lib/components/core/card/card.component.spec.ts +0 -21
- package/src/lib/components/core/card/card.component.ts +0 -78
- package/src/lib/components/core/carousel/carousel/carousel.component.html +0 -29
- package/src/lib/components/core/carousel/carousel/carousel.component.scss +0 -1
- package/src/lib/components/core/carousel/carousel/carousel.component.spec.ts +0 -21
- package/src/lib/components/core/carousel/carousel/carousel.component.ts +0 -119
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.html +0 -3
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.spec.ts +0 -22
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.ts +0 -20
- package/src/lib/components/core/carousel/carousel.module.ts +0 -11
- package/src/lib/components/core/chip/chip.component.html +0 -26
- package/src/lib/components/core/chip/chip.component.spec.ts +0 -87
- package/src/lib/components/core/chip/chip.component.ts +0 -154
- package/src/lib/components/core/collapse/collapse.component.html +0 -3
- package/src/lib/components/core/collapse/collapse.component.spec.ts +0 -21
- package/src/lib/components/core/collapse/collapse.component.ts +0 -124
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.html +0 -3
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.spec.ts +0 -35
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.ts +0 -23
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.html +0 -3
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.spec.ts +0 -22
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.ts +0 -10
- package/src/lib/components/core/dimmer/dimmer.component.html +0 -7
- package/src/lib/components/core/dimmer/dimmer.component.spec.ts +0 -49
- package/src/lib/components/core/dimmer/dimmer.component.ts +0 -50
- package/src/lib/components/core/dimmer/dimmer.module.ts +0 -12
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.html +0 -45
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.scss +0 -3
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.spec.ts +0 -21
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.ts +0 -186
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.html +0 -18
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.scss +0 -4
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.spec.ts +0 -21
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.ts +0 -82
- package/src/lib/components/core/dropdown/dropdown.module.ts +0 -11
- package/src/lib/components/core/forward/forward.directive.spec.ts +0 -60
- package/src/lib/components/core/forward/forward.directive.ts +0 -43
- package/src/lib/components/core/link/link.component.html +0 -13
- package/src/lib/components/core/link/link.component.spec.ts +0 -21
- package/src/lib/components/core/link/link.component.ts +0 -54
- package/src/lib/components/core/list/list/list.component.html +0 -13
- package/src/lib/components/core/list/list/list.component.spec.ts +0 -21
- package/src/lib/components/core/list/list/list.component.ts +0 -30
- package/src/lib/components/core/list/list-item/list-item.component.html +0 -42
- package/src/lib/components/core/list/list-item/list-item.component.scss +0 -16
- package/src/lib/components/core/list/list-item/list-item.component.spec.ts +0 -21
- package/src/lib/components/core/list/list-item/list-item.component.ts +0 -75
- package/src/lib/components/core/list/list.module.ts +0 -11
- package/src/lib/components/core/modal/modal.component.html +0 -36
- package/src/lib/components/core/modal/modal.component.scss +0 -3
- package/src/lib/components/core/modal/modal.component.spec.ts +0 -21
- package/src/lib/components/core/modal/modal.component.ts +0 -218
- package/src/lib/components/core/notifications/notifications.component.html +0 -25
- package/src/lib/components/core/notifications/notifications.component.scss +0 -3
- package/src/lib/components/core/notifications/notifications.component.spec.ts +0 -21
- package/src/lib/components/core/notifications/notifications.component.ts +0 -123
- package/src/lib/components/core/pagination/pagination.component.html +0 -107
- package/src/lib/components/core/pagination/pagination.component.spec.ts +0 -21
- package/src/lib/components/core/pagination/pagination.component.ts +0 -157
- package/src/lib/components/core/popover/popover.directive.spec.ts +0 -21
- package/src/lib/components/core/popover/popover.directive.ts +0 -171
- package/src/lib/components/core/progress-bar/progress-bar.component.html +0 -20
- package/src/lib/components/core/progress-bar/progress-bar.component.spec.ts +0 -21
- package/src/lib/components/core/progress-bar/progress-bar.component.ts +0 -46
- package/src/lib/components/core/progress-button/progress-button.component.html +0 -5
- package/src/lib/components/core/progress-button/progress-button.component.spec.ts +0 -21
- package/src/lib/components/core/progress-button/progress-button.component.ts +0 -39
- package/src/lib/components/core/spinner/spinner.component.html +0 -7
- package/src/lib/components/core/spinner/spinner.component.spec.ts +0 -80
- package/src/lib/components/core/spinner/spinner.component.ts +0 -31
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.html +0 -126
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.spec.ts +0 -21
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.ts +0 -185
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.html +0 -3
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.spec.ts +0 -22
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.ts +0 -33
- package/src/lib/components/core/steppers/steppers.module.ts +0 -11
- package/src/lib/components/core/tab/tab-container/tab-container.component.html +0 -78
- package/src/lib/components/core/tab/tab-container/tab-container.component.spec.ts +0 -21
- package/src/lib/components/core/tab/tab-container/tab-container.component.ts +0 -137
- package/src/lib/components/core/tab/tab-item/tab-item.component.html +0 -3
- package/src/lib/components/core/tab/tab-item/tab-item.component.spec.ts +0 -22
- package/src/lib/components/core/tab/tab-item/tab-item.component.ts +0 -50
- package/src/lib/components/core/tab/tab.module.ts +0 -11
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.html +0 -27
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.scss +0 -65
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.spec.ts +0 -25
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.ts +0 -164
- package/src/lib/components/core/table/sort/sort.directive.spec.ts +0 -73
- package/src/lib/components/core/table/sort/sort.directive.ts +0 -142
- package/src/lib/components/core/table/table.component.html +0 -23
- package/src/lib/components/core/table/table.component.scss +0 -7
- package/src/lib/components/core/table/table.component.spec.ts +0 -21
- package/src/lib/components/core/table/table.component.ts +0 -70
- package/src/lib/components/core/table/table.module.ts +0 -12
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.html +0 -47
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.spec.ts +0 -24
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.ts +0 -102
- package/src/lib/components/core/timeline/timeline.component.html +0 -21
- package/src/lib/components/core/timeline/timeline.component.spec.ts +0 -21
- package/src/lib/components/core/timeline/timeline.component.ts +0 -31
- package/src/lib/components/core/timeline/timeline.module.ts +0 -11
- package/src/lib/components/core/tooltip/tooltip.directive.spec.ts +0 -20
- package/src/lib/components/core/tooltip/tooltip.directive.ts +0 -141
- package/src/lib/components/form/autocomplete/autocomplete.component.html +0 -58
- package/src/lib/components/form/autocomplete/autocomplete.component.spec.ts +0 -21
- package/src/lib/components/form/autocomplete/autocomplete.component.ts +0 -130
- package/src/lib/components/form/checkbox/checkbox.component.html +0 -67
- package/src/lib/components/form/checkbox/checkbox.component.spec.ts +0 -21
- package/src/lib/components/form/checkbox/checkbox.component.ts +0 -65
- package/src/lib/components/form/form.module.ts +0 -34
- package/src/lib/components/form/input/input.component.html +0 -92
- package/src/lib/components/form/input/input.component.scss +0 -29
- package/src/lib/components/form/input/input.component.spec.ts +0 -21
- package/src/lib/components/form/input/input.component.ts +0 -234
- package/src/lib/components/form/password-input/password-input.component.html +0 -65
- package/src/lib/components/form/password-input/password-input.component.scss +0 -9
- package/src/lib/components/form/password-input/password-input.component.spec.ts +0 -21
- package/src/lib/components/form/password-input/password-input.component.ts +0 -171
- package/src/lib/components/form/radio-button/radio-button.component.html +0 -50
- package/src/lib/components/form/radio-button/radio-button.component.scss +0 -14
- package/src/lib/components/form/radio-button/radio-button.component.spec.ts +0 -21
- package/src/lib/components/form/radio-button/radio-button.component.ts +0 -82
- package/src/lib/components/form/range/range.component.html +0 -17
- package/src/lib/components/form/range/range.component.scss +0 -17
- package/src/lib/components/form/range/range.component.spec.ts +0 -21
- package/src/lib/components/form/range/range.component.ts +0 -100
- package/src/lib/components/form/rating/rating.component.html +0 -24
- package/src/lib/components/form/rating/rating.component.spec.ts +0 -21
- package/src/lib/components/form/rating/rating.component.ts +0 -52
- package/src/lib/components/form/select/select.component.html +0 -54
- package/src/lib/components/form/select/select.component.scss +0 -3
- package/src/lib/components/form/select/select.component.spec.ts +0 -22
- package/src/lib/components/form/select/select.component.ts +0 -91
- package/src/lib/components/form/textarea/textarea.component.html +0 -28
- package/src/lib/components/form/textarea/textarea.component.scss +0 -12
- package/src/lib/components/form/textarea/textarea.component.spec.ts +0 -21
- package/src/lib/components/form/textarea/textarea.component.ts +0 -61
- package/src/lib/components/form/transfer/store/transfer.reducers.ts +0 -242
- package/src/lib/components/form/transfer/store/transfer.state.ts +0 -20
- package/src/lib/components/form/transfer/store/transfer.store.ts +0 -88
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.html +0 -42
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.spec.ts +0 -33
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.ts +0 -93
- package/src/lib/components/form/transfer/transfer.component.html +0 -52
- package/src/lib/components/form/transfer/transfer.component.spec.ts +0 -27
- package/src/lib/components/form/transfer/transfer.component.ts +0 -159
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.html +0 -36
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.spec.ts +0 -21
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.ts +0 -170
- package/src/lib/components/form/upload-file-list/upload-file-list.component.html +0 -46
- package/src/lib/components/form/upload-file-list/upload-file-list.component.spec.ts +0 -22
- package/src/lib/components/form/upload-file-list/upload-file-list.component.ts +0 -120
- package/src/lib/components/navigation/back-button/back-button.component.html +0 -25
- package/src/lib/components/navigation/back-button/back-button.component.spec.ts +0 -91
- package/src/lib/components/navigation/back-button/back-button.component.ts +0 -67
- package/src/lib/components/navigation/back-to-top/back-to-top.component.html +0 -11
- package/src/lib/components/navigation/back-to-top/back-to-top.component.spec.ts +0 -21
- package/src/lib/components/navigation/back-to-top/back-to-top.component.ts +0 -80
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.html +0 -23
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.spec.ts +0 -21
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.ts +0 -68
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.html +0 -3
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.spec.ts +0 -22
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.ts +0 -29
- package/src/lib/components/navigation/breadcrumbs/breadcrumbs.module.ts +0 -11
- package/src/lib/components/navigation/header/header.component.html +0 -102
- package/src/lib/components/navigation/header/header.component.scss +0 -3
- package/src/lib/components/navigation/header/header.component.spec.ts +0 -21
- package/src/lib/components/navigation/header/header.component.ts +0 -107
- package/src/lib/components/navigation/megamenu/megamenu.component.html +0 -34
- package/src/lib/components/navigation/megamenu/megamenu.component.scss +0 -5
- package/src/lib/components/navigation/megamenu/megamenu.component.ts +0 -30
- package/src/lib/components/navigation/navbar/navbar/navbar.component.html +0 -28
- package/src/lib/components/navigation/navbar/navbar/navbar.component.ts +0 -45
- package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.html +0 -3
- package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.ts +0 -10
- package/src/lib/components/navigation/navbar/navbar.module.ts +0 -11
- package/src/lib/components/navigation/navscroll/navscroll-list-item.component.ts +0 -95
- package/src/lib/components/navigation/navscroll/navscroll-list-items.component.ts +0 -27
- package/src/lib/components/navigation/navscroll/navscroll.component.html +0 -101
- package/src/lib/components/navigation/navscroll/navscroll.component.scss +0 -9
- package/src/lib/components/navigation/navscroll/navscroll.component.ts +0 -143
- package/src/lib/components/navigation/navscroll/navscroll.store.ts +0 -96
- package/src/lib/components/navigation/navscroll/navscroll.utils.ts +0 -28
- package/src/lib/components/navigation/sidebar/sidebar.component.html +0 -11
- package/src/lib/components/navigation/sidebar/sidebar.component.spec.ts +0 -21
- package/src/lib/components/navigation/sidebar/sidebar.component.ts +0 -39
- package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.html +0 -15
- package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.ts +0 -27
- package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.html +0 -15
- package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.ts +0 -38
- package/src/lib/components/navigation/skiplink/skiplink.module.ts +0 -11
- package/src/lib/components/utils/error-page/error-page.component.html +0 -33
- package/src/lib/components/utils/error-page/error-page.component.spec.ts +0 -21
- package/src/lib/components/utils/error-page/error-page.component.ts +0 -79
- package/src/lib/components/utils/icon/icon.component.html +0 -6
- package/src/lib/components/utils/icon/icon.component.spec.ts +0 -21
- package/src/lib/components/utils/icon/icon.component.ts +0 -95
- package/src/lib/components/utils/language-switcher/language-switcher.component.html +0 -21
- package/src/lib/components/utils/language-switcher/language-switcher.component.spec.ts +0 -21
- package/src/lib/components/utils/language-switcher/language-switcher.component.ts +0 -56
- package/src/lib/design-angular-kit.module.ts +0 -131
- package/src/lib/enums/colors.enums.ts +0 -10
- package/src/lib/enums/sizes.enum.ts +0 -7
- package/src/lib/interfaces/design-angular-kit-config.ts +0 -34
- package/src/lib/interfaces/form.ts +0 -78
- package/src/lib/interfaces/icon.ts +0 -176
- package/src/lib/interfaces/sortable-table.ts +0 -42
- package/src/lib/interfaces/utils.ts +0 -11
- package/src/lib/pipes/date-ago.pipe.ts +0 -57
- package/src/lib/pipes/duration.pipe.ts +0 -112
- package/src/lib/pipes/mark-matching-text.pipe.ts +0 -43
- package/src/lib/provide-design-angular-kit.ts +0 -73
- package/src/lib/services/notification/notification.service.spec.ts +0 -16
- package/src/lib/services/notification/notification.service.ts +0 -119
- package/src/lib/utils/date-utils.ts +0 -184
- package/src/lib/utils/file-utils.ts +0 -80
- package/src/lib/utils/regex.ts +0 -44
- package/src/lib/validators/it-validators.ts +0 -193
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -24
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.schematics.json +0 -25
- package/tsconfig.spec.json +0 -9
- /package/schematics/ng-add/rules/setup-project/{index.ts → index.d.ts} +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Component, ContentChildren, HostBinding, Input, QueryList, TemplateRef, ViewChild } from '@angular/core';
|
|
2
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
-
import { inputToBoolean } from '../../../../utils/coercion';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
standalone: true,
|
|
7
|
-
selector: 'it-avatar-item',
|
|
8
|
-
template: '<ng-template><ng-content></ng-content></ng-template>',
|
|
9
|
-
})
|
|
10
|
-
export class ItAvatarGroupItemComponent {
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
-
@ViewChild(TemplateRef, { static: true }) _implicitContent!: TemplateRef<any>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
standalone: true,
|
|
17
|
-
selector: 'it-avatar-group',
|
|
18
|
-
templateUrl: './avatar-group.component.html',
|
|
19
|
-
imports: [NgTemplateOutlet],
|
|
20
|
-
})
|
|
21
|
-
export class ItAvatarGroupComponent {
|
|
22
|
-
@Input({ transform: inputToBoolean }) @HostBinding('class.link-list-wrapper') linkList = false;
|
|
23
|
-
|
|
24
|
-
@ContentChildren(ItAvatarGroupItemComponent) avatars!: QueryList<ItAvatarGroupItemComponent>;
|
|
25
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ColorsEnum } from '../../../enums/colors.enums';
|
|
2
|
-
import { SizesEnum } from '../../../enums/sizes.enum';
|
|
3
|
-
import { Directive, HostBinding, Input } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
@Directive({
|
|
6
|
-
standalone: true,
|
|
7
|
-
selector: '[itAvatar]',
|
|
8
|
-
exportAs: 'itAvatar',
|
|
9
|
-
})
|
|
10
|
-
export class ItAvatarDirective {
|
|
11
|
-
/**
|
|
12
|
-
* Indica il colore dell'avatar. Può assumere i valori:
|
|
13
|
-
* <ul>
|
|
14
|
-
* <li> primary
|
|
15
|
-
* <li> secondary
|
|
16
|
-
* <li> green
|
|
17
|
-
* <li> orange
|
|
18
|
-
* <li> red
|
|
19
|
-
* </ul>
|
|
20
|
-
*/
|
|
21
|
-
@Input()
|
|
22
|
-
get color(): string | undefined {
|
|
23
|
-
return this._color;
|
|
24
|
-
}
|
|
25
|
-
set color(value: string | undefined) {
|
|
26
|
-
const colorsKey = value as keyof typeof ColorsEnum;
|
|
27
|
-
if (ColorsEnum[colorsKey]) {
|
|
28
|
-
this._color = ColorsEnum[colorsKey];
|
|
29
|
-
} else {
|
|
30
|
-
this._color = undefined;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
private _color?: ColorsEnum;
|
|
34
|
-
/**
|
|
35
|
-
* Indica la grandezza dell'avatar. Può assumere i valori:
|
|
36
|
-
* <ul>
|
|
37
|
-
* <li> xs
|
|
38
|
-
* <li> sm
|
|
39
|
-
* <li> lg
|
|
40
|
-
* <li> xl
|
|
41
|
-
* <li> xxl
|
|
42
|
-
* </ul>
|
|
43
|
-
*/
|
|
44
|
-
@Input()
|
|
45
|
-
get size(): SizesEnum | undefined {
|
|
46
|
-
return this._size;
|
|
47
|
-
}
|
|
48
|
-
set size(value: string | undefined) {
|
|
49
|
-
const sizesKey = value as keyof typeof SizesEnum;
|
|
50
|
-
if (SizesEnum[sizesKey]) {
|
|
51
|
-
this._size = SizesEnum[sizesKey];
|
|
52
|
-
} else {
|
|
53
|
-
this._size = undefined;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
private _size?: SizesEnum;
|
|
58
|
-
|
|
59
|
-
@HostBinding('class')
|
|
60
|
-
get hostClasses(): string {
|
|
61
|
-
let cssClass = 'avatar';
|
|
62
|
-
|
|
63
|
-
if (this.size) {
|
|
64
|
-
cssClass += ` ${this.size}`;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (this.color) {
|
|
68
|
-
cssClass += ` avatar-${this.color}`;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return cssClass;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { ItAvatarGroupComponent, ItAvatarGroupItemComponent } from './avatar-group/avatar-group.component';
|
|
3
|
-
import { ItAvatarDropdownComponent, ItAvatarDropdownItemComponent } from './avatar-dropdown/avatar-dropdown.component';
|
|
4
|
-
import { ItAvatarDirective } from './avatar.directive';
|
|
5
|
-
|
|
6
|
-
const avatarComponents = [
|
|
7
|
-
ItAvatarGroupItemComponent,
|
|
8
|
-
ItAvatarGroupComponent,
|
|
9
|
-
ItAvatarDropdownComponent,
|
|
10
|
-
ItAvatarDropdownItemComponent,
|
|
11
|
-
ItAvatarDirective,
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
@NgModule({
|
|
15
|
-
imports: avatarComponents,
|
|
16
|
-
exports: avatarComponents,
|
|
17
|
-
})
|
|
18
|
-
export class ItAvatarModule {}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { By } from '@angular/platform-browser';
|
|
4
|
-
import { BadgeColor } from '../../../interfaces/core';
|
|
5
|
-
import { ItBadgeDirective } from './badge.directive';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'it-unit-test',
|
|
9
|
-
template: `
|
|
10
|
-
<h5>
|
|
11
|
-
Testo di esempio <span [itBadge]="selectedColor" [rounded]="isRounded">{{ badgeText }}</span>
|
|
12
|
-
</h5>
|
|
13
|
-
`,
|
|
14
|
-
})
|
|
15
|
-
class UnitTestComponent {
|
|
16
|
-
@Input() set selectedColor(value: BadgeColor | undefined) {
|
|
17
|
-
this._selectedColor = value;
|
|
18
|
-
}
|
|
19
|
-
get selectedColor(): BadgeColor | undefined {
|
|
20
|
-
return this._selectedColor;
|
|
21
|
-
}
|
|
22
|
-
private _selectedColor: BadgeColor | undefined = undefined;
|
|
23
|
-
|
|
24
|
-
@Input() set isRounded(value: boolean) {
|
|
25
|
-
this._isRounded = value;
|
|
26
|
-
}
|
|
27
|
-
get isRounded(): boolean {
|
|
28
|
-
return this._isRounded;
|
|
29
|
-
}
|
|
30
|
-
private _isRounded: boolean = undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
describe('ItBadgeDirective', () => {
|
|
34
|
-
let component: UnitTestComponent;
|
|
35
|
-
let fixture: ComponentFixture<UnitTestComponent>;
|
|
36
|
-
beforeEach(fakeAsync(() => {
|
|
37
|
-
TestBed.configureTestingModule({
|
|
38
|
-
declarations: [UnitTestComponent],
|
|
39
|
-
imports: [ItBadgeDirective],
|
|
40
|
-
}).compileComponents();
|
|
41
|
-
|
|
42
|
-
fixture = TestBed.createComponent(UnitTestComponent);
|
|
43
|
-
component = fixture.componentInstance;
|
|
44
|
-
fixture.detectChanges();
|
|
45
|
-
}));
|
|
46
|
-
|
|
47
|
-
it('should create an instance', () => {
|
|
48
|
-
const directive = new ItBadgeDirective();
|
|
49
|
-
expect(directive).toBeTruthy();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('can have color primary and be rounded', () => {
|
|
53
|
-
component.isRounded = true;
|
|
54
|
-
component.selectedColor = 'primary';
|
|
55
|
-
fixture.detectChanges();
|
|
56
|
-
const spanElement = fixture.debugElement.query(By.css('.badge.rounded-pill.bg-primary'));
|
|
57
|
-
expect(spanElement).toBeTruthy();
|
|
58
|
-
});
|
|
59
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Directive, HostBinding, Input } from '@angular/core';
|
|
2
|
-
import { BadgeColor } from '../../../interfaces/core';
|
|
3
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Badge
|
|
7
|
-
* @description Useful for small counters and labels
|
|
8
|
-
*/
|
|
9
|
-
@Directive({
|
|
10
|
-
standalone: true,
|
|
11
|
-
selector: '[itBadge]',
|
|
12
|
-
exportAs: 'itBadge',
|
|
13
|
-
})
|
|
14
|
-
export class ItBadgeDirective {
|
|
15
|
-
/**
|
|
16
|
-
* Define the badge color
|
|
17
|
-
* @default undefined
|
|
18
|
-
*/
|
|
19
|
-
@Input('itBadge') color: BadgeColor | undefined;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Show rounded badge
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
@Input({ transform: inputToBoolean }) rounded?: boolean;
|
|
26
|
-
|
|
27
|
-
@HostBinding('class')
|
|
28
|
-
protected get badgeClass(): string {
|
|
29
|
-
let badgeClass = 'badge';
|
|
30
|
-
if (this.rounded) {
|
|
31
|
-
badgeClass += ` rounded-pill`;
|
|
32
|
-
}
|
|
33
|
-
if (this.color) {
|
|
34
|
-
badgeClass += ` bg-${this.color}`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return badgeClass;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { ItButtonDirective } from './button.directive';
|
|
2
|
-
import { Component, DebugElement } from '@angular/core';
|
|
3
|
-
import { ButtonColor } from '../../../interfaces/core';
|
|
4
|
-
import { FormsModule } from '@angular/forms';
|
|
5
|
-
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
|
6
|
-
import { By } from '@angular/platform-browser';
|
|
7
|
-
|
|
8
|
-
/** Componente per testare una singola button. */
|
|
9
|
-
@Component({
|
|
10
|
-
template: ` <div>
|
|
11
|
-
<button [disabled]="disabled" [itButton]="color" (click)="onClick()">
|
|
12
|
-
{{ label }}
|
|
13
|
-
</button>
|
|
14
|
-
</div>`,
|
|
15
|
-
})
|
|
16
|
-
class SingleButtonComponent {
|
|
17
|
-
disabled = false;
|
|
18
|
-
color: ButtonColor = 'primary';
|
|
19
|
-
count = 0;
|
|
20
|
-
label = 'Test Button';
|
|
21
|
-
|
|
22
|
-
onClick = () => {
|
|
23
|
-
this.count++;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
describe('ItButtonDirective', () => {
|
|
28
|
-
beforeEach(fakeAsync(() => {
|
|
29
|
-
TestBed.configureTestingModule({
|
|
30
|
-
imports: [FormsModule, ItButtonDirective],
|
|
31
|
-
declarations: [SingleButtonComponent],
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
TestBed.compileComponents();
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
describe('comportamenti base', () => {
|
|
38
|
-
let fixture: ComponentFixture<SingleButtonComponent>;
|
|
39
|
-
let buttonDebugElement: DebugElement;
|
|
40
|
-
let buttonNativeElement: HTMLElement;
|
|
41
|
-
let buttonInstance: ItButtonDirective;
|
|
42
|
-
let testComponent: SingleButtonComponent;
|
|
43
|
-
|
|
44
|
-
beforeEach(() => {
|
|
45
|
-
fixture = TestBed.createComponent(SingleButtonComponent);
|
|
46
|
-
fixture.detectChanges();
|
|
47
|
-
|
|
48
|
-
buttonDebugElement = fixture.debugElement.query(By.directive(ItButtonDirective));
|
|
49
|
-
buttonNativeElement = buttonDebugElement.nativeElement;
|
|
50
|
-
buttonInstance = buttonDebugElement.componentInstance;
|
|
51
|
-
testComponent = fixture.debugElement.componentInstance;
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('dovrebbe poter essere abilitato e disabilitato', () => {
|
|
55
|
-
expect(buttonInstance.disabled).toBe(false);
|
|
56
|
-
|
|
57
|
-
testComponent.disabled = true;
|
|
58
|
-
fixture.detectChanges();
|
|
59
|
-
|
|
60
|
-
expect(buttonInstance.disabled).toBe(true);
|
|
61
|
-
|
|
62
|
-
testComponent.disabled = false;
|
|
63
|
-
fixture.detectChanges();
|
|
64
|
-
|
|
65
|
-
expect(buttonInstance.disabled).toBe(false);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it("dovrebbe ricevere l'evento di click", () => {
|
|
69
|
-
expect(testComponent.count).toBe(0);
|
|
70
|
-
fixture.detectChanges();
|
|
71
|
-
|
|
72
|
-
buttonNativeElement.click();
|
|
73
|
-
fixture.detectChanges();
|
|
74
|
-
|
|
75
|
-
expect(testComponent.count).toBe(1);
|
|
76
|
-
|
|
77
|
-
buttonNativeElement.click();
|
|
78
|
-
fixture.detectChanges();
|
|
79
|
-
|
|
80
|
-
expect(testComponent.count).toBe(2);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('dovrebbe poter cambiare colore', () => {
|
|
84
|
-
expect(testComponent.color).toBe('primary');
|
|
85
|
-
expect(buttonInstance.color).toBe('primary');
|
|
86
|
-
|
|
87
|
-
testComponent.color = 'secondary';
|
|
88
|
-
fixture.detectChanges();
|
|
89
|
-
expect(buttonInstance.color).toBe('secondary');
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
it('dovrebbe generare un id univoco per bottone', () => {
|
|
93
|
-
expect(buttonNativeElement.textContent.trim()).toBe('Test Button');
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { ContentChildren, Directive, Host, HostBinding, Input, Optional, QueryList } from '@angular/core';
|
|
2
|
-
import { ButtonColor, ButtonSize } from '../../../interfaces/core';
|
|
3
|
-
import { ItIconComponent } from '../../utils/icon/icon.component';
|
|
4
|
-
import { ItProgressButtonComponent } from '../progress-button/progress-button.component';
|
|
5
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Button
|
|
9
|
-
* @description Bootstrap italia custom button styles
|
|
10
|
-
*/
|
|
11
|
-
@Directive({
|
|
12
|
-
standalone: true,
|
|
13
|
-
selector: '[itButton]',
|
|
14
|
-
exportAs: 'itButton',
|
|
15
|
-
})
|
|
16
|
-
export class ItButtonDirective {
|
|
17
|
-
/**
|
|
18
|
-
* Button color
|
|
19
|
-
* @default undefined
|
|
20
|
-
*/
|
|
21
|
-
@Input('itButton') color: ButtonColor | undefined;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Button size
|
|
25
|
-
* @default undefined
|
|
26
|
-
*/
|
|
27
|
-
@Input() size: ButtonSize | undefined;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Indicates whether the button occupies all the width available to it.
|
|
31
|
-
* @default undefined
|
|
32
|
-
*/
|
|
33
|
-
@Input() block: ButtonSize | undefined;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* If button is disabled
|
|
37
|
-
* @default false
|
|
38
|
-
*/
|
|
39
|
-
@Input({ transform: inputToBoolean })
|
|
40
|
-
@HostBinding('disabled')
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The type attribute
|
|
45
|
-
* @default button
|
|
46
|
-
*/
|
|
47
|
-
@Input()
|
|
48
|
-
@HostBinding('type')
|
|
49
|
-
type: 'button' | 'reset' | 'submit' = 'button';
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The icon children
|
|
53
|
-
* @default undefined
|
|
54
|
-
*/
|
|
55
|
-
@ContentChildren(ItIconComponent) protected icons?: QueryList<ItIconComponent>;
|
|
56
|
-
|
|
57
|
-
constructor(@Optional() @Host() private progressButtonComponent: ItProgressButtonComponent) {}
|
|
58
|
-
|
|
59
|
-
@HostBinding('class')
|
|
60
|
-
protected get hostClasses(): string {
|
|
61
|
-
let cssClass = 'btn';
|
|
62
|
-
|
|
63
|
-
if (this.color) {
|
|
64
|
-
cssClass += ` btn-${this.color}`;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (this.size) {
|
|
68
|
-
cssClass += ` btn-${this.size}`;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (this.block) {
|
|
72
|
-
cssClass += ' btn-block';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (this.disabled) {
|
|
76
|
-
cssClass += ' disabled';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (this.icons?.length && !this.progressButtonComponent) {
|
|
80
|
-
cssClass += ' btn-icon';
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (this.progressButtonComponent) {
|
|
84
|
-
cssClass += ' btn-progress';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return cssClass;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<div class="callout {{ color }}" [class.callout-highlight]="appearance === 'highlight'" [class.callout-more]="appearance === 'more'">
|
|
2
|
-
@if (appearance === 'default') {
|
|
3
|
-
<div class="callout-inner">
|
|
4
|
-
<ng-container *ngTemplateOutlet="inner"></ng-container>
|
|
5
|
-
</div>
|
|
6
|
-
} @else {
|
|
7
|
-
<ng-container *ngTemplateOutlet="inner"></ng-container>
|
|
8
|
-
}
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<ng-template #inner>
|
|
12
|
-
@if (label) {
|
|
13
|
-
<div class="callout-title">
|
|
14
|
-
<it-icon [labelWaria]="labelWaria" [name]="iconName"></it-icon>
|
|
15
|
-
@if (hiddenLabel) {
|
|
16
|
-
<span class="visually-hidden">{{ hiddenLabel }}</span>
|
|
17
|
-
}
|
|
18
|
-
<span class="text">{{ label }}</span>
|
|
19
|
-
</div>
|
|
20
|
-
}
|
|
21
|
-
<p class="callout-big-text">
|
|
22
|
-
<ng-content select="[bigText]"></ng-content>
|
|
23
|
-
</p>
|
|
24
|
-
<ng-content></ng-content>
|
|
25
|
-
</ng-template>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { By } from '@angular/platform-browser';
|
|
4
|
-
|
|
5
|
-
import { ItCalloutComponent } from './callout.component';
|
|
6
|
-
import { tb_base } from '../../../../test';
|
|
7
|
-
|
|
8
|
-
describe('ItCalloutComponent', () => {
|
|
9
|
-
let component: ItCalloutComponent;
|
|
10
|
-
let fixture: ComponentFixture<ItCalloutComponent>;
|
|
11
|
-
|
|
12
|
-
beforeEach(async () => {
|
|
13
|
-
await TestBed.configureTestingModule(tb_base)
|
|
14
|
-
.overrideComponent(ItCalloutComponent, {
|
|
15
|
-
set: { changeDetection: ChangeDetectionStrategy.Default },
|
|
16
|
-
})
|
|
17
|
-
.compileComponents();
|
|
18
|
-
|
|
19
|
-
fixture = TestBed.createComponent(ItCalloutComponent);
|
|
20
|
-
component = fixture.componentInstance;
|
|
21
|
-
fixture.detectChanges();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should create', () => {
|
|
25
|
-
expect(component).toBeTruthy();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('if i set a color, that class will be on div with class callout', fakeAsync(() => {
|
|
29
|
-
component.color = 'note';
|
|
30
|
-
fixture.detectChanges();
|
|
31
|
-
const divPrimaryElement = fixture.debugElement.query(By.css('div.callout.note'));
|
|
32
|
-
expect(divPrimaryElement).toBeTruthy();
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
it('if i set a appearance, that class will be on div with class callout with prefix callout-*', () => {
|
|
36
|
-
component.appearance = 'more';
|
|
37
|
-
fixture.detectChanges();
|
|
38
|
-
const divPrimaryElement = fixture.debugElement.query(By.css('div.callout.' + 'callout-' + 'more'));
|
|
39
|
-
expect(divPrimaryElement).toBeTruthy();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('if i set a label, that can be on DOM', () => {
|
|
43
|
-
component.label = 'label';
|
|
44
|
-
fixture.detectChanges();
|
|
45
|
-
const spanPrimaryElement = fixture.debugElement.query(By.css('.callout-title > span:not(.visually-hidden)'));
|
|
46
|
-
expect(spanPrimaryElement).toBeTruthy();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it("if i don't set a label, that cannot be on DOM", () => {
|
|
50
|
-
const spanPrimaryElement = fixture.debugElement.query(By.css('.callout-title > span:not(.visually-hidden)'));
|
|
51
|
-
expect(spanPrimaryElement).toBeFalsy();
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('if i set a hiddenLabel (with a label), that can be on DOM', () => {
|
|
55
|
-
component.hiddenLabel = 'hiddenLabel';
|
|
56
|
-
component.label = 'label';
|
|
57
|
-
fixture.detectChanges();
|
|
58
|
-
const spanPrimaryElement = fixture.debugElement.query(By.css('.callout-title > span.visually-hidden'));
|
|
59
|
-
expect(spanPrimaryElement).toBeTruthy();
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("if i don't set a hiddenLabel (with a label), that cannot be on DOM", () => {
|
|
63
|
-
component.label = 'label';
|
|
64
|
-
fixture.detectChanges();
|
|
65
|
-
const spanPrimaryElement = fixture.debugElement.query(By.css('.callout-title > span.visually-hidden'));
|
|
66
|
-
expect(spanPrimaryElement).toBeFalsy();
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('if i set a hiddenLabel (without a label), that cannot be on DOM', () => {
|
|
70
|
-
component.hiddenLabel = 'hiddenLabel';
|
|
71
|
-
fixture.detectChanges();
|
|
72
|
-
const spanPrimaryElement = fixture.debugElement.query(By.css('.callout-title > span.visually-hidden'));
|
|
73
|
-
expect(spanPrimaryElement).toBeFalsy();
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('if i set a icon (zoom-in), that will be on DOM', () => {
|
|
77
|
-
component.label = 'label';
|
|
78
|
-
component.icon = 'zoom-in';
|
|
79
|
-
fixture.detectChanges();
|
|
80
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-zoom-in'));
|
|
81
|
-
expect(useElement).toBeTruthy();
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
it("if i don't set a icon (with a label), that will be on DOM (default is info-circle)", () => {
|
|
85
|
-
component.label = 'label';
|
|
86
|
-
fixture.detectChanges();
|
|
87
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-info-circle'));
|
|
88
|
-
expect(useElement).toBeTruthy();
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('if i set appearance to more with a label, the component show icon: zoom-in', () => {
|
|
92
|
-
component.appearance = 'more';
|
|
93
|
-
component.label = 'label';
|
|
94
|
-
fixture.detectChanges();
|
|
95
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-zoom-in'));
|
|
96
|
-
expect(useElement).toBeTruthy();
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it('if i set color to success with a label, the component show icon: check-circle', () => {
|
|
100
|
-
component.color = 'success';
|
|
101
|
-
component.label = 'label';
|
|
102
|
-
fixture.detectChanges();
|
|
103
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-check-circle'));
|
|
104
|
-
expect(useElement).toBeTruthy();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('if i set color to warning with a label, the component show icon: help-circle', () => {
|
|
108
|
-
component.color = 'warning';
|
|
109
|
-
component.label = 'label';
|
|
110
|
-
fixture.detectChanges();
|
|
111
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-help-circle'));
|
|
112
|
-
expect(useElement).toBeTruthy();
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
it('if i set color to danger with a label, the component show icon: close-circle', () => {
|
|
116
|
-
component.color = 'danger';
|
|
117
|
-
component.label = 'label';
|
|
118
|
-
fixture.detectChanges();
|
|
119
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-close-circle'));
|
|
120
|
-
expect(useElement).toBeTruthy();
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it('if i set color to important with a label, the component show icon: info-circle', () => {
|
|
124
|
-
component.color = 'important';
|
|
125
|
-
component.label = 'label';
|
|
126
|
-
fixture.detectChanges();
|
|
127
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-info-circle'));
|
|
128
|
-
expect(useElement).toBeTruthy();
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it('if i set color to note with a label, the component show icon: info-circle', () => {
|
|
132
|
-
component.color = 'note';
|
|
133
|
-
component.label = 'label';
|
|
134
|
-
fixture.detectChanges();
|
|
135
|
-
const useElement = fixture.debugElement.query(By.css('use[href="./bootstrap-italia/dist/svg/sprites.svg#it-info-circle'));
|
|
136
|
-
expect(useElement).toBeTruthy();
|
|
137
|
-
});
|
|
138
|
-
});
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
import { CalloutAppearance, CalloutColor } from '../../../interfaces/core';
|
|
3
|
-
import { IconName } from '../../../interfaces/icon';
|
|
4
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
-
import { ItIconComponent } from '../../utils/icon/icon.component';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Callout
|
|
9
|
-
* @description Callouts can be used to highlight certain parts of the text that require particular attention. They may contain error messages, warnings, hints, etc.
|
|
10
|
-
*/
|
|
11
|
-
@Component({
|
|
12
|
-
standalone: true,
|
|
13
|
-
selector: 'it-callout',
|
|
14
|
-
templateUrl: './callout.component.html',
|
|
15
|
-
styles: [
|
|
16
|
-
`
|
|
17
|
-
.callout-big-text:empty {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
`,
|
|
21
|
-
],
|
|
22
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
-
imports: [NgTemplateOutlet, ItIconComponent],
|
|
24
|
-
})
|
|
25
|
-
export class ItCalloutComponent {
|
|
26
|
-
/**
|
|
27
|
-
* Callout label
|
|
28
|
-
* @default undefined
|
|
29
|
-
*/
|
|
30
|
-
@Input() label: string | undefined;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Callout hiddenLabel
|
|
34
|
-
* @default undefined
|
|
35
|
-
*/
|
|
36
|
-
@Input() hiddenLabel: string | undefined;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Callout color
|
|
40
|
-
* - <b>success</b>
|
|
41
|
-
* - <b>danger</b>
|
|
42
|
-
* - <b>warning</b>
|
|
43
|
-
* - <b>important</b>
|
|
44
|
-
* - <b>note</b>
|
|
45
|
-
* @default undefined
|
|
46
|
-
*/
|
|
47
|
-
@Input() color: CalloutColor | undefined;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Callout appearance
|
|
51
|
-
* - <b>default</b>
|
|
52
|
-
* - <b>highlight</b>: Callout version with border only on the left side
|
|
53
|
-
* - <b>more</b>: It looks radically different from the other styles available and is suitable for more extensive texts
|
|
54
|
-
* @default default
|
|
55
|
-
*/
|
|
56
|
-
@Input() appearance: CalloutAppearance = 'default';
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Custom icon
|
|
60
|
-
* @default undefined
|
|
61
|
-
*/
|
|
62
|
-
@Input() icon: IconName | undefined;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The input label even get labelWaria icon
|
|
66
|
-
* @default undefined
|
|
67
|
-
*/
|
|
68
|
-
@Input() labelWaria: string | undefined = undefined;
|
|
69
|
-
|
|
70
|
-
protected get iconName(): IconName {
|
|
71
|
-
if (this.icon) {
|
|
72
|
-
return this.icon;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (this.appearance === 'more') {
|
|
76
|
-
return 'zoom-in';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
switch (this.color) {
|
|
80
|
-
case 'success':
|
|
81
|
-
return 'check-circle';
|
|
82
|
-
case 'warning':
|
|
83
|
-
return 'help-circle';
|
|
84
|
-
case 'danger':
|
|
85
|
-
return 'close-circle';
|
|
86
|
-
case 'important':
|
|
87
|
-
case 'note':
|
|
88
|
-
default:
|
|
89
|
-
return 'info-circle';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<ng-template #cardContent>
|
|
2
|
-
<ng-content select="[beforeBody]"></ng-content>
|
|
3
|
-
|
|
4
|
-
<div class="card-body {{ bodyClass }}">
|
|
5
|
-
<ng-content></ng-content>
|
|
6
|
-
</div>
|
|
7
|
-
</ng-template>
|
|
8
|
-
|
|
9
|
-
@if (!special) {
|
|
10
|
-
<div
|
|
11
|
-
class="card {{ cardClass }}"
|
|
12
|
-
[class.card-img]="hasImage"
|
|
13
|
-
[class.card-teaser]="teaser"
|
|
14
|
-
[class.no-after]="hasImage"
|
|
15
|
-
[class.shadow]="shadow"
|
|
16
|
-
[class.card-bg]="background"
|
|
17
|
-
[class.card-big]="big"
|
|
18
|
-
[class.border-bottom-card]="borderBottom"
|
|
19
|
-
[class.rounded]="rounded">
|
|
20
|
-
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
21
|
-
</div>
|
|
22
|
-
} @else {
|
|
23
|
-
<a
|
|
24
|
-
class="card special-card {{ cardClass }}"
|
|
25
|
-
[class.card-img]="hasImage"
|
|
26
|
-
[class.card-teaser]="teaser"
|
|
27
|
-
[class.shadow]="shadow"
|
|
28
|
-
[class.card-bg]="background"
|
|
29
|
-
[class.card-big]="big"
|
|
30
|
-
[class.no-after]="hasImage"
|
|
31
|
-
[class.border-bottom-card]="borderBottom"
|
|
32
|
-
[class.rounded]="rounded">
|
|
33
|
-
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
34
|
-
</a>
|
|
35
|
-
}
|