@eui/eds 23.0.0-alpha.6 → 23.0.0-alpha.8
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 +86 -0
- package/docs/classes/EdsChipModel.html +6 -6
- package/docs/classes/{EuiChipTooltip.html → EdsChipTooltip.html} +2 -2
- package/docs/components/EdsAlert.html +27 -226
- package/docs/components/EdsAlertTitle.html +2 -2
- package/docs/components/EdsAvatar.html +35 -108
- package/docs/components/EdsAvatarBadge.html +2 -2
- package/docs/components/EdsAvatarContent.html +2 -2
- package/docs/components/EdsAvatarContentLabel.html +2 -2
- package/docs/components/EdsAvatarContentSublabel.html +2 -2
- package/docs/components/EdsAvatarIcon.html +2 -2
- package/docs/components/EdsAvatarImage.html +2 -2
- package/docs/components/EdsAvatarList.html +2 -2
- package/docs/components/EdsAvatarText.html +2 -2
- package/docs/components/EdsBadge.html +41 -175
- package/docs/components/EdsButton.html +123 -123
- package/docs/components/EdsChip.html +135 -254
- package/docs/components/EdsIcon.html +93 -145
- package/docs/components/EdsIconButton.html +72 -86
- package/docs/components/EdsIconImage.html +5 -5
- package/docs/components/EdsIconState.html +47 -61
- package/docs/components/EdsLanguageSelector.html +870 -0
- package/docs/components/EdsMenu.html +631 -0
- package/docs/components/EdsMenuItemComponent.html +728 -0
- package/docs/components/EdsOverlay.html +804 -0
- package/docs/components/EdsOverlayContent.html +315 -0
- package/docs/components/EdsOverlayFooter.html +315 -0
- package/docs/components/EdsOverlayHeader.html +458 -0
- package/docs/components/EdsOverlayHeaderActionItems.html +315 -0
- package/docs/components/EdsOverlayHeaderLabel.html +315 -0
- package/docs/components/EdsOverlayHeaderSublabel.html +315 -0
- package/docs/components/EdsPage.html +315 -0
- package/docs/components/EdsPageContent.html +319 -0
- package/docs/components/EdsPageFooter.html +387 -0
- package/docs/components/EdsPageHeader.html +673 -0
- package/docs/components/EdsPageHeaderActionItems.html +315 -0
- package/docs/components/EdsPageHeaderBody.html +315 -0
- package/docs/components/EdsPageHeaderLabel.html +315 -0
- package/docs/components/EdsPageHeaderSublabel.html +315 -0
- package/docs/components/EdsShell.html +1078 -0
- package/docs/components/EdsShellContent.html +315 -0
- package/docs/components/EdsShellFooter.html +383 -0
- package/docs/components/EdsShellHeader.html +383 -0
- package/docs/components/EdsShellHeaderApp.html +443 -0
- package/docs/components/EdsShellHeaderEnd.html +311 -0
- package/docs/components/EdsShellHeaderEnvironment.html +315 -0
- package/docs/components/EdsShellHeaderLogo.html +561 -0
- package/docs/components/EdsShellHeaderStart.html +311 -0
- package/docs/components/EdsShellMenuToggle.html +458 -0
- package/docs/components/EdsShellSidebar.html +413 -0
- package/docs/components/EdsShellSidebarBottomNav.html +624 -0
- package/docs/components/EdsShellSidebarFooter.html +315 -0
- package/docs/components/EdsShellSidebarHeader.html +508 -0
- package/docs/components/EdsShellSidebarNav.html +624 -0
- package/docs/components/EdsShellToolbar.html +315 -0
- package/docs/components/EdsShellToolbarApp.html +443 -0
- package/docs/components/EdsShellToolbarEnd.html +315 -0
- package/docs/components/EdsShellToolbarEnvironment.html +315 -0
- package/docs/components/EdsShellToolbarLogo.html +315 -0
- package/docs/components/EdsShellToolbarStart.html +315 -0
- package/docs/components/EdsShellTopMessage.html +574 -0
- package/docs/components/EdsTab.html +6 -10
- package/docs/components/EdsTabBody.html +6 -10
- package/docs/components/EdsTabHeader.html +6 -10
- package/docs/components/EdsTabHeaderLabel.html +2 -2
- package/docs/components/EdsTabHeaderLeftContent.html +2 -2
- package/docs/components/EdsTabHeaderRightContent.html +2 -2
- package/docs/components/EdsTabHeaderSublabel.html +2 -2
- package/docs/components/EdsTabs.html +61 -126
- package/docs/components/EdsTabsRightContent.html +2 -2
- package/docs/components/EdsTag.html +82 -182
- package/docs/components/EdsTooltipContainer.html +2 -2
- package/docs/components/EdsUserProfile.html +1336 -0
- package/docs/components/EdsUserProfileMenu.html +315 -0
- package/docs/components/EdsUserProfileMenuItem.html +511 -0
- package/docs/directives/{EuiBaseColorVariantsDirective.html → EdsBaseColorVariantsDirective.html} +174 -91
- package/docs/directives/{EuiBaseSizeVariantsDirective.html → EdsBaseSizeVariantsDirective.html} +107 -107
- package/docs/directives/EdsResizable.html +586 -0
- package/docs/directives/EdsTooltip.html +21 -21
- package/docs/interfaces/EdsLanguage.html +368 -0
- package/docs/interfaces/EdsMenuItem.html +731 -0
- package/docs/js/menu-wc.js +146 -5
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EdsAlert.md +7 -7
- package/docs/json/EdsAvatar.md +8 -7
- package/docs/json/EdsBadge.md +14 -14
- package/docs/json/EdsBaseColorVariantsDirective.md +22 -0
- package/docs/json/EdsBaseSizeVariantsDirective.md +23 -0
- package/docs/json/EdsButton.md +21 -21
- package/docs/json/EdsChip.md +15 -14
- package/docs/json/EdsIcon.md +23 -23
- package/docs/json/EdsIconButton.md +18 -17
- package/docs/json/EdsIconImage.md +10 -10
- package/docs/json/EdsIconState.md +12 -12
- package/docs/json/EdsLanguageSelector.md +16 -0
- package/docs/json/EdsMenu.md +17 -0
- package/docs/json/EdsMenuItemComponent.md +18 -0
- package/docs/json/EdsOverlay.md +19 -0
- package/docs/json/EdsOverlayContent.md +8 -0
- package/docs/json/EdsOverlayFooter.md +8 -0
- package/docs/json/EdsOverlayHeader.md +11 -0
- package/docs/json/EdsOverlayHeaderActionItems.md +8 -0
- package/docs/json/EdsOverlayHeaderLabel.md +8 -0
- package/docs/json/EdsOverlayHeaderSublabel.md +8 -0
- package/docs/json/EdsPage.md +8 -0
- package/docs/json/EdsPageContent.md +8 -0
- package/docs/json/EdsPageFooter.md +11 -0
- package/docs/json/EdsPageHeader.md +18 -0
- package/docs/json/EdsPageHeaderActionItems.md +8 -0
- package/docs/json/EdsPageHeaderBody.md +8 -0
- package/docs/json/EdsPageHeaderLabel.md +8 -0
- package/docs/json/EdsPageHeaderSublabel.md +8 -0
- package/docs/json/EdsResizable.md +24 -0
- package/docs/json/EdsShell.md +14 -0
- package/docs/json/EdsShellContent.md +8 -0
- package/docs/json/EdsShellFooter.md +11 -0
- package/docs/json/EdsShellHeader.md +11 -0
- package/docs/json/EdsShellHeaderApp.md +13 -0
- package/docs/json/EdsShellHeaderEnd.md +8 -0
- package/docs/json/EdsShellHeaderEnvironment.md +8 -0
- package/docs/json/EdsShellHeaderLogo.md +15 -0
- package/docs/json/EdsShellHeaderStart.md +8 -0
- package/docs/json/EdsShellMenuToggle.md +11 -0
- package/docs/json/EdsShellSidebar.md +12 -0
- package/docs/json/EdsShellSidebarBottomNav.md +17 -0
- package/docs/json/EdsShellSidebarFooter.md +8 -0
- package/docs/json/EdsShellSidebarHeader.md +15 -0
- package/docs/json/EdsShellSidebarNav.md +17 -0
- package/docs/json/EdsShellToolbar.md +8 -0
- package/docs/json/EdsShellToolbarApp.md +13 -0
- package/docs/json/EdsShellToolbarEnd.md +8 -0
- package/docs/json/EdsShellToolbarEnvironment.md +8 -0
- package/docs/json/EdsShellToolbarLogo.md +8 -0
- package/docs/json/EdsShellToolbarStart.md +8 -0
- package/docs/json/EdsShellTopMessage.md +19 -0
- package/docs/json/EdsTabs.md +4 -4
- package/docs/json/EdsTag.md +14 -13
- package/docs/json/EdsTooltip.md +7 -7
- package/docs/json/EdsUserProfile.md +21 -0
- package/docs/json/EdsUserProfileMenu.md +8 -0
- package/docs/json/EdsUserProfileMenuItem.md +8 -0
- package/docs/json/documentation.json +9649 -5338
- package/docs/llms.txt +641 -123
- package/docs/miscellaneous/typealiases.html +309 -0
- package/docs/miscellaneous/variables.html +342 -0
- package/docs/overview.html +3 -3
- package/docs/properties.html +1 -1
- package/eds-language-selector/package.json +4 -0
- package/eds-menu/package.json +4 -0
- package/eds-overlay/package.json +4 -0
- package/eds-page/package.json +4 -0
- package/eds-resizable/package.json +4 -0
- package/eds-shell/package.json +4 -0
- package/eds-user-profile/package.json +4 -0
- package/fesm2022/eui-eds-eds-alert.mjs +33 -61
- package/fesm2022/eui-eds-eds-alert.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-avatar.mjs +29 -43
- package/fesm2022/eui-eds-eds-avatar.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-badge.mjs +65 -89
- package/fesm2022/eui-eds-eds-badge.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-button.mjs +70 -99
- package/fesm2022/eui-eds-eds-button.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-chip.mjs +118 -111
- package/fesm2022/eui-eds-eds-chip.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-icon-button.mjs +49 -55
- package/fesm2022/eui-eds-eds-icon-button.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-icon-state.mjs +38 -34
- package/fesm2022/eui-eds-eds-icon-state.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-icon.mjs +92 -107
- package/fesm2022/eui-eds-eds-icon.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-language-selector.mjs +67 -0
- package/fesm2022/eui-eds-eds-language-selector.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-menu.mjs +90 -0
- package/fesm2022/eui-eds-eds-menu.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-overlay.mjs +141 -0
- package/fesm2022/eui-eds-eds-overlay.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-page.mjs +129 -0
- package/fesm2022/eui-eds-eds-page.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-resizable.mjs +193 -0
- package/fesm2022/eui-eds-eds-resizable.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-shell.mjs +481 -0
- package/fesm2022/eui-eds-eds-shell.mjs.map +1 -0
- package/fesm2022/eui-eds-eds-tabs.mjs +71 -101
- package/fesm2022/eui-eds-eds-tabs.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-tag.mjs +74 -77
- package/fesm2022/eui-eds-eds-tag.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-tooltip.mjs +23 -23
- package/fesm2022/eui-eds-eds-tooltip.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-user-profile.mjs +231 -0
- package/fesm2022/eui-eds-eds-user-profile.mjs.map +1 -0
- package/fesm2022/eui-eds-shared.mjs +255 -243
- package/fesm2022/eui-eds-shared.mjs.map +1 -1
- package/package.json +29 -1
- package/types/eui-eds-eds-alert.d.ts +7 -29
- package/types/eui-eds-eds-alert.d.ts.map +1 -1
- package/types/eui-eds-eds-avatar.d.ts +11 -12
- package/types/eui-eds-eds-avatar.d.ts.map +1 -1
- package/types/eui-eds-eds-badge.d.ts +15 -20
- package/types/eui-eds-eds-badge.d.ts.map +1 -1
- package/types/eui-eds-eds-button.d.ts +22 -30
- package/types/eui-eds-eds-button.d.ts.map +1 -1
- package/types/eui-eds-eds-chip.d.ts +36 -36
- package/types/eui-eds-eds-chip.d.ts.map +1 -1
- package/types/eui-eds-eds-icon-button.d.ts +13 -16
- package/types/eui-eds-eds-icon-button.d.ts.map +1 -1
- package/types/eui-eds-eds-icon-state.d.ts +8 -8
- package/types/eui-eds-eds-icon-state.d.ts.map +1 -1
- package/types/eui-eds-eds-icon.d.ts +22 -29
- package/types/eui-eds-eds-icon.d.ts.map +1 -1
- package/types/eui-eds-eds-language-selector.d.ts +34 -0
- package/types/eui-eds-eds-language-selector.d.ts.map +1 -0
- package/types/eui-eds-eds-menu.d.ts +65 -0
- package/types/eui-eds-eds-menu.d.ts.map +1 -0
- package/types/eui-eds-eds-overlay.d.ts +64 -0
- package/types/eui-eds-eds-overlay.d.ts.map +1 -0
- package/types/eui-eds-eds-page.d.ts +63 -0
- package/types/eui-eds-eds-page.d.ts.map +1 -0
- package/types/eui-eds-eds-resizable.d.ts +49 -0
- package/types/eui-eds-eds-resizable.d.ts.map +1 -0
- package/types/eui-eds-eds-shell.d.ts +229 -0
- package/types/eui-eds-eds-shell.d.ts.map +1 -0
- package/types/eui-eds-eds-tabs.d.ts +32 -30
- package/types/eui-eds-eds-tabs.d.ts.map +1 -1
- package/types/eui-eds-eds-tag.d.ts +22 -25
- package/types/eui-eds-eds-tag.d.ts.map +1 -1
- package/types/eui-eds-eds-tooltip.d.ts +16 -16
- package/types/eui-eds-eds-user-profile.d.ts +78 -0
- package/types/eui-eds-eds-user-profile.d.ts.map +1 -0
- package/types/eui-eds-shared.d.ts +82 -79
- package/types/eui-eds-shared.d.ts.map +1 -1
- package/docs/json/EuiBaseColorVariantsDirective.md +0 -21
- package/docs/json/EuiBaseSizeVariantsDirective.md +0 -23
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, input, output, signal } from '@angular/core';
|
|
3
|
+
import * as i1 from '@eui/eds/eds-icon-button';
|
|
4
|
+
import { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';
|
|
5
|
+
|
|
6
|
+
class EdsPage {
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPage, isStandalone: true, selector: "eds-page", ngImport: i0, template: "<ng-content select=\"eds-page-header\"></ng-content>\n<ng-content select=\"eds-page-content\"></ng-content>\n<ng-content select=\"eds-page-footer\"></ng-content>\n", styles: [".eui-21 :host{display:flex;flex-direction:column;height:100%;gap:var(--eds-sp-xs)}\n"] }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPage, decorators: [{
|
|
11
|
+
type: Component,
|
|
12
|
+
args: [{ selector: 'eds-page', template: "<ng-content select=\"eds-page-header\"></ng-content>\n<ng-content select=\"eds-page-content\"></ng-content>\n<ng-content select=\"eds-page-footer\"></ng-content>\n", styles: [".eui-21 :host{display:flex;flex-direction:column;height:100%;gap:var(--eds-sp-xs)}\n"] }]
|
|
13
|
+
}] });
|
|
14
|
+
|
|
15
|
+
class EdsPageHeader {
|
|
16
|
+
constructor() {
|
|
17
|
+
/** Enables expand/collapse functionality for the page header. */
|
|
18
|
+
this.isCollapsible = input(false, /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "isCollapsible" }] : /* istanbul ignore next */ []));
|
|
20
|
+
/** Controls the collapsed state of the header. */
|
|
21
|
+
this.isCollapsed = input(false, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Enables multi-line layout mode for headers with extensive content. */
|
|
24
|
+
this.isHeaderMultilines = input(false, /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "isHeaderMultilines" }] : /* istanbul ignore next */ []));
|
|
26
|
+
/** Accessible label for the toggle button when header is collapsed. */
|
|
27
|
+
this.collapsedLabel = input('Expand', /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "collapsedLabel" }] : /* istanbul ignore next */ []));
|
|
29
|
+
/** Accessible label for the toggle button when header is expanded. */
|
|
30
|
+
this.expandedLabel = input('Collapse', /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "expandedLabel" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/** Emitted when the header's collapsed state changes. */
|
|
33
|
+
this.collapse = output();
|
|
34
|
+
this.collapsed = signal(false, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
36
|
+
}
|
|
37
|
+
toggleCollapse() {
|
|
38
|
+
this.collapsed.update(v => !v);
|
|
39
|
+
this.collapse.emit(this.collapsed());
|
|
40
|
+
}
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EdsPageHeader, isStandalone: true, selector: "eds-page-header", inputs: { isCollapsible: { classPropertyName: "isCollapsible", publicName: "isCollapsible", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, isHeaderMultilines: { classPropertyName: "isHeaderMultilines", publicName: "isHeaderMultilines", isSignal: true, isRequired: false, transformFunction: null }, collapsedLabel: { classPropertyName: "collapsedLabel", publicName: "collapsedLabel", isSignal: true, isRequired: false, transformFunction: null }, expandedLabel: { classPropertyName: "expandedLabel", publicName: "expandedLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"header-top\" [class.multilines]=\"isHeaderMultilines()\">\n <div class=\"header-labels\">\n <ng-content select=\"eds-page-header-label\"></ng-content>\n <ng-content select=\"eds-page-header-sublabel\"></ng-content>\n </div>\n\n <div class=\"header-actions\">\n <ng-content select=\"eds-page-header-action-items\"></ng-content>\n\n @if (isCollapsible()) {\n <button\n edsIconButton\n icon=\"caret-down\"\n [ariaLabel]=\"collapsed() ? collapsedLabel() : expandedLabel()\"\n [class.collapsed-icon]=\"collapsed()\"\n (click)=\"toggleCollapse()\">\n </button>\n }\n </div>\n</div>\n\n@if (!collapsed()) {\n <ng-content select=\"eds-page-header-body\"></ng-content>\n}\n", styles: [".eui-21 :host{display:flex;flex-direction:column;gap:var(--eds-sp-xs);flex-shrink:0;padding:var(--eds-sp-m) var(--eds-sp-m) var(--eds-sp-2xs) var(--eds-sp-m)}.eui-21 :host .header-top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--eds-sp-m)}.eui-21 :host .header-top.multilines{flex-wrap:wrap}.eui-21 :host .header-labels{display:flex;flex-direction:column;gap:var(--eds-sp-3xs);min-width:0}.eui-21 :host .header-actions{display:flex;align-items:center;gap:var(--eds-sp-xs);flex-shrink:0}.eui-21 :host .collapse-toggle{display:flex;align-items:center;justify-content:center;width:var(--eds-is-l);height:var(--eds-is-l);border:none;background:none;border-radius:var(--eds-br-s);cursor:pointer;color:var(--eds-c-foreground-subtler);transition:background .15s ease}.eui-21 :host .collapse-toggle:hover{background:var(--eds-c-surface-elevation-sunken)}.eui-21 :host .collapse-toggle eds-icon{transition:transform .2s ease}.eui-21 :host .collapse-toggle eds-icon.collapsed-icon{transform:rotate(-90deg)}.eui-21 :host [edsIconButton]{transition:transform .2s ease}.eui-21 :host [edsIconButton].collapsed-icon{transform:rotate(-90deg)}\n"], dependencies: [{ kind: "component", type: i1.EdsIconButton, selector: "button[edsIconButton]", inputs: ["icon", "ariaLabel", "edsRounded", "edsDisabled"], outputs: ["buttonClick"] }] }); }
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeader, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{ selector: 'eds-page-header', imports: [...EDS_ICON_BUTTON], template: "<div class=\"header-top\" [class.multilines]=\"isHeaderMultilines()\">\n <div class=\"header-labels\">\n <ng-content select=\"eds-page-header-label\"></ng-content>\n <ng-content select=\"eds-page-header-sublabel\"></ng-content>\n </div>\n\n <div class=\"header-actions\">\n <ng-content select=\"eds-page-header-action-items\"></ng-content>\n\n @if (isCollapsible()) {\n <button\n edsIconButton\n icon=\"caret-down\"\n [ariaLabel]=\"collapsed() ? collapsedLabel() : expandedLabel()\"\n [class.collapsed-icon]=\"collapsed()\"\n (click)=\"toggleCollapse()\">\n </button>\n }\n </div>\n</div>\n\n@if (!collapsed()) {\n <ng-content select=\"eds-page-header-body\"></ng-content>\n}\n", styles: [".eui-21 :host{display:flex;flex-direction:column;gap:var(--eds-sp-xs);flex-shrink:0;padding:var(--eds-sp-m) var(--eds-sp-m) var(--eds-sp-2xs) var(--eds-sp-m)}.eui-21 :host .header-top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--eds-sp-m)}.eui-21 :host .header-top.multilines{flex-wrap:wrap}.eui-21 :host .header-labels{display:flex;flex-direction:column;gap:var(--eds-sp-3xs);min-width:0}.eui-21 :host .header-actions{display:flex;align-items:center;gap:var(--eds-sp-xs);flex-shrink:0}.eui-21 :host .collapse-toggle{display:flex;align-items:center;justify-content:center;width:var(--eds-is-l);height:var(--eds-is-l);border:none;background:none;border-radius:var(--eds-br-s);cursor:pointer;color:var(--eds-c-foreground-subtler);transition:background .15s ease}.eui-21 :host .collapse-toggle:hover{background:var(--eds-c-surface-elevation-sunken)}.eui-21 :host .collapse-toggle eds-icon{transition:transform .2s ease}.eui-21 :host .collapse-toggle eds-icon.collapsed-icon{transform:rotate(-90deg)}.eui-21 :host [edsIconButton]{transition:transform .2s ease}.eui-21 :host [edsIconButton].collapsed-icon{transform:rotate(-90deg)}\n"] }]
|
|
47
|
+
}], propDecorators: { isCollapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsible", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }], isHeaderMultilines: [{ type: i0.Input, args: [{ isSignal: true, alias: "isHeaderMultilines", required: false }] }], collapsedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedLabel", required: false }] }], expandedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedLabel", required: false }] }], collapse: [{ type: i0.Output, args: ["collapse"] }] } });
|
|
48
|
+
|
|
49
|
+
class EdsPageHeaderLabel {
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPageHeaderLabel, isStandalone: true, selector: "eds-page-header-label", ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:block;font:var(--eds-f-heading-l);letter-spacing:var(--eds-f-ls-4xl);color:var(--eds-c-foreground);margin:0}\n"] }); }
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderLabel, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'eds-page-header-label', template: '<ng-content/>', styles: [".eui-21 :host{display:block;font:var(--eds-f-heading-l);letter-spacing:var(--eds-f-ls-4xl);color:var(--eds-c-foreground);margin:0}\n"] }]
|
|
56
|
+
}] });
|
|
57
|
+
|
|
58
|
+
class EdsPageHeaderSublabel {
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderSublabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPageHeaderSublabel, isStandalone: true, selector: "eds-page-header-sublabel", ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:block;font:var(--eds-f-paragraph-m);color:var(--eds-c-foreground-subtler);margin:0}\n"] }); }
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderSublabel, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'eds-page-header-sublabel', template: '<ng-content/>', styles: [".eui-21 :host{display:block;font:var(--eds-f-paragraph-m);color:var(--eds-c-foreground-subtler);margin:0}\n"] }]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
class EdsPageHeaderActionItems {
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderActionItems, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
69
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPageHeaderActionItems, isStandalone: true, selector: "eds-page-header-action-items", ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:flex;align-items:center;gap:var(--eds-sp-xs)}\n"] }); }
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderActionItems, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ selector: 'eds-page-header-action-items', template: '<ng-content/>', styles: [".eui-21 :host{display:flex;align-items:center;gap:var(--eds-sp-xs)}\n"] }]
|
|
74
|
+
}] });
|
|
75
|
+
|
|
76
|
+
class EdsPageHeaderBody {
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPageHeaderBody, isStandalone: true, selector: "eds-page-header-body", ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:block;padding-top:var(--eds-sp-xs)}\n"] }); }
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageHeaderBody, decorators: [{
|
|
81
|
+
type: Component,
|
|
82
|
+
args: [{ selector: 'eds-page-header-body', template: '<ng-content/>', styles: [".eui-21 :host{display:block;padding-top:var(--eds-sp-xs)}\n"] }]
|
|
83
|
+
}] });
|
|
84
|
+
|
|
85
|
+
class EdsPageContent {
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
87
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EdsPageContent, isStandalone: true, selector: "eds-page-content", host: { attributes: { "role": "main" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:block;flex:1;min-height:0;padding:var(--eds-sp-2xs) var(--eds-sp-m) var(--eds-sp-m) var(--eds-sp-m);height:100%;overflow-y:auto;overflow-x:hidden}\n"] }); }
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageContent, decorators: [{
|
|
90
|
+
type: Component,
|
|
91
|
+
args: [{ selector: 'eds-page-content', template: '<ng-content/>', host: {
|
|
92
|
+
role: 'main',
|
|
93
|
+
}, styles: [".eui-21 :host{display:block;flex:1;min-height:0;padding:var(--eds-sp-2xs) var(--eds-sp-m) var(--eds-sp-m) var(--eds-sp-m);height:100%;overflow-y:auto;overflow-x:hidden}\n"] }]
|
|
94
|
+
}] });
|
|
95
|
+
|
|
96
|
+
class EdsPageFooter {
|
|
97
|
+
constructor() {
|
|
98
|
+
/** Adds visual emphasis to the footer. */
|
|
99
|
+
this.highlighted = input(false, /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
|
|
101
|
+
}
|
|
102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: EdsPageFooter, isStandalone: true, selector: "eds-page-footer", inputs: { highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.highlighted": "highlighted()" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-21 :host{display:flex;align-items:center;gap:var(--eds-sp-xs);flex-shrink:0;padding:var(--eds-sp-m) var(--eds-sp-none);border-top:var(--eds-bw-xs) solid var(--eds-c-border-divider)}.eui-21 :host(.highlighted){background:var(--eds-c-surface-elevation-raised);padding:var(--eds-sp-m);border-radius:var(--eds-br-s);border-top:none}\n"] }); }
|
|
104
|
+
}
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsPageFooter, decorators: [{
|
|
106
|
+
type: Component,
|
|
107
|
+
args: [{ selector: 'eds-page-footer', template: '<ng-content/>', host: {
|
|
108
|
+
'[class.highlighted]': 'highlighted()',
|
|
109
|
+
}, styles: [".eui-21 :host{display:flex;align-items:center;gap:var(--eds-sp-xs);flex-shrink:0;padding:var(--eds-sp-m) var(--eds-sp-none);border-top:var(--eds-bw-xs) solid var(--eds-c-border-divider)}.eui-21 :host(.highlighted){background:var(--eds-c-surface-elevation-raised);padding:var(--eds-sp-m);border-radius:var(--eds-br-s);border-top:none}\n"] }]
|
|
110
|
+
}], propDecorators: { highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }] } });
|
|
111
|
+
|
|
112
|
+
/** Convenience array for importing all eds-page components. */
|
|
113
|
+
const EDS_PAGE = [
|
|
114
|
+
EdsPage,
|
|
115
|
+
EdsPageHeader,
|
|
116
|
+
EdsPageHeaderLabel,
|
|
117
|
+
EdsPageHeaderSublabel,
|
|
118
|
+
EdsPageHeaderActionItems,
|
|
119
|
+
EdsPageHeaderBody,
|
|
120
|
+
EdsPageContent,
|
|
121
|
+
EdsPageFooter,
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Generated bundle index. Do not edit.
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
export { EDS_PAGE, EdsPage, EdsPageContent, EdsPageFooter, EdsPageHeader, EdsPageHeaderActionItems, EdsPageHeaderBody, EdsPageHeaderLabel, EdsPageHeaderSublabel };
|
|
129
|
+
//# sourceMappingURL=eui-eds-eds-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eui-eds-eds-page.mjs","sources":["../../eds-page/eds-page.ts","../../eds-page/eds-page.html","../../eds-page/eds-page-header.ts","../../eds-page/eds-page-header.html","../../eds-page/eds-page-header-label.ts","../../eds-page/eds-page-header-sublabel.ts","../../eds-page/eds-page-header-action-items.ts","../../eds-page/eds-page-header-body.ts","../../eds-page/eds-page-content.ts","../../eds-page/eds-page-footer.ts","../../eds-page/index.ts","../../eds-page/eui-eds-eds-page.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page',\n templateUrl: './eds-page.html',\n styleUrl: './eds-page.scss',\n})\nexport class EdsPage {}\n","<ng-content select=\"eds-page-header\"></ng-content>\n<ng-content select=\"eds-page-content\"></ng-content>\n<ng-content select=\"eds-page-footer\"></ng-content>\n","import { Component, input, output, signal } from '@angular/core';\nimport { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';\n\n@Component({\n selector: 'eds-page-header',\n imports: [...EDS_ICON_BUTTON],\n templateUrl: './eds-page-header.html',\n styleUrl: './eds-page-header.scss',\n})\nexport class EdsPageHeader {\n /** Enables expand/collapse functionality for the page header. */\n isCollapsible = input<boolean>(false);\n\n /** Controls the collapsed state of the header. */\n isCollapsed = input<boolean>(false);\n\n /** Enables multi-line layout mode for headers with extensive content. */\n isHeaderMultilines = input<boolean>(false);\n\n /** Accessible label for the toggle button when header is collapsed. */\n collapsedLabel = input<string>('Expand');\n\n /** Accessible label for the toggle button when header is expanded. */\n expandedLabel = input<string>('Collapse');\n\n /** Emitted when the header's collapsed state changes. */\n collapse = output<boolean>();\n\n collapsed = signal(false);\n\n toggleCollapse(): void {\n this.collapsed.update(v => !v);\n this.collapse.emit(this.collapsed());\n }\n}\n","<div class=\"header-top\" [class.multilines]=\"isHeaderMultilines()\">\n <div class=\"header-labels\">\n <ng-content select=\"eds-page-header-label\"></ng-content>\n <ng-content select=\"eds-page-header-sublabel\"></ng-content>\n </div>\n\n <div class=\"header-actions\">\n <ng-content select=\"eds-page-header-action-items\"></ng-content>\n\n @if (isCollapsible()) {\n <button\n edsIconButton\n icon=\"caret-down\"\n [ariaLabel]=\"collapsed() ? collapsedLabel() : expandedLabel()\"\n [class.collapsed-icon]=\"collapsed()\"\n (click)=\"toggleCollapse()\">\n </button>\n }\n </div>\n</div>\n\n@if (!collapsed()) {\n <ng-content select=\"eds-page-header-body\"></ng-content>\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page-header-label',\n template: '<ng-content/>',\n styleUrl: './eds-page-header-label.scss',\n})\nexport class EdsPageHeaderLabel {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page-header-sublabel',\n template: '<ng-content/>',\n styleUrl: './eds-page-header-sublabel.scss',\n})\nexport class EdsPageHeaderSublabel {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page-header-action-items',\n template: '<ng-content/>',\n styleUrl: './eds-page-header-action-items.scss',\n})\nexport class EdsPageHeaderActionItems {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page-header-body',\n template: '<ng-content/>',\n styleUrl: './eds-page-header-body.scss',\n})\nexport class EdsPageHeaderBody {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'eds-page-content',\n template: '<ng-content/>',\n styleUrl: './eds-page-content.scss',\n host: {\n role: 'main',\n },\n})\nexport class EdsPageContent {}\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'eds-page-footer',\n template: '<ng-content/>',\n styleUrl: './eds-page-footer.scss',\n host: {\n '[class.highlighted]': 'highlighted()',\n },\n})\nexport class EdsPageFooter {\n /** Adds visual emphasis to the footer. */\n highlighted = input<boolean>(false);\n}\n","import { EdsPage } from './eds-page';\nimport { EdsPageHeader } from './eds-page-header';\nimport { EdsPageHeaderLabel } from './eds-page-header-label';\nimport { EdsPageHeaderSublabel } from './eds-page-header-sublabel';\nimport { EdsPageHeaderActionItems } from './eds-page-header-action-items';\nimport { EdsPageHeaderBody } from './eds-page-header-body';\nimport { EdsPageContent } from './eds-page-content';\nimport { EdsPageFooter } from './eds-page-footer';\n\nexport {\n EdsPage,\n EdsPageHeader,\n EdsPageHeaderLabel,\n EdsPageHeaderSublabel,\n EdsPageHeaderActionItems,\n EdsPageHeaderBody,\n EdsPageContent,\n EdsPageFooter,\n};\n\n/** Convenience array for importing all eds-page components. */\nexport const EDS_PAGE = [\n EdsPage,\n EdsPageHeader,\n EdsPageHeaderLabel,\n EdsPageHeaderSublabel,\n EdsPageHeaderActionItems,\n EdsPageHeaderBody,\n EdsPageContent,\n EdsPageFooter,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAOa,OAAO,CAAA;8GAAP,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,oECPpB,qKAGA,EAAA,MAAA,EAAA,CAAA,sFAAA,CAAA,EAAA,CAAA,CAAA;;2FDIa,OAAO,EAAA,UAAA,EAAA,CAAA;kBALnB,SAAS;+BACE,UAAU,EAAA,QAAA,EAAA,qKAAA,EAAA,MAAA,EAAA,CAAA,sFAAA,CAAA,EAAA;;;MEMT,aAAa,CAAA;AAN1B,IAAA,WAAA,GAAA;;QAQE,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK;0FAAC;;QAGrC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK;wFAAC;;QAGnC,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAU,KAAK;+FAAC;;QAG1C,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,QAAQ;2FAAC;;QAGxC,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AA,EAEnB;AACJ,wBAAA,IAAI,EAAE,MAAM;AACb,qBAAA,EAAA,MAAA,EAAA,CAAA,4KAAA,CAAA,EAAA;;;MCEU,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;;QAUE,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK;wFAAC;AACpC,IAAA;8GAHY,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,iSANd,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,iVAAA,CAAA,EAAA,CAAA,CAAA;;2FAMd,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;+BACE,iBAAiB,EAAA,QAAA,EACjB,eAAe,EAAA,IAAA,EAEnB;AACJ,wBAAA,qBAAqB,EAAE,eAAe;AACvC,qBAAA,EAAA,MAAA,EAAA,CAAA,iVAAA,CAAA,EAAA;;;ACYH;AACO,MAAM,QAAQ,GAAG;IACtB,OAAO;IACP,aAAa;IACb,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,iBAAiB;IACjB,cAAc;IACd,aAAa;;;AC7Bf;;AAEG;;;;"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { numberAttribute, input, booleanAttribute, output, inject, ElementRef, Renderer2, effect, Directive } from '@angular/core';
|
|
4
|
+
import { Subject, fromEvent } from 'rxjs';
|
|
5
|
+
import { tap, takeUntil, map, distinctUntilChanged } from 'rxjs/operators';
|
|
6
|
+
|
|
7
|
+
/** Ensures value is a non-negative pixel number. */
|
|
8
|
+
const pixelTransform = (value) => Math.max(0, numberAttribute(value, 0));
|
|
9
|
+
/**
|
|
10
|
+
* Directive that enables interactive resizing of a host element by dragging a handle.
|
|
11
|
+
* Applies width constraints dynamically and supports left or right-side handle placement.
|
|
12
|
+
*
|
|
13
|
+
* Usage: `<div edsResizable [edsResizableMinWidth]="200" [edsResizableMaxWidth]="600"></div>`
|
|
14
|
+
*/
|
|
15
|
+
class EdsResizable {
|
|
16
|
+
constructor() {
|
|
17
|
+
/** Minimum width in pixels. */
|
|
18
|
+
this.edsResizableMinWidth = input(0, { ...(ngDevMode ? { debugName: "edsResizableMinWidth" } : /* istanbul ignore next */ {}), transform: pixelTransform });
|
|
19
|
+
/** Maximum width in pixels. */
|
|
20
|
+
this.edsResizableMaxWidth = input(undefined, /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "edsResizableMaxWidth" }] : /* istanbul ignore next */ []));
|
|
22
|
+
/** Handle placement side. */
|
|
23
|
+
this.edsResizablePosition = input('right', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "edsResizablePosition" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/** Whether the resize handle is hidden/disabled. */
|
|
26
|
+
this.edsResizableDisabled = input(false, { ...(ngDevMode ? { debugName: "edsResizableDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
27
|
+
/** Step size in pixels for keyboard arrow key resizing. */
|
|
28
|
+
this.edsResizableKeyStep = input(10, { ...(ngDevMode ? { debugName: "edsResizableKeyStep" } : /* istanbul ignore next */ {}), transform: pixelTransform });
|
|
29
|
+
/** Accessible label for the separator handle. */
|
|
30
|
+
this.edsResizableAriaLabel = input('Press the left or right arrow key to resize the panel', /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "edsResizableAriaLabel" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/** Emits the new width in pixels after a resize operation. */
|
|
33
|
+
this.edsResizableWidthChange = output();
|
|
34
|
+
this.document = inject(DOCUMENT);
|
|
35
|
+
this.el = inject(ElementRef);
|
|
36
|
+
this.renderer = inject(Renderer2);
|
|
37
|
+
this.destroy$ = new Subject();
|
|
38
|
+
this.interaction$ = new Subject();
|
|
39
|
+
this.initialized = false;
|
|
40
|
+
effect(() => {
|
|
41
|
+
const disabled = this.edsResizableDisabled();
|
|
42
|
+
if (!this.initialized)
|
|
43
|
+
return;
|
|
44
|
+
if (disabled) {
|
|
45
|
+
this.teardownInteraction();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.setupInteraction();
|
|
49
|
+
}
|
|
50
|
+
this.updateHandleVisibility();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
ngOnInit() {
|
|
54
|
+
this.createHandle();
|
|
55
|
+
this.initialized = true;
|
|
56
|
+
if (!this.edsResizableDisabled()) {
|
|
57
|
+
this.setupInteraction();
|
|
58
|
+
}
|
|
59
|
+
this.updateHandleVisibility();
|
|
60
|
+
}
|
|
61
|
+
ngOnDestroy() {
|
|
62
|
+
this.destroy$.next();
|
|
63
|
+
this.destroy$.complete();
|
|
64
|
+
this.interaction$.complete();
|
|
65
|
+
}
|
|
66
|
+
applySize(size) {
|
|
67
|
+
const min = this.edsResizableMinWidth();
|
|
68
|
+
const max = this.edsResizableMaxWidth();
|
|
69
|
+
let constrained = Math.max(Math.round(size), min);
|
|
70
|
+
if (max !== undefined) {
|
|
71
|
+
constrained = Math.min(constrained, max);
|
|
72
|
+
}
|
|
73
|
+
const host = this.el.nativeElement;
|
|
74
|
+
this.renderer.setStyle(host, 'width', `${constrained}px`);
|
|
75
|
+
this.renderer.setStyle(host, 'min-width', `${constrained}px`);
|
|
76
|
+
this.renderer.setStyle(host, 'max-width', `${constrained}px`);
|
|
77
|
+
this.renderer.setStyle(host, 'flex-basis', `${constrained}px`);
|
|
78
|
+
this.handleEl.setAttribute('aria-valuenow', String(constrained));
|
|
79
|
+
this.edsResizableWidthChange.emit(constrained);
|
|
80
|
+
}
|
|
81
|
+
setupInteraction() {
|
|
82
|
+
this.interaction$.next();
|
|
83
|
+
fromEvent(this.handleEl, 'mousedown').pipe(tap(e => e.preventDefault()), takeUntil(this.interaction$), takeUntil(this.destroy$)).subscribe(e => {
|
|
84
|
+
if (e.button !== 0)
|
|
85
|
+
return;
|
|
86
|
+
const { width, right, left } = this.el.nativeElement.getBoundingClientRect();
|
|
87
|
+
this.renderer.addClass(this.document.body, 'eds-resizing');
|
|
88
|
+
fromEvent(this.document, 'mousemove').pipe(map(({ clientX }) => {
|
|
89
|
+
if (this.edsResizablePosition() === 'right') {
|
|
90
|
+
return width + clientX - right;
|
|
91
|
+
}
|
|
92
|
+
return width + (left - clientX);
|
|
93
|
+
}), distinctUntilChanged(), takeUntil(fromEvent(this.document, 'mouseup').pipe(tap(() => this.renderer.removeClass(this.document.body, 'eds-resizing'))))).subscribe(size => this.applySize(size));
|
|
94
|
+
});
|
|
95
|
+
fromEvent(this.handleEl, 'keydown').pipe(takeUntil(this.interaction$), takeUntil(this.destroy$)).subscribe(e => this.onKeydown(e));
|
|
96
|
+
}
|
|
97
|
+
teardownInteraction() {
|
|
98
|
+
this.interaction$.next();
|
|
99
|
+
}
|
|
100
|
+
onKeydown(e) {
|
|
101
|
+
const currentWidth = this.el.nativeElement.getBoundingClientRect().width;
|
|
102
|
+
const step = this.edsResizableKeyStep();
|
|
103
|
+
const isLeft = this.edsResizablePosition() === 'left';
|
|
104
|
+
let newSize = null;
|
|
105
|
+
switch (e.key) {
|
|
106
|
+
case 'ArrowRight':
|
|
107
|
+
newSize = isLeft ? currentWidth - step : currentWidth + step;
|
|
108
|
+
break;
|
|
109
|
+
case 'ArrowLeft':
|
|
110
|
+
newSize = isLeft ? currentWidth + step : currentWidth - step;
|
|
111
|
+
break;
|
|
112
|
+
case 'Home':
|
|
113
|
+
newSize = this.edsResizableMinWidth();
|
|
114
|
+
break;
|
|
115
|
+
case 'End':
|
|
116
|
+
newSize = this.edsResizableMaxWidth() ?? currentWidth;
|
|
117
|
+
break;
|
|
118
|
+
default:
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
this.applySize(newSize);
|
|
123
|
+
}
|
|
124
|
+
createHandle() {
|
|
125
|
+
const handle = this.renderer.createElement('div');
|
|
126
|
+
// Position & layout
|
|
127
|
+
this.renderer.setStyle(handle, 'position', 'absolute');
|
|
128
|
+
this.renderer.setStyle(handle, 'top', '0');
|
|
129
|
+
this.renderer.setStyle(handle, 'bottom', '0');
|
|
130
|
+
this.renderer.setStyle(handle, 'width', '6px');
|
|
131
|
+
this.renderer.setStyle(handle, 'cursor', 'ew-resize');
|
|
132
|
+
this.renderer.setStyle(handle, 'opacity', '0');
|
|
133
|
+
this.renderer.setStyle(handle, 'background', 'var(--eds-c-border-primary)');
|
|
134
|
+
this.renderer.setStyle(handle, 'transition', 'opacity 0.2s ease');
|
|
135
|
+
this.renderer.setStyle(handle, 'z-index', '10');
|
|
136
|
+
if (this.edsResizablePosition() === 'right') {
|
|
137
|
+
this.renderer.setStyle(handle, 'right', '0');
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
this.renderer.setStyle(handle, 'left', '0');
|
|
141
|
+
}
|
|
142
|
+
// Hover/focus effects via event listeners
|
|
143
|
+
this.renderer.listen(handle, 'mouseenter', () => this.renderer.setStyle(handle, 'opacity', '1'));
|
|
144
|
+
this.renderer.listen(handle, 'mouseleave', () => {
|
|
145
|
+
if (this.document.activeElement !== handle) {
|
|
146
|
+
this.renderer.setStyle(handle, 'opacity', '0');
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
this.renderer.listen(handle, 'focus', () => this.renderer.setStyle(handle, 'opacity', '1'));
|
|
150
|
+
this.renderer.listen(handle, 'blur', () => this.renderer.setStyle(handle, 'opacity', '0'));
|
|
151
|
+
// Accessibility attributes
|
|
152
|
+
this.renderer.setAttribute(handle, 'role', 'separator');
|
|
153
|
+
this.renderer.setAttribute(handle, 'aria-orientation', 'vertical');
|
|
154
|
+
this.renderer.setAttribute(handle, 'tabindex', '0');
|
|
155
|
+
this.renderer.setAttribute(handle, 'aria-label', this.edsResizableAriaLabel());
|
|
156
|
+
this.renderer.setAttribute(handle, 'aria-valuemin', String(this.edsResizableMinWidth()));
|
|
157
|
+
if (this.edsResizableMaxWidth() !== undefined) {
|
|
158
|
+
this.renderer.setAttribute(handle, 'aria-valuemax', String(this.edsResizableMaxWidth()));
|
|
159
|
+
}
|
|
160
|
+
const currentWidth = Math.round(this.el.nativeElement.getBoundingClientRect().width);
|
|
161
|
+
this.renderer.setAttribute(handle, 'aria-valuenow', String(currentWidth));
|
|
162
|
+
this.renderer.appendChild(this.el.nativeElement, handle);
|
|
163
|
+
this.handleEl = handle;
|
|
164
|
+
}
|
|
165
|
+
updateHandleVisibility() {
|
|
166
|
+
if (!this.handleEl)
|
|
167
|
+
return;
|
|
168
|
+
if (this.edsResizableDisabled()) {
|
|
169
|
+
this.renderer.setStyle(this.handleEl, 'display', 'none');
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.renderer.removeStyle(this.handleEl, 'display');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsResizable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
176
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: EdsResizable, isStandalone: true, selector: "[edsResizable]", inputs: { edsResizableMinWidth: { classPropertyName: "edsResizableMinWidth", publicName: "edsResizableMinWidth", isSignal: true, isRequired: false, transformFunction: null }, edsResizableMaxWidth: { classPropertyName: "edsResizableMaxWidth", publicName: "edsResizableMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, edsResizablePosition: { classPropertyName: "edsResizablePosition", publicName: "edsResizablePosition", isSignal: true, isRequired: false, transformFunction: null }, edsResizableDisabled: { classPropertyName: "edsResizableDisabled", publicName: "edsResizableDisabled", isSignal: true, isRequired: false, transformFunction: null }, edsResizableKeyStep: { classPropertyName: "edsResizableKeyStep", publicName: "edsResizableKeyStep", isSignal: true, isRequired: false, transformFunction: null }, edsResizableAriaLabel: { classPropertyName: "edsResizableAriaLabel", publicName: "edsResizableAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edsResizableWidthChange: "edsResizableWidthChange" }, host: { attributes: { "style.position": "relative" } }, ngImport: i0 }); }
|
|
177
|
+
}
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsResizable, decorators: [{
|
|
179
|
+
type: Directive,
|
|
180
|
+
args: [{
|
|
181
|
+
selector: '[edsResizable]',
|
|
182
|
+
host: {
|
|
183
|
+
'style.position': 'relative',
|
|
184
|
+
},
|
|
185
|
+
}]
|
|
186
|
+
}], ctorParameters: () => [], propDecorators: { edsResizableMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizableMinWidth", required: false }] }], edsResizableMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizableMaxWidth", required: false }] }], edsResizablePosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizablePosition", required: false }] }], edsResizableDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizableDisabled", required: false }] }], edsResizableKeyStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizableKeyStep", required: false }] }], edsResizableAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsResizableAriaLabel", required: false }] }], edsResizableWidthChange: [{ type: i0.Output, args: ["edsResizableWidthChange"] }] } });
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Generated bundle index. Do not edit.
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
export { EdsResizable };
|
|
193
|
+
//# sourceMappingURL=eui-eds-eds-resizable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eui-eds-eds-resizable.mjs","sources":["../../eds-resizable/eds-resizable.directive.ts","../../eds-resizable/eui-eds-eds-resizable.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n Renderer2,\n inject,\n input,\n output,\n effect,\n numberAttribute,\n booleanAttribute,\n} from '@angular/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { distinctUntilChanged, map, takeUntil, tap } from 'rxjs/operators';\n\n/** Handle placement side. */\nexport type EdsResizablePosition = 'left' | 'right';\n\n/** Ensures value is a non-negative pixel number. */\nconst pixelTransform = (value: string | number): number => Math.max(0, numberAttribute(value, 0));\n\n/**\n * Directive that enables interactive resizing of a host element by dragging a handle.\n * Applies width constraints dynamically and supports left or right-side handle placement.\n *\n * Usage: `<div edsResizable [edsResizableMinWidth]=\"200\" [edsResizableMaxWidth]=\"600\"></div>`\n */\n@Directive({\n selector: '[edsResizable]',\n host: {\n 'style.position': 'relative',\n },\n})\nexport class EdsResizable implements OnInit, OnDestroy {\n /** Minimum width in pixels. */\n edsResizableMinWidth = input(0, { transform: pixelTransform });\n\n /** Maximum width in pixels. */\n edsResizableMaxWidth = input<number | undefined>(undefined);\n\n /** Handle placement side. */\n edsResizablePosition = input<EdsResizablePosition>('right');\n\n /** Whether the resize handle is hidden/disabled. */\n edsResizableDisabled = input(false, { transform: booleanAttribute });\n\n /** Step size in pixels for keyboard arrow key resizing. */\n edsResizableKeyStep = input(10, { transform: pixelTransform });\n\n /** Accessible label for the separator handle. */\n edsResizableAriaLabel = input('Press the left or right arrow key to resize the panel');\n\n /** Emits the new width in pixels after a resize operation. */\n edsResizableWidthChange = output<number>();\n\n private document = inject<Document>(DOCUMENT);\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n\n private destroy$ = new Subject<void>();\n private interaction$ = new Subject<void>();\n private handleEl!: HTMLElement;\n private initialized = false;\n\n constructor() {\n effect(() => {\n const disabled = this.edsResizableDisabled();\n if (!this.initialized) return;\n if (disabled) {\n this.teardownInteraction();\n } else {\n this.setupInteraction();\n }\n this.updateHandleVisibility();\n });\n }\n\n ngOnInit(): void {\n this.createHandle();\n this.initialized = true;\n if (!this.edsResizableDisabled()) {\n this.setupInteraction();\n }\n this.updateHandleVisibility();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.interaction$.complete();\n }\n\n private applySize(size: number): void {\n const min = this.edsResizableMinWidth();\n const max = this.edsResizableMaxWidth();\n let constrained = Math.max(Math.round(size), min);\n if (max !== undefined) {\n constrained = Math.min(constrained, max);\n }\n\n const host = this.el.nativeElement;\n this.renderer.setStyle(host, 'width', `${constrained}px`);\n this.renderer.setStyle(host, 'min-width', `${constrained}px`);\n this.renderer.setStyle(host, 'max-width', `${constrained}px`);\n this.renderer.setStyle(host, 'flex-basis', `${constrained}px`);\n\n this.handleEl.setAttribute('aria-valuenow', String(constrained));\n this.edsResizableWidthChange.emit(constrained);\n }\n\n private setupInteraction(): void {\n this.interaction$.next();\n\n fromEvent<MouseEvent>(this.handleEl, 'mousedown').pipe(\n tap(e => e.preventDefault()),\n takeUntil(this.interaction$),\n takeUntil(this.destroy$),\n ).subscribe(e => {\n if (e.button !== 0) return;\n\n const { width, right, left } = this.el.nativeElement.getBoundingClientRect();\n this.renderer.addClass(this.document.body, 'eds-resizing');\n\n fromEvent<MouseEvent>(this.document, 'mousemove').pipe(\n map(({ clientX }) => {\n if (this.edsResizablePosition() === 'right') {\n return width + clientX - right;\n }\n return width + (left - clientX);\n }),\n distinctUntilChanged(),\n takeUntil(fromEvent(this.document, 'mouseup').pipe(\n tap(() => this.renderer.removeClass(this.document.body, 'eds-resizing')),\n )),\n ).subscribe(size => this.applySize(size));\n });\n\n fromEvent<KeyboardEvent>(this.handleEl, 'keydown').pipe(\n takeUntil(this.interaction$),\n takeUntil(this.destroy$),\n ).subscribe(e => this.onKeydown(e));\n }\n\n private teardownInteraction(): void {\n this.interaction$.next();\n }\n\n private onKeydown(e: KeyboardEvent): void {\n const currentWidth = this.el.nativeElement.getBoundingClientRect().width;\n const step = this.edsResizableKeyStep();\n const isLeft = this.edsResizablePosition() === 'left';\n let newSize: number | null = null;\n\n switch (e.key) {\n case 'ArrowRight':\n newSize = isLeft ? currentWidth - step : currentWidth + step;\n break;\n case 'ArrowLeft':\n newSize = isLeft ? currentWidth + step : currentWidth - step;\n break;\n case 'Home':\n newSize = this.edsResizableMinWidth();\n break;\n case 'End':\n newSize = this.edsResizableMaxWidth() ?? currentWidth;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n this.applySize(newSize);\n }\n\n private createHandle(): void {\n const handle = this.renderer.createElement('div');\n\n // Position & layout\n this.renderer.setStyle(handle, 'position', 'absolute');\n this.renderer.setStyle(handle, 'top', '0');\n this.renderer.setStyle(handle, 'bottom', '0');\n this.renderer.setStyle(handle, 'width', '6px');\n this.renderer.setStyle(handle, 'cursor', 'ew-resize');\n this.renderer.setStyle(handle, 'opacity', '0');\n this.renderer.setStyle(handle, 'background', 'var(--eds-c-border-primary)');\n this.renderer.setStyle(handle, 'transition', 'opacity 0.2s ease');\n this.renderer.setStyle(handle, 'z-index', '10');\n\n if (this.edsResizablePosition() === 'right') {\n this.renderer.setStyle(handle, 'right', '0');\n } else {\n this.renderer.setStyle(handle, 'left', '0');\n }\n\n // Hover/focus effects via event listeners\n this.renderer.listen(handle, 'mouseenter', () => this.renderer.setStyle(handle, 'opacity', '1'));\n this.renderer.listen(handle, 'mouseleave', () => {\n if (this.document.activeElement !== handle) {\n this.renderer.setStyle(handle, 'opacity', '0');\n }\n });\n this.renderer.listen(handle, 'focus', () => this.renderer.setStyle(handle, 'opacity', '1'));\n this.renderer.listen(handle, 'blur', () => this.renderer.setStyle(handle, 'opacity', '0'));\n\n // Accessibility attributes\n this.renderer.setAttribute(handle, 'role', 'separator');\n this.renderer.setAttribute(handle, 'aria-orientation', 'vertical');\n this.renderer.setAttribute(handle, 'tabindex', '0');\n this.renderer.setAttribute(handle, 'aria-label', this.edsResizableAriaLabel());\n this.renderer.setAttribute(handle, 'aria-valuemin', String(this.edsResizableMinWidth()));\n if (this.edsResizableMaxWidth() !== undefined) {\n this.renderer.setAttribute(handle, 'aria-valuemax', String(this.edsResizableMaxWidth()));\n }\n const currentWidth = Math.round(this.el.nativeElement.getBoundingClientRect().width);\n this.renderer.setAttribute(handle, 'aria-valuenow', String(currentWidth));\n\n this.renderer.appendChild(this.el.nativeElement, handle);\n this.handleEl = handle;\n }\n private updateHandleVisibility(): void {\n if (!this.handleEl) return;\n if (this.edsResizableDisabled()) {\n this.renderer.setStyle(this.handleEl, 'display', 'none');\n } else {\n this.renderer.removeStyle(this.handleEl, 'display');\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAoBA;AACA,MAAM,cAAc,GAAG,CAAC,KAAsB,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAEjG;;;;;AAKG;MAOU,YAAY,CAAA;AA+BvB,IAAA,WAAA,GAAA;;QA7BA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAC,CAAC,4FAAI,SAAS,EAAE,cAAc,EAAA,CAAG;;QAG9D,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAqB,SAAS;iGAAC;;QAG3D,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAuB,OAAO;iGAAC;;QAG3D,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAC,KAAK,4FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAGpE,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,EAAE,2FAAI,SAAS,EAAE,cAAc,EAAA,CAAG;;QAG9D,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAC,uDAAuD;kGAAC;;QAGtF,IAAA,CAAA,uBAAuB,GAAG,MAAM,EAAU;AAElC,QAAA,IAAA,C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