@xplortech/apollo-core 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.typings/apollo-components.html-data.json +35 -2
- package/build/style.css +259 -34
- package/dist/apollo-core/apollo-core.css +12 -12
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-728341d2.entry.js → p-048fdde0.entry.js} +1 -1
- package/dist/apollo-core/p-0abc496e.entry.js +1 -0
- package/dist/apollo-core/{p-23870463.entry.js → p-1442c052.entry.js} +1 -1
- package/dist/apollo-core/p-1e498763.entry.js +1 -0
- package/dist/apollo-core/p-26c3a508.entry.js +1 -0
- package/dist/apollo-core/p-4ce52107.entry.js +1 -0
- package/dist/apollo-core/p-6710fb29.entry.js +1 -0
- package/dist/apollo-core/p-7e622809.entry.js +1 -0
- package/dist/apollo-core/{p-c17b6351.entry.js → p-87068144.entry.js} +1 -1
- package/dist/apollo-core/p-BUgtURvw.js +1 -0
- package/dist/apollo-core/p-a3b4820a.entry.js +1 -0
- package/dist/apollo-core/p-b2d6dd0e.entry.js +1 -0
- package/dist/apollo-core/{p-e9e7577f.entry.js → p-bd2249ef.entry.js} +1 -1
- package/dist/apollo-core/p-c96b7957.entry.js +1 -0
- package/dist/apollo-core/p-d6be63cd.entry.js +1 -0
- package/dist/apollo-core/{p-9adf3694.entry.js → p-ddf76cee.entry.js} +1 -1
- package/dist/apollo-core/p-f0554edd.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/index-BaXVr8ux.js +4 -0
- package/dist/cjs/lifecycle-Bf3QwiVa.js +70 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-accordion.cjs.entry.js +2 -2
- package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +292 -243
- package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
- package/dist/cjs/xpl-calendar.cjs.entry.js +1 -1
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header.cjs.entry.js +1 -1
- package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
- package/dist/cjs/xpl-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +97 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +3 -3
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +4 -4
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +1 -1
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +5 -5
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +2 -2
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +1 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +4 -4
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
- package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
- package/dist/collection/components/xpl-select/xpl-select.js +6 -6
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +2 -2
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table.js +5 -5
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
- package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/top-nav-constants.js +1 -0
- package/dist/collection/components/xpl-top-nav/top-nav.stories.js +131 -11
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/top-nav-item-constants.js +2 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +305 -85
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +119 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +11 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/collection/utils/lifecycle.js +18 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-2xGSxBGa.js +1 -0
- package/dist/components/p-B8RYNiz-.js +1 -0
- package/dist/components/p-BDWXBWGE.js +1 -0
- package/dist/components/{p-Bn-27-xj.js → p-BJqNuBZr.js} +1 -1
- package/dist/components/p-BUgtURvw.js +1 -0
- package/dist/components/{p-DllC7F-H.js → p-B_sq_SAX.js} +1 -1
- package/dist/components/{p-hPUzON4O.js → p-Bsy-VVS5.js} +1 -1
- package/dist/components/p-BxHFEnPN.js +1 -0
- package/dist/components/{p-B1PBAEzg.js → p-ByJRw26d.js} +1 -1
- package/dist/components/{p-DPTHmitJ.js → p-C5_Yo0ZP.js} +1 -1
- package/dist/components/p-C8rmEAx6.js +1 -0
- package/dist/components/p-CF_YTx16.js +1 -0
- package/dist/components/{p-BG0-6Xek.js → p-CUYkG-PB.js} +1 -1
- package/dist/components/{p-kPHfCq1d.js → p-CaW0fL0P.js} +1 -1
- package/dist/components/{p-B_Wi--Ov.js → p-CuisR8WP.js} +1 -1
- package/dist/components/{p-D97c0GjM.js → p-D2SFagIb.js} +1 -1
- package/dist/components/{p-3qMYyqTe.js → p-DKUNbsb0.js} +1 -1
- package/dist/components/p-DcXL24UI.js +1 -0
- package/dist/components/{p-CVqbA9op.js → p-Dp3H99Yc.js} +1 -1
- package/dist/components/p-M900WO1C.js +1 -0
- package/dist/components/{p-DEl4Rvzs.js → p-ZTFt9sBy.js} +1 -1
- package/dist/components/{p-CFW_w5Wj.js → p-gfb3l9Pr.js} +1 -1
- package/dist/components/{p-C9BO2vL-.js → p-h1Gbk5lO.js} +1 -1
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar.js +1 -1
- package/dist/components/xpl-backdrop.js +1 -1
- package/dist/components/xpl-badge.js +1 -1
- package/dist/components/xpl-banner.js +1 -1
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-content-area.js +1 -1
- package/dist/components/xpl-dashboard.js +1 -1
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider.js +1 -1
- package/dist/components/xpl-dropdown-group.js +1 -1
- package/dist/components/xpl-dropdown-heading.js +1 -1
- package/dist/components/xpl-dropdown-option.js +1 -1
- package/dist/components/xpl-dropdown.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon.js +1 -1
- package/dist/components/xpl-input-color.js +1 -1
- package/dist/components/xpl-input-date.js +1 -1
- package/dist/components/xpl-input-file.js +1 -1
- package/dist/components/xpl-input-phone.js +1 -1
- package/dist/components/xpl-input-search.js +1 -1
- package/dist/components/xpl-input-time.js +1 -1
- package/dist/components/xpl-input.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list-item.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-header-menu.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.js +1 -1
- package/dist/components/xpl-popover.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.js +1 -1
- package/dist/components/xpl-radio.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-spotlight.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip.js +1 -1
- package/dist/components/xpl-top-nav-item.js +1 -1
- package/dist/components/xpl-top-nav-menu.d.ts +11 -0
- package/dist/components/xpl-top-nav-menu.js +1 -0
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-icon/readme.md +2 -0
- package/dist/docs/xpl-top-nav/readme.md +3 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +79 -20
- package/dist/docs/xpl-top-nav/xpl-top-nav-menu/readme.md +96 -0
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/index-CXkZUm1c.js +4 -0
- package/dist/esm/lifecycle-BUgtURvw.js +68 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-accordion.entry.js +2 -2
- package/dist/esm/xpl-application-shell.entry.js +1 -1
- package/dist/esm/xpl-avatar_54.entry.js +291 -242
- package/dist/esm/xpl-button-row.entry.js +1 -1
- package/dist/esm/xpl-calendar.entry.js +1 -1
- package/dist/esm/xpl-dynamic-table-cell.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table-row.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table.entry.js +1 -1
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-large-card.entry.js +1 -1
- package/dist/esm/xpl-main-nav.entry.js +1 -1
- package/dist/esm/xpl-table-header.entry.js +1 -1
- package/dist/esm/xpl-toggle.entry.js +3 -3
- package/dist/esm/xpl-toolbar.entry.js +2 -2
- package/dist/esm/xpl-top-nav-menu.entry.js +95 -0
- package/dist/types/components/xpl-top-nav/top-nav-constants.d.ts +1 -0
- package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +70 -1
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/top-nav-item-constants.d.ts +2 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.d.ts +23 -4
- package/dist/types/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.d.ts +18 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav.d.ts +1 -0
- package/dist/types/components.d.ts +179 -19
- package/dist/types/utils/lifecycle.d.ts +3 -0
- package/package.json +21 -11
- package/dist/apollo-core/p-0e45f332.entry.js +0 -1
- package/dist/apollo-core/p-0f251f98.entry.js +0 -1
- package/dist/apollo-core/p-1691c4f3.entry.js +0 -1
- package/dist/apollo-core/p-172ac720.entry.js +0 -1
- package/dist/apollo-core/p-44a16751.entry.js +0 -1
- package/dist/apollo-core/p-4efecab2.entry.js +0 -1
- package/dist/apollo-core/p-5094dd97.entry.js +0 -1
- package/dist/apollo-core/p-70e7facc.entry.js +0 -1
- package/dist/apollo-core/p-910be81f.entry.js +0 -1
- package/dist/apollo-core/p-e08b434c.entry.js +0 -1
- package/dist/components/p-BWyAzrwu.js +0 -1
- package/dist/components/p-Bd6JweBt.js +0 -1
- package/dist/components/p-Bs6vq0C6.js +0 -1
- package/dist/components/p-CGNq3DyC.js +0 -1
- package/dist/components/p-CtIUusUL.js +0 -1
- package/dist/components/p-DBWV65V-.js +0 -1
- package/dist/components/p-Ds28UyUR.js +0 -1
- package/dist/components/p-U5dPMCXE.js +0 -1
|
@@ -26,7 +26,7 @@ export class Slideout {
|
|
|
26
26
|
this.handleScroll();
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '2784d3da5b726f04552fa93289f34ff0347d3e70', class: "xpl-slideout" }, this.backdrop && this.isOpen && (h("xpl-backdrop", { key: 'b8978c6811b9d1c175bfaee2296fbcb433c048d4', onClick: this.handleClose })), h("aside", { key: '0e4357253aa004531aa86fc2f93fb1332cec089b', class: `slideout slideout--${!this.isOpen && 'closed'}` }, h("header", { key: '132170bf2c8ff6c23e6bc85bce4dc8a2aec0c5d5', class: "header" }, h("div", { key: 'a38f7f2a2da8c622a9d2ef53c370560761b87b51', class: "title" }, h("slot", { key: 'ba7b485b02bd472a4f64e067cabf5cf6ae0ad1b0', name: "title" }), h("xpl-button", { key: '9538bc33599840f7756e747c63d9717cf14a0c58', class: "close-button", "icon-only": true, size: "sm", variant: "tertiary", onClick: this.handleClose }, h("xpl-icon", { key: '6d6846794afea4053736bc67b3c0c90fb822ca96', icon: "x" }))), h("div", { key: 'da9630c9cdc8d9c3e57242c58993f5815052e684', class: "subtitle" }, h("slot", { key: 'c923c0cdae7e6f09713592e31216ec10accce39f', name: "subtitle" })), h("div", { key: 'c9fc409c7e2c14987b4df6be17d7d2c9a5906100', class: "search" }, h("slot", { key: 'b963bc05b745e55bbdc27cc4bb224af97feccdda', name: "search" }))), h("xpl-divider", { key: 'e5f9201e96ac5d6b202e3e88edfa07dacfbb3786', tier: 0, class: "divider top" }), h("article", { key: '41b424ea94bdc2577b56166f45de2b1addc3a8b4', class: "content", tabIndex: 0 }, h("slot", { key: '5d316d1981d44536af9cc5d67ef7fd20f6375ec8', name: "content" })), this.showFooter && (h("footer", { key: '3d9c2b22153b6a9057d3c40b98af97d345b9e9c1' }, h("xpl-divider", { key: '77e87834d203624cc03ff2b0cf894300c2749094', tier: 0, class: "divider bottom" }), h("div", { key: '44737714daf25a087ad2c0d8938f94ec4668b071', class: "footer" }, h("slot", { key: '2c0c7b62872fa826ef117a730c92369ba7e340f1', name: "tertiary" }), h("slot", { key: '31ac0e95189487b668b3e5c0bd8d414ab7d73f30', name: "secondary" }), h("slot", { key: 'a0dd4999caac29b546cd0526e652596937dff83b', name: "primary" })))))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "xpl-slideout"; }
|
|
32
32
|
static get properties() {
|
|
@@ -10,10 +10,10 @@ export class TabPanel {
|
|
|
10
10
|
const t = (_a = this.target) !== null && _a !== void 0 ? _a : '';
|
|
11
11
|
const panelId = tabPanelDomId(groupId, t);
|
|
12
12
|
const labelledBy = tabTriggerId(groupId, t);
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'd1d6b910b84ee0aa483d605d10aaabf662d2efcf', "aria-labelledby": labelledBy, class: {
|
|
14
14
|
'xpl-tab-panel': true,
|
|
15
15
|
'xpl-tab-panel--selected': this.selected,
|
|
16
|
-
}, id: panelId, role: "tabpanel" }, h("slot", { key: '
|
|
16
|
+
}, id: panelId, role: "tabpanel" }, h("slot", { key: '1fe282e7372fb0353cf1c32db841269aaa3c44a9' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "xpl-tab-panel"; }
|
|
19
19
|
static get properties() {
|
|
@@ -126,24 +126,24 @@ export class Table {
|
|
|
126
126
|
(!this.sortTypeArray || this.sortTypeArray.length !== this.columns.length)) {
|
|
127
127
|
this.sortTypeArray = this.columns.map(() => null);
|
|
128
128
|
}
|
|
129
|
-
return (h(Host, { key: '
|
|
129
|
+
return (h(Host, { key: 'feca62966731c111adc18988af07bd269dd63868' }, h("div", { key: 'b585fe5b3161eb7763e4292a7015fb3209a3fa90', class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => {
|
|
130
130
|
this.container = el;
|
|
131
|
-
} }, h("table", { key: '
|
|
131
|
+
} }, h("table", { key: '37930d45de6739b43ff6d541d46d7f960d922716', class: {
|
|
132
132
|
'xpl-table': true,
|
|
133
133
|
'xpl-table--striped': this.striped,
|
|
134
134
|
'xpl-table--freeze': this.freeze,
|
|
135
135
|
'xpl-table--has-scrolled': this.hasScrolled,
|
|
136
|
-
} }, this.columns && (h("thead", { key: '
|
|
136
|
+
} }, this.columns && (h("thead", { key: '40e9b8bb9cb641a2f89a63a707ecaa3a286fc99d' }, this.columns.map((column, i) => {
|
|
137
137
|
var _a;
|
|
138
138
|
const iconType = getIconType((_a = this.sortTypeArray) === null || _a === void 0 ? void 0 : _a[i]);
|
|
139
139
|
const isColumnSortable = !!(this.isSortable && this.sortableColumns[i]);
|
|
140
140
|
return (h("th", null, h("label", { onClick: (e) => this.handleSort(e, isColumnSortable, i, column.replace(/ /g, '-').toLowerCase()), class: isColumnSortable ? 'cursor-pointer' : '' }, this.multiselect && i === 0 && (h("xpl-checkbox", { checked: this.areAllSelected, indeterminate: !this.areAllSelected &&
|
|
141
141
|
this.selected.some((a) => a), onClick: (e) => e.stopPropagation(), onCheckboxChange: (e) => this.selectAll(e), value: `select-all-${this.selectAllValue}`, "aria-label": "Select all rows" })), column, isColumnSortable && !!this.sortTypeArray[i] && (h("xpl-icon", { icon: iconType, size: 16 })))));
|
|
142
|
-
}))), h("tbody", { key: '
|
|
142
|
+
}))), h("tbody", { key: '99bc5a0fd8b91d040483cc5749490b5319097ab9' }, this.rowData.map((row, rowNum) => (h("tr", { class: this.selected && this.selected[rowNum]
|
|
143
143
|
? 'xpl-table-row-selected'
|
|
144
144
|
: '' }, row.map((cell, i) => (h("td", null, this.multiselect && i === 0 ? (h("label", null, h("xpl-checkbox", { checked: !!this.selected[rowNum], onCheckboxChange: (e) => this.selectOne(e, rowNum), value: this.selectedValues.length > 0
|
|
145
145
|
? this.selectedValues[rowNum]
|
|
146
|
-
: `xpl-table-checkbox-${rowNum}`, "aria-label": `Select row ${rowNum + 1}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", { key: '
|
|
146
|
+
: `xpl-table-checkbox-${rowNum}`, "aria-label": `Select row ${rowNum + 1}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", { key: '404659d5846461f017e974786ec359473be0a7b6' }, this.rowFooterData.map((row) => (h("tr", null, row.map((cell) => (h("td", null, h("div", { innerHTML: cell })))))))))))));
|
|
147
147
|
}
|
|
148
148
|
static get is() { return "xpl-table"; }
|
|
149
149
|
static get properties() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class TableHeader {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '1123c671d82d987a74264ef2869494155746d7d8', role: "row", class: "xpl-table-header" }, h("slot", { key: 'f1a238ba023ce03559f87cf92214a1804c8ac821' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-table-header"; }
|
|
7
7
|
}
|
|
@@ -317,11 +317,11 @@ export class Tabs {
|
|
|
317
317
|
}
|
|
318
318
|
render() {
|
|
319
319
|
const isSegment = this.type === 'segment';
|
|
320
|
-
return (h(Host, { key: '
|
|
320
|
+
return (h(Host, { key: '712b11ca22e287b8e981c327d1793fbc627c8508', class: {
|
|
321
321
|
'xpl-tabs': true,
|
|
322
322
|
'xpl-tabs--full-width': this.fullWidth,
|
|
323
323
|
'xpl-tabs--segment': isSegment,
|
|
324
|
-
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: '
|
|
324
|
+
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: 'ca013d1c4848a13e3210e3e010f90969a70b609f', classNames: this.mobileSelectClassNames(), choices: this.renderChoices(), disabled: this.disabled, selectedValues: this.selectedValue, onDropdownStateChange: (event) => {
|
|
325
325
|
if (event.detail) {
|
|
326
326
|
this.isMobileSelectChange = true;
|
|
327
327
|
}
|
|
@@ -332,17 +332,17 @@ export class Tabs {
|
|
|
332
332
|
this.tabChange.emit(selectedValue);
|
|
333
333
|
this.isMobileSelectChange = false;
|
|
334
334
|
}
|
|
335
|
-
} }), h("nav", { key: '
|
|
335
|
+
} }), h("nav", { key: 'bbabd600ae5e210b7a3e9cfa9c5938f12ee14e1d', "aria-orientation": "horizontal", class: "xpl-tabs__headings", role: "tablist", ref: (el) => {
|
|
336
336
|
this.headingsContainerRef = el;
|
|
337
337
|
}, onTabChange: (event) => {
|
|
338
338
|
event.stopPropagation();
|
|
339
339
|
this.isMobileSelectChange = false;
|
|
340
340
|
this.handleTabChange(event.detail);
|
|
341
341
|
this.tabChange.emit(event.detail);
|
|
342
|
-
} }, !isSegment && (h("div", { key: '
|
|
342
|
+
} }, !isSegment && (h("div", { key: 'fe8c53716bd0fe10b02a22ac3df643aa6627303d', class: "xpl-tabs__active-bar", style: {
|
|
343
343
|
transform: `translateX(${this.activeBarPosition.left}px)`,
|
|
344
344
|
width: `${this.activeBarPosition.width}px`,
|
|
345
|
-
} })), h("slot", { key: '
|
|
345
|
+
} })), h("slot", { key: '8a1232936ec72a91e4fcd57f1f35f598a337dd99', name: "heading" })), h("div", { key: '2ef4b61b894a326bc370a1c7631308b8b13261b5', class: "xpl-tabs__panels" }, h("slot", { key: '28c9ccce6482c7cbe9ee46960c65bd59aaacb4b9', name: "panel" }))));
|
|
346
346
|
}
|
|
347
347
|
static get is() { return "xpl-tabs"; }
|
|
348
348
|
static get properties() {
|
|
@@ -121,7 +121,7 @@ export class Tag {
|
|
|
121
121
|
}
|
|
122
122
|
render() {
|
|
123
123
|
const dragEnabled = this.isDraggable && !this.disabled;
|
|
124
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '4b8228da443d411561306e790333d676fc3907e3', class: {
|
|
125
125
|
'xpl-tag': true,
|
|
126
126
|
'xpl-tag-container': true,
|
|
127
127
|
'xpl-tag--disabled': this.disabled,
|
|
@@ -129,7 +129,7 @@ export class Tag {
|
|
|
129
129
|
'xpl-tag--dragging': this.isDragging,
|
|
130
130
|
'xpl-tag--draggable': dragEnabled,
|
|
131
131
|
'xpl-tag--sm': this.size === 'sm',
|
|
132
|
-
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: '
|
|
132
|
+
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: 'bf634c6b75d1cd2eaadff8e4459b74a097e3f221', class: "xpl-tag__dismiss xpl-tag__close", type: "button", draggable: false, disabled: this.disabled, "aria-label": `Dismiss ${this.dismissAriaLabelSuffix}`, onClick: this.handleDismissClick }, h("xpl-icon", { key: 'fb37896890c9afb56c02a3ff4e62f096c416a569', icon: "xmark", size: 10 })))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "xpl-tag"; }
|
|
135
135
|
static get properties() {
|
|
@@ -35,9 +35,9 @@ export class Toast {
|
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
37
|
var _a;
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: 'c9abdb6db66a9dad0d6ed3d2e6d178ea34852c86', class: `xpl-toast xpl-toast--${this.variant}`, onAnimationEnd: this.handleAnimationEnd }, h("div", { key: '7057e31e0f25dab1ba8b093f1dca15e6f08c44e4', class: "xpl-toast__left" }, this.showIcon && (h("div", { key: '7875c518753729ae39a7bb9f2051751924a0d558', class: `xpl-toast__icon xpl-toast__icon--${this.variant}` }, this.getIcon())), h("div", { key: 'e38c7d0593c16f3dfa83bc4e521f89ee644b46d4', class: "xpl-toast__notification" }, h("p", { key: '8186437158381780554d2509a806704c52450f8c', class: "xpl-toast__title" }, h("slot", { key: '0aa8df0520c33b4576acfb1ad4750a72928b94d5', name: "title" })), this.caption !== '' && (h("p", { key: '3a4ce8f73e498373344b8b692e624f177212a70a', class: "xpl-toast__caption" }, (_a = this.caption) === null || _a === void 0 ? void 0 : _a.substring(0, 85))))), h("div", { key: '636ff5b9476cea09d21b97f3e1b78860a6f10669', class: "xpl-toast__action", ref: (el) => {
|
|
39
39
|
this.actionSlot = el;
|
|
40
|
-
} }, h("slot", { key: '
|
|
40
|
+
} }, h("slot", { key: '733bc27fba998cdbb97cc1124d8449b539a0fc21', name: "action" })), this.dismissable && (h("div", { key: '8f555e8a02c8aed5095ab659a792e19c242dae98', class: "xpl-toast__close" }, h("button", { key: 'ca64c6cb98c4cda5d2dab208afef54db4832e103', tabIndex: 0, onClick: this.dismiss }, h("xpl-icon", { key: 'bf00f852ecffd16504a8ec95f3f6630b1aa569c9', icon: "x" }))))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "xpl-toast"; }
|
|
43
43
|
static get properties() {
|
|
@@ -16,13 +16,13 @@ export class Toggle {
|
|
|
16
16
|
let className = 'xpl-toggle';
|
|
17
17
|
if (this.variant === 'small')
|
|
18
18
|
className += ' xpl-toggle--small';
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'c57e1813c72cba62eed2927763277341bb0d3f77', class: containerClassName }, (this.heading || this.description) && (h("label", { key: '00ba33da343a47681982f6437f1cb45060d70ae9', class: {
|
|
20
20
|
'xpl-label': true,
|
|
21
21
|
'xpl-label--disabled': this.disabled,
|
|
22
|
-
}, htmlFor: this.id }, this.heading, this.description && (h("small", { key: '
|
|
22
|
+
}, htmlFor: this.id }, this.heading, this.description && (h("small", { key: '8ec4104abdb16ca405577f061c4cb68580317bc4', class: {
|
|
23
23
|
'xpl-description': true,
|
|
24
24
|
'xpl-description--disabled': this.disabled,
|
|
25
|
-
} }, this.description)))), h("input", { key: '
|
|
25
|
+
} }, this.description)))), h("input", { key: 'face83ccc22985b6d0a4c8b9e4c8dcf1d9d6b72a', class: className, type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name, onChange: this.onChange }), this.label && h("label", { key: 'aa89637f4b60b050a168fcf02e6702d9ed9bd186', htmlFor: this.id }, this.label)));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "xpl-toggle"; }
|
|
28
28
|
static get properties() {
|
|
@@ -12,11 +12,11 @@ export class Toolbar {
|
|
|
12
12
|
this.selectedItemCount = event.detail.length;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'eda1f57ef1a207b82f622f090dd30f21d60bbc61', class: {
|
|
16
16
|
'xpl-toolbar': true,
|
|
17
17
|
dark: true,
|
|
18
18
|
hidden: this.selectedItemCount === 0,
|
|
19
|
-
} }, h("div", { key: '
|
|
19
|
+
} }, h("div", { key: 'fe703bf7fb49ebe27f4eee7973ea1e24c5ed50a4', class: "toolbar" }, h("p", { key: 'd0d9cb84b4828688aabbabb3395ff3c18c4d2a78', class: "selected-item-count" }, this.selectedItemCount, " Selected"), h("div", { key: 'c1259be179d245e4c18a3690f800eb493f491ba9', class: "actions" }, h("slot", { key: '40000dda8efbfd0aa7175e0e5db1c1c9f4e7e89f', name: "actions-left" }), h("slot", { key: '255e21ebb1af8fde1bb76a1a1243eeadc4146d3d', name: "actions-right" })))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "xpl-toolbar"; }
|
|
22
22
|
static get properties() {
|
|
@@ -6,7 +6,7 @@ export class Tooltip {
|
|
|
6
6
|
this.hideArrow = false;
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '9890dea245d2fbd24c67fea6e39ce3430ffc8d81' }, h("div", { key: '0930c7ee1f0e1f6a625f41e34f31d2432fdff7eb', class: "xpl-tooltip-container" }, h("slot", { key: '3b9a8aebce020a13f3d7ef624b59c06e55398907' }), h("div", { key: '50fe33b8bef96df08899b449065558ea8f2ed820', class: `xpl-tooltip xpl-tooltip--${this.position}` }, this.text, !this.hideArrow && (h("div", { key: '53668e28af956a2293c36eb4991782aee8542378', class: "xpl-tooltip-arrow" }, h(TooltipArrow, { key: 'ebbbf0e6b2a848af99d14ddecdb70723bff5181b' })))))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "xpl-tooltip"; }
|
|
12
12
|
static get properties() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const TOP_NAV_MOBILE_MQ = '(max-width: 767px)';
|
|
@@ -99,12 +99,17 @@ const TOP_NAV_STORY_CSS = `
|
|
|
99
99
|
}
|
|
100
100
|
.sb-top-nav-html-item-inner {
|
|
101
101
|
padding: var(--xpl-space-8);
|
|
102
|
+
font: inherit;
|
|
102
103
|
font-size: var(--xpl-font-size-body);
|
|
104
|
+
border: 0;
|
|
103
105
|
border-radius: var(--xpl-border-radius-small);
|
|
106
|
+
appearance: none;
|
|
107
|
+
background: transparent;
|
|
104
108
|
display: flex;
|
|
105
109
|
align-items: center;
|
|
106
110
|
gap: var(--xpl-space-8);
|
|
107
111
|
cursor: pointer;
|
|
112
|
+
text-align: inherit;
|
|
108
113
|
text-decoration: none;
|
|
109
114
|
color: inherit;
|
|
110
115
|
}
|
|
@@ -134,7 +139,10 @@ const TOP_NAV_STORY_CSS = `
|
|
|
134
139
|
border-bottom: var(--xpl-border-small) solid var(--xpl-border-default);
|
|
135
140
|
}
|
|
136
141
|
.sb-top-nav-menu-profile-inner { width: 100%; min-width: 0; }
|
|
137
|
-
.sb-top-nav-menu-username {
|
|
142
|
+
.sb-top-nav-menu-username {
|
|
143
|
+
font-weight: var(--xpl-font-weight-medium);
|
|
144
|
+
color: var(--xpl-text-strong);
|
|
145
|
+
}
|
|
138
146
|
.sb-top-nav-menu-email {
|
|
139
147
|
font-size: var(--xpl-font-size-caption);
|
|
140
148
|
color: var(--xpl-text-subdued);
|
|
@@ -147,7 +155,7 @@ const TOP_NAV_STORY_CSS = `
|
|
|
147
155
|
align-items: center;
|
|
148
156
|
gap: var(--xpl-space-8);
|
|
149
157
|
padding: var(--xpl-space-8) var(--xpl-space-16);
|
|
150
|
-
color:
|
|
158
|
+
color: var(--xpl-text-default);
|
|
151
159
|
text-decoration: none;
|
|
152
160
|
}
|
|
153
161
|
.sb-top-nav-menu-right-aside-mobile {
|
|
@@ -162,7 +170,7 @@ const TOP_NAV_STORY_CSS = `
|
|
|
162
170
|
align-items: center;
|
|
163
171
|
gap: var(--xpl-space-8);
|
|
164
172
|
padding: var(--xpl-space-10) var(--xpl-space-12);
|
|
165
|
-
color:
|
|
173
|
+
color: var(--xpl-text-default);
|
|
166
174
|
text-decoration: none;
|
|
167
175
|
}
|
|
168
176
|
`.trim();
|
|
@@ -226,7 +234,9 @@ const TOP_NAV_FIGMA_DESIGN = {
|
|
|
226
234
|
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=36021-13064&p=f&t=zPkMI4H5nK5XE3ZU-11',
|
|
227
235
|
};
|
|
228
236
|
const topNavFamilyDocsDescription = [
|
|
229
|
-
'Horizontal top bar (`xpl-top-nav`), nav items (`xpl-top-nav-item`), and profile header (`xpl-nav-header-menu`). **`xpl-top-nav`** supports **`brand-name`**, **`brand-href`**, **`brand-logo`** (image URL), and **`slot="brand-logo"`** for the built-in brand row; **`slot="left-aside"`** holds primary links; **`slot="right-aside"`** then **`slot="user-menu"`**; on narrow viewports (**one pixel below Tailwind `md`** — **`max-width: 767px`** with default **`screens.md`**) **`right-aside`** is hidden in the bar — duplicate those actions into **`slot="right-aside-mobile"`** on **`xpl-nav-header-menu`**. The account region uses an **internal** **`xpl-popover`** (**`bottom-end`**, **`display="menu"`**): set **`child-account-label`** for the built-in trigger label beside **`chevron-down`**, put the panel in **`slot="user-menu"`**, or use **`slot="user-menu-trigger"`** to replace the built-in trigger. Use **Top Navigation** Controls for props + **Actions** for **`navOpen`** / **`brandClick`**. With **`nav-control`**, the hamburger is visible only on those narrow widths (CSS **`top-nav.css`**). **`brandClick`** fires when the built-in brand is activated and **`brand-href`** is **not** set.',
|
|
237
|
+
'Horizontal top bar (`xpl-top-nav`), nav items (`xpl-top-nav-item`), grouping container (`xpl-top-nav-menu`), and profile header (`xpl-nav-header-menu`). **`xpl-top-nav`** supports **`brand-name`**, **`brand-href`**, **`brand-logo`** (image URL), and **`slot="brand-logo"`** for the built-in brand row; **`slot="left-aside"`** holds primary links; **`slot="right-aside"`** then **`slot="user-menu"`**; on narrow viewports (**one pixel below Tailwind `md`** — **`max-width: 767px`** with default **`screens.md`**) **`right-aside`** is hidden in the bar — duplicate those actions into **`slot="right-aside-mobile"`** on **`xpl-nav-header-menu`**. The account region uses an **internal** **`xpl-popover`** (**`bottom-end`**, **`display="menu"`**): set **`child-account-label`** for the built-in trigger label beside **`chevron-down`**, put the panel in **`slot="user-menu"`**, or use **`slot="user-menu-trigger"`** to replace the built-in trigger. Use **Top Navigation** Controls for props + **Actions** for **`navOpen`** / **`brandClick`**. With **`nav-control`**, the hamburger is visible only on those narrow widths (CSS **`top-nav.css`**). **`brandClick`** fires when the built-in brand is activated and **`brand-href`** is **not** set.',
|
|
238
|
+
'',
|
|
239
|
+
'Group a parent nav item\'s children with **`xpl-top-nav-menu`** in its **`slot="dropdown"`**: on desktop it opens as a flyout under the parent; on narrow viewports the **same markup** drives a mobile cascade — the drawer swaps its top-level list for the group\'s rows in place (auto back row + `chevron-left`, no second panel). See the **`TopNavItem`** story\'s **`showDropdown`** control, or the grouped "Xplor Ops" item in this story\'s Controls, and switch **`previewViewport`** to a narrow preset to try the cascade.',
|
|
230
240
|
'',
|
|
231
241
|
'**Storybook:** These stories wrap the canvas in Foundation **`dark`** so previews match the components’ dark palette. The manager **moon** toggle targets the addon store and may still look “light” in the chrome; the preview area uses dark tokens regardless.',
|
|
232
242
|
'',
|
|
@@ -237,7 +247,9 @@ const topNavFamilyDocsDescription = [
|
|
|
237
247
|
'| **`xpl-top-nav`** | `navOpen` | Mobile menu toggled via control, or drawer closed with **Escape** (`nav-control` must be set). | `boolean` — `true` when open, `false` when closed. |',
|
|
238
248
|
'| **`xpl-top-nav`** | `brandClick` | Built-in brand is activated (click or keyboard) and **`brand-href`** is unset. | `MouseEvent` — same as **`navItemClick`** on the internal brand **`xpl-top-nav-item`**. |',
|
|
239
249
|
'| **`xpl-top-nav-item`** | `navItemClick` | User activates a plain item (click or Enter/Space). Not emitted for dropdown items (`slot="dropdown"`) or for internal chevron-only toggles. | `MouseEvent` (the original click). |',
|
|
250
|
+
'| **`xpl-top-nav-item`** | `openChange` | `open` changes (click, hover, keyboard, Escape, outside click, or programmatic). | `boolean` — new open state. |',
|
|
240
251
|
'| **`xpl-nav-header-menu`** | — | No custom events. | — |',
|
|
252
|
+
'| **`xpl-top-nav-menu`** | — | No custom events — the back row calls `closeMenu()` on the parent trigger directly. | — |',
|
|
241
253
|
].join('\n');
|
|
242
254
|
const meta = {
|
|
243
255
|
title: 'Components/Navigation/Top Navigation',
|
|
@@ -314,15 +326,28 @@ export const TopNavigation = (args) => {
|
|
|
314
326
|
const rightAsideMobileBlock = `
|
|
315
327
|
<xpl-top-nav-item slot="right-aside-mobile" label="Inbox" icon="message-writing"></xpl-top-nav-item>
|
|
316
328
|
`;
|
|
329
|
+
const groupedNavItem = `
|
|
330
|
+
<xpl-top-nav-item slot="left-aside" label="Xplor Ops" open-mode="hover">
|
|
331
|
+
<xpl-top-nav-menu slot="dropdown" label="Xplor Ops">
|
|
332
|
+
<xpl-top-nav-item label="Payroll" href="#"></xpl-top-nav-item>
|
|
333
|
+
<xpl-top-nav-item label="Capital" href="#">
|
|
334
|
+
<xpl-icon slot="trailing-icon" icon="open-rect-arrow-out"></xpl-icon>
|
|
335
|
+
</xpl-top-nav-item>
|
|
336
|
+
</xpl-top-nav-menu>
|
|
337
|
+
</xpl-top-nav-item>`;
|
|
317
338
|
return `
|
|
318
339
|
<xpl-top-nav${navControlAttr}${labelAttr}${childAccountAttr}${brandAttr}>
|
|
319
340
|
${brandLogoSlot}
|
|
320
341
|
<xpl-top-nav-item slot="left-aside" label="Home" selected></xpl-top-nav-item>
|
|
321
342
|
<xpl-top-nav-item slot="left-aside" label="Dashboard"></xpl-top-nav-item>
|
|
322
|
-
<xpl-top-nav-item slot="left-aside" label="Settings"></xpl-top-nav-item>${rightAsideBlock}
|
|
343
|
+
<xpl-top-nav-item slot="left-aside" label="Settings"></xpl-top-nav-item>${groupedNavItem}${rightAsideBlock}
|
|
323
344
|
<xpl-nav-header-menu slot="user-menu" ${navHeaderMenuAttrs}>${rightAsideMobileBlock}
|
|
324
345
|
<xpl-top-nav-item label="View Account" icon="house-4" selected></xpl-top-nav-item>
|
|
325
|
-
<xpl-top-nav-item
|
|
346
|
+
<xpl-top-nav-item
|
|
347
|
+
label="Change Account"
|
|
348
|
+
icon="refresh"
|
|
349
|
+
description="Acme Corp — Downtown Location"
|
|
350
|
+
></xpl-top-nav-item>
|
|
326
351
|
<xpl-top-nav-item label="Logout" icon="open-rect-arrow-out"></xpl-top-nav-item>
|
|
327
352
|
</xpl-nav-header-menu>
|
|
328
353
|
</xpl-top-nav>
|
|
@@ -451,23 +476,39 @@ TopNavigation.parameters = {
|
|
|
451
476
|
},
|
|
452
477
|
};
|
|
453
478
|
export const TopNavItem = (args) => {
|
|
479
|
+
var _a;
|
|
454
480
|
const attrs = [
|
|
455
481
|
args.active === true ? ' active' : '',
|
|
456
482
|
args.href != null && args.href !== '' ? `href="${escapeAttr(args.href)}"` : '',
|
|
457
483
|
args.label != null && args.label !== '' ? `label="${escapeAttr(args.label)}"` : '',
|
|
458
484
|
args.icon != null && args.icon !== '' ? `icon="${escapeAttr(args.icon)}"` : '',
|
|
485
|
+
args.description != null && args.description !== ''
|
|
486
|
+
? `description="${escapeAttr(args.description)}"`
|
|
487
|
+
: '',
|
|
459
488
|
args.itemAriaLabel != null && args.itemAriaLabel !== ''
|
|
460
489
|
? `item-aria-label="${escapeAttr(args.itemAriaLabel)}"`
|
|
461
490
|
: '',
|
|
491
|
+
args.openMode === 'hover' ? ' open-mode="hover"' : '',
|
|
462
492
|
args.selected === true ? ' selected' : '',
|
|
463
493
|
]
|
|
464
494
|
.filter(Boolean)
|
|
465
495
|
.join(' ');
|
|
466
496
|
const hasLabel = args.label != null && args.label !== '';
|
|
497
|
+
const trailingIconSlot = args.trailingIcon != null && args.trailingIcon !== ''
|
|
498
|
+
? `\n <xpl-icon slot="trailing-icon" icon="${escapeAttr(args.trailingIcon)}"></xpl-icon>`
|
|
499
|
+
: '';
|
|
500
|
+
const dropdownSlot = args.showDropdown === true
|
|
501
|
+
? `\n <xpl-top-nav-menu slot="dropdown" label="${escapeAttr((_a = args.label) !== null && _a !== void 0 ? _a : 'Menu')}">
|
|
502
|
+
<xpl-top-nav-item label="Payroll" href="#"></xpl-top-nav-item>
|
|
503
|
+
<xpl-top-nav-item label="Capital" href="#" selected>
|
|
504
|
+
<xpl-icon slot="trailing-icon" icon="open-rect-arrow-out"></xpl-icon>
|
|
505
|
+
</xpl-top-nav-item>
|
|
506
|
+
</xpl-top-nav-menu>`
|
|
507
|
+
: '';
|
|
467
508
|
return `
|
|
468
509
|
<div class="dark sb-top-nav-item-story-bar">
|
|
469
510
|
<xpl-top-nav-item ${attrs.trim()}>
|
|
470
|
-
${hasLabel ? '' : ' <span>Custom slot content</span>'}
|
|
511
|
+
${hasLabel ? '' : ' <span>Custom slot content</span>'}${trailingIconSlot}${dropdownSlot}
|
|
471
512
|
</xpl-top-nav-item>
|
|
472
513
|
</div>
|
|
473
514
|
`.trim();
|
|
@@ -491,8 +532,8 @@ const HtmlTopNavItem = (args) => {
|
|
|
491
532
|
.join(' ');
|
|
492
533
|
const innerTag = hasHref
|
|
493
534
|
? ` <a href="${escapeAttr((_a = args.href) !== null && _a !== void 0 ? _a : '')}"${ariaCurrent} class="${innerClasses}">`
|
|
494
|
-
: ` <
|
|
495
|
-
const innerClose = hasHref ? ' </a>' : ' </
|
|
535
|
+
: ` <button type="button"${ariaCurrent} class="${innerClasses}">`;
|
|
536
|
+
const innerClose = hasHref ? ' </a>' : ' </button>';
|
|
496
537
|
const lines = [
|
|
497
538
|
'<div class="dark sb-top-nav-item-story-bar">',
|
|
498
539
|
' <div role="listitem">',
|
|
@@ -508,6 +549,8 @@ TopNavItem.args = {
|
|
|
508
549
|
href: '',
|
|
509
550
|
label: 'Nav item',
|
|
510
551
|
selected: false,
|
|
552
|
+
openMode: 'click',
|
|
553
|
+
showDropdown: false,
|
|
511
554
|
};
|
|
512
555
|
TopNavItem.argTypes = {
|
|
513
556
|
active: {
|
|
@@ -516,7 +559,7 @@ TopNavItem.argTypes = {
|
|
|
516
559
|
},
|
|
517
560
|
href: {
|
|
518
561
|
control: 'text',
|
|
519
|
-
description: 'When set, the item renders as a native `<a>` link instead of a
|
|
562
|
+
description: 'When set, the item renders as a native `<a>` link instead of a native `<button>`. Use `#` for in-page demo. Clear to switch back to button mode.',
|
|
520
563
|
},
|
|
521
564
|
label: {
|
|
522
565
|
control: 'text',
|
|
@@ -524,21 +567,45 @@ TopNavItem.argTypes = {
|
|
|
524
567
|
},
|
|
525
568
|
icon: {
|
|
526
569
|
control: 'text',
|
|
527
|
-
description: 'Icon name from the Apollo icon set
|
|
570
|
+
description: 'Icon name from the Apollo icon set for `slot="leading-icon"`\'s fallback (e.g. house-4, wrench). Empty = no icon. Ignored when `slot="leading-icon"` content is present.',
|
|
571
|
+
},
|
|
572
|
+
description: {
|
|
573
|
+
control: 'text',
|
|
574
|
+
description: 'Optional second line below `label` (row context — e.g. inside `xpl-nav-header-menu`). Empty = single-line row.',
|
|
575
|
+
},
|
|
576
|
+
trailingIcon: {
|
|
577
|
+
control: 'text',
|
|
578
|
+
description: 'Storybook-only: demos `slot="trailing-icon"` with the given icon name (e.g. `open-rect-arrow-out` for "opens in new window"). When `showDropdown` is also on, this replaces the auto `chevron-down`.',
|
|
579
|
+
table: { category: 'Storybook' },
|
|
528
580
|
},
|
|
529
581
|
itemAriaLabel: {
|
|
530
582
|
control: 'text',
|
|
531
583
|
description: 'Maps to `item-aria-label`: accessible name for icon-only items (no label / default-slot text).',
|
|
532
584
|
},
|
|
585
|
+
openMode: {
|
|
586
|
+
control: 'select',
|
|
587
|
+
options: ['click', 'hover'],
|
|
588
|
+
description: 'How `slot="dropdown"` opens. `hover` only activates on hover-capable, fine-pointer, `md`-and-up devices (falls back to click/tap otherwise); Enter/Space always toggles regardless. Requires `showDropdown`.',
|
|
589
|
+
},
|
|
533
590
|
selected: {
|
|
534
591
|
control: 'boolean',
|
|
535
592
|
description: 'Whether the item is selected. Sets aria-current="page" and selected styling.',
|
|
536
593
|
},
|
|
594
|
+
showDropdown: {
|
|
595
|
+
control: 'boolean',
|
|
596
|
+
description: 'Storybook-only: demos this item as a dropdown trigger with `slot="dropdown"` content (auto chevron, `open` state, `openMode`).',
|
|
597
|
+
table: { category: 'Storybook' },
|
|
598
|
+
},
|
|
537
599
|
navItemClick: {
|
|
538
600
|
control: false,
|
|
539
601
|
description: '**Event** (not a prop): `navItemClick` — `CustomEvent<MouseEvent>`; `detail` is the originating click. Not emitted when `slot="dropdown"` is used.',
|
|
540
602
|
table: { category: 'Events' },
|
|
541
603
|
},
|
|
604
|
+
openChange: {
|
|
605
|
+
control: false,
|
|
606
|
+
description: '**Event** (not a prop): `openChange` — `CustomEvent<boolean>`; fires whenever `open` changes (click, hover, keyboard, Escape, outside click, or programmatic).',
|
|
607
|
+
table: { category: 'Events' },
|
|
608
|
+
},
|
|
542
609
|
};
|
|
543
610
|
TopNavItem.parameters = {
|
|
544
611
|
layout: 'centered',
|
|
@@ -550,6 +617,59 @@ TopNavItem.parameters = {
|
|
|
550
617
|
render: HtmlTopNavItem(TopNavItem.args),
|
|
551
618
|
},
|
|
552
619
|
};
|
|
620
|
+
export const TopNavMenuGroup = (args) => {
|
|
621
|
+
const label = args.label != null && args.label !== '' ? args.label : 'Xplor Ops';
|
|
622
|
+
return `
|
|
623
|
+
<div class="dark sb-top-nav-menu-shell--min">
|
|
624
|
+
<xpl-top-nav-menu label="${escapeAttr(label)}">
|
|
625
|
+
<xpl-top-nav-item label="Payroll" href="#"></xpl-top-nav-item>
|
|
626
|
+
<xpl-top-nav-item label="Capital" href="#" selected>
|
|
627
|
+
<xpl-icon slot="trailing-icon" icon="open-rect-arrow-out"></xpl-icon>
|
|
628
|
+
</xpl-top-nav-item>
|
|
629
|
+
<xpl-top-nav-item label="Xplor Ops Home" description="xplorops.com" href="#"></xpl-top-nav-item>
|
|
630
|
+
</xpl-top-nav-menu>
|
|
631
|
+
</div>
|
|
632
|
+
`.trim();
|
|
633
|
+
};
|
|
634
|
+
const HtmlTopNavMenuGroup = (args) => {
|
|
635
|
+
const label = args.label != null && args.label !== '' ? args.label : 'Xplor Ops';
|
|
636
|
+
return [
|
|
637
|
+
'<div class="dark sb-top-nav-menu-shell--min">',
|
|
638
|
+
` <div role="list" aria-label="${escapeAttr(label)}" class="sb-top-nav-menu-list">`,
|
|
639
|
+
' <a href="#">Payroll</a>',
|
|
640
|
+
' <a href="#">Capital</a>',
|
|
641
|
+
' <a href="#">Xplor Ops Home</a>',
|
|
642
|
+
' </div>',
|
|
643
|
+
'</div>',
|
|
644
|
+
].join('\n');
|
|
645
|
+
};
|
|
646
|
+
TopNavMenuGroup.args = {
|
|
647
|
+
label: 'Xplor Ops',
|
|
648
|
+
};
|
|
649
|
+
TopNavMenuGroup.argTypes = {
|
|
650
|
+
label: {
|
|
651
|
+
control: 'text',
|
|
652
|
+
description: 'Accessible name for the list (`aria-label`) and, on small screens, the mobile cascade back-row label for this group.',
|
|
653
|
+
},
|
|
654
|
+
};
|
|
655
|
+
TopNavMenuGroup.parameters = {
|
|
656
|
+
layout: 'centered',
|
|
657
|
+
design: TOP_NAV_FIGMA_DESIGN,
|
|
658
|
+
docs: {
|
|
659
|
+
description: {
|
|
660
|
+
story: 'Thin grouping container for `xpl-top-nav-item` rows — the panel content for a desktop flyout ' +
|
|
661
|
+
'(nest it in a parent `xpl-top-nav-item`\'s `slot="dropdown"`, see the `TopNavItem` story\'s ' +
|
|
662
|
+
'`showDropdown` control) and, in a follow-up PR, the source list for the mobile cascade. Panel ' +
|
|
663
|
+
'chrome (width, surface, shadow, radius, padding) matches `xpl-nav-header-menu`.',
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
'web-component': {
|
|
667
|
+
render: TopNavMenuGroup(TopNavMenuGroup.args),
|
|
668
|
+
},
|
|
669
|
+
html: {
|
|
670
|
+
render: HtmlTopNavMenuGroup(TopNavMenuGroup.args),
|
|
671
|
+
},
|
|
672
|
+
};
|
|
553
673
|
export const TopNavMenu = (args) => {
|
|
554
674
|
const attrs = [
|
|
555
675
|
args.username != null && args.username !== ''
|
|
@@ -64,11 +64,11 @@ export class NavHeaderMenu {
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
const hasProfile = !!this.username || !!this.email;
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: 'c2a9e2904ae2cd06462f7e2d4407ac3e34ded34e', class: {
|
|
68
68
|
'xpl-nav-header-menu': true,
|
|
69
69
|
'xpl-nav-header-menu--has-right-aside-mobile': this.rightAsideMobilePresent,
|
|
70
70
|
dark: true,
|
|
71
|
-
} }, hasProfile && (h("div", { key: '
|
|
71
|
+
} }, hasProfile && (h("div", { key: '0b7c1b081ac1e73b95bf36724e83511c27e522be', class: "xpl-nav-header-menu__profile" }, h("div", { key: '77ac13de474f5508b5bae03aba09f782a0a05cbc', class: "xpl-nav-header-menu__info" }, this.username && (h("div", { key: '58722b17d64c8cffe7a38b81f30f885a26b0b19e', class: "xpl-nav-header-menu__username" }, this.username)), this.email && (h("div", { key: 'ad7aa885518ee8c205cc3f0e1c84a24b3e486335', class: "xpl-nav-header-menu__email" }, this.email))))), h("div", { key: 'e8c6cdb4e57b02d8b9591eef07a9f0458b73acaa', class: "xpl-nav-header-menu__right-aside-mobile" }, h("slot", { key: 'bb884eeb89b4de9d45cb4a7466cc2d7aac90cf6f', name: "right-aside-mobile" })), h("div", { key: '4fa5347923a9f9db10e8875e9ec00407b843263c', class: "xpl-nav-header-menu__slot", role: "list" }, h("slot", { key: '694d33b2fe8b1cfa302de845a15aa24fdb33fc62' }))));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "xpl-nav-header-menu"; }
|
|
74
74
|
static get properties() {
|