@i-cell/ids-angular 0.1.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 +24 -0
- package/accordion/accordion-animations.d.ts +1 -0
- package/accordion/accordion-defaults.d.ts +18 -0
- package/accordion/accordion-item/accordion-item.component.d.ts +27 -0
- package/accordion/accordion.component.d.ts +29 -0
- package/accordion/index.d.ts +5 -0
- package/accordion/public-api.d.ts +5 -0
- package/accordion/types/accordion-appearance.type.d.ts +5 -0
- package/avatar/avatar-defaults.d.ts +12 -0
- package/avatar/avatar-image.directive.d.ts +5 -0
- package/avatar/avatar.component.d.ts +28 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/public-api.d.ts +6 -0
- package/avatar/tokens/avatar-parent.d.ts +6 -0
- package/avatar/types/avatar-type.type.d.ts +6 -0
- package/avatar/types/avatar-variant.type.d.ts +8 -0
- package/button/button-defaults.d.ts +11 -0
- package/button/button-group-defaults.d.ts +7 -0
- package/button/button-group.component.d.ts +11 -0
- package/button/button.component.d.ts +23 -0
- package/button/index.d.ts +5 -0
- package/button/public-api.d.ts +7 -0
- package/button/tokens/button-parent.d.ts +6 -0
- package/button/types/button-appearance.type.d.ts +6 -0
- package/button/types/button-variant.type.d.ts +14 -0
- package/card/card-body.directive.d.ts +6 -0
- package/card/card-defaults.d.ts +12 -0
- package/card/card-footer.directive.d.ts +6 -0
- package/card/card-header.component.d.ts +6 -0
- package/card/card-media.directive.d.ts +7 -0
- package/card/card-section-base.directive.d.ts +9 -0
- package/card/card-subtitle.directive.d.ts +5 -0
- package/card/card-title.directive.d.ts +5 -0
- package/card/card.component.d.ts +21 -0
- package/card/index.d.ts +5 -0
- package/card/public-api.d.ts +10 -0
- package/card/types/card-appearances.type.d.ts +6 -0
- package/card/types/card-variant.type.d.ts +13 -0
- package/checkbox/checkbox-defaults.d.ts +9 -0
- package/checkbox/checkbox-group-defaults.d.ts +9 -0
- package/checkbox/checkbox-group.component.d.ts +28 -0
- package/checkbox/checkbox.component.d.ts +68 -0
- package/checkbox/index.d.ts +5 -0
- package/checkbox/public-api.d.ts +7 -0
- package/checkbox/types/checkbox-events.class.d.ts +6 -0
- package/checkbox/types/checkbox-group-child.d.ts +7 -0
- package/checkbox/types/checkbox-parent.d.ts +8 -0
- package/checkbox/types/checkbox-state.type.d.ts +6 -0
- package/checkbox/types/checkbox-variant.type.d.ts +6 -0
- package/chip/chip-defaults.d.ts +12 -0
- package/chip/chip-group-defaults.d.ts +9 -0
- package/chip/chip-group.component.d.ts +14 -0
- package/chip/chip.component.d.ts +35 -0
- package/chip/index.d.ts +5 -0
- package/chip/public-api.d.ts +7 -0
- package/chip/types/chip-appearance.type.d.ts +5 -0
- package/chip/types/chip-events.type.d.ts +4 -0
- package/chip/types/chip-variant.type.d.ts +8 -0
- package/core/base-classes/component-base.d.ts +13 -0
- package/core/base-classes/directive-base.d.ts +16 -0
- package/core/directives/detect-scrollable.directive.d.ts +11 -0
- package/core/index.d.ts +5 -0
- package/core/pipes/sentence-case.pipe.d.ts +7 -0
- package/core/public-api.d.ts +17 -0
- package/core/services/resize-observer.service.d.ts +13 -0
- package/core/types/orientation.type.d.ts +5 -0
- package/core/types/position.type.d.ts +39 -0
- package/core/types/size-collection.type.d.ts +5 -0
- package/core/types/size.type.d.ts +7 -0
- package/core/utils/class-prefix.d.ts +2 -0
- package/core/utils/class.d.ts +2 -0
- package/core/utils/coercion.d.ts +6 -0
- package/core/utils/compare.d.ts +1 -0
- package/core/utils/date.d.ts +1 -0
- package/core/utils/even-odd.d.ts +2 -0
- package/core/utils/fallback-value.d.ts +1 -0
- package/core/utils/string.d.ts +1 -0
- package/dialog/custom-dialog-base.d.ts +15 -0
- package/dialog/dialog-defaults.d.ts +9 -0
- package/dialog/dialog-header.directive.d.ts +7 -0
- package/dialog/dialog.component.d.ts +22 -0
- package/dialog/dialog.service.d.ts +17 -0
- package/dialog/index.d.ts +5 -0
- package/dialog/public-api.d.ts +5 -0
- package/divider/divider-defaults.d.ts +12 -0
- package/divider/divider.component.d.ts +18 -0
- package/divider/index.d.ts +5 -0
- package/divider/public-api.d.ts +3 -0
- package/divider/types/divider-variant.type.d.ts +13 -0
- package/fesm2022/i-cell-ids-angular-accordion.mjs +223 -0
- package/fesm2022/i-cell-ids-angular-accordion.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-avatar.mjs +125 -0
- package/fesm2022/i-cell-ids-angular-avatar.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-button.mjs +117 -0
- package/fesm2022/i-cell-ids-angular-button.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-card.mjs +222 -0
- package/fesm2022/i-cell-ids-angular-card.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-checkbox.mjs +346 -0
- package/fesm2022/i-cell-ids-angular-checkbox.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-chip.mjs +166 -0
- package/fesm2022/i-cell-ids-angular-chip.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-core.mjs +266 -0
- package/fesm2022/i-cell-ids-angular-core.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-dialog.mjs +157 -0
- package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-divider.mjs +76 -0
- package/fesm2022/i-cell-ids-angular-divider.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-forms.mjs +871 -0
- package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-icon-button.mjs +81 -0
- package/fesm2022/i-cell-ids-angular-icon-button.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-icon.mjs +149 -0
- package/fesm2022/i-cell-ids-angular-icon.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-menu.mjs +108 -0
- package/fesm2022/i-cell-ids-angular-menu.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-notification.mjs +167 -0
- package/fesm2022/i-cell-ids-angular-notification.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs +72 -0
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-paginator.mjs +319 -0
- package/fesm2022/i-cell-ids-angular-paginator.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-radio.mjs +312 -0
- package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs +264 -0
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs +283 -0
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-select.mjs +550 -0
- package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-snackbar.mjs +440 -0
- package/fesm2022/i-cell-ids-angular-snackbar.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-switch.mjs +181 -0
- package/fesm2022/i-cell-ids-angular-switch.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tab.mjs +141 -0
- package/fesm2022/i-cell-ids-angular-tab.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-table.mjs +663 -0
- package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tag.mjs +116 -0
- package/fesm2022/i-cell-ids-angular-tag.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tooltip.mjs +587 -0
- package/fesm2022/i-cell-ids-angular-tooltip.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular.mjs +9 -0
- package/fesm2022/i-cell-ids-angular.mjs.map +1 -0
- package/forms/common/error/error-state.d.ts +23 -0
- package/forms/common/success/success-state.d.ts +23 -0
- package/forms/components/fieldset/fieldset-defaults.d.ts +9 -0
- package/forms/components/fieldset/fieldset-message.directive.d.ts +5 -0
- package/forms/components/fieldset/fieldset-row/fieldset-row.component.d.ts +8 -0
- package/forms/components/fieldset/fieldset.component.d.ts +16 -0
- package/forms/components/form-field/form-field-control.d.ts +21 -0
- package/forms/components/form-field/form-field-defaults.d.ts +9 -0
- package/forms/components/form-field/form-field.component.d.ts +41 -0
- package/forms/components/form-field/tokens/form-field-control.d.ts +3 -0
- package/forms/components/form-field/types/form-field-variant.type.d.ts +5 -0
- package/forms/components/input/input-defaults.d.ts +9 -0
- package/forms/components/input/input.directive.d.ts +55 -0
- package/forms/components/input/types/input.type.d.ts +1 -0
- package/forms/components/message/error-message/error-message.component.d.ts +15 -0
- package/forms/components/message/hint-message/hint-message.component.d.ts +10 -0
- package/forms/components/message/message-defaults.d.ts +9 -0
- package/forms/components/message/success-message/success-message.component.d.ts +11 -0
- package/forms/components/message/types/message-parent-form-field.d.ts +9 -0
- package/forms/components/message/types/message-variant.type.d.ts +6 -0
- package/forms/components/message/types/message.type.d.ts +6 -0
- package/forms/components/option/option-group.component.d.ts +13 -0
- package/forms/components/option/option.component.d.ts +47 -0
- package/forms/components/option/tokens/option-group.d.ts +3 -0
- package/forms/components/option/tokens/option-parent.d.ts +11 -0
- package/forms/components/option/types/option-events.class.d.ts +7 -0
- package/forms/components/pseudo-checkbox/pseudo-checkbox.component.d.ts +14 -0
- package/forms/components/pseudo-checkbox/tokens/pseudo-checkbox-parent.d.ts +7 -0
- package/forms/components/pseudo-checkbox/types/pseudo-checkbox-state.type.d.ts +6 -0
- package/forms/directives/form-field-action.directive.d.ts +5 -0
- package/forms/directives/label.directive.d.ts +5 -0
- package/forms/directives/message-prefix.directive.d.ts +5 -0
- package/forms/directives/message-suffix.directive.d.ts +5 -0
- package/forms/directives/message.directive.d.ts +17 -0
- package/forms/directives/prefix.directive.d.ts +7 -0
- package/forms/directives/suffix.directive.d.ts +7 -0
- package/forms/index.d.ts +5 -0
- package/forms/public-api.d.ts +35 -0
- package/forms/validators.d.ts +9 -0
- package/icon/icon-defaults.d.ts +11 -0
- package/icon/icon.component.d.ts +32 -0
- package/icon/index.d.ts +5 -0
- package/icon/public-api.d.ts +5 -0
- package/icon/tokens/icon-parent.d.ts +6 -0
- package/icon/types/icon-source.type.d.ts +5 -0
- package/icon/types/icon-variant.type.d.ts +12 -0
- package/icon-button/icon-button-defaults.d.ts +11 -0
- package/icon-button/icon-button.component.d.ts +22 -0
- package/icon-button/index.d.ts +5 -0
- package/icon-button/public-api.d.ts +5 -0
- package/icon-button/tokens/icon-button-parent.d.ts +9 -0
- package/icon-button/types/icon-button-appearance.type.d.ts +6 -0
- package/icon-button/types/icon-button-variant.type.d.ts +13 -0
- package/index.d.ts +5 -0
- package/menu/action-menu/action-menu-trigger.directive.d.ts +12 -0
- package/menu/index.d.ts +5 -0
- package/menu/menu-item/menu-item-defaults.d.ts +11 -0
- package/menu/menu-item/menu-item.component.d.ts +23 -0
- package/menu/menu-item/types/menu-item-appearance.type.d.ts +5 -0
- package/menu/menu-item/types/menu-item-variant.type.d.ts +4 -0
- package/menu/public-api.d.ts +5 -0
- package/notification/index.d.ts +5 -0
- package/notification/notification-action-button.directive.d.ts +5 -0
- package/notification/notification-defaults.d.ts +15 -0
- package/notification/notification.component.d.ts +34 -0
- package/notification/public-api.d.ts +5 -0
- package/notification/types/notification-appearance.type.d.ts +5 -0
- package/notification/types/notification-variant.type.d.ts +10 -0
- package/overlay-panel/index.d.ts +5 -0
- package/overlay-panel/overlay-panel-defaults.d.ts +11 -0
- package/overlay-panel/overlay-panel.component.d.ts +18 -0
- package/overlay-panel/public-api.d.ts +4 -0
- package/overlay-panel/types/overlay-panel-appearance.type.d.ts +6 -0
- package/overlay-panel/types/overlay-panel-variant.type.d.ts +5 -0
- package/package.json +153 -0
- package/paginator/index.d.ts +5 -0
- package/paginator/paginator-defaults.d.ts +22 -0
- package/paginator/paginator-intl.d.ts +24 -0
- package/paginator/paginator.component.d.ts +67 -0
- package/paginator/public-api.d.ts +5 -0
- package/paginator/types/paginator-appearance.type.d.ts +4 -0
- package/paginator/types/paginator-events.class.d.ts +6 -0
- package/paginator/types/paginator-variant.type.d.ts +7 -0
- package/public-api.d.ts +2 -0
- package/radio/index.d.ts +5 -0
- package/radio/public-api.d.ts +5 -0
- package/radio/radio-defaults.d.ts +11 -0
- package/radio/radio-group.directive.d.ts +46 -0
- package/radio/radio.component.d.ts +30 -0
- package/radio/types/radio-events.class.d.ts +6 -0
- package/radio/types/radio-variant.type.d.ts +6 -0
- package/segmented-control/index.d.ts +5 -0
- package/segmented-control/public-api.d.ts +6 -0
- package/segmented-control/segmented-control-defaults.d.ts +11 -0
- package/segmented-control/segmented-control-item.component.d.ts +33 -0
- package/segmented-control/segmented-control.directive.d.ts +42 -0
- package/segmented-control/types/segmented-control-appearance.type.d.ts +4 -0
- package/segmented-control/types/segmented-control-item-change.class.d.ts +7 -0
- package/segmented-control/types/segmented-control-variant.type.d.ts +6 -0
- package/segmented-control-toggle/index.d.ts +5 -0
- package/segmented-control-toggle/public-api.d.ts +6 -0
- package/segmented-control-toggle/segmented-control-toggle-defaults.d.ts +12 -0
- package/segmented-control-toggle/segmented-control-toggle-item.component.d.ts +32 -0
- package/segmented-control-toggle/segmented-control-toggle.directive.d.ts +43 -0
- package/segmented-control-toggle/types/segmented-control-toggle-appearance.type.d.ts +5 -0
- package/segmented-control-toggle/types/segmented-control-toggle-item-change.class.d.ts +6 -0
- package/segmented-control-toggle/types/segmented-control-toggle-variant.type.d.ts +11 -0
- package/select/index.d.ts +5 -0
- package/select/public-api.d.ts +3 -0
- package/select/select-defaults.d.ts +9 -0
- package/select/select-positions.d.ts +2 -0
- package/select/select-trigger.directive.d.ts +5 -0
- package/select/select.component.d.ts +102 -0
- package/snackbar/animations.d.ts +2 -0
- package/snackbar/index.d.ts +5 -0
- package/snackbar/public-api.d.ts +7 -0
- package/snackbar/services/snackbar.service.d.ts +28 -0
- package/snackbar/snackbar-defaults.d.ts +16 -0
- package/snackbar/snackbar-group.component.d.ts +25 -0
- package/snackbar/snackbar-position-strategies.d.ts +4 -0
- package/snackbar/snackbar.component.d.ts +51 -0
- package/snackbar/types/snackbar-data.type.d.ts +15 -0
- package/snackbar/types/snackbar-inner-data.type.d.ts +4 -0
- package/snackbar/types/snackbar-position.type.d.ts +9 -0
- package/snackbar/types/snackbar-variant.type.d.ts +8 -0
- package/switch/index.d.ts +5 -0
- package/switch/public-api.d.ts +5 -0
- package/switch/switch-animations.d.ts +2 -0
- package/switch/switch-defaults.d.ts +13 -0
- package/switch/switch-group.component.d.ts +14 -0
- package/switch/switch.component.d.ts +45 -0
- package/switch/types/switch-positions.type.d.ts +10 -0
- package/switch/types/switch-variant.type.d.ts +6 -0
- package/tab/index.d.ts +5 -0
- package/tab/public-api.d.ts +6 -0
- package/tab/tab-group-defaults.d.ts +15 -0
- package/tab/tab-group.component.d.ts +29 -0
- package/tab/tab.component.d.ts +18 -0
- package/tab/types/tab-group-position.type.d.ts +6 -0
- package/tab/types/tab-group-variant.type.d.ts +6 -0
- package/tab/types/tab-indicator-position.type.d.ts +7 -0
- package/table/components/cell-content/cell-content.component.d.ts +25 -0
- package/table/datasource/server-side-datasource.d.ts +37 -0
- package/table/directives/cell-renderer.d.ts +13 -0
- package/table/directives/cell-template.d.ts +8 -0
- package/table/directives/row-info-holder.d.ts +9 -0
- package/table/index.d.ts +5 -0
- package/table/public-api.d.ts +18 -0
- package/table/table-defaults.d.ts +22 -0
- package/table/table-intl.d.ts +25 -0
- package/table/table.component.d.ts +142 -0
- package/table/types/pagination-params.d.ts +9 -0
- package/table/types/request-factory.d.ts +5 -0
- package/table/types/request-pagination-data.d.ts +6 -0
- package/table/types/response-data.d.ts +5 -0
- package/table/types/table-appearance.type.d.ts +6 -0
- package/table/types/table-cell-click-event.d.ts +6 -0
- package/table/types/table-column-def.d.ts +97 -0
- package/table/types/table-row-click-event.d.ts +4 -0
- package/table/types/table-row-keydown-event.d.ts +4 -0
- package/table/types/table-sort-direction.d.ts +6 -0
- package/table/types/table-sort-info.d.ts +6 -0
- package/table/types/table-variant.type.d.ts +6 -0
- package/tag/index.d.ts +5 -0
- package/tag/public-api.d.ts +6 -0
- package/tag/tag-defaults.d.ts +11 -0
- package/tag/tag-group-defaults.d.ts +9 -0
- package/tag/tag-group.component.d.ts +13 -0
- package/tag/tag.component.d.ts +23 -0
- package/tag/types/tag-appearance.type.d.ts +5 -0
- package/tag/types/tag-variant.type.d.ts +13 -0
- package/tooltip/index.d.ts +5 -0
- package/tooltip/public-api.d.ts +5 -0
- package/tooltip/tooltip-defaults.d.ts +18 -0
- package/tooltip/tooltip-position-strategies.d.ts +3 -0
- package/tooltip/tooltip.component.d.ts +31 -0
- package/tooltip/tooltip.directive.d.ts +60 -0
- package/tooltip/types/tooltip-position.type.d.ts +11 -0
- package/tooltip/types/tooltip-variant.type.d.ts +5 -0
- package/tooltip/types/tooltip.type.d.ts +2 -0
- package/tooltip/utils/tooltip-converters.d.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-menu.mjs","sources":["../../../projects/widgets/menu/action-menu/action-menu-trigger.directive.ts","../../../projects/widgets/menu/menu-item/types/menu-item-appearance.type.ts","../../../projects/widgets/menu/menu-item/types/menu-item-variant.type.ts","../../../projects/widgets/menu/menu-item/menu-item-defaults.ts","../../../projects/widgets/menu/menu-item/menu-item.component.ts","../../../projects/widgets/menu/menu-item/menu-item.component.html","../../../projects/widgets/menu/i-cell-ids-angular-menu.ts"],"sourcesContent":["import { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { Directive, inject } from '@angular/core';\n\n@Directive({\n selector: 'button[idsActionMenuTriggerFor]',\n standalone: true,\n hostDirectives: [\n {\n directive: CdkMenuTrigger,\n inputs: ['cdkMenuTriggerFor: idsActionMenuTriggerFor'],\n },\n ],\n exportAs: 'idsActionMenuTrigger',\n})\nexport class IdsActionMenuTriggerDirective {\n public menuTrigger = inject(CdkMenuTrigger);\n\n get isOpen(): boolean {\n return !!this.menuTrigger.isOpen();\n }\n\n public open(): void {\n this.menuTrigger.open();\n }\n\n public close(): void {\n this.menuTrigger.close();\n }\n\n public toggle(): void {\n this.menuTrigger.toggle();\n }\n}\n","export const IdsMenuItemAppearance = {\n FILLED: 'filled',\n TEXT: 'text',\n} as const;\n\nexport type IdsMenuItemAppearanceType = (typeof IdsMenuItemAppearance)[keyof typeof IdsMenuItemAppearance];\n","export const IdsMenuItemVariant = {\n SURFACE: 'surface',\n} as const;\n\nexport type MenuItemVariantType = (typeof IdsMenuItemVariant)[keyof typeof IdsMenuItemVariant];\n","import { IdsMenuItemAppearance, IdsMenuItemAppearanceType } from './types/menu-item-appearance.type';\nimport { IdsMenuItemVariant, MenuItemVariantType } from './types/menu-item-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsMenuItemDefaultConfig {\n appearance?: IdsMenuItemAppearanceType,\n size?: IdsSizeType,\n variant?: MenuItemVariantType,\n}\n\nexport const IDS_MENU_ITEM_DEFAULT_CONFIG = new InjectionToken<IdsMenuItemDefaultConfig>(\n 'IDS_MENU_ITEM_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_MENU_ITEM_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_MENU_ITEM_DEFAULT_CONFIG_FACTORY(): Required<IdsMenuItemDefaultConfig> {\n return {\n appearance: IdsMenuItemAppearance.TEXT,\n size: IdsSize.COMPACT,\n variant: IdsMenuItemVariant.SURFACE,\n };\n}\n\n","import { IDS_MENU_ITEM_DEFAULT_CONFIG, IDS_MENU_ITEM_DEFAULT_CONFIG_FACTORY, IdsMenuItemDefaultConfig } from './menu-item-defaults';\nimport { IdsMenuItemAppearanceType } from './types/menu-item-appearance.type';\nimport { MenuItemVariantType } from './types/menu-item-variant.type';\n\nimport { CdkMenuItem } from '@angular/cdk/menu';\nimport { ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, computed, contentChildren, inject, input } from '@angular/core';\nimport { ComponentBaseWithDefaults, IdsSizeType, coerceBooleanAttribute } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_MENU_ITEM_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'button[idsMenuItem],a[idsMenuItem]',\n imports: [],\n hostDirectives: [CdkMenuItem],\n templateUrl: './menu-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[type]': 'buttonType',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() || null',\n },\n})\nexport class IdsMenuItemComponent extends ComponentBaseWithDefaults<IdsMenuItemDefaultConfig> {\n protected override get _hostName(): string {\n return 'menu-item';\n }\n\n private _hostElement = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>).nativeElement;\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_MENU_ITEM_DEFAULT_CONFIG);\n\n public label = input.required<string>();\n public appearance = input<IdsMenuItemAppearanceType>(this._defaultConfig.appearance);\n\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public variant = input<MenuItemVariantType>(this._defaultConfig.variant);\n public active = input(false);\n public disabled = input(false, {\n transform: (value: boolean | string) => coerceBooleanAttribute(value),\n });\n\n public iconLeading = contentChildren<IdsIconComponent>('[icon-leading]');\n public iconTrailing = contentChildren<IdsIconComponent>('[icon-trailing]');\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.appearance(),\n this.size(),\n this.variant(),\n this.active() ? 'active' : null,\n ]));\n\n public get buttonType(): string | null {\n return this._hostElement.tagName === 'BUTTON' ? 'button' : null;\n }\n}\n","@if (iconLeading()) {\n <ng-content select=\"ids-icon[icon-leading]\" />\n}\n<span class=\"ids-menu-item-label\">{{ label() }}</span>\n@if (iconTrailing()) {\n <ng-content select=\"ids-icon[icon-trailing]\" />\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings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;;AAEG;;;;"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, InjectionToken, input, signal, contentChildren, output, computed, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { IdsButtonAppearance, IdsButtonVariant, IDS_BUTTON_PARENT, IdsButtonComponent } from '@i-cell/ids-angular/button';
|
|
4
|
+
import { IdsSize, ComponentBaseWithDefaults, coerceBooleanAttribute, coerceStringAttribute } from '@i-cell/ids-angular/core';
|
|
5
|
+
import { IdsIconComponent } from '@i-cell/ids-angular/icon';
|
|
6
|
+
import { IdsIconButtonAppearance, IdsIconButtonVariant, IDS_ICON_BUTTON_PARENT, IdsIconButtonComponent } from '@i-cell/ids-angular/icon-button';
|
|
7
|
+
|
|
8
|
+
const IdsNotificationAppearance = {
|
|
9
|
+
FILLED: 'filled',
|
|
10
|
+
OUTLINED: 'outlined',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const IdsNotificationVariant = {
|
|
14
|
+
SURFACE: 'surface',
|
|
15
|
+
LIGHT: 'light',
|
|
16
|
+
DARK: 'dark',
|
|
17
|
+
INFO: 'info',
|
|
18
|
+
SUCCESS: 'success',
|
|
19
|
+
WARNING: 'warning',
|
|
20
|
+
ERROR: 'error',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
class IdsNotificationActionButtonDirective {
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsNotificationActionButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
25
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.2", type: IdsNotificationActionButtonDirective, isStandalone: true, selector: "[idsNotificationActionButton]", ngImport: i0 }); }
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsNotificationActionButtonDirective, decorators: [{
|
|
28
|
+
type: Directive,
|
|
29
|
+
args: [{
|
|
30
|
+
selector: '[idsNotificationActionButton]',
|
|
31
|
+
standalone: true,
|
|
32
|
+
}]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
const IDS_NOTIFICATION_DEFAULT_CONFIG = new InjectionToken('IDS_NOTIFICATION_DEFAULT_CONFIG', {
|
|
36
|
+
providedIn: 'root',
|
|
37
|
+
factory: IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY,
|
|
38
|
+
});
|
|
39
|
+
function IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY() {
|
|
40
|
+
return {
|
|
41
|
+
appearance: IdsNotificationAppearance.OUTLINED,
|
|
42
|
+
size: IdsSize.COMPACT,
|
|
43
|
+
variant: IdsNotificationVariant.DARK,
|
|
44
|
+
closeButtonSize: IdsSize.COMPACT,
|
|
45
|
+
closeLabelButtonAppearance: IdsButtonAppearance.OUTLINED,
|
|
46
|
+
displayActionsAtBottom: false,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const defaultConfig = IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY();
|
|
51
|
+
class IdsNotificationComponent extends ComponentBaseWithDefaults {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
|
+
this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_NOTIFICATION_DEFAULT_CONFIG);
|
|
55
|
+
this.size = input(this._defaultConfig.size);
|
|
56
|
+
this.appearance = input(this._defaultConfig.appearance);
|
|
57
|
+
this.variant = input(this._defaultConfig.variant);
|
|
58
|
+
this.icon = input();
|
|
59
|
+
this.title = input('');
|
|
60
|
+
this.urgent = input(false, { transform: coerceBooleanAttribute });
|
|
61
|
+
this.displayActionsAtBottom = input(false, { transform: coerceBooleanAttribute });
|
|
62
|
+
this.closeButtonSize = input(this._defaultConfig.closeButtonSize);
|
|
63
|
+
this.closeLabelButtonAppearance = input(this._defaultConfig.closeLabelButtonAppearance);
|
|
64
|
+
this.closeButtonLabel = input('', { transform: coerceStringAttribute });
|
|
65
|
+
this.embeddedIconButtonAppearance = signal(IdsIconButtonAppearance.STANDARD);
|
|
66
|
+
this.disabled = signal(false);
|
|
67
|
+
this._actionButtons = contentChildren(IdsNotificationActionButtonDirective);
|
|
68
|
+
this.closed = output();
|
|
69
|
+
this.role = computed(() => (this.urgent() ? 'alert' : 'status'));
|
|
70
|
+
this._hostClasses = computed(() => this._getHostClasses([
|
|
71
|
+
this.size(),
|
|
72
|
+
this.appearance(),
|
|
73
|
+
this.variant(),
|
|
74
|
+
this.displayActionsAtBottom() ? 'actions-bottom-mode' : null,
|
|
75
|
+
]));
|
|
76
|
+
this._closeLabelButtonClass = computed(() => (this.closeButtonLabel() ? 'ids-notification__label-button' : ''));
|
|
77
|
+
this.embeddedButtonVariant = computed(() => {
|
|
78
|
+
const notificationVariant = this.variant();
|
|
79
|
+
const notificationAppearance = this.appearance();
|
|
80
|
+
if (notificationAppearance === IdsNotificationAppearance.OUTLINED) {
|
|
81
|
+
switch (notificationVariant) {
|
|
82
|
+
case IdsNotificationVariant.DARK:
|
|
83
|
+
return IdsButtonVariant.DARK;
|
|
84
|
+
case IdsNotificationVariant.LIGHT:
|
|
85
|
+
return IdsButtonVariant.LIGHT;
|
|
86
|
+
default:
|
|
87
|
+
return IdsButtonVariant.SURFACE;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
switch (notificationVariant) {
|
|
92
|
+
case IdsNotificationVariant.SURFACE:
|
|
93
|
+
case IdsNotificationVariant.LIGHT:
|
|
94
|
+
return IdsButtonVariant.DARK;
|
|
95
|
+
default:
|
|
96
|
+
return IdsButtonVariant.LIGHT;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
this.embeddedIconButtonVariant = computed(() => {
|
|
101
|
+
const notificationVariant = this.variant();
|
|
102
|
+
const notificationAppearance = this.appearance();
|
|
103
|
+
if (notificationAppearance === IdsNotificationAppearance.OUTLINED) {
|
|
104
|
+
switch (notificationVariant) {
|
|
105
|
+
case IdsNotificationVariant.DARK:
|
|
106
|
+
return IdsIconButtonVariant.DARK;
|
|
107
|
+
case IdsNotificationVariant.LIGHT:
|
|
108
|
+
return IdsIconButtonVariant.LIGHT;
|
|
109
|
+
default:
|
|
110
|
+
return IdsIconButtonVariant.SURFACE;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
switch (notificationVariant) {
|
|
115
|
+
case IdsNotificationVariant.SURFACE:
|
|
116
|
+
case IdsNotificationVariant.LIGHT:
|
|
117
|
+
return IdsIconButtonVariant.DARK;
|
|
118
|
+
default:
|
|
119
|
+
return IdsIconButtonVariant.LIGHT;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
get _hostName() {
|
|
125
|
+
return 'notification';
|
|
126
|
+
}
|
|
127
|
+
_close() {
|
|
128
|
+
this.closed.emit();
|
|
129
|
+
}
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsNotificationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsNotificationComponent, isStandalone: true, selector: "ids-notification", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, urgent: { classPropertyName: "urgent", publicName: "urgent", isSignal: true, isRequired: false, transformFunction: null }, displayActionsAtBottom: { classPropertyName: "displayActionsAtBottom", publicName: "displayActionsAtBottom", isSignal: true, isRequired: false, transformFunction: null }, closeButtonSize: { classPropertyName: "closeButtonSize", publicName: "closeButtonSize", isSignal: true, isRequired: false, transformFunction: null }, closeLabelButtonAppearance: { classPropertyName: "closeLabelButtonAppearance", publicName: "closeLabelButtonAppearance", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "role": "role()" } }, providers: [
|
|
132
|
+
{
|
|
133
|
+
provide: IDS_BUTTON_PARENT,
|
|
134
|
+
useExisting: IdsNotificationComponent,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
provide: IDS_ICON_BUTTON_PARENT,
|
|
138
|
+
useExisting: IdsNotificationComponent,
|
|
139
|
+
},
|
|
140
|
+
], queries: [{ propertyName: "_actionButtons", predicate: IdsNotificationActionButtonDirective, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ids-notification__content-wrapper\">\n @let fontIcon = icon();\n @if (fontIcon) {\n <div class=\"ids-notification__leading-element\">\n <ids-icon [fontIcon]=\"fontIcon\" />\n </div>\n }\n\n <div class=\"ids-notification__container\">\n <div class=\"ids-notification__title-msg-container\">\n <div class=\"ids-notification__title\">\n {{ title() }}\n </div>\n <div class=\"ids-notification__message\">\n <ng-content />\n </div>\n </div>\n @if (_actionButtons()) {\n <div class=\"ids-notification__action\">\n <ng-content select=\"button[idsNotificationActionButton]\" />\n </div>\n }\n </div>\n\n <div class=\"ids-notification__close-button-container\" [class]=\"_closeLabelButtonClass()\">\n @let buttonLabel = closeButtonLabel();\n @if (buttonLabel) {\n <button\n type=\"button\"\n aria-label=\"Close notification\"\n idsButton\n [size]=\"closeButtonSize()\"\n [appearance]=\"closeLabelButtonAppearance()\"\n (click)=\"_close()\"\n >\n {{ buttonLabel }}\n </button>\n } @else {\n <button type=\"button\" aria-label=\"Close notification\" idsIconButton [size]=\"closeButtonSize()\" (click)=\"_close()\">\n <ids-icon alt=\"close icon\" fontIcon=\"close\" />\n </button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsButtonComponent, selector: "button[idsButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsNotificationComponent, decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{ selector: 'ids-notification', imports: [
|
|
145
|
+
IdsIconComponent,
|
|
146
|
+
IdsButtonComponent,
|
|
147
|
+
IdsIconButtonComponent,
|
|
148
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
149
|
+
'[role]': 'role()',
|
|
150
|
+
}, providers: [
|
|
151
|
+
{
|
|
152
|
+
provide: IDS_BUTTON_PARENT,
|
|
153
|
+
useExisting: IdsNotificationComponent,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
provide: IDS_ICON_BUTTON_PARENT,
|
|
157
|
+
useExisting: IdsNotificationComponent,
|
|
158
|
+
},
|
|
159
|
+
], template: "<div class=\"ids-notification__content-wrapper\">\n @let fontIcon = icon();\n @if (fontIcon) {\n <div class=\"ids-notification__leading-element\">\n <ids-icon [fontIcon]=\"fontIcon\" />\n </div>\n }\n\n <div class=\"ids-notification__container\">\n <div class=\"ids-notification__title-msg-container\">\n <div class=\"ids-notification__title\">\n {{ title() }}\n </div>\n <div class=\"ids-notification__message\">\n <ng-content />\n </div>\n </div>\n @if (_actionButtons()) {\n <div class=\"ids-notification__action\">\n <ng-content select=\"button[idsNotificationActionButton]\" />\n </div>\n }\n </div>\n\n <div class=\"ids-notification__close-button-container\" [class]=\"_closeLabelButtonClass()\">\n @let buttonLabel = closeButtonLabel();\n @if (buttonLabel) {\n <button\n type=\"button\"\n aria-label=\"Close notification\"\n idsButton\n [size]=\"closeButtonSize()\"\n [appearance]=\"closeLabelButtonAppearance()\"\n (click)=\"_close()\"\n >\n {{ buttonLabel }}\n </button>\n } @else {\n <button type=\"button\" aria-label=\"Close notification\" idsIconButton [size]=\"closeButtonSize()\" (click)=\"_close()\">\n <ids-icon alt=\"close icon\" fontIcon=\"close\" />\n </button>\n }\n </div>\n</div>\n" }]
|
|
160
|
+
}] });
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Generated bundle index. Do not edit.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
export { IDS_NOTIFICATION_DEFAULT_CONFIG, IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY, IdsNotificationActionButtonDirective, IdsNotificationAppearance, IdsNotificationComponent, IdsNotificationVariant };
|
|
167
|
+
//# sourceMappingURL=i-cell-ids-angular-notification.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-notification.mjs","sources":["../../../projects/widgets/notification/types/notification-appearance.type.ts","../../../projects/widgets/notification/types/notification-variant.type.ts","../../../projects/widgets/notification/notification-action-button.directive.ts","../../../projects/widgets/notification/notification-defaults.ts","../../../projects/widgets/notification/notification.component.ts","../../../projects/widgets/notification/notification.component.html","../../../projects/widgets/notification/i-cell-ids-angular-notification.ts"],"sourcesContent":["export const IdsNotificationAppearance = {\n FILLED: 'filled',\n OUTLINED: 'outlined',\n} as const;\n\nexport type IdsNotificationAppearanceType = (typeof IdsNotificationAppearance)[keyof typeof IdsNotificationAppearance];\n","export const IdsNotificationVariant = {\n SURFACE: 'surface',\n LIGHT: 'light',\n DARK: 'dark',\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\n\nexport type IdsNotificationVariantType = (typeof IdsNotificationVariant)[keyof typeof IdsNotificationVariant];\n\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[idsNotificationActionButton]',\n standalone: true,\n})\nexport class IdsNotificationActionButtonDirective {\n}\n","import { IdsNotificationAppearance, IdsNotificationAppearanceType } from './types/notification-appearance.type';\nimport { IdsNotificationVariant, IdsNotificationVariantType } from './types/notification-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsButtonAppearance, IdsButtonAppearanceType } from '@i-cell/ids-angular/button';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsNotificationDefaultConfig {\n appearance?: IdsNotificationAppearanceType,\n size?: IdsSizeType,\n variant?: IdsNotificationVariantType,\n closeButtonSize?: IdsSizeType,\n closeLabelButtonAppearance?: IdsButtonAppearanceType,\n displayActionsAtBottom?: boolean,\n}\n\nexport const IDS_NOTIFICATION_DEFAULT_CONFIG = new InjectionToken<IdsNotificationDefaultConfig>(\n 'IDS_NOTIFICATION_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY(): Required<IdsNotificationDefaultConfig> {\n return {\n appearance: IdsNotificationAppearance.OUTLINED,\n size: IdsSize.COMPACT,\n variant: IdsNotificationVariant.DARK,\n closeButtonSize: IdsSize.COMPACT,\n closeLabelButtonAppearance: IdsButtonAppearance.OUTLINED,\n displayActionsAtBottom: false,\n };\n}\n\n","import { IdsNotificationActionButtonDirective } from './notification-action-button.directive';\nimport { IDS_NOTIFICATION_DEFAULT_CONFIG, IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY, IdsNotificationDefaultConfig } from './notification-defaults';\nimport { IdsNotificationAppearance, IdsNotificationAppearanceType } from './types/notification-appearance.type';\nimport { IdsNotificationVariant, IdsNotificationVariantType } from './types/notification-variant.type';\n\nimport { ChangeDetectionStrategy, Component, computed, contentChildren, input, output, signal, ViewEncapsulation } from '@angular/core';\nimport { IDS_BUTTON_PARENT, IdsButtonAppearanceType, IdsButtonComponent, IdsButtonParent, IdsButtonVariant } from '@i-cell/ids-angular/button';\nimport { coerceBooleanAttribute, coerceStringAttribute, ComponentBaseWithDefaults, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\nimport { IDS_ICON_BUTTON_PARENT, IdsIconButtonAppearance, IdsIconButtonAppearanceType, IdsIconButtonComponent, IdsIconButtonParent, IdsIconButtonVariant, IdsIconButtonVariantType } from '@i-cell/ids-angular/icon-button';\n\nconst defaultConfig = IDS_NOTIFICATION_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-notification',\n imports: [\n IdsIconComponent,\n IdsButtonComponent,\n IdsIconButtonComponent,\n ],\n templateUrl: './notification.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[role]': 'role()',\n },\n providers: [\n {\n provide: IDS_BUTTON_PARENT,\n useExisting: IdsNotificationComponent,\n },\n {\n provide: IDS_ICON_BUTTON_PARENT,\n useExisting: IdsNotificationComponent,\n },\n ],\n})\nexport class IdsNotificationComponent extends ComponentBaseWithDefaults<IdsNotificationDefaultConfig>\n implements IdsButtonParent, IdsIconButtonParent {\n protected override get _hostName(): string {\n return 'notification';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_NOTIFICATION_DEFAULT_CONFIG);\n\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public appearance = input<IdsNotificationAppearanceType>(this._defaultConfig.appearance);\n public variant = input<IdsNotificationVariantType>(this._defaultConfig.variant);\n public icon = input<string | undefined>();\n public title = input<string>('');\n public urgent = input<boolean, boolean | undefined>(false, { transform: coerceBooleanAttribute });\n public displayActionsAtBottom = input<boolean, boolean | undefined>(false, { transform: coerceBooleanAttribute });\n public closeButtonSize = input<IdsSizeType>(this._defaultConfig.closeButtonSize);\n public closeLabelButtonAppearance = input<IdsButtonAppearanceType>(this._defaultConfig.closeLabelButtonAppearance);\n public closeButtonLabel = input<string, string>('', { transform: coerceStringAttribute });\n\n public embeddedIconButtonAppearance = signal<IdsIconButtonAppearanceType>(IdsIconButtonAppearance.STANDARD);\n public disabled = signal<boolean>(false);\n\n protected _actionButtons = contentChildren<IdsNotificationActionButtonDirective>(IdsNotificationActionButtonDirective);\n\n public closed = output<void>();\n\n public role = computed(() => (this.urgent() ? 'alert' : 'status'));\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.appearance(),\n this.variant(),\n this.displayActionsAtBottom() ? 'actions-bottom-mode' : null,\n ]));\n\n protected _closeLabelButtonClass = computed(() => (this.closeButtonLabel() ? 'ids-notification__label-button' : ''));\n\n public embeddedButtonVariant = computed<IdsIconButtonVariantType>(() => {\n const notificationVariant = this.variant();\n const notificationAppearance = this.appearance();\n\n if (notificationAppearance === IdsNotificationAppearance.OUTLINED) {\n switch (notificationVariant) {\n case IdsNotificationVariant.DARK:\n return IdsButtonVariant.DARK;\n case IdsNotificationVariant.LIGHT:\n return IdsButtonVariant.LIGHT;\n default:\n return IdsButtonVariant.SURFACE;\n }\n } else {\n switch (notificationVariant) {\n case IdsNotificationVariant.SURFACE:\n case IdsNotificationVariant.LIGHT:\n return IdsButtonVariant.DARK;\n default:\n return IdsButtonVariant.LIGHT;\n }\n }\n });\n\n public embeddedIconButtonVariant = computed<IdsIconButtonVariantType>(() => {\n const notificationVariant = this.variant();\n const notificationAppearance = this.appearance();\n\n if (notificationAppearance === IdsNotificationAppearance.OUTLINED) {\n switch (notificationVariant) {\n case IdsNotificationVariant.DARK:\n return IdsIconButtonVariant.DARK;\n case IdsNotificationVariant.LIGHT:\n return IdsIconButtonVariant.LIGHT;\n default:\n return IdsIconButtonVariant.SURFACE;\n }\n } else {\n switch (notificationVariant) {\n case IdsNotificationVariant.SURFACE:\n case IdsNotificationVariant.LIGHT:\n return IdsIconButtonVariant.DARK;\n default:\n return IdsIconButtonVariant.LIGHT;\n }\n }\n });\n\n protected _close(): void {\n this.closed.emit();\n }\n}\n","<div class=\"ids-notification__content-wrapper\">\n @let fontIcon = icon();\n @if (fontIcon) {\n <div class=\"ids-notification__leading-element\">\n <ids-icon [fontIcon]=\"fontIcon\" />\n </div>\n }\n\n <div class=\"ids-notification__container\">\n <div class=\"ids-notification__title-msg-container\">\n <div class=\"ids-notification__title\">\n {{ title() }}\n </div>\n <div class=\"ids-notification__message\">\n <ng-content />\n </div>\n </div>\n @if (_actionButtons()) {\n <div class=\"ids-notification__action\">\n <ng-content select=\"button[idsNotificationActionButton]\" />\n </div>\n }\n </div>\n\n <div class=\"ids-notification__close-button-container\" [class]=\"_closeLabelButtonClass()\">\n @let buttonLabel = closeButtonLabel();\n @if (buttonLabel) {\n <button\n type=\"button\"\n aria-label=\"Close notification\"\n idsButton\n [size]=\"closeButtonSize()\"\n [appearance]=\"closeLabelButtonAppearance()\"\n (click)=\"_close()\"\n >\n {{ buttonLabel }}\n </button>\n } @else {\n <button type=\"button\" aria-label=\"Close notification\" idsIconButton [size]=\"closeButtonSize()\" (click)=\"_close()\">\n <ids-icon alt=\"close icon\" fontIcon=\"close\" />\n </button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAa,MAAA,yBAAyB,GAAG;AACvC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,QAAQ,EAAE,UAAU;;;ACFT,MAAA,sBAAsB,GAAG;AACpC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,SAAS;AAClB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Children, computed, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { IdsSize, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';
|
|
4
|
+
import * as i1 from '@angular/cdk/menu';
|
|
5
|
+
import { CdkMenu, CdkTargetMenuAim } from '@angular/cdk/menu';
|
|
6
|
+
import { IdsMenuItemComponent } from '@i-cell/ids-angular/menu';
|
|
7
|
+
|
|
8
|
+
const IdsOverlayPanelAppearance = {
|
|
9
|
+
FILLED: 'filled',
|
|
10
|
+
OUTLINED: 'outlined',
|
|
11
|
+
ELEVATED: 'elevated',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const IdsOverlayPanelVariant = {
|
|
15
|
+
SURFACE: 'surface',
|
|
16
|
+
LIGHT: 'light',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const IDS_OVERLAY_PANEL_DEFAULT_CONFIG = new InjectionToken('IDS_OVERLAY_PANEL_DEFAULT_CONFIG', {
|
|
20
|
+
providedIn: 'root',
|
|
21
|
+
factory: IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY,
|
|
22
|
+
});
|
|
23
|
+
function IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY() {
|
|
24
|
+
return {
|
|
25
|
+
appearance: IdsOverlayPanelAppearance.FILLED,
|
|
26
|
+
size: IdsSize.COMPACT,
|
|
27
|
+
variant: IdsOverlayPanelVariant.LIGHT,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const defaultConfig = IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY();
|
|
32
|
+
class IdsOverlayPanelComponent extends ComponentBaseWithDefaults {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_OVERLAY_PANEL_DEFAULT_CONFIG);
|
|
36
|
+
this.appearance = input(this._defaultConfig.appearance);
|
|
37
|
+
this.size = input(this._defaultConfig.size);
|
|
38
|
+
this.variant = input(this._defaultConfig.variant);
|
|
39
|
+
this.actionItems = contentChildren(IdsMenuItemComponent);
|
|
40
|
+
this._hostClasses = computed(() => this._getHostClasses([
|
|
41
|
+
this.appearance(),
|
|
42
|
+
this.size(),
|
|
43
|
+
this.variant(),
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
get _hostName() {
|
|
47
|
+
return 'overlay-panel';
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsOverlayPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.2", type: IdsOverlayPanelComponent, isStandalone: true, selector: "ids-overlay-panel,div[idsOverlayPanel]", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "actionItems", predicate: IdsMenuItemComponent, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.CdkMenu }, { directive: i1.CdkTargetMenuAim }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsOverlayPanelComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{
|
|
55
|
+
selector: 'ids-overlay-panel,div[idsOverlayPanel]',
|
|
56
|
+
imports: [],
|
|
57
|
+
hostDirectives: [
|
|
58
|
+
CdkMenu,
|
|
59
|
+
CdkTargetMenuAim,
|
|
60
|
+
],
|
|
61
|
+
template: '<ng-content />',
|
|
62
|
+
encapsulation: ViewEncapsulation.None,
|
|
63
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
64
|
+
}]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Generated bundle index. Do not edit.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
export { IDS_OVERLAY_PANEL_DEFAULT_CONFIG, IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY, IdsOverlayPanelAppearance, IdsOverlayPanelComponent, IdsOverlayPanelVariant };
|
|
72
|
+
//# sourceMappingURL=i-cell-ids-angular-overlay-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-overlay-panel.mjs","sources":["../../../projects/widgets/overlay-panel/types/overlay-panel-appearance.type.ts","../../../projects/widgets/overlay-panel/types/overlay-panel-variant.type.ts","../../../projects/widgets/overlay-panel/overlay-panel-defaults.ts","../../../projects/widgets/overlay-panel/overlay-panel.component.ts","../../../projects/widgets/overlay-panel/i-cell-ids-angular-overlay-panel.ts"],"sourcesContent":["export const IdsOverlayPanelAppearance = {\n FILLED: 'filled',\n OUTLINED: 'outlined',\n ELEVATED: 'elevated',\n} as const;\n\nexport type IdsOverlayPanelAppearanceType = (typeof IdsOverlayPanelAppearance)[keyof typeof IdsOverlayPanelAppearance];\n","export const IdsOverlayPanelVariant = {\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsOverlayPanelVariantType = (typeof IdsOverlayPanelVariant)[keyof typeof IdsOverlayPanelVariant];\n","import { IdsOverlayPanelAppearance, IdsOverlayPanelAppearanceType } from './types/overlay-panel-appearance.type';\nimport { IdsOverlayPanelVariant, IdsOverlayPanelVariantType } from './types/overlay-panel-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsOverlayPanelDefaultConfig {\n appearance?: IdsOverlayPanelAppearanceType,\n size?: IdsSizeType,\n variant?: IdsOverlayPanelVariantType,\n}\n\nexport const IDS_OVERLAY_PANEL_DEFAULT_CONFIG = new InjectionToken<IdsOverlayPanelDefaultConfig>(\n 'IDS_OVERLAY_PANEL_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY(): Required<IdsOverlayPanelDefaultConfig> {\n return {\n appearance: IdsOverlayPanelAppearance.FILLED,\n size: IdsSize.COMPACT,\n variant: IdsOverlayPanelVariant.LIGHT,\n };\n}\n\n","import { IDS_OVERLAY_PANEL_DEFAULT_CONFIG, IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY, IdsOverlayPanelDefaultConfig } from './overlay-panel-defaults';\nimport { IdsOverlayPanelAppearanceType } from './types/overlay-panel-appearance.type';\nimport { IdsOverlayPanelVariantType } from './types/overlay-panel-variant.type';\n\nimport { CdkMenu, CdkTargetMenuAim } from '@angular/cdk/menu';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, contentChildren, input } from '@angular/core';\nimport { ComponentBaseWithDefaults, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsMenuItemComponent } from '@i-cell/ids-angular/menu';\n\nconst defaultConfig = IDS_OVERLAY_PANEL_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-overlay-panel,div[idsOverlayPanel]',\n imports: [],\n hostDirectives: [\n CdkMenu,\n CdkTargetMenuAim,\n ],\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsOverlayPanelComponent extends ComponentBaseWithDefaults<IdsOverlayPanelDefaultConfig> {\n protected override get _hostName(): string {\n return 'overlay-panel';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_OVERLAY_PANEL_DEFAULT_CONFIG);\n\n public appearance = input<IdsOverlayPanelAppearanceType>(this._defaultConfig.appearance);\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public variant = input<IdsOverlayPanelVariantType>(this._defaultConfig.variant);\n\n public actionItems = contentChildren(IdsMenuItemComponent);\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.appearance(),\n this.size(),\n this.variant(),\n ]),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAa,MAAA,yBAAyB,GAAG;AACvC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,QAAQ,EAAE,UAAU;;;ACHT,MAAA,sBAAsB,GAAG;AACpC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;MCUH,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC,EAClC;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,wCAAwC;AAClD,CAAA;SAGa,wCAAwC,GAAA;IACtD,OAAO;QACL,UAAU,EAAE,yBAAyB,CAAC,MAAM;QAC5C,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,sBAAsB,CAAC,KAAK;KACtC;AACH;;ACjBA,MAAM,aAAa,GAAG,wCAAwC,EAAE;AAa1D,MAAO,wBAAyB,SAAQ,yBAAuD,CAAA;AAXrG,IAAA,WAAA,GAAA;;QAgBqB,IAAc,CAAA,cAAA,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,gCAAgC,CAAC;QAEpG,IAAU,CAAA,UAAA,GAAG,KAAK,CAAgC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC;QACjF,IAAI,CAAA,IAAA,GAAG,KAAK,CAAc,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QACnD,IAAO,CAAA,OAAA,GAAG,KAAK,CAA6B,IAAI,CAAC,cAAc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