@xplortech/apollo-core 2.9.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 +55 -14
- package/build/style.css +2338 -1902
- package/dist/apollo-core/apollo-core.css +26 -24
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-6a15f1e0.entry.js → p-048fdde0.entry.js} +1 -1
- package/dist/apollo-core/{p-34438721.entry.js → p-0abc496e.entry.js} +1 -1
- package/dist/apollo-core/p-1442c052.entry.js +1 -0
- package/dist/apollo-core/{p-3bb14840.entry.js → p-1e498763.entry.js} +1 -1
- package/dist/apollo-core/p-26c3a508.entry.js +1 -0
- package/dist/apollo-core/{p-36ba29da.entry.js → p-3b8639b7.entry.js} +1 -1
- 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-87068144.entry.js +1 -0
- package/dist/apollo-core/p-BUgtURvw.js +1 -0
- package/dist/apollo-core/p-CK3_k8jD.js +1 -0
- package/dist/apollo-core/p-CXkZUm1c.js +2 -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-ca127ee8.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-b61d7952.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 +3 -3
- package/dist/cjs/{index-BQ97-AWw.js → index-BaXVr8ux.js} +40 -9
- package/dist/cjs/lifecycle-Bf3QwiVa.js +70 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/cjs/xpl-accordion.cjs.entry.js +3 -3
- package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +879 -306
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +2 -2
- package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
- package/dist/cjs/xpl-toggle.cjs.entry.js +5 -5
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +97 -0
- package/dist/collection/collection-manifest.json +7 -6
- 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/banner.stories.js +5 -0
- 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/button.stories.js +5 -0
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/button-row.stories.js +1 -11
- 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 +4 -4
- 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 +208 -31
- 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/input.stories.js +1 -1
- 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 +25 -6
- 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 +3 -3
- 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 +4 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +26 -8
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/popover.stories.js +3 -7
- 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/radio.stories.js +19 -17
- 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 +16 -11
- package/dist/collection/components/xpl-side-nav/side-nav-constants.js +2 -0
- package/dist/collection/components/xpl-side-nav/side-nav.stories.js +301 -186
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +80 -14
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +284 -3
- 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-spotlight/xpl-spotlight.js +14 -4
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table.js +13 -22
- 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/tooltip-arrow.js +1 -1
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +6 -37
- 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 +143 -12
- 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-BJqNuBZr.js +1 -0
- package/dist/components/p-BT_Lq3Vd.js +1 -0
- package/dist/components/p-BUgtURvw.js +1 -0
- package/dist/components/{xpl-input-search2.js → p-B_sq_SAX.js} +1 -1
- package/dist/components/p-Bsy-VVS5.js +1 -0
- package/dist/components/p-BxHFEnPN.js +1 -0
- package/dist/components/p-ByJRw26d.js +1 -0
- package/dist/components/p-C5_Yo0ZP.js +1 -0
- package/dist/components/p-C8rmEAx6.js +1 -0
- package/dist/components/p-CF_YTx16.js +1 -0
- package/dist/components/{floating-ui.dom.js → p-CFpsSZyr.js} +1 -1
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-CUYkG-PB.js +1 -0
- package/dist/components/p-CaW0fL0P.js +1 -0
- package/dist/components/p-CuisR8WP.js +1 -0
- package/dist/components/p-CzwViN3U.js +1 -0
- package/dist/components/p-D2SFagIb.js +1 -0
- package/dist/components/p-DKUNbsb0.js +1 -0
- package/dist/components/p-DcXL24UI.js +1 -0
- package/dist/components/p-Dp3H99Yc.js +1 -0
- package/dist/components/p-M900WO1C.js +1 -0
- package/dist/components/{xpl-tag2.js → p-ZTFt9sBy.js} +1 -1
- package/dist/components/p-gfb3l9Pr.js +1 -0
- package/dist/components/{xpl-input-file2.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-backdrop/readme.md +2 -0
- package/dist/docs/xpl-badge/readme.md +34 -0
- package/dist/docs/xpl-button/readme.md +2 -0
- package/dist/docs/xpl-button-row/readme.md +13 -0
- package/dist/docs/xpl-checkbox/readme.md +23 -1
- package/dist/docs/xpl-divider/readme.md +22 -4
- package/dist/docs/xpl-icon/readme.md +2 -0
- package/dist/docs/xpl-input/readme.md +51 -0
- package/dist/docs/xpl-input/xpl-input-date/readme.md +7 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +21 -0
- package/dist/docs/xpl-popover/readme.md +24 -0
- package/dist/docs/xpl-radio/readme.md +21 -4
- package/dist/docs/xpl-side-nav/readme.md +153 -5
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +165 -32
- package/dist/docs/xpl-table/readme.md +2 -0
- package/dist/docs/xpl-tooltip/readme.md +29 -1
- 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 +4 -4
- package/dist/esm/{index-C7bgJs6C.js → index-CXkZUm1c.js} +40 -9
- package/dist/esm/lifecycle-BUgtURvw.js +68 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/xpl-avatar_54.entry.js +878 -305
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-cell.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-row.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table.entry.js +2 -2
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +2 -2
- package/dist/esm/xpl-large-card.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +2 -2
- package/dist/esm/xpl-table-header-cell.entry.js +1 -1
- package/dist/esm/xpl-table-header.entry.js +2 -2
- package/dist/esm/xpl-toggle.entry.js +5 -5
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/esm/xpl-top-nav-menu.entry.js +95 -0
- package/dist/types/components/xpl-banner/banner.stories.d.ts +2 -0
- package/dist/types/components/xpl-button/button.stories.d.ts +2 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +16 -0
- package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +1 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +4 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +11 -10
- package/dist/types/components/xpl-side-nav/side-nav-constants.d.ts +2 -0
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +53 -32
- package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +31 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +1 -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 +402 -39
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/utils/lifecycle.d.ts +3 -0
- package/package.json +53 -34
- package/dist/apollo-core/p-0bf50890.entry.js +0 -1
- package/dist/apollo-core/p-1947e7a8.entry.js +0 -1
- package/dist/apollo-core/p-27928cb0.entry.js +0 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +0 -1
- package/dist/apollo-core/p-368c81f1.entry.js +0 -1
- package/dist/apollo-core/p-406b27a8.entry.js +0 -1
- package/dist/apollo-core/p-5d63b4ce.entry.js +0 -1
- package/dist/apollo-core/p-8d692d05.entry.js +0 -1
- package/dist/apollo-core/p-C7bgJs6C.js +0 -2
- package/dist/apollo-core/p-Cqlsd6nf.js +0 -1
- package/dist/apollo-core/p-cd56a3d5.entry.js +0 -1
- package/dist/apollo-core/p-dc205893.entry.js +0 -1
- package/dist/cjs/v4-D4KzFnn8.js +0 -67
- package/dist/components/index3.js +0 -1
- package/dist/components/v4.js +0 -1
- package/dist/components/xpl-avatar2.js +0 -1
- package/dist/components/xpl-backdrop2.js +0 -1
- package/dist/components/xpl-badge2.js +0 -1
- package/dist/components/xpl-button2.js +0 -1
- package/dist/components/xpl-checkbox2.js +0 -1
- package/dist/components/xpl-divider2.js +0 -1
- package/dist/components/xpl-dropdown-group2.js +0 -1
- package/dist/components/xpl-dropdown-heading2.js +0 -1
- package/dist/components/xpl-dropdown-option2.js +0 -1
- package/dist/components/xpl-dropdown2.js +0 -1
- package/dist/components/xpl-icon2.js +0 -1
- package/dist/components/xpl-input-date2.js +0 -1
- package/dist/components/xpl-input2.js +0 -1
- package/dist/components/xpl-list-item2.js +0 -1
- package/dist/components/xpl-popover2.js +0 -1
- package/dist/components/xpl-radio2.js +0 -1
- package/dist/components/xpl-select2.js +0 -1
- package/dist/components/xpl-tooltip2.js +0 -1
- package/dist/components/xpl-top-nav-item2.js +0 -1
- package/dist/esm/v4-Cqlsd6nf.js +0 -65
- /package/dist/components/{_commonjsHelpers.js → p-BFTU3MAI.js} +0 -0
- /package/dist/components/{index2.js → p-CH4yJ6Qx.js} +0 -0
- /package/dist/components/{tab-a11y-ids.js → p-Yj_QFaRn.js} +0 -0
- /package/dist/{index.cjs.js → index.cjs} +0 -0
- /package/loader/{cdn.js → cdn.cjs} +0 -0
- /package/loader/{index.cjs.js → index.cjs} +0 -0
|
@@ -4,6 +4,57 @@ A flexible form input that supports multiple `type` values: `text`, `number`, `p
|
|
|
4
4
|
|
|
5
5
|
For `type="phone"`, the value is always emitted in **E.164** format (e.g. `+14155551234`). See [`xpl-input-phone`](xpl-input-phone) for full phone-input documentation.
|
|
6
6
|
|
|
7
|
+
## Design Tokens
|
|
8
|
+
|
|
9
|
+
The `xpl-input` component uses Apollo Foundation tokens for consistent theming across light and dark modes:
|
|
10
|
+
|
|
11
|
+
| Element | Property | Token |
|
|
12
|
+
|---------|----------|-------|
|
|
13
|
+
| Input wrapper border (default) | `border-color` | `var(--xpl-border-default)` |
|
|
14
|
+
| Input wrapper border (focus) | `border-color` | `var(--xpl-border-focus)` |
|
|
15
|
+
| Input wrapper border (error) | `border-color` | `var(--xpl-border-negative)` |
|
|
16
|
+
| Input wrapper background (default) | `background-color` | `var(--xpl-background-surface-default)` |
|
|
17
|
+
| Input/textarea background | `background-color` | `var(--xpl-background-surface-transparent-0)` |
|
|
18
|
+
| Disabled/readonly wrapper background | `background-color` | `var(--xpl-background-action-disabled)` |
|
|
19
|
+
| Post element background | `background-color` | `var(--xpl-background-surface-subtle)` |
|
|
20
|
+
| Input text | `color` | `var(--xpl-text-default)` |
|
|
21
|
+
| Disabled/readonly text | `color` | `var(--xpl-text-disabled)` |
|
|
22
|
+
| Label text | `color` | `var(--xpl-text-strong)` |
|
|
23
|
+
| Description text | `color` | `var(--xpl-text-subdued)` |
|
|
24
|
+
| Error text | `color` | `var(--xpl-text-negative)` |
|
|
25
|
+
| Character counter background (default) | `background-color` | `var(--xpl-background-surface-default)` |
|
|
26
|
+
| Character counter background (disabled/readonly) | `background-color` | `var(--xpl-background-action-disabled)` |
|
|
27
|
+
| Character counter text | `color` | `var(--xpl-text-subdued)` |
|
|
28
|
+
| Calendar/password icon | `color` | `var(--xpl-icon-default)` |
|
|
29
|
+
|
|
30
|
+
### Spacing Tokens
|
|
31
|
+
|
|
32
|
+
| Element | Property | Token |
|
|
33
|
+
|---------|----------|-------|
|
|
34
|
+
| Input | `padding-right` | `var(--xpl-space-8)` |
|
|
35
|
+
| Textarea | `padding-top` | `var(--xpl-space-12)` |
|
|
36
|
+
| Textarea | `padding-bottom` | `var(--xpl-space-8)` |
|
|
37
|
+
| Wrapper | `padding-left` | `var(--xpl-space-12)` |
|
|
38
|
+
| Pre element (leading icon/text) | `padding-right` | `var(--xpl-space-8)` |
|
|
39
|
+
| Post element (trailing unit / AM-PM) | `padding-left`, `padding-right` | `var(--xpl-space-12)` |
|
|
40
|
+
| Label | `padding-bottom` | `var(--xpl-space-4)` |
|
|
41
|
+
| Character counter | `padding` | `var(--xpl-space-8) var(--xpl-space-12)` |
|
|
42
|
+
| Error message | `padding`, `gap` | `var(--xpl-space-4)` |
|
|
43
|
+
| Calendar icon | `right` | `var(--xpl-space-12)` |
|
|
44
|
+
| Password button | `padding-left`, `padding-right` | `var(--xpl-space-12)` |
|
|
45
|
+
|
|
46
|
+
### Dimension Tokens
|
|
47
|
+
|
|
48
|
+
| Element | Property | Token |
|
|
49
|
+
|---------|----------|-------|
|
|
50
|
+
| Input | `height` | `var(--xpl-size-250)` (40px; matches Figma `form/height`) |
|
|
51
|
+
| Textarea | `min-height` | `var(--xpl-size-250)` (40px) |
|
|
52
|
+
| Textarea | `height` | `var(--xpl-size-700)` (112px; rounded up from 98px) |
|
|
53
|
+
| Wrapper | `border-width` | `var(--xpl-border-small)` |
|
|
54
|
+
| Wrapper | `border-radius` | `var(--xpl-border-radius-small)` (4px; matches Figma `border/radius/small`) |
|
|
55
|
+
| Post element | `height` | `var(--xpl-size-250)` (40px; vertically centered via flex) |
|
|
56
|
+
| Post element | `border-left-width` | `var(--xpl-border-small)` |
|
|
57
|
+
|
|
7
58
|
### Delegated types (`search`, `phone`, `date`, `time`, …)
|
|
8
59
|
|
|
9
60
|
`valueChange`, `inputEvent`, `focusEvent`, and `blurEvent` are emitted by the inner component and **bubble** to `<xpl-input>`. For **`type="search"`**, **`focusEvent`** and **`blurEvent`** are **re-emitted from `<xpl-input>`** (parent uses **`onFocusEvent`** / **`onBlurEvent`** on **`<xpl-input-search>`** with **`stopPropagation`**) so **`event.target`** matches **`type="text"`**. For **`valueChange`** and **`inputEvent`** on search, events still **bubble** from **`xpl-input-search`** without parent re-emission; **`event.target`** may be the inner host—prefer **`event.detail`** (the string) or **`event.currentTarget`** when you attach the listener on **`<xpl-input>`**. Other delegated types follow the same **`event.detail`** / **`event.currentTarget`** guidance.
|
|
@@ -99,6 +99,26 @@ Countries with custom formatters: US/CA, GB, AU, DE/AT/CH, FR, BR, MX, JP, CN, I
|
|
|
99
99
|
|
|
100
100
|
28 countries are currently supported. See `phone-country-data.ts` for the full list. Countries with custom number formatting are noted above. To add a new country, add an entry to the `PHONE_COUNTRIES` array and optionally add a formatter in `phone-format.ts`.
|
|
101
101
|
|
|
102
|
+
### Design Tokens
|
|
103
|
+
|
|
104
|
+
Tokens used by this component from `@xplortech/apollo-foundation`.
|
|
105
|
+
|
|
106
|
+
**Color**
|
|
107
|
+
- `--xpl-background-surface-subtlest` — trigger background
|
|
108
|
+
- `--xpl-background-surface-information` — trigger hover / open background
|
|
109
|
+
- `--xpl-border-negative` — error state border
|
|
110
|
+
- `--xpl-border-focus` — wrapper and trigger focus outline
|
|
111
|
+
- `--xpl-border-default` — trigger divider, search border
|
|
112
|
+
- `--xpl-text-default` — trigger text, dial code
|
|
113
|
+
- `--xpl-text-subdued` — clear button color
|
|
114
|
+
- `--xpl-icon-default` — search icon
|
|
115
|
+
|
|
116
|
+
**Border**
|
|
117
|
+
- `--xpl-border-small` — trigger divider width (1px)
|
|
118
|
+
|
|
119
|
+
**Focus**
|
|
120
|
+
- `--xpl-border-focus` — `:focus-visible` outline (inset, 2px)
|
|
121
|
+
|
|
102
122
|
<!-- Auto Generated Below -->
|
|
103
123
|
|
|
104
124
|
|
|
@@ -108,6 +128,7 @@ Countries with custom formatters: US/CA, GB, AU, DE/AT/CH, FR, BR, MX, JP, CN, I
|
|
|
108
128
|
| -------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | ----------- |
|
|
109
129
|
| `defaultCountry` | `default-country` | Default country code (ISO 3166-1 alpha-2) when value is empty, e.g. "US". | `string` | `'US'` |
|
|
110
130
|
| `disabled` | `disabled` | Whether the field is disabled | `boolean` | `undefined` |
|
|
131
|
+
| `error` | `error` | Whether the field is in an error state. When true, the input renders with the error border styling. The error message itself is owned by the parent `xpl-input` wrapper. | `boolean` | `undefined` |
|
|
111
132
|
| `inputId` | `input-id` | The `inputId` is used to associate the input with a label. | `string` | `undefined` |
|
|
112
133
|
| `isInternational` | `is-international` | Enables international mode with a country selector and dial code prefix. When false, the input is locked to `defaultCountry` with no country picker and no dial code shown in the display value. Emitted value is still E.164. | `boolean` | `true` |
|
|
113
134
|
| `name` | `name` | Most inputs are used in forms, and should have a `name` associated with the input for handling form data. | `string` | `undefined` |
|
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
A popover is an overlay that pops up over all other layers and is triggered by a click or tap, and dismissed by clicking outside the popover or a dismiss icon. Popovers can contain additional actions and allow those actions to be triggered.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
### Design Tokens
|
|
7
|
+
|
|
8
|
+
Tokens used by this component from `@xplortech/apollo-foundation`.
|
|
9
|
+
|
|
10
|
+
**Color**
|
|
11
|
+
- `--xpl-background-surface-default` — content panel background and arrow fill
|
|
12
|
+
- `--xpl-background-surface-transparent-10` — shadow primary layer
|
|
13
|
+
- `--xpl-background-surface-transparent-5` — shadow secondary layer
|
|
14
|
+
- `--xpl-text-default` — content text color
|
|
15
|
+
- `--xpl-border-default` — content panel border and arrow stroke
|
|
16
|
+
|
|
17
|
+
**Spacing**
|
|
18
|
+
- `--xpl-space-8` — popover margin (offset from trigger), via `--xpl-popover-margin`
|
|
19
|
+
- `--xpl-space-16` — content panel padding (Figma `padding/tight`; corrected from the legacy 24px during the Foundation migration — see `TECH_DEBT.md`)
|
|
20
|
+
|
|
21
|
+
**Border**
|
|
22
|
+
- `--xpl-border-small` — border width (1px)
|
|
23
|
+
- `--xpl-border-radius-default` — content panel corner radius (8px)
|
|
24
|
+
|
|
25
|
+
**Z-index**
|
|
26
|
+
- `--xpl-z-index-100` — content panel stacking order
|
|
27
|
+
- `--xpl-z-index-900` — arrow stacking order
|
|
28
|
+
|
|
5
29
|
<!-- Auto Generated Below -->
|
|
6
30
|
|
|
7
31
|
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
# xpl-radio
|
|
2
|
-
|
|
3
|
-
Radio buttons allow users to make selections or choices. Radios are always single select, and can also act as controls.
|
|
4
|
-
|
|
1
|
+
# xpl-radio
|
|
2
|
+
|
|
3
|
+
Radio buttons allow users to make selections or choices. Radios are always single select, and can also act as controls.
|
|
4
|
+
|
|
5
|
+
## Design Tokens
|
|
6
|
+
|
|
7
|
+
The radio component uses the following Apollo Foundation tokens:
|
|
8
|
+
|
|
9
|
+
| Token | Usage |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| `--xpl-background-surface-default` | Disabled checked state background; styled label background (resting/hover/focused) |
|
|
12
|
+
| `--xpl-background-action-disabled` | Disabled state background; disabled label background (styled variant) |
|
|
13
|
+
| `--xpl-background-surface-information` | Checked label background (styled variant) |
|
|
14
|
+
| `--xpl-border-strong` | Resting (unchecked) border color |
|
|
15
|
+
| `--xpl-border-hover` | Checked/hover/active border color; styled container hover/focus border |
|
|
16
|
+
| `--xpl-border-default` | Disabled state border color |
|
|
17
|
+
| `--xpl-border-focus` | Focus visible outline |
|
|
18
|
+
| `--xpl-border-radius-small` | Styled container corner radius (4px) |
|
|
19
|
+
| `--xpl-border-small` | Default border width (1px) |
|
|
20
|
+
| `--xpl-size-100` | Radio dimensions (16px) |
|
|
21
|
+
|
|
5
22
|
<!-- Auto Generated Below -->
|
|
6
23
|
|
|
7
24
|
|
|
@@ -27,7 +27,75 @@ Use the **`label`** prop for a unique accessible name on the `<nav>` when multip
|
|
|
27
27
|
</xpl-side-nav>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
**Link rows:** use `xpl-side-nav-item` with `link`
|
|
30
|
+
**Link rows:** use `xpl-side-nav-item` with `link` when the row needs to be a real `<a>` element (framework router components, right-click / open-in-new-tab, semantic link role). For typical in-app navigation, the default button mode is simpler. See [xpl-side-nav-item](./xpl-side-nav-item) **Link mode** for usage and styling guidance.
|
|
31
|
+
|
|
32
|
+
## Mobile behavior
|
|
33
|
+
|
|
34
|
+
Below the Tailwind `md` breakpoint (768px) the sidebar collapses to a ~56px top bar with a built-in toggle button (`sidebar-left-show` / `sidebar-left-hide`). Activating the toggle opens a drawer containing the `section` + `nav-footer` content over an [`xpl-backdrop`](../xpl-backdrop) scrim. Above `md` the toggle and backdrop are hidden and the sidebar renders inline — no markup changes are needed for either layout.
|
|
35
|
+
|
|
36
|
+
**Keyboard / focus:**
|
|
37
|
+
- **Escape** closes the drawer and returns focus to the toggle.
|
|
38
|
+
- A **backdrop click** closes the drawer.
|
|
39
|
+
- **Focus is trapped** inside the open drawer — Tab cycles only through the toggle and drawer rows.
|
|
40
|
+
- The toggle exposes `aria-expanded` and a dynamic `aria-label` ("Open/Close navigation menu").
|
|
41
|
+
|
|
42
|
+
**Row-level responsive scaling (applied automatically inside the drawer):**
|
|
43
|
+
|
|
44
|
+
| Property | Desktop (≥ 768px) | Mobile (< 768px) |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| Tap target (`xpl-side-nav-item` wrapper) | — (inner button sized by content) | `min-height: 48px; padding: 6px 8px` |
|
|
47
|
+
| Leading / trailing icon size | 16px | 24px |
|
|
48
|
+
| Top-level label typography | `title-4` (16px, medium) | `title-3` (20px, medium) |
|
|
49
|
+
| Child item label typography | `title-5` | `title-4` (16px, medium) |
|
|
50
|
+
| Footer item label typography | `title-5` | `title-4` (16px, medium) |
|
|
51
|
+
| Footer row min-height | `28px` | `--xpl-size-200` (32px) |
|
|
52
|
+
| Footer leading / trailing icon | 16px | 20px |
|
|
53
|
+
|
|
54
|
+
No markup or props are needed for these changes — they are driven entirely by CSS.
|
|
55
|
+
|
|
56
|
+
### Open state API
|
|
57
|
+
|
|
58
|
+
The `open` prop, `openChange` event, and `toggle()` / `setOpen()` methods control and observe the drawer. The component works **uncontrolled** (the built-in toggle flips `open`) or **controlled** (the consumer owns `open`).
|
|
59
|
+
|
|
60
|
+
**Uncontrolled** — the built-in toggle manages everything; listen to `openChange` if you need to react:
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<xpl-side-nav label="Main navigation" id="nav">
|
|
64
|
+
<div slot="section">…</div>
|
|
65
|
+
<div slot="nav-footer">…</div>
|
|
66
|
+
</xpl-side-nav>
|
|
67
|
+
<script>
|
|
68
|
+
document.getElementById('nav').addEventListener('openChange', (e) => {
|
|
69
|
+
console.log('drawer open:', e.detail);
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Controlled** — own `open` and update it from `openChange` (and/or the imperative methods):
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<xpl-side-nav label="Main navigation" id="nav" open>…</xpl-side-nav>
|
|
78
|
+
<script>
|
|
79
|
+
const nav = document.getElementById('nav');
|
|
80
|
+
// Keep your state in sync with user-driven changes (toggle, Escape, backdrop):
|
|
81
|
+
nav.addEventListener('openChange', (e) => {
|
|
82
|
+
nav.open = e.detail;
|
|
83
|
+
});
|
|
84
|
+
// Programmatic control:
|
|
85
|
+
await nav.toggle();
|
|
86
|
+
await nav.setOpen(false);
|
|
87
|
+
</script>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **v2 breaking change (beta):** the mobile toggle + drawer are now built in. Consumers who previously wrapped their own toggle around `xpl-side-nav` should remove it.
|
|
91
|
+
|
|
92
|
+
### Implementation details (mobile drawer)
|
|
93
|
+
|
|
94
|
+
- **Host class hooks** — when the drawer is open the host carries `xpl-side-nav--open` alongside `xpl-side-nav`. Useful for app-level CSS that needs to react (e.g. lock body scroll).
|
|
95
|
+
- **Drawer transition** — `transform` + `opacity` + `visibility` over **300 ms** with `ease-out`. Closed state is `translateX(-100%)` + `opacity: 0` + `visibility: hidden`; the `visibility` flip is delayed 300 ms on close so the slide is visible.
|
|
96
|
+
- **Backdrop transition** — `opacity` + `visibility` over **500 ms** with `ease-in-out`. Open state uses `opacity-50` (matches the native `xpl-backdrop` value, not full opaque). Visibility delayed 500 ms on close. `pointer-events: none` applies immediately on close so page content is tappable while the scrim fades out.
|
|
97
|
+
- **Drawer geometry** — width `80vw` with a `min-width: 300px` floor (Figma spec; no Foundation token yet — see `TECH_DEBT.md`). The remaining `20vw` shows the backdrop scrim.
|
|
98
|
+
- **Toggle styling overrides** — the built-in `xpl-button` toggle uses `padding-inline: var(--xpl-space-12)` on its inner `<button>` and renders its icon at `var(--xpl-size-200)` (32 px) so the icon's left edge aligns with the drawer's nav-item icon column.
|
|
31
99
|
|
|
32
100
|
### Multi-Navigation Layouts (Accessibility)
|
|
33
101
|
|
|
@@ -54,17 +122,97 @@ When multiple navigation landmarks exist on a page (e.g., side nav, top nav, bre
|
|
|
54
122
|
|
|
55
123
|
## Related components
|
|
56
124
|
|
|
57
|
-
- [xpl-side-nav-item](
|
|
125
|
+
- [xpl-side-nav-item](./xpl-side-nav-item) — Navigation rows for section and footer: leaf button, expandable parent, or link (real `<a>`) mode.
|
|
58
126
|
|
|
59
127
|
<!-- Auto Generated Below -->
|
|
60
128
|
|
|
61
129
|
|
|
130
|
+
## Overview
|
|
131
|
+
|
|
132
|
+
Slot-based sidebar for app navigation: a scrollable main `section` and a fixed
|
|
133
|
+
`nav-footer`. Compose with `xpl-side-nav-item` for rows.
|
|
134
|
+
|
|
135
|
+
**Mobile (v2):** below the Tailwind `md` breakpoint, the sidebar collapses to a
|
|
136
|
+
~56px top bar with a toggle button (`sidebar-left-show` / `sidebar-left-hide`).
|
|
137
|
+
Activating the toggle opens a drawer containing the `section` + `nav-footer`
|
|
138
|
+
content behind an `xpl-backdrop` scrim. The drawer traps focus while open;
|
|
139
|
+
Escape or a backdrop click closes it and returns focus to the toggle. Above
|
|
140
|
+
`md` the toggle and backdrop are hidden via CSS and the sidebar renders inline.
|
|
141
|
+
|
|
142
|
+
The toggle is always rendered (no gating prop) and hidden above the breakpoint
|
|
143
|
+
in CSS. Open state is exposed via the `open` prop (controlled or uncontrolled),
|
|
144
|
+
the `openChange` event, and the `toggle()` / `setOpen()` methods.
|
|
145
|
+
|
|
146
|
+
**v2 breaking change (beta):** consumers who wrapped their own mobile toggle
|
|
147
|
+
around `xpl-side-nav` should remove it — the toggle and drawer are now built in.
|
|
148
|
+
|
|
62
149
|
## Properties
|
|
63
150
|
|
|
64
|
-
| Property | Attribute | Description
|
|
65
|
-
| -------- | --------- |
|
|
66
|
-
| `label` | `label` | Accessible label for the navigation landmark. Maps to `aria-label` on the `<nav>` element. Recommended when multiple navigation landmarks exist on a page (e.g., side nav + top nav + breadcrumbs) to help screen readers distinguish them.
|
|
151
|
+
| Property | Attribute | Description | Type | Default |
|
|
152
|
+
| -------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- |
|
|
153
|
+
| `label` | `label` | Accessible label for the navigation landmark. Maps to `aria-label` on the `<nav>` element. Recommended when multiple navigation landmarks exist on a page (e.g., side nav + top nav + breadcrumbs) to help screen readers distinguish them. | `string` | `undefined` |
|
|
154
|
+
| `open` | `open` | Whether the mobile drawer is open. Reflected to the `open` attribute so CSS and host state stay in sync. Controlled (consumer owns `open`) or uncontrolled (built-in toggle flips it). Has no visible effect above the `md` breakpoint, where the sidebar always renders inline. | `boolean` | `false` |
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## Events
|
|
67
158
|
|
|
159
|
+
| Event | Description | Type |
|
|
160
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
|
|
161
|
+
| `openChange` | Emitted when the mobile drawer open state changes: toggle activation, Escape, or a backdrop click. Detail is the new open state (`true` = open, `false` = closed). | `CustomEvent<boolean>` |
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## Methods
|
|
165
|
+
|
|
166
|
+
### `setOpen(open: boolean) => Promise<void>`
|
|
167
|
+
|
|
168
|
+
Programmatically set the mobile drawer open state. Emits `openChange` when it changes.
|
|
169
|
+
|
|
170
|
+
#### Parameters
|
|
171
|
+
|
|
172
|
+
| Name | Type | Description |
|
|
173
|
+
| ------ | --------- | ----------- |
|
|
174
|
+
| `open` | `boolean` | |
|
|
175
|
+
|
|
176
|
+
#### Returns
|
|
177
|
+
|
|
178
|
+
Type: `Promise<void>`
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### `toggle() => Promise<void>`
|
|
183
|
+
|
|
184
|
+
Programmatically toggle the mobile drawer open/closed. Emits `openChange`.
|
|
185
|
+
|
|
186
|
+
#### Returns
|
|
187
|
+
|
|
188
|
+
Type: `Promise<void>`
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
## Slots
|
|
194
|
+
|
|
195
|
+
| Slot | Description |
|
|
196
|
+
| -------------- | ------------------------------------------------------------ |
|
|
197
|
+
| `"nav-footer"` | Footer items (e.g. Help, Logout), separated by a top border. |
|
|
198
|
+
| `"section"` | Primary navigation items (`xpl-side-nav-item`). |
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## Dependencies
|
|
202
|
+
|
|
203
|
+
### Depends on
|
|
204
|
+
|
|
205
|
+
- [xpl-button](../xpl-button)
|
|
206
|
+
- [xpl-backdrop](../xpl-backdrop)
|
|
207
|
+
|
|
208
|
+
### Graph
|
|
209
|
+
```mermaid
|
|
210
|
+
graph TD;
|
|
211
|
+
xpl-side-nav --> xpl-button
|
|
212
|
+
xpl-side-nav --> xpl-backdrop
|
|
213
|
+
xpl-button --> xpl-icon
|
|
214
|
+
style xpl-side-nav fill:#f9f,stroke:#333,stroke-width:4px
|
|
215
|
+
```
|
|
68
216
|
|
|
69
217
|
----------------------------------------------
|
|
70
218
|
|
|
@@ -2,42 +2,108 @@
|
|
|
2
2
|
|
|
3
3
|
Row for [`xpl-side-nav`](../xpl-side-nav): place items in `slot="section"` or `slot="nav-footer"`. Supports **leaf** (button), **expandable** (`has-children`), and **link** (slot-only) modes, plus `selected`, `disabled`, and `hidden`.
|
|
4
4
|
|
|
5
|
+
## Changes in v2 (breaking)
|
|
6
|
+
|
|
7
|
+
`xpl-side-nav` is in **beta**. v2 makes the following breaking changes — no compat shims are provided.
|
|
8
|
+
|
|
9
|
+
### Migration table
|
|
10
|
+
|
|
11
|
+
| API | v1 (before) | v2 (after) | Action required |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| Leading icon slot | `slot="icon"` | `slot="leading"` | Rename the `slot` attribute on slotted icon elements |
|
|
14
|
+
| Parent leading icon | Not rendered (chevron only) | Rendered alongside the trailing chevron | Pass `icon` prop or `slot="leading"` content to parent rows |
|
|
15
|
+
| Trailing slot | Not available | `slot="trailing"` | Add to leaf items for custom trailing content |
|
|
16
|
+
| Chevron position | Leading (left side) | Trailing (right side), auto-rendered for parents | No action needed for auto chevron; remove manual chevron markup if any |
|
|
17
|
+
| Chevron override | Not possible | `slot="trailing"` content replaces auto chevron on parents | Pass `slot="trailing"` to customize the trailing column on a parent |
|
|
18
|
+
|
|
19
|
+
### Before / after examples
|
|
20
|
+
|
|
21
|
+
**Leading icon slot rename:**
|
|
22
|
+
```html
|
|
23
|
+
<!-- v1 -->
|
|
24
|
+
<xpl-side-nav-item label="Dashboard">
|
|
25
|
+
<xpl-icon slot="icon" icon="house-4" size="16"></xpl-icon>
|
|
26
|
+
</xpl-side-nav-item>
|
|
27
|
+
|
|
28
|
+
<!-- v2 -->
|
|
29
|
+
<xpl-side-nav-item label="Dashboard">
|
|
30
|
+
<xpl-icon slot="leading" icon="house-4" size="16"></xpl-icon>
|
|
31
|
+
</xpl-side-nav-item>
|
|
32
|
+
<!-- or use the icon prop shorthand -->
|
|
33
|
+
<xpl-side-nav-item label="Dashboard" icon="house-4"></xpl-side-nav-item>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Parent rows now show leading icon + chevron:**
|
|
37
|
+
```html
|
|
38
|
+
<!-- v1: icon prop was ignored on parents -->
|
|
39
|
+
<xpl-side-nav-item has-children label="Settings" icon="gear">...</xpl-side-nav-item>
|
|
40
|
+
|
|
41
|
+
<!-- v2: icon prop renders in the leading slot; chevron auto-renders in trailing -->
|
|
42
|
+
<xpl-side-nav-item has-children label="Settings" icon="gear">...</xpl-side-nav-item>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Adding a trailing icon to a leaf item:**
|
|
46
|
+
```html
|
|
47
|
+
<!-- v2: slot="trailing" for custom trailing content -->
|
|
48
|
+
<xpl-side-nav-item label="Xplor Growth" icon="chart-line-up">
|
|
49
|
+
<xpl-icon slot="trailing" icon="external-link" size="16" aria-hidden="true"></xpl-icon>
|
|
50
|
+
</xpl-side-nav-item>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
5
55
|
## Modes
|
|
6
56
|
|
|
7
|
-
- **Leaf (default)** — Button with optional `label`, `icon`, and `slot="
|
|
8
|
-
- **Expandable (`has-children`)** — Put nested `xpl-side-nav-item` elements in the **default slot**.
|
|
9
|
-
- **Link (`link`)** — **Default slot only**:
|
|
57
|
+
- **Leaf (default)** — Button with optional `label`, `icon` prop / `slot="leading"`, and `slot="trailing"`. Click emits **`navClick`**.
|
|
58
|
+
- **Expandable (`has-children`)** — Put nested `xpl-side-nav-item` elements in the **default slot**. Row renders **leading icon** (from `icon` prop or `slot="leading"`) **+ label + auto chevron** in the trailing position (**`chevron-down`** when collapsed, **`chevron-up`** when expanded). The chevron is replaced if `slot="trailing"` content is provided. Click toggles **`expanded`** and emits **`expandedChange`**.
|
|
59
|
+
- **Link (`link`)** — **Default slot only**: renders a bare `<slot>` with no inner button. Use when the row must be a real `<a>` element — for framework router components, browser right-click / open-in-new-tab behaviour, or when semantic link vs. button distinction matters for screen readers. For typical in-app navigation the default button mode is simpler. The `label` and `icon` props are ignored in link mode; supply all content in your slotted anchor. **Cannot** be combined with `has-children`.
|
|
10
60
|
|
|
11
61
|
## Rules
|
|
12
62
|
|
|
13
63
|
| Topic | Behavior |
|
|
14
|
-
|
|
64
|
+
|---|---|
|
|
15
65
|
| **`link` vs `has-children`** | Mutually exclusive. When **`link`** is true, **`hasChildren`** is always false; if both attributes appear in markup, `has-children` is cleared. |
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
66
|
+
| **Leading icon** | `icon` prop / `slot="leading"` apply to all item types including parents. Nested sub-items (inside a parent) have the leading column hidden in CSS — use label only. |
|
|
67
|
+
| **Trailing chevron** | Auto-rendered for `has-children` items when `slot="trailing"` is empty. Providing `slot="trailing"` content replaces the auto chevron. |
|
|
68
|
+
| **Events** | **`navClick`** — leaf button rows. **`expandedChange`** — expandable rows only (detail = new `expanded` boolean). |
|
|
18
69
|
|
|
19
70
|
## Usage
|
|
20
71
|
|
|
21
|
-
### Leaf
|
|
72
|
+
### Leaf (icon prop)
|
|
22
73
|
```html
|
|
23
74
|
<xpl-side-nav-item label="Dashboard" icon="house-4" selected></xpl-side-nav-item>
|
|
24
75
|
```
|
|
25
76
|
|
|
26
|
-
###
|
|
77
|
+
### Leaf (slot="leading")
|
|
78
|
+
```html
|
|
79
|
+
<xpl-side-nav-item label="Dashboard">
|
|
80
|
+
<xpl-icon slot="leading" icon="house-4" size="16"></xpl-icon>
|
|
81
|
+
</xpl-side-nav-item>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Leaf with trailing icon
|
|
85
|
+
```html
|
|
86
|
+
<xpl-side-nav-item label="Xplor Growth" icon="chart-line-up">
|
|
87
|
+
<xpl-icon slot="trailing" icon="external-link" size="16" aria-hidden="true"></xpl-icon>
|
|
88
|
+
</xpl-side-nav-item>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Expandable parent (leading icon + auto chevron)
|
|
27
92
|
```html
|
|
28
|
-
<xpl-side-nav-item has-children label="Settings" expanded>
|
|
93
|
+
<xpl-side-nav-item has-children label="Settings" icon="gear" expanded>
|
|
29
94
|
<xpl-side-nav-item label="Profile"></xpl-side-nav-item>
|
|
30
95
|
<xpl-side-nav-item label="Billing"></xpl-side-nav-item>
|
|
31
96
|
</xpl-side-nav-item>
|
|
32
97
|
```
|
|
33
98
|
|
|
34
99
|
### Link (slot-only)
|
|
100
|
+
|
|
101
|
+
Wrap the anchor's children in the component CSS classes to match the icon color, label color, and spacing of button-mode items. Avoid whitespace text nodes between flex children — they render as a space character and add an unwanted gap.
|
|
102
|
+
|
|
35
103
|
```html
|
|
36
104
|
<xpl-side-nav-item link>
|
|
37
|
-
|
|
38
|
-
<xpl-icon icon="chart-line" size="16"></xpl-icon>
|
|
39
|
-
Reports
|
|
40
|
-
</a>
|
|
105
|
+
<!-- No whitespace between __leading / __label spans and the closing </a> -->
|
|
106
|
+
<a href="/reports" class="xpl-side-nav-item__link"><span class="xpl-side-nav-item__leading"><xpl-icon icon="chart-line" size="16"></xpl-icon></span><span class="xpl-side-nav-item__label">Reports</span></a>
|
|
41
107
|
</xpl-side-nav-item>
|
|
42
108
|
```
|
|
43
109
|
|
|
@@ -50,14 +116,17 @@ Row for [`xpl-side-nav`](../xpl-side-nav): place items in `slot="section"` or `s
|
|
|
50
116
|
## Slots
|
|
51
117
|
|
|
52
118
|
| Slot | Description |
|
|
53
|
-
|
|
54
|
-
| `
|
|
55
|
-
|
|
|
119
|
+
|---|---|
|
|
120
|
+
| `leading` | Leading icon column. Default content is an `xpl-icon` from the `icon` prop. Override with slotted content. Applies to all item types including parents. Renamed from `icon` in v2. |
|
|
121
|
+
| `trailing` | Trailing content (e.g. `xpl-icon icon="external-link"`). On `has-children` items, the auto chevron is rendered here when this slot is empty (`chevron-down` collapsed, `chevron-up` expanded); slotted content replaces the chevron. |
|
|
122
|
+
| *(default)* | **`has-children`:** nested `xpl-side-nav-item` children. **`link`:** one `<a>` (or router link component) containing all row content. Unused in leaf button mode. |
|
|
56
123
|
|
|
57
124
|
## Link mode checklist
|
|
58
125
|
|
|
59
|
-
- Do **not** use `label` or `icon` props —
|
|
60
|
-
-
|
|
126
|
+
- Do **not** use `label` or `icon` props — they are ignored in link mode. Put all text and icons inside your slotted anchor.
|
|
127
|
+
- Use **`class="xpl-side-nav-item__link"`** on the anchor, **`class="xpl-side-nav-item__leading"`** on the icon wrapper, and **`class="xpl-side-nav-item__label"`** on the text span for consistent icon color, label typography, hover, and focus styling.
|
|
128
|
+
- **No whitespace between flex children** — ensure no newlines or spaces sit between `__leading`, `__label`, and the `</a>` tag. Whitespace between flex items renders as a space character and shifts the label to the right.
|
|
129
|
+
- Set **`aria-current="page"`** on the anchor (not the host) when the route is active.
|
|
61
130
|
- For **disabled** links: set `disabled` on the host and `aria-disabled="true"` + `tabindex="-1"` on the anchor (see **Accessibility**).
|
|
62
131
|
|
|
63
132
|
## Accessibility
|
|
@@ -65,9 +134,45 @@ Row for [`xpl-side-nav`](../xpl-side-nav): place items in `slot="section"` or `s
|
|
|
65
134
|
- **Selected (non-link):** `aria-current="page"` on the `button` (leaf or expandable row).
|
|
66
135
|
- **Selected (link):** set `aria-current="page"` on your slotted anchor.
|
|
67
136
|
- **Expandable:** `aria-expanded` on the parent `button` matches `expanded`.
|
|
137
|
+
- **Trailing decorative icons:** add `aria-hidden="true"` to trailing `xpl-icon` elements. If the trailing icon conveys meaning (e.g. external link), provide accessible labeling in the surrounding context.
|
|
68
138
|
- **Disabled:** use the `disabled` prop on non-link rows; for link mode, coordinate host `disabled` with the anchor as above.
|
|
69
139
|
- **Hidden:** `hidden` hides the row; it does not disable interaction by itself — use `disabled` when appropriate.
|
|
70
140
|
|
|
141
|
+
## Mobile behavior (below `md` / 768px)
|
|
142
|
+
|
|
143
|
+
Inside the `xpl-side-nav` mobile drawer, items are automatically restyled by CSS — no props or markup changes needed.
|
|
144
|
+
|
|
145
|
+
| Property | Desktop | Mobile |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| Outer wrapper tap target | — | `min-height: 48px; padding: 6px 8px` |
|
|
148
|
+
| Inner button `min-height` | 32px | 0 (tap target comes from wrapper) |
|
|
149
|
+
| Leading / trailing icon size | 16px (`--xpl-size-100`) | 24px (`--xpl-size-150`) |
|
|
150
|
+
| Top-level label | `title-4` (16px, medium, lh 1.5) | `title-3` (20px, medium, lh 1.4) |
|
|
151
|
+
| Child item label | `title-5` | `title-4` (16px, medium, lh 1.5) |
|
|
152
|
+
| Footer item label | `title-5` | `title-4` (16px, medium, lh 1.5) |
|
|
153
|
+
| Footer row min-height | `28px` (one step smaller than section rows) | `--xpl-size-200` (32px) |
|
|
154
|
+
| Footer leading / trailing icon | 16px (`--xpl-size-100`) | 20px (`--xpl-size-125`) |
|
|
155
|
+
| Child label alignment offset | `padding-left: var(--xpl-side-nav-child-indent)` (32px) | Same — child labels stay aligned with the parent label column on every viewport |
|
|
156
|
+
|
|
157
|
+
**Link mode and mobile icons:** in button mode the component automatically adjusts the `xpl-icon` `size` prop to 24 below `md`. In link mode, where the consumer controls the anchor content, the CSS scales the `svg` element inside `__leading` / `__trailing` via a presentational-attribute override — no `size` prop change needed.
|
|
158
|
+
|
|
159
|
+
## Token reference
|
|
160
|
+
|
|
161
|
+
| Token | Usage |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `--xpl-icon-default` | Leading and trailing icon color (default, hover, selected) |
|
|
164
|
+
| `--xpl-icon-disabled` | Leading, trailing, and label color when disabled |
|
|
165
|
+
| `--xpl-text-strong` | Label color |
|
|
166
|
+
| `--xpl-text-disabled` | Label color when disabled |
|
|
167
|
+
| `--xpl-background-brand-secondary-surface` | Selected row background |
|
|
168
|
+
| `--xpl-background-surface-transparent-10` | Hover row background |
|
|
169
|
+
| `--xpl-border-focus` | Focus outline color |
|
|
170
|
+
| `--xpl-space-8` | `margin-right` on the leading icon box (spacing between icon and label); `margin-left` on the trailing box |
|
|
171
|
+
| `--xpl-size-100` | Leading / trailing icon box: 16px on desktop |
|
|
172
|
+
| `--xpl-size-150` | Leading / trailing icon box on mobile (overrides `--xpl-size-100` below `md`) |
|
|
173
|
+
| `--xpl-size-200` | `min-height` of the inner link / button (32px desktop) |
|
|
174
|
+
| `--xpl-size-300` | `min-height` of the outer row wrapper on mobile (48px tap target) |
|
|
175
|
+
|
|
71
176
|
## Related
|
|
72
177
|
|
|
73
178
|
- [xpl-side-nav](../xpl-side-nav) — Sidebar container (`slot="section"`, `slot="nav-footer"`).
|
|
@@ -75,26 +180,54 @@ Row for [`xpl-side-nav`](../xpl-side-nav): place items in `slot="section"` or `s
|
|
|
75
180
|
<!-- Auto Generated Below -->
|
|
76
181
|
|
|
77
182
|
|
|
183
|
+
## Overview
|
|
184
|
+
|
|
185
|
+
Navigation row for `xpl-side-nav`. Renders a button (default) or a slot-only
|
|
186
|
+
anchor container (`link` mode). Three slot positions are available:
|
|
187
|
+
|
|
188
|
+
- `slot="leading"` — leading icon column (renamed from `slot="icon"` in v2).
|
|
189
|
+
The `icon` prop is a convenience shorthand that renders an `xpl-icon` here
|
|
190
|
+
when no slotted `leading` content is present.
|
|
191
|
+
- `slot="trailing"` — trailing content (e.g. `xpl-icon icon="external-link"`).
|
|
192
|
+
When `has-children` is true and no `trailing` slot content is provided, an
|
|
193
|
+
auto chevron is rendered automatically in this position: `chevron-down` when
|
|
194
|
+
collapsed, `chevron-up` when expanded.
|
|
195
|
+
- default slot — nested `xpl-side-nav-item` children (expandable parents only).
|
|
196
|
+
|
|
197
|
+
**v2 breaking changes (beta):**
|
|
198
|
+
- `slot="icon"` renamed to `slot="leading"` — no alias kept.
|
|
199
|
+
- Parent rows (`has-children`) now render the leading icon alongside the chevron.
|
|
200
|
+
Previously parents showed chevron + label only (no leading icon).
|
|
201
|
+
- The chevron has moved from the leading position to the trailing position.
|
|
202
|
+
- A slotted `slot="trailing"` replaces the auto chevron on parent rows.
|
|
203
|
+
|
|
204
|
+
**Migration:**
|
|
205
|
+
| Before (v1) | After (v2) | Action |
|
|
206
|
+
|---|---|---|
|
|
207
|
+
| `slot="icon"` | `slot="leading"` | Rename the slot attribute |
|
|
208
|
+
| Parent row: chevron only (no leading) | Parent row: leading icon + chevron | Pass `icon` prop or `slot="leading"` |
|
|
209
|
+
| (no trailing slot) | `slot="trailing"` | Add for custom trailing content |
|
|
210
|
+
|
|
78
211
|
## Properties
|
|
79
212
|
|
|
80
|
-
| Property | Attribute | Description
|
|
81
|
-
| ------------- | -------------- |
|
|
82
|
-
| `disabled` | `disabled` | Whether the
|
|
83
|
-
| `expanded` | `expanded` | Whether the item is currently expanded (only applies when
|
|
84
|
-
| `hasChildren` | `has-children` | Whether the item has child items; when true, shows expand/collapse and a default slot for nested items. Mutually exclusive with
|
|
85
|
-
| `hidden` | `hidden` | Whether the component is hidden
|
|
86
|
-
| `icon` | `icon` | Optional icon name; default content for
|
|
87
|
-
| `label` | `label` | The display label for the navigation item (button / expandable rows; omit in
|
|
88
|
-
| `link` | `link` | When true, the row becomes a slot-only container for consumer-provided links. The consumer provides the full anchor element (or router link) via the default slot. In link mode,
|
|
89
|
-
| `selected` | `selected` | Whether the item is currently in a selected state
|
|
213
|
+
| Property | Attribute | Description | Type | Default |
|
|
214
|
+
| ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | ----------- |
|
|
215
|
+
| `disabled` | `disabled` | Whether the item is currently disabled. | `boolean` | `false` |
|
|
216
|
+
| `expanded` | `expanded` | Whether the item is currently expanded (only applies when `has-children` is true). | `boolean` | `false` |
|
|
217
|
+
| `hasChildren` | `has-children` | Whether the item has child items; when true, shows expand/collapse and a default slot for nested items. Mutually exclusive with `link`. If `link` is already true, setting `has-children` is reverted. | `boolean` | `false` |
|
|
218
|
+
| `hidden` | `hidden` | Whether the component is hidden. | `boolean` | `false` |
|
|
219
|
+
| `icon` | `icon` | Optional icon name; renders as the default content for `slot="leading"`. When `slot="leading"` content is present, this prop is ignored. In v2, this prop applies to all item types including parent rows (`has-children`). | `string` | `undefined` |
|
|
220
|
+
| `label` | `label` | The display label for the navigation item (button / expandable rows; omit in `link` mode). | `string` | `undefined` |
|
|
221
|
+
| `link` | `link` | When true, the row becomes a slot-only container for consumer-provided links. The consumer provides the full anchor element (or router link) via the default slot. In link mode, `label` and `icon` props should not be used. Link mode does not support `has-children`; use the default button mode for expandable items. When `link` is true, `hasChildren` is always false. | `boolean` | `false` |
|
|
222
|
+
| `selected` | `selected` | Whether the item is currently in a selected state. | `boolean` | `false` |
|
|
90
223
|
|
|
91
224
|
|
|
92
225
|
## Events
|
|
93
226
|
|
|
94
|
-
| Event | Description
|
|
95
|
-
| ---------------- |
|
|
96
|
-
| `expandedChange` | Emitted when the expanded state changes (
|
|
97
|
-
| `navClick` | Emitted when a leaf item is clicked. Expandable parents use expandedChange instead.
|
|
227
|
+
| Event | Description | Type |
|
|
228
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------ | ---------------------- |
|
|
229
|
+
| `expandedChange` | Emitted when the expanded state changes (`has-children` items only). Detail is the new expanded value. | `CustomEvent<boolean>` |
|
|
230
|
+
| `navClick` | Emitted when a leaf item is clicked. Expandable parents use `expandedChange` instead. | `CustomEvent<void>` |
|
|
98
231
|
|
|
99
232
|
|
|
100
233
|
## Dependencies
|