@eui/eds 22.0.0-alpha.22 → 22.0.0-alpha.24
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/docs/changelog.html +62 -0
- package/docs/components/EdsButton.html +77 -203
- package/docs/components/EdsCalendarDay.html +1 -1
- package/docs/components/EdsCalendarHeader.html +1 -1
- package/docs/components/EdsDatepicker.html +1 -1
- package/docs/components/EdsDialogContainer.html +1 -1
- package/docs/components/EdsFeedbackMessage.html +35 -73
- package/docs/components/EdsFileUpload.html +1 -1
- package/docs/components/EdsFlexLayout.html +1 -1
- package/docs/components/EdsGridLayout.html +1 -1
- package/docs/components/EdsGridLayoutCell.html +1 -1
- package/docs/components/EdsGridLayoutRow.html +1 -1
- package/docs/components/EdsIconState.html +38 -3
- package/docs/components/EdsInputButton.html +0 -57
- package/docs/components/EdsInputCheckbox.html +0 -62
- package/docs/components/EdsInputIcon.html +0 -53
- package/docs/components/EdsInputNumber.html +0 -60
- package/docs/components/EdsInputRadio.html +0 -62
- package/docs/components/EdsInputText.html +0 -62
- package/docs/components/EdsLabel.html +1 -1
- package/docs/components/EdsLanguageSelectorDialog.html +3 -5
- package/docs/components/EdsLink.html +1 -1
- package/docs/components/EdsLoadingIndicator.html +1 -1
- package/docs/components/EdsPaginator.html +1 -1
- package/docs/components/EdsRating.html +66 -57
- package/docs/components/EdsSelect.html +0 -45
- package/docs/components/EdsSnc.html +2 -2
- package/docs/components/EdsTab.html +8 -133
- package/docs/components/EdsTabBody.html +21 -41
- package/docs/components/EdsTabHeader.html +13 -25
- package/docs/components/EdsTabHeaderLabel.html +4 -126
- package/docs/components/EdsTabHeaderLeftContent.html +4 -126
- package/docs/components/EdsTabHeaderRightContent.html +4 -126
- package/docs/components/EdsTabHeaderSublabel.html +4 -126
- package/docs/components/EdsTabs.html +113 -140
- package/docs/components/EdsTextarea.html +0 -62
- package/docs/components/EdsTreeListToolbar.html +1 -1
- package/docs/components/EdsTrend.html +1 -1
- package/docs/directives/EdsColorDirective.html +0 -9
- package/docs/directives/EdsFlexColDirective.html +1 -1
- package/docs/directives/EdsFlexGrowDirective.html +1 -1
- package/docs/directives/EdsFlexNoShrinkDirective.html +1 -1
- package/docs/directives/EdsSizeDirective.html +0 -3
- package/docs/directives/EdsTooltip.html +45 -281
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EdsButton.md +15 -24
- package/docs/json/EdsFeedbackMessage.md +4 -10
- package/docs/json/EdsIconState.md +2 -1
- package/docs/json/EdsRating.md +2 -0
- package/docs/json/EdsTab.md +1 -1
- package/docs/json/EdsTabs.md +7 -8
- package/docs/json/EdsTooltip.md +3 -3
- package/docs/json/documentation.json +1803 -2031
- package/docs/llms.txt +72 -109
- package/docs/miscellaneous/typealiases.html +179 -16
- package/docs/miscellaneous/variables.html +16 -16
- package/docs/properties.html +1 -1
- package/eds-flex-layout/package.json +4 -0
- package/eds-grid-layout/package.json +4 -0
- package/eds-icon-state/package.json +4 -0
- package/eds-label/package.json +4 -0
- package/eds-link/package.json +4 -0
- package/eds-loading-indicator/package.json +4 -0
- package/eds-snc/package.json +4 -0
- package/eds-trend/package.json +4 -0
- package/fesm2022/eui-eds-eds-alert.mjs +3 -3
- package/fesm2022/eui-eds-eds-alert.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-button.mjs +53 -85
- package/fesm2022/eui-eds-eds-button.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-calendar.mjs +4 -4
- package/fesm2022/eui-eds-eds-calendar.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-datepicker.mjs +2 -2
- package/fesm2022/eui-eds-eds-datepicker.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-dialog.mjs +4 -4
- package/fesm2022/eui-eds-eds-dialog.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-discussion-thread.mjs +3 -3
- package/fesm2022/eui-eds-eds-discussion-thread.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-feedback-message.mjs +28 -42
- package/fesm2022/eui-eds-eds-feedback-message.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-file-upload.mjs +2 -2
- package/fesm2022/eui-eds-eds-file-upload.mjs.map +1 -1
- package/fesm2022/{eui-eds-utilities-eds-flex-layout.mjs → eui-eds-eds-flex-layout.mjs} +1 -1
- package/fesm2022/eui-eds-eds-flex-layout.mjs.map +1 -0
- package/fesm2022/{eui-eds-utilities-eds-grid-layout.mjs → eui-eds-eds-grid-layout.mjs} +1 -1
- package/fesm2022/eui-eds-eds-grid-layout.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-growl.mjs +3 -3
- package/fesm2022/eui-eds-eds-growl.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-icon-state.mjs +56 -0
- package/fesm2022/eui-eds-eds-icon-state.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-input-button.mjs +10 -13
- package/fesm2022/eui-eds-eds-input-button.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-checkbox.mjs +6 -17
- package/fesm2022/eui-eds-eds-input-checkbox.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-icon.mjs +10 -9
- package/fesm2022/eui-eds-eds-input-icon.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-number.mjs +5 -14
- package/fesm2022/eui-eds-eds-input-number.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-radio.mjs +6 -17
- package/fesm2022/eui-eds-eds-input-radio.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-text.mjs +5 -16
- package/fesm2022/eui-eds-eds-input-text.mjs.map +1 -1
- package/fesm2022/{eui-eds-utilities-eds-label.mjs → eui-eds-eds-label.mjs} +1 -1
- package/fesm2022/eui-eds-eds-label.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-language-selector.mjs +5 -9
- package/fesm2022/eui-eds-eds-language-selector.mjs.map +1 -1
- package/fesm2022/{eui-eds-utilities-eds-link.mjs → eui-eds-eds-link.mjs} +1 -1
- package/fesm2022/eui-eds-eds-link.mjs.map +1 -0
- package/fesm2022/{eui-eds-utilities-eds-loading-indicator.mjs → eui-eds-eds-loading-indicator.mjs} +1 -1
- package/fesm2022/eui-eds-eds-loading-indicator.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-paginator.mjs +2 -2
- package/fesm2022/eui-eds-eds-paginator.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-progress-bar.mjs +3 -3
- package/fesm2022/eui-eds-eds-progress-bar.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-rating.mjs +30 -16
- package/fesm2022/eui-eds-eds-rating.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-select.mjs +10 -33
- package/fesm2022/eui-eds-eds-select.mjs.map +1 -1
- package/fesm2022/{eui-eds-utilities-eds-snc.mjs → eui-eds-eds-snc.mjs} +3 -3
- package/fesm2022/eui-eds-eds-snc.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-tabs.mjs +192 -259
- package/fesm2022/eui-eds-eds-tabs.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-textarea.mjs +5 -16
- package/fesm2022/eui-eds-eds-textarea.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-tooltip.mjs +71 -86
- package/fesm2022/eui-eds-eds-tooltip.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-tree-list.mjs +2 -2
- package/fesm2022/eui-eds-eds-tree-list.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-tree.mjs +2 -2
- package/fesm2022/eui-eds-eds-tree.mjs.map +1 -1
- package/fesm2022/{eui-eds-utilities-eds-trend.mjs → eui-eds-eds-trend.mjs} +1 -1
- package/fesm2022/eui-eds-eds-trend.mjs.map +1 -0
- package/package.json +33 -33
- package/types/eui-eds-eds-button.d.ts +47 -33
- package/types/eui-eds-eds-button.d.ts.map +1 -1
- package/types/eui-eds-eds-feedback-message.d.ts +20 -10
- package/types/eui-eds-eds-feedback-message.d.ts.map +1 -1
- package/types/{eui-eds-utilities-eds-flex-layout.d.ts → eui-eds-eds-flex-layout.d.ts} +1 -1
- package/types/eui-eds-eds-flex-layout.d.ts.map +1 -0
- package/types/{eui-eds-utilities-eds-grid-layout.d.ts → eui-eds-eds-grid-layout.d.ts} +1 -1
- package/types/eui-eds-eds-grid-layout.d.ts.map +1 -0
- package/types/{eui-eds-utilities-eds-icon-state.d.ts → eui-eds-eds-icon-state.d.ts} +8 -3
- package/types/eui-eds-eds-icon-state.d.ts.map +1 -0
- package/types/eui-eds-eds-input-button.d.ts +5 -1
- package/types/eui-eds-eds-input-button.d.ts.map +1 -1
- package/types/eui-eds-eds-input-checkbox.d.ts +0 -4
- package/types/eui-eds-eds-input-checkbox.d.ts.map +1 -1
- package/types/eui-eds-eds-input-icon.d.ts +5 -1
- package/types/eui-eds-eds-input-icon.d.ts.map +1 -1
- package/types/eui-eds-eds-input-number.d.ts +1 -5
- package/types/eui-eds-eds-input-number.d.ts.map +1 -1
- package/types/eui-eds-eds-input-radio.d.ts +0 -4
- package/types/eui-eds-eds-input-radio.d.ts.map +1 -1
- package/types/eui-eds-eds-input-text.d.ts +1 -5
- package/types/eui-eds-eds-input-text.d.ts.map +1 -1
- package/types/{eui-eds-utilities-eds-label.d.ts → eui-eds-eds-label.d.ts} +1 -1
- package/types/eui-eds-eds-label.d.ts.map +1 -0
- package/types/eui-eds-eds-language-selector.d.ts.map +1 -1
- package/types/{eui-eds-utilities-eds-link.d.ts → eui-eds-eds-link.d.ts} +1 -1
- package/types/eui-eds-eds-link.d.ts.map +1 -0
- package/types/{eui-eds-utilities-eds-loading-indicator.d.ts → eui-eds-eds-loading-indicator.d.ts} +1 -1
- package/types/eui-eds-eds-loading-indicator.d.ts.map +1 -0
- package/types/eui-eds-eds-rating.d.ts +19 -2
- package/types/eui-eds-eds-rating.d.ts.map +1 -1
- package/types/eui-eds-eds-select.d.ts +1 -5
- package/types/eui-eds-eds-select.d.ts.map +1 -1
- package/types/{eui-eds-utilities-eds-snc.d.ts → eui-eds-eds-snc.d.ts} +1 -1
- package/types/eui-eds-eds-snc.d.ts.map +1 -0
- package/types/eui-eds-eds-tabs.d.ts +87 -100
- package/types/eui-eds-eds-tabs.d.ts.map +1 -1
- package/types/eui-eds-eds-textarea.d.ts +1 -5
- package/types/eui-eds-eds-textarea.d.ts.map +1 -1
- package/types/eui-eds-eds-tooltip.d.ts +27 -25
- package/types/eui-eds-eds-tooltip.d.ts.map +1 -1
- package/types/{eui-eds-utilities-eds-trend.d.ts → eui-eds-eds-trend.d.ts} +1 -1
- package/types/eui-eds-eds-trend.d.ts.map +1 -0
- package/fesm2022/eui-eds-utilities-eds-flex-layout.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-grid-layout.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-icon-state.mjs +0 -49
- package/fesm2022/eui-eds-utilities-eds-icon-state.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-label.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-link.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-loading-indicator.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-snc.mjs.map +0 -1
- package/fesm2022/eui-eds-utilities-eds-trend.mjs.map +0 -1
- package/types/eui-eds-utilities-eds-flex-layout.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-grid-layout.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-icon-state.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-label.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-link.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-loading-indicator.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-snc.d.ts.map +0 -1
- package/types/eui-eds-utilities-eds-trend.d.ts.map +0 -1
- package/utilities/eds-flex-layout/package.json +0 -4
- package/utilities/eds-grid-layout/package.json +0 -4
- package/utilities/eds-icon-state/package.json +0 -4
- package/utilities/eds-label/package.json +0 -4
- package/utilities/eds-link/package.json +0 -4
- package/utilities/eds-loading-indicator/package.json +0 -4
- package/utilities/eds-snc/package.json +0 -4
- package/utilities/eds-trend/package.json +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-eds-eds-alert.mjs","sources":["../../eds-alert/eds-alert.ts","../../eds-alert/eds-alert.html","../../eds-alert/eds-alert-title.ts","../../eds-alert/index.ts","../../eds-alert/eui-eds-eds-alert.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n booleanAttribute,\n model,\n} from '@angular/core';\n\nimport { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';\nimport { EDS_ICON_STATE } from '@eui/eds/
|
|
1
|
+
{"version":3,"file":"eui-eds-eds-alert.mjs","sources":["../../eds-alert/eds-alert.ts","../../eds-alert/eds-alert.html","../../eds-alert/eds-alert-title.ts","../../eds-alert/index.ts","../../eds-alert/eui-eds-eds-alert.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n booleanAttribute,\n model,\n} from '@angular/core';\n\nimport { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';\nimport { EDS_ICON_STATE } from '@eui/eds/eds-icon-state';\n\n/**\n * Local narrowed color union — the alert's color contract.\n */\nexport type EdsAlertColor = 'info' | 'success' | 'warning' | 'critical';\n\n@Component({\n templateUrl: './eds-alert.html',\n selector: 'div[edsAlert], eds-alert',\n styleUrl: './eds-alert.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON_BUTTON,\n ...EDS_ICON_STATE,\n ],\n host: {\n role: 'alert',\n '[attr.color]': 'color()',\n '[attr.hidden]': '!isVisible() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n },\n})\nexport class EdsAlert {\n /**\n * Data attribute value for end-to-end testing identification.\n * Applied as data-e2e attribute on the host element.\n * @default 'eds-alert'\n */\n e2eAttr = input('eds-alert');\n\n /**\n * Semantic color of the alert.\n * @default 'info'\n */\n color = input<EdsAlertColor>('info');\n\n /**\n * Enables a close button allowing users to dismiss the alert.\n * When true, displays a close icon button that hides the alert and emits closeAlert event.\n * @default false\n */\n isCloseable = input(false, { transform: booleanAttribute });\n\n /**\n * Controls the visibility state of the alert.\n * Two-way bindable model that can be programmatically controlled or updated by user dismissal.\n * @default true\n */\n isVisible = model(true);\n\n /**\n * Emitted when the alert is closed via the close button.\n * Payload: boolean - always emits false to indicate alert is hidden\n * Triggered when user clicks the close button (when isCloseable is true).\n */\n closeAlert = output<boolean>();\n\n /**\n * ARIA label for the close button, allowing localization.\n * @default 'Close alert'\n */\n closeAriaLabel = input('Close alert');\n\n /**\n * Hide the alert and emits the `closeAlert` event when the close button is clicked.\n */\n onCloseClick(): void {\n this.isVisible.set(false);\n this.closeAlert.emit(false);\n }\n}\n","<eds-icon-state class=\"eds-alert__icon\" [color]=\"color()\"/>\n\n<div class=\"eds-alert__content\">\n <ng-content select=\"eds-alert-title\"/>\n <ng-content />\n</div>\n\n@if (isCloseable()) {\n <button edsIconButton class=\"eds-alert__close\"\n [ariaLabel]=\"closeAriaLabel()\"\n icon=\"x:core\" rounded size=\"s\" color=\"neutral\"\n (buttonClick)=\"onCloseClick()\">\n </button>\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n template: '<ng-content/>',\n selector: 'eds-alert-title',\n styleUrl: './eds-alert-title.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAlertTitle {\n}\n","import { EdsAlert } from './eds-alert';\nimport { EdsAlertTitle } from './eds-alert-title';\n\nexport * from './eds-alert';\nexport * from './eds-alert-title';\n\nexport const EDS_ALERT = [\n EdsAlert,\n EdsAlertTitle,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiCa,QAAQ,CAAA;AAhBrB,IAAA,WAAA,GAAA;AAiBI;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,WAAW;oFAAC;AAE5B;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,MAAM;kFAAC;AAEpC;;;;AAIG;QACH,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE3D;;;;AAIG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI;sFAAC;AAEvB;;;;AAIG;QACH,IAAA,CAAA,UAAU,GAAG,MAAM,EAAW;AAE9B;;;AAGG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,aAAa;2FAAC;AASxC,IAAA;AAPG;;AAEG;IACH,YAAY,GAAA;AACR,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;IAC/B;8GA/CS,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,q9BCjCrB,uaAcA,EAAA,MAAA,EAAA,CAAA,29CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDmBa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAhBpB,SAAS;AAEI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,eAAA,EAEnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;AACL,wBAAA,GAAG,eAAe;AAClB,wBAAA,GAAG,cAAc;qBACpB,EAAA,IAAA,EACK;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,eAAe,EAAE,sBAAsB;AACvC,wBAAA,iBAAiB,EAAE,WAAW;AACjC,qBAAA,EAAA,QAAA,EAAA,uaAAA,EAAA,MAAA,EAAA,CAAA,29CAAA,CAAA,EAAA;;;MEpBQ,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,2EALZ,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,iDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKhB,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,QAAA,EACf,iBAAiB,EAAA,eAAA,EAEV,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,iDAAA,CAAA,EAAA;;;ACH5C,MAAM,SAAS,GAAG;IACrB,QAAQ;IACR,aAAa;;;ACRjB;;AAEG;;;;"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute,
|
|
3
|
-
import * as i1 from '@eui/eds/shared';
|
|
4
|
-
import { EdsSizeDirective, EdsColorDirective } from '@eui/eds/shared';
|
|
2
|
+
import { input, booleanAttribute, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* EDS Button — a directive-style button component applied on native `<button>` elements.
|
|
8
6
|
*
|
|
9
|
-
* Supports multiple visual types (primary, secondary, tertiary), color variants
|
|
10
|
-
* (primary, neutral, highlight, critical), and sizes (s, m, l) via
|
|
7
|
+
* Supports multiple visual types (primary, secondary, tertiary), semantic color variants
|
|
8
|
+
* (primary, neutral, highlight, critical), and sizes (s, m, l) via string inputs reflected
|
|
9
|
+
* as host attributes.
|
|
11
10
|
*
|
|
12
11
|
* Usage:
|
|
13
12
|
* ```html
|
|
14
|
-
* <button edsButton
|
|
15
|
-
* <button edsButton
|
|
16
|
-
* <button edsButton
|
|
13
|
+
* <button edsButton size="m" color="primary">Label</button>
|
|
14
|
+
* <button edsButton type="secondary" color="neutral" size="s">Cancel</button>
|
|
15
|
+
* <button edsButton type="tertiary" color="critical" [disabled]="isLoading">Delete</button>
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
18
|
class EdsButton {
|
|
@@ -27,43 +26,59 @@ class EdsButton {
|
|
|
27
26
|
/** @description ID attribute for the button element */
|
|
28
27
|
this.id = input(undefined, /* @ts-ignore */
|
|
29
28
|
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
29
|
+
/**
|
|
30
|
+
* Visual type of the button. `primary` = solid surface; `secondary` = bordered;
|
|
31
|
+
* `tertiary` = text/ghost. Named `variant` (not `type`) on the Angular side to avoid
|
|
32
|
+
* clashing with the native `<button type>` attribute; reflected as `[attr.type-variant]`
|
|
33
|
+
* (the React projection exposes this axis as its `type` prop).
|
|
34
|
+
* @default 'primary'
|
|
35
|
+
*/
|
|
36
|
+
this.variant = input('primary', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/**
|
|
39
|
+
* Semantic color of the button.
|
|
40
|
+
* @default 'primary'
|
|
41
|
+
*/
|
|
42
|
+
this.color = input('primary', /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/**
|
|
45
|
+
* Size of the button.
|
|
46
|
+
* @default 'm'
|
|
47
|
+
*/
|
|
48
|
+
this.size = input('m', /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
30
50
|
/**
|
|
31
51
|
* @description Controls the disabled state of the button.
|
|
32
52
|
* When true, adds the disabled attribute and prevents interaction.
|
|
33
53
|
* @default false
|
|
34
54
|
*/
|
|
35
|
-
this.
|
|
55
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
36
56
|
/**
|
|
37
57
|
* @description When true, makes the button full-width (block-level).
|
|
38
58
|
* @default false
|
|
39
59
|
*/
|
|
40
|
-
this.
|
|
60
|
+
this.block = input(false, { ...(ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
41
61
|
/**
|
|
42
62
|
* @description When true, styles the button for icon-only content.
|
|
43
63
|
* @default false
|
|
44
64
|
*/
|
|
45
|
-
this.
|
|
65
|
+
this.iconButton = input(false, { ...(ngDevMode ? { debugName: "iconButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
46
66
|
/**
|
|
47
|
-
* @description When true,
|
|
67
|
+
* @description When true, styles the button when used in an avatar trigger
|
|
68
|
+
* (e.g. dropdown trigger, see actionable avatar).
|
|
48
69
|
* @default false
|
|
49
70
|
*/
|
|
50
|
-
this.
|
|
71
|
+
this.avatarButton = input(false, { ...(ngDevMode ? { debugName: "avatarButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
51
72
|
/**
|
|
52
73
|
* @description When true, allows text content to wrap.
|
|
53
74
|
* @default false
|
|
54
75
|
*/
|
|
55
|
-
this.
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.edsButtonTertiary = input(false, { ...(ngDevMode ? { debugName: "edsButtonTertiary" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
62
|
-
/** Boolean shorthand: fully rounded border-radius. */
|
|
63
|
-
this.edsButtonRounded = input(false, { ...(ngDevMode ? { debugName: "edsButtonRounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
64
|
-
/** String-based type variant for dynamic binding. */
|
|
65
|
-
this.edsTypeVariant = input('primary', /* @ts-ignore */
|
|
66
|
-
...(ngDevMode ? [{ debugName: "edsTypeVariant" }] : /* istanbul ignore next */ []));
|
|
76
|
+
this.lineWrap = input(false, { ...(ngDevMode ? { debugName: "lineWrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
77
|
+
/**
|
|
78
|
+
* @description When true, applies a fully rounded border-radius.
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
this.rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
67
82
|
/**
|
|
68
83
|
* @description
|
|
69
84
|
* When true, marks the button as initially checked/selected within an eds-button-group.
|
|
@@ -71,74 +86,27 @@ class EdsButton {
|
|
|
71
86
|
* @default false
|
|
72
87
|
*/
|
|
73
88
|
this.isChecked = input(false, { ...(ngDevMode ? { debugName: "isChecked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
74
|
-
this.sizeDirective = inject(EdsSizeDirective);
|
|
75
|
-
this.colorDirective = inject(EdsColorDirective);
|
|
76
|
-
/** Resolved button type: first boolean that is true wins, otherwise edsTypeVariant. */
|
|
77
|
-
this.resolvedType = computed(() => {
|
|
78
|
-
if (this.edsButtonTertiary())
|
|
79
|
-
return 'tertiary';
|
|
80
|
-
if (this.edsButtonSecondary())
|
|
81
|
-
return 'secondary';
|
|
82
|
-
if (this.edsButtonPrimary())
|
|
83
|
-
return 'primary';
|
|
84
|
-
return this.edsTypeVariant();
|
|
85
|
-
}, /* @ts-ignore */
|
|
86
|
-
...(ngDevMode ? [{ debugName: "resolvedType" }] : /* istanbul ignore next */ []));
|
|
87
|
-
/**
|
|
88
|
-
* @description
|
|
89
|
-
* Computes and returns the CSS classes for the button based on its current state.
|
|
90
|
-
*/
|
|
91
|
-
this.hostClasses = computed(() => {
|
|
92
|
-
const sizeClass = this.sizeDirective.getCssClass('eds-button');
|
|
93
|
-
const colorClass = this.colorDirective.getCssClass('eds-button');
|
|
94
|
-
return [
|
|
95
|
-
'eds-button',
|
|
96
|
-
sizeClass || 'eds-button--size-m',
|
|
97
|
-
colorClass || 'eds-button--primary',
|
|
98
|
-
`eds-button--type-${this.resolvedType()}`,
|
|
99
|
-
this.edsButtonRounded() ? 'eds-button--rounded' : '',
|
|
100
|
-
this.edsBlockButton() ? 'eds-button--block' : '',
|
|
101
|
-
this.edsIconButton() ? 'eds-button--icon-only' : '',
|
|
102
|
-
this.edsAvatarButton() ? 'eds-button--avatar' : '',
|
|
103
|
-
this.edsLineWrap() ? 'eds-button--line-wrap' : '',
|
|
104
|
-
]
|
|
105
|
-
.join(' ')
|
|
106
|
-
.trim();
|
|
107
|
-
}, /* @ts-ignore */
|
|
108
|
-
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
109
89
|
}
|
|
110
90
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: true, isRequired: false, transformFunction: null }, edsBlockButton: { classPropertyName: "edsBlockButton", publicName: "edsBlockButton", isSignal: true, isRequired: false, transformFunction: null }, edsIconButton: { classPropertyName: "edsIconButton", publicName: "edsIconButton", isSignal: true, isRequired: false, transformFunction: null }, edsAvatarButton: { classPropertyName: "edsAvatarButton", publicName: "edsAvatarButton", isSignal: true, isRequired: false, transformFunction: null }, edsLineWrap: { classPropertyName: "edsLineWrap", publicName: "edsLineWrap", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPrimary: { classPropertyName: "edsButtonPrimary", publicName: "edsButtonPrimary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonSecondary: { classPropertyName: "edsButtonSecondary", publicName: "edsButtonSecondary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonTertiary: { classPropertyName: "edsButtonTertiary", publicName: "edsButtonTertiary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonRounded: { classPropertyName: "edsButtonRounded", publicName: "edsButtonRounded", isSignal: true, isRequired: false, transformFunction: null }, edsTypeVariant: { classPropertyName: "edsTypeVariant", publicName: "edsTypeVariant", isSignal: true, isRequired: false, transformFunction: null }, isChecked: { classPropertyName: "isChecked", publicName: "isChecked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.data-e2e": "e2eAttr()", "attr.id": "id()", "attr.disabled": "edsDisabled() || null" } }, hostDirectives: [{ directive: i1.EdsSizeDirective, inputs: ["edsSizeS", "edsSizeS", "edsSizeM", "edsSizeM", "edsSizeL", "edsSizeL", "edsSizeVariant", "edsSizeVariant"] }, { directive: i1.EdsColorDirective, inputs: ["edsPrimary", "edsPrimary", "edsNeutral", "edsNeutral", "edsHighlight", "edsHighlight", "edsCritical", "edsCritical", "edsColorVariant", "edsColorVariant"] }], ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button.eds-button--type-primary{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--primary{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--highlight{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--critical{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button.eds-button--type-primary:disabled,.eui-21 :host.eds-button.eds-button--type-primary.disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-secondary{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--primary{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--neutral{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--highlight{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--critical{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary:disabled,.eui-21 :host.eds-button.eds-button--type-secondary.disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-tertiary{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--primary{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--neutral{--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--highlight{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--critical{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary:disabled,.eui-21 :host.eds-button.eds-button--type-tertiary.disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--size-m{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button.eds-button--size-s{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button.eds-button--size-l{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);--_eds-icon-on-surface: var(--_on-surface)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover);--_eds-icon-on-surface: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);--_eds-icon-on-surface: var(--_on-surface-active)}.eui-21 :host.eds-button.eds-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button.eds-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, iconButton: { classPropertyName: "iconButton", publicName: "iconButton", isSignal: true, isRequired: false, transformFunction: null }, avatarButton: { classPropertyName: "avatarButton", publicName: "avatarButton", isSignal: true, isRequired: false, transformFunction: null }, lineWrap: { classPropertyName: "lineWrap", publicName: "lineWrap", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, isChecked: { classPropertyName: "isChecked", publicName: "isChecked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.type-variant": "variant()", "attr.color": "color()", "attr.size": "size()", "attr.rounded": "rounded() || null", "attr.block": "block() || null", "attr.icon-only": "iconButton() || null", "attr.avatar": "avatarButton() || null", "attr.line-wrap": "lineWrap() || null", "attr.data-e2e": "e2eAttr()", "attr.id": "id()", "attr.disabled": "disabled() || null" }, classAttribute: "eds-button" }, ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button[type-variant=primary]:disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary]:disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=critical]{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=tertiary]:disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);--_eds-icon-on-surface: var(--_on-surface)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover);--_eds-icon-on-surface: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);--_eds-icon-on-surface: var(--_on-surface-active)}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
112
92
|
}
|
|
113
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsButton, decorators: [{
|
|
114
94
|
type: Component,
|
|
115
95
|
args: [{ selector: 'button[edsButton]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
116
|
-
|
|
96
|
+
class: 'eds-button',
|
|
97
|
+
'[attr.type-variant]': 'variant()',
|
|
98
|
+
'[attr.color]': 'color()',
|
|
99
|
+
'[attr.size]': 'size()',
|
|
100
|
+
'[attr.rounded]': 'rounded() || null',
|
|
101
|
+
'[attr.block]': 'block() || null',
|
|
102
|
+
'[attr.icon-only]': 'iconButton() || null',
|
|
103
|
+
'[attr.avatar]': 'avatarButton() || null',
|
|
104
|
+
'[attr.line-wrap]': 'lineWrap() || null',
|
|
117
105
|
'[attr.data-e2e]': 'e2eAttr()',
|
|
118
106
|
'[attr.id]': 'id()',
|
|
119
|
-
'[attr.disabled]': '
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
directive: EdsSizeDirective,
|
|
123
|
-
inputs: [
|
|
124
|
-
'edsSizeS',
|
|
125
|
-
'edsSizeM',
|
|
126
|
-
'edsSizeL',
|
|
127
|
-
'edsSizeVariant',
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
directive: EdsColorDirective,
|
|
132
|
-
inputs: [
|
|
133
|
-
'edsPrimary',
|
|
134
|
-
'edsNeutral',
|
|
135
|
-
'edsHighlight',
|
|
136
|
-
'edsCritical',
|
|
137
|
-
'edsColorVariant',
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
], template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button.eds-button--type-primary{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--primary{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--highlight{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--critical{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button.eds-button--type-primary:disabled,.eui-21 :host.eds-button.eds-button--type-primary.disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-secondary{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--primary{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--neutral{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--highlight{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--critical{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary:disabled,.eui-21 :host.eds-button.eds-button--type-secondary.disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-tertiary{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--primary{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--neutral{--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--highlight{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--critical{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary:disabled,.eui-21 :host.eds-button.eds-button--type-tertiary.disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--size-m{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button.eds-button--size-s{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button.eds-button--size-l{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);--_eds-icon-on-surface: var(--_on-surface)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover);--_eds-icon-on-surface: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);--_eds-icon-on-surface: var(--_on-surface-active)}.eui-21 :host.eds-button.eds-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button.eds-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"] }]
|
|
141
|
-
}], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], edsDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsDisabled", required: false }] }], edsBlockButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsBlockButton", required: false }] }], edsIconButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsIconButton", required: false }] }], edsAvatarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsAvatarButton", required: false }] }], edsLineWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsLineWrap", required: false }] }], edsButtonPrimary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPrimary", required: false }] }], edsButtonSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonSecondary", required: false }] }], edsButtonTertiary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonTertiary", required: false }] }], edsButtonRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonRounded", required: false }] }], edsTypeVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsTypeVariant", required: false }] }], isChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isChecked", required: false }] }] } });
|
|
107
|
+
'[attr.disabled]': 'disabled() || null',
|
|
108
|
+
}, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button[type-variant=primary]:disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary]:disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=critical]{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=tertiary]:disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);--_eds-icon-on-surface: var(--_on-surface)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover);--_eds-icon-on-surface: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);--_eds-icon-on-surface: var(--_on-surface-active)}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"] }]
|
|
109
|
+
}], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], iconButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconButton", required: false }] }], avatarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarButton", required: false }] }], lineWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWrap", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], isChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isChecked", required: false }] }] } });
|
|
142
110
|
|
|
143
111
|
/** Convenience array for importing all eds-button components. */
|
|
144
112
|
const EDS_BUTTON = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-eds-eds-button.mjs","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n booleanAttribute,\n
|
|
1
|
+
{"version":3,"file":"eui-eds-eds-button.mjs","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n booleanAttribute,\n input,\n} from '@angular/core';\n\n/**\n * Local narrowed unions — the button's variant contract. No shared-token import.\n */\nexport type EdsButtonType = 'primary' | 'secondary' | 'tertiary';\n\n/**\n * Colors the button accepts. `primary` / `neutral` / `highlight` / `critical` have dedicated\n * SCSS branches; `warning` is accepted for parity but has no styled branch.\n */\nexport type EdsButtonColor = 'primary' | 'neutral' | 'highlight' | 'critical' | 'warning';\n\n/** Sizes the button styles (SCSS `:host([size=\"…\"])` branches). */\nexport type EdsButtonSize = 's' | 'm' | 'l';\n\n/**\n * EDS Button — a directive-style button component applied on native `<button>` elements.\n *\n * Supports multiple visual types (primary, secondary, tertiary), semantic color variants\n * (primary, neutral, highlight, critical), and sizes (s, m, l) via string inputs reflected\n * as host attributes.\n *\n * Usage:\n * ```html\n * <button edsButton size=\"m\" color=\"primary\">Label</button>\n * <button edsButton type=\"secondary\" color=\"neutral\" size=\"s\">Cancel</button>\n * <button edsButton type=\"tertiary\" color=\"critical\" [disabled]=\"isLoading\">Delete</button>\n * ```\n */\n@Component({\n templateUrl: './eds-button.html',\n // eslint-disable-next-line\n selector: 'button[edsButton]',\n styleUrl: './eds-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-button',\n '[attr.type-variant]': 'variant()',\n '[attr.color]': 'color()',\n '[attr.size]': 'size()',\n '[attr.rounded]': 'rounded() || null',\n '[attr.block]': 'block() || null',\n '[attr.icon-only]': 'iconButton() || null',\n '[attr.avatar]': 'avatarButton() || null',\n '[attr.line-wrap]': 'lineWrap() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled() || null',\n },\n})\nexport class EdsButton {\n /**\n * @description Data attribute for e2e testing\n * @default eds-button\n */\n e2eAttr = input('eds-button');\n\n /** @description ID attribute for the button element */\n id = input<string | undefined>(undefined);\n\n /**\n * Visual type of the button. `primary` = solid surface; `secondary` = bordered;\n * `tertiary` = text/ghost. Named `variant` (not `type`) on the Angular side to avoid\n * clashing with the native `<button type>` attribute; reflected as `[attr.type-variant]`\n * (the React projection exposes this axis as its `type` prop).\n * @default 'primary'\n */\n variant = input<EdsButtonType>('primary');\n\n /**\n * Semantic color of the button.\n * @default 'primary'\n */\n color = input<EdsButtonColor>('primary');\n\n /**\n * Size of the button.\n * @default 'm'\n */\n size = input<EdsButtonSize>('m');\n\n /**\n * @description Controls the disabled state of the button.\n * When true, adds the disabled attribute and prevents interaction.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, makes the button full-width (block-level).\n * @default false\n */\n block = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, styles the button for icon-only content.\n * @default false\n */\n iconButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, styles the button when used in an avatar trigger\n * (e.g. dropdown trigger, see actionable avatar).\n * @default false\n */\n avatarButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, allows text content to wrap.\n * @default false\n */\n lineWrap = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, applies a fully rounded border-radius.\n * @default false\n */\n rounded = input(false, { transform: booleanAttribute });\n\n /**\n * @description\n * When true, marks the button as initially checked/selected within an eds-button-group.\n * The button-group reads this value during initialization to determine the initial selection state.\n * @default false\n */\n isChecked = input(false, { transform: booleanAttribute });\n}\n","<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n","import { EdsButton } from './eds-button';\n\nexport { EdsButton };\n\n/** Convenience array for importing all eds-button components. */\nexport const EDS_BUTTON = [\n EdsButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAqBA;;;;;;;;;;;;;AAaG;MAsBU,SAAS,CAAA;AArBtB,IAAA,WAAA,GAAA;AAsBI;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,YAAY;oFAAC;;QAG7B,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS;+EAAC;AAEzC;;;;;;AAMG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,SAAS;oFAAC;AAEzC;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAiB,SAAS;kFAAC;AAExC;;;AAGG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,GAAG;iFAAC;AAEhC;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAErD;;;AAGG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE1D;;;;AAIG;QACH,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE5D;;;AAGG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvD;;;;;AAKG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D,IAAA;8GA5EY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,o+DCxDtB,kFAGA,EAAA,MAAA,EAAA,CAAA,+hPAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDqDa,SAAS,EAAA,UAAA,EAAA,CAAA;kBArBrB,SAAS;AAGI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,eAAA,EAEZ,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,gBAAgB,EAAE,mBAAmB;AACrC,wBAAA,cAAc,EAAE,iBAAiB;AACjC,wBAAA,kBAAkB,EAAE,sBAAsB;AAC1C,wBAAA,eAAe,EAAE,wBAAwB;AACzC,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,iBAAiB,EAAE,oBAAoB;AAC1C,qBAAA,EAAA,QAAA,EAAA,kFAAA,EAAA,MAAA,EAAA,CAAA,+hPAAA,CAAA,EAAA;;;AElDL;AACO,MAAM,UAAU,GAAG;IACtB,SAAS;;;ACNb;;AAEG;;;;"}
|
|
@@ -306,7 +306,7 @@ class EdsCalendarHeader {
|
|
|
306
306
|
return { start, end };
|
|
307
307
|
}
|
|
308
308
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsCalendarHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
309
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsCalendarHeader, isStandalone: true, selector: "eds-calendar-header", inputs: { containWeekends: { classPropertyName: "containWeekends", publicName: "containWeekends", isSignal: true, isRequired: false, transformFunction: null }, dateFormatOptions: { classPropertyName: "dateFormatOptions", publicName: "dateFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, currentDate: { classPropertyName: "currentDate", publicName: "currentDate", isSignal: true, isRequired: true, transformFunction: null }, subLabel: { classPropertyName: "subLabel", publicName: "subLabel", isSignal: true, isRequired: false, transformFunction: null }, showTodayButton: { classPropertyName: "showTodayButton", publicName: "showTodayButton", isSignal: true, isRequired: false, transformFunction: null }, showNavigationButtons: { classPropertyName: "showNavigationButtons", publicName: "showNavigationButtons", isSignal: true, isRequired: false, transformFunction: null }, startingDay: { classPropertyName: "startingDay", publicName: "startingDay", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentDate: "currentDateChange", navigationClicked: "navigationClicked", todayClicked: "todayClicked" }, host: { classAttribute: "eds-calendar-header" }, ngImport: i0, template: "@if (customTemplate(); as template) {\n <ng-container [ngTemplateOutletContext]=\"headerContext()\" [ngTemplateOutlet]=\"template\" />\n} @else {\n <div class=\"eds-calendar-header__nav\">\n <div class=\"eds-calendar-header__left\">\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-left:core\" ariaLabel=\"Go to previous\" (click)=\"navigatePrevious()\"></button>\n }\n <div class=\"eds-calendar-header__label\" [style.min-width]=\"maxMonthWidth()\">\n <span class=\"eds-calendar-header__date\">{{ formattedDate() }}</span>\n @if (subLabel()) {\n <span class=\"eds-calendar-header__sublabel\">{{ subLabel() }}</span>\n }\n </div>\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-right:core\" ariaLabel=\"Go to next\" (click)=\"navigateNext()\"></button>\n }\n </div>\n @if (showTodayButton()) {\n <button edsButton
|
|
309
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsCalendarHeader, isStandalone: true, selector: "eds-calendar-header", inputs: { containWeekends: { classPropertyName: "containWeekends", publicName: "containWeekends", isSignal: true, isRequired: false, transformFunction: null }, dateFormatOptions: { classPropertyName: "dateFormatOptions", publicName: "dateFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, currentDate: { classPropertyName: "currentDate", publicName: "currentDate", isSignal: true, isRequired: true, transformFunction: null }, subLabel: { classPropertyName: "subLabel", publicName: "subLabel", isSignal: true, isRequired: false, transformFunction: null }, showTodayButton: { classPropertyName: "showTodayButton", publicName: "showTodayButton", isSignal: true, isRequired: false, transformFunction: null }, showNavigationButtons: { classPropertyName: "showNavigationButtons", publicName: "showNavigationButtons", isSignal: true, isRequired: false, transformFunction: null }, startingDay: { classPropertyName: "startingDay", publicName: "startingDay", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentDate: "currentDateChange", navigationClicked: "navigationClicked", todayClicked: "todayClicked" }, host: { classAttribute: "eds-calendar-header" }, ngImport: i0, template: "@if (customTemplate(); as template) {\n <ng-container [ngTemplateOutletContext]=\"headerContext()\" [ngTemplateOutlet]=\"template\" />\n} @else {\n <div class=\"eds-calendar-header__nav\">\n <div class=\"eds-calendar-header__left\">\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-left:core\" ariaLabel=\"Go to previous\" (click)=\"navigatePrevious()\"></button>\n }\n <div class=\"eds-calendar-header__label\" [style.min-width]=\"maxMonthWidth()\">\n <span class=\"eds-calendar-header__date\">{{ formattedDate() }}</span>\n @if (subLabel()) {\n <span class=\"eds-calendar-header__sublabel\">{{ subLabel() }}</span>\n }\n </div>\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-right:core\" ariaLabel=\"Go to next\" (click)=\"navigateNext()\"></button>\n }\n </div>\n @if (showTodayButton()) {\n <button edsButton color=\"neutral\" [disabled]=\"isCurrentDateToday()\" (click)=\"goToToday()\">Today</button>\n }\n </div>\n}\n", styles: [".eui-21 :host{display:block}.eui-21 :host .eds-calendar-header__nav{display:flex;justify-content:space-between;align-items:center;gap:var(--eds-sp-s)}.eui-21 :host .eds-calendar-header__left{display:flex;align-items:center;gap:var(--eds-sp-s)}.eui-21 :host .eds-calendar-header__label{display:flex;flex-direction:column;align-items:flex-start}.eui-21 :host .eds-calendar-header__date{font:var(--eds-f-label-l-semibold)}.eui-21 :host .eds-calendar-header__sublabel{font:var(--eds-f-paragraph-xs);color:var(--eds-c-foreground-subtler)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.EdsIconButton, selector: "button[edsIconButton]", inputs: ["icon", "color", "size", "ariaLabel", "rounded", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: i2.EdsButton, selector: "button[edsButton]", inputs: ["e2eAttr", "id", "variant", "color", "size", "disabled", "block", "iconButton", "avatarButton", "lineWrap", "rounded", "isChecked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
310
310
|
}
|
|
311
311
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsCalendarHeader, decorators: [{
|
|
312
312
|
type: Component,
|
|
@@ -316,7 +316,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
316
316
|
...EDS_BUTTON,
|
|
317
317
|
], host: {
|
|
318
318
|
class: 'eds-calendar-header',
|
|
319
|
-
}, template: "@if (customTemplate(); as template) {\n <ng-container [ngTemplateOutletContext]=\"headerContext()\" [ngTemplateOutlet]=\"template\" />\n} @else {\n <div class=\"eds-calendar-header__nav\">\n <div class=\"eds-calendar-header__left\">\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-left:core\" ariaLabel=\"Go to previous\" (click)=\"navigatePrevious()\"></button>\n }\n <div class=\"eds-calendar-header__label\" [style.min-width]=\"maxMonthWidth()\">\n <span class=\"eds-calendar-header__date\">{{ formattedDate() }}</span>\n @if (subLabel()) {\n <span class=\"eds-calendar-header__sublabel\">{{ subLabel() }}</span>\n }\n </div>\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-right:core\" ariaLabel=\"Go to next\" (click)=\"navigateNext()\"></button>\n }\n </div>\n @if (showTodayButton()) {\n <button edsButton
|
|
319
|
+
}, template: "@if (customTemplate(); as template) {\n <ng-container [ngTemplateOutletContext]=\"headerContext()\" [ngTemplateOutlet]=\"template\" />\n} @else {\n <div class=\"eds-calendar-header__nav\">\n <div class=\"eds-calendar-header__left\">\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-left:core\" ariaLabel=\"Go to previous\" (click)=\"navigatePrevious()\"></button>\n }\n <div class=\"eds-calendar-header__label\" [style.min-width]=\"maxMonthWidth()\">\n <span class=\"eds-calendar-header__date\">{{ formattedDate() }}</span>\n @if (subLabel()) {\n <span class=\"eds-calendar-header__sublabel\">{{ subLabel() }}</span>\n }\n </div>\n @if (showNavigationButtons()) {\n <button edsIconButton color=\"neutral\" size=\"s\" icon=\"caret-right:core\" ariaLabel=\"Go to next\" (click)=\"navigateNext()\"></button>\n }\n </div>\n @if (showTodayButton()) {\n <button edsButton color=\"neutral\" [disabled]=\"isCurrentDateToday()\" (click)=\"goToToday()\">Today</button>\n }\n </div>\n}\n", styles: [".eui-21 :host{display:block}.eui-21 :host .eds-calendar-header__nav{display:flex;justify-content:space-between;align-items:center;gap:var(--eds-sp-s)}.eui-21 :host .eds-calendar-header__left{display:flex;align-items:center;gap:var(--eds-sp-s)}.eui-21 :host .eds-calendar-header__label{display:flex;flex-direction:column;align-items:flex-start}.eui-21 :host .eds-calendar-header__date{font:var(--eds-f-label-l-semibold)}.eui-21 :host .eds-calendar-header__sublabel{font:var(--eds-f-paragraph-xs);color:var(--eds-c-foreground-subtler)}\n"] }]
|
|
320
320
|
}], propDecorators: { containWeekends: [{ type: i0.Input, args: [{ isSignal: true, alias: "containWeekends", required: false }] }], dateFormatOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormatOptions", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], currentDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentDate", required: true }] }, { type: i0.Output, args: ["currentDateChange"] }], subLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subLabel", required: false }] }], showTodayButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTodayButton", required: false }] }], showNavigationButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNavigationButtons", required: false }] }], startingDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "startingDay", required: false }] }], customTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTemplate", required: false }] }], navigationClicked: [{ type: i0.Output, args: ["navigationClicked"] }], todayClicked: [{ type: i0.Output, args: ["todayClicked"] }] } });
|
|
321
321
|
|
|
322
322
|
class EdsCalendarDayCellDef {
|
|
@@ -413,7 +413,7 @@ class EdsCalendarDay {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsCalendarDay, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
416
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsCalendarDay, isStandalone: true, selector: "eds-calendar-day", inputs: { edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: true, isRequired: false, transformFunction: null }, dayOfTheMonth: { classPropertyName: "dayOfTheMonth", publicName: "dayOfTheMonth", isSignal: true, isRequired: false, transformFunction: null }, maxNumberOfEventsToShow: { classPropertyName: "maxNumberOfEventsToShow", publicName: "maxNumberOfEventsToShow", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, eventTemplate: { classPropertyName: "eventTemplate", publicName: "eventTemplate", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addNewItemEvent: "addNewItemEvent" }, host: { listeners: { "mouseenter": "onMouseOver()", "mouseleave": "onMouseOut()" }, properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "eventTemplateDef", first: true, predicate: EdsCalendarEventCellDef, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (dayOfTheMonth()) {\n <div class=\"eds-calendar-day__header\">\n <button edsButton
|
|
416
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsCalendarDay, isStandalone: true, selector: "eds-calendar-day", inputs: { edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: true, isRequired: false, transformFunction: null }, dayOfTheMonth: { classPropertyName: "dayOfTheMonth", publicName: "dayOfTheMonth", isSignal: true, isRequired: false, transformFunction: null }, maxNumberOfEventsToShow: { classPropertyName: "maxNumberOfEventsToShow", publicName: "maxNumberOfEventsToShow", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, eventTemplate: { classPropertyName: "eventTemplate", publicName: "eventTemplate", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addNewItemEvent: "addNewItemEvent" }, host: { listeners: { "mouseenter": "onMouseOver()", "mouseleave": "onMouseOut()" }, properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "eventTemplateDef", first: true, predicate: EdsCalendarEventCellDef, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (dayOfTheMonth()) {\n <div class=\"eds-calendar-day__header\">\n <button edsButton [rounded]=\"isSelected()\" [color]=\"isSelected() ? 'primary' : 'neutral'\">\n {{ dayOfTheMonth() }}\n </button>\n @if (renderNewEvent()) {\n <button edsIconButton color=\"info\" size=\"s\" icon=\"plus:core\" ariaLabel=\"Add new event\" (click)=\"addNewItemClicked()\"></button>\n }\n </div>\n}\n\n<div class=\"eds-calendar-day__events\">\n @for (event of events(); track event.id; let idx = $index, l = $last) {\n @if (idx < maxNumberOfEventsToShow()) {\n @if (resolvedEventTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"resolvedEventTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: event, label: event.label(), type: event.type?.() }\">\n </ng-container>\n } @else if (event.type?.()) {\n <eds-tag [color]=\"tagColor(event.type?.())\">\n {{ event.label() }}\n </eds-tag>\n } @else {\n <eds-tag>{{ event.label() }}</eds-tag>\n }\n }\n\n @if (l) {\n @if (events().length > maxNumberOfEventsToShow()) {\n <span class=\"eds-calendar-day__show-more\" (click)=\"showMoreEvents($event)\">\n +{{ events().length - maxNumberOfEventsToShow() }} more\n </span>\n }\n }\n }\n</div>\n\n<eds-popover #popover [title]=\"'Events'\">\n <div class=\"eds-calendar-day__popover-events\">\n @for (event of events(); track event.id) {\n @if (resolvedEventTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"resolvedEventTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: event, label: event.label(), type: event.type?.() }\">\n </ng-container>\n } @else if (event.type?.()) {\n <eds-tag [color]=\"tagColor(event.type?.())\">\n {{ event.label() }}\n </eds-tag>\n } @else {\n <eds-tag>{{ event.label() }}</eds-tag>\n }\n }\n </div>\n</eds-popover>\n", styles: [".eui-21 :host{height:8rem;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:var(--eds-sp-2xs);overflow:hidden;width:100%;padding:var(--eds-sp-xs)}.eui-21 :host.eds-calendar-day--disabled{opacity:.5;pointer-events:none}.eui-21 :host .eds-calendar-day__header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.eui-21 :host .eds-calendar-day__show-more{cursor:pointer;font:var(--eds-f-paragraph-xs);color:var(--eds-c-foreground-subtle)}.eui-21 :host .eds-calendar-day__show-more:hover{text-decoration:underline}.eui-21 :host .eds-calendar-day__events{display:flex;flex-direction:column;align-items:flex-start;gap:var(--eds-sp-2xs);margin-top:auto}.eui-21 :host .eds-calendar-day__popover-events{display:flex;flex-direction:column;align-items:flex-start;gap:var(--eds-sp-xs)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.EdsButton, selector: "button[edsButton]", inputs: ["e2eAttr", "id", "variant", "color", "size", "disabled", "block", "iconButton", "avatarButton", "lineWrap", "rounded", "isChecked"] }, { kind: "component", type: i1.EdsIconButton, selector: "button[edsIconButton]", inputs: ["icon", "color", "size", "ariaLabel", "rounded", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EdsTag, selector: "eds-tag, span[edsTag]", inputs: ["color", "size", "e2eAttr", "aria-label"] }, { kind: "component", type: i4.EdsPopover, selector: "eds-popover", inputs: ["title", "position", "width", "hasBackDrop", "hasCloseButton", "isDismissable", "hasNoContentPadding"], outputs: ["outsideClick", "popoverOpen", "popoverClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
417
417
|
}
|
|
418
418
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsCalendarDay, decorators: [{
|
|
419
419
|
type: Component,
|
|
@@ -428,7 +428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
428
428
|
'[class]': 'hostClasses()',
|
|
429
429
|
'(mouseenter)': 'onMouseOver()',
|
|
430
430
|
'(mouseleave)': 'onMouseOut()',
|
|
431
|
-
}, template: "@if (dayOfTheMonth()) {\n <div class=\"eds-calendar-day__header\">\n <button edsButton
|
|
431
|
+
}, template: "@if (dayOfTheMonth()) {\n <div class=\"eds-calendar-day__header\">\n <button edsButton [rounded]=\"isSelected()\" [color]=\"isSelected() ? 'primary' : 'neutral'\">\n {{ dayOfTheMonth() }}\n </button>\n @if (renderNewEvent()) {\n <button edsIconButton color=\"info\" size=\"s\" icon=\"plus:core\" ariaLabel=\"Add new event\" (click)=\"addNewItemClicked()\"></button>\n }\n </div>\n}\n\n<div class=\"eds-calendar-day__events\">\n @for (event of events(); track event.id; let idx = $index, l = $last) {\n @if (idx < maxNumberOfEventsToShow()) {\n @if (resolvedEventTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"resolvedEventTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: event, label: event.label(), type: event.type?.() }\">\n </ng-container>\n } @else if (event.type?.()) {\n <eds-tag [color]=\"tagColor(event.type?.())\">\n {{ event.label() }}\n </eds-tag>\n } @else {\n <eds-tag>{{ event.label() }}</eds-tag>\n }\n }\n\n @if (l) {\n @if (events().length > maxNumberOfEventsToShow()) {\n <span class=\"eds-calendar-day__show-more\" (click)=\"showMoreEvents($event)\">\n +{{ events().length - maxNumberOfEventsToShow() }} more\n </span>\n }\n }\n }\n</div>\n\n<eds-popover #popover [title]=\"'Events'\">\n <div class=\"eds-calendar-day__popover-events\">\n @for (event of events(); track event.id) {\n @if (resolvedEventTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"resolvedEventTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: event, label: event.label(), type: event.type?.() }\">\n </ng-container>\n } @else if (event.type?.()) {\n <eds-tag [color]=\"tagColor(event.type?.())\">\n {{ event.label() }}\n </eds-tag>\n } @else {\n <eds-tag>{{ event.label() }}</eds-tag>\n }\n }\n </div>\n</eds-popover>\n", styles: [".eui-21 :host{height:8rem;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:var(--eds-sp-2xs);overflow:hidden;width:100%;padding:var(--eds-sp-xs)}.eui-21 :host.eds-calendar-day--disabled{opacity:.5;pointer-events:none}.eui-21 :host .eds-calendar-day__header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.eui-21 :host .eds-calendar-day__show-more{cursor:pointer;font:var(--eds-f-paragraph-xs);color:var(--eds-c-foreground-subtle)}.eui-21 :host .eds-calendar-day__show-more:hover{text-decoration:underline}.eui-21 :host .eds-calendar-day__events{display:flex;flex-direction:column;align-items:flex-start;gap:var(--eds-sp-2xs);margin-top:auto}.eui-21 :host .eds-calendar-day__popover-events{display:flex;flex-direction:column;align-items:flex-start;gap:var(--eds-sp-xs)}\n"] }]
|
|
432
432
|
}], propDecorators: { edsDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsDisabled", required: false }] }], dayOfTheMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayOfTheMonth", required: false }] }], maxNumberOfEventsToShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxNumberOfEventsToShow", required: false }] }], events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: false }] }], eventTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventTemplate", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }], addNewItemEvent: [{ type: i0.Output, args: ["addNewItemEvent"] }], popover: [{ type: i0.ViewChild, args: ['popover', { isSignal: true }] }], eventTemplateDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EdsCalendarEventCellDef), { ...{ read: TemplateRef }, isSignal: true }] }] } });
|
|
433
433
|
|
|
434
434
|
class EdsCalendarMonthly {
|