@xplortech/apollo-core 2.6.0 → 2.7.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 +737 -63
- package/build/style.css +5415 -1805
- package/dist/apollo-core/apollo-core.css +62 -22
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-8a1affce.entry.js → p-084d26ed.entry.js} +1 -1
- package/dist/apollo-core/p-146d5d55.entry.js +1 -0
- package/dist/apollo-core/p-16742606.entry.js +1 -0
- package/dist/apollo-core/{p-42016063.entry.js → p-28d12fd3.entry.js} +1 -1
- package/dist/apollo-core/p-3eb5eb7c.entry.js +1 -0
- package/dist/apollo-core/p-4882f0bd.entry.js +1 -0
- package/dist/apollo-core/p-64b34268.entry.js +1 -0
- package/dist/apollo-core/p-6c956d4e.entry.js +1 -0
- package/dist/apollo-core/p-71b75f36.entry.js +1 -0
- package/dist/apollo-core/{p-02167464.entry.js → p-7eb86c63.entry.js} +1 -1
- package/dist/apollo-core/{p-1fd3dc87.entry.js → p-84254a24.entry.js} +1 -1
- package/dist/apollo-core/p-9f2a0321.entry.js +1 -0
- package/dist/apollo-core/{p-C_Z2nG0p.js → p-C7bgJs6C.js} +2 -2
- package/dist/apollo-core/p-cde83ab0.entry.js +1 -0
- package/dist/apollo-core/p-e7363036.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-DH6pgWru.js → index-BQ97-AWw.js} +18 -15
- package/dist/cjs/loader.cjs.js +2 -2
- 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_47.cjs.entry.js → xpl-avatar_61.cjs.entry.js} +6096 -1461
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
- 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-toggle.cjs.entry.js +4 -4
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +18 -7
- 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-avatar/avatar.stories.js +122 -107
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +249 -15
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/badge.stories.js +1 -33
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/xpl-banner.js +4 -3
- 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 +21 -3
- 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 +47 -25
- 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 +2 -2
- 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 +46 -53
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/input.stories.js +96 -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 +5 -5
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +485 -0
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +130 -18
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/list.stories.js +300 -63
- package/dist/collection/components/xpl-list/xpl-list-item/xpl-list-item.js +818 -0
- package/dist/collection/components/xpl-list/xpl-list.js +579 -21
- 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 +3 -3
- package/dist/collection/components/xpl-panel/panel.stories.js +5 -3
- package/dist/collection/components/xpl-panel/xpl-panel.js +3 -3
- 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/progress-indicator.stories.js +118 -0
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +171 -0
- 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-spotlight/spotlight.stories.js +385 -0
- package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +1085 -0
- package/dist/collection/components/xpl-tab/xpl-tab.js +261 -8
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +22 -15
- package/dist/collection/components/xpl-table/table.stories.js +319 -67
- package/dist/collection/components/xpl-table/utils/move-row-dom.js +50 -0
- package/dist/collection/components/xpl-table/utils/table-internal.js +58 -0
- package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +7 -0
- package/dist/collection/components/xpl-table/xpl-table-cell/xpl-table-cell.js +155 -0
- package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +7 -0
- package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +37 -0
- package/dist/collection/components/xpl-table/xpl-table-header/table-header.stories.js +131 -0
- package/dist/collection/components/xpl-table/xpl-table-header/xpl-table-header.js +7 -0
- package/dist/collection/components/xpl-table/xpl-table-header-cell/table-header-cell.stories.js +105 -0
- package/dist/collection/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.js +402 -0
- package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +121 -0
- package/dist/collection/components/xpl-table/xpl-table.js +1448 -143
- package/dist/collection/components/xpl-tabs/segment-control.stories.js +31 -0
- package/dist/collection/components/xpl-tabs/tabs.shared.js +156 -0
- package/dist/collection/components/xpl-tabs/tabs.stories.js +10 -60
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +338 -62
- package/dist/collection/components/xpl-tag/tag.stories.js +153 -0
- package/dist/collection/components/xpl-tag/xpl-tag.js +312 -9
- 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.stories.js +625 -0
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +122 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +481 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +433 -0
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/collection/utils/lifecycle.js +79 -0
- package/dist/collection/utils/tab-a11y-ids.js +22 -0
- package/dist/components/floating-ui.dom.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/lifecycle.js +1 -0
- package/dist/components/tab-a11y-ids.js +1 -0
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar2.js +1 -1
- package/dist/components/xpl-backdrop2.js +1 -1
- package/dist/components/xpl-badge2.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-button2.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox2.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-divider2.js +1 -1
- package/dist/components/xpl-dropdown-group2.js +1 -1
- package/dist/components/xpl-dropdown-heading2.js +1 -1
- package/dist/components/xpl-dropdown-option2.js +1 -1
- package/dist/components/xpl-dropdown2.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-icon2.js +1 -1
- package/dist/components/xpl-input-date2.js +1 -1
- package/dist/components/xpl-input-file2.js +1 -1
- package/dist/components/xpl-input-search.d.ts +11 -0
- package/dist/components/xpl-input-search.js +1 -0
- package/dist/components/xpl-input-search2.js +1 -0
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/{xpl-progress.d.ts → xpl-list-item.d.ts} +4 -4
- package/dist/components/xpl-list-item.js +1 -0
- package/dist/components/xpl-list-item2.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/xpl-nav-header-menu.js +1 -0
- 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-popover2.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.d.ts +11 -0
- package/dist/components/xpl-progress-indicator.js +1 -0
- package/dist/components/xpl-radio2.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select2.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.d.ts +11 -0
- package/dist/components/xpl-spotlight.js +1 -0
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-body.d.ts +11 -0
- package/dist/components/xpl-table-body.js +1 -0
- package/dist/components/xpl-table-cell.d.ts +11 -0
- package/dist/components/xpl-table-cell.js +1 -0
- package/dist/components/xpl-table-cell2.js +1 -0
- package/dist/components/xpl-table-footer-cell.d.ts +11 -0
- package/dist/components/xpl-table-footer-cell.js +1 -0
- package/dist/components/xpl-table-footer-cell2.js +1 -0
- package/dist/components/xpl-table-footer.d.ts +11 -0
- package/dist/components/xpl-table-footer.js +1 -0
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header-cell2.js +1 -0
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table-row.d.ts +11 -0
- package/dist/components/xpl-table-row.js +1 -0
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag2.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-tooltip2.js +1 -1
- package/dist/components/xpl-top-nav-item.d.ts +11 -0
- package/dist/components/xpl-top-nav-item.js +1 -0
- package/dist/components/xpl-top-nav-item2.js +1 -0
- package/dist/components/xpl-top-nav.d.ts +11 -0
- package/dist/components/xpl-top-nav.js +1 -0
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-avatar/readme.md +289 -15
- package/dist/docs/xpl-badge/readme.md +14 -9
- package/dist/docs/xpl-banner/readme.md +48 -11
- package/dist/docs/xpl-button/readme.md +28 -18
- package/dist/docs/xpl-calendar/readme.md +1 -1
- package/dist/docs/xpl-checkbox/readme.md +19 -16
- package/dist/docs/xpl-divider/readme.md +6 -4
- package/dist/docs/xpl-dropdown/readme.md +1 -1
- package/dist/docs/xpl-dynamic-table/readme.md +22 -19
- package/dist/docs/xpl-dynamic-table-cell/readme.md +20 -18
- package/dist/docs/xpl-dynamic-table-row/readme.md +21 -19
- package/dist/docs/xpl-icon/readme.md +15 -3
- package/dist/docs/xpl-input/readme.md +66 -41
- package/dist/docs/xpl-input/xpl-input-color/readme.md +1 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +1 -0
- package/dist/docs/xpl-input/xpl-input-search/readme.md +175 -0
- package/dist/docs/xpl-input/xpl-input-time/readme.md +1 -0
- package/dist/docs/xpl-list/readme.md +320 -10
- package/dist/docs/xpl-list/xpl-list-item/readme.md +99 -0
- package/dist/docs/xpl-pagination/readme.md +1 -0
- package/dist/docs/xpl-panel/readme.md +108 -17
- package/dist/docs/xpl-popover/readme.md +2 -0
- package/dist/docs/xpl-progress-indicator/readme.md +234 -0
- package/dist/docs/xpl-radio/readme.md +6 -4
- package/dist/docs/xpl-select/readme.md +2 -1
- package/dist/docs/xpl-side-nav/readme.md +2 -2
- package/dist/docs/xpl-slideout/readme.md +1 -1
- package/dist/docs/xpl-spotlight/readme.md +235 -0
- package/dist/docs/xpl-tab/readme.md +43 -7
- package/dist/docs/xpl-tab-panel/readme.md +42 -0
- package/dist/docs/xpl-table/readme.md +110 -46
- package/dist/docs/xpl-table/xpl-table-body/readme.md +10 -0
- package/dist/docs/xpl-table/xpl-table-cell/readme.md +33 -0
- package/dist/docs/xpl-table/xpl-table-footer/readme.md +10 -0
- package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +30 -0
- package/dist/docs/{xpl-table-header → xpl-table/xpl-table-header}/readme.md +13 -13
- package/dist/docs/xpl-table/xpl-table-header-cell/readme.md +66 -0
- package/dist/docs/xpl-table/xpl-table-row/readme.md +19 -0
- package/dist/docs/xpl-tabs/readme.md +62 -8
- package/dist/docs/xpl-tag/readme.md +379 -4
- package/dist/docs/xpl-toast/readme.md +1 -1
- package/dist/docs/xpl-top-nav/readme.md +179 -0
- package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +81 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +87 -0
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-C_Z2nG0p.js → index-C7bgJs6C.js} +18 -16
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/{xpl-avatar_47.entry.js → xpl-avatar_61.entry.js} +6082 -1461
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +2 -2
- 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-toggle.entry.js +4 -4
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/types/components/xpl-avatar/avatar.stories.d.ts +88 -29
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +29 -2
- package/dist/types/components/xpl-badge/badge.stories.d.ts +0 -19
- package/dist/types/components/xpl-button/xpl-button.d.ts +7 -0
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +4 -3
- package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +9 -10
- package/dist/types/components/xpl-input/input.stories.d.ts +1 -0
- package/dist/types/components/xpl-input/xpl-input-search/xpl-input-search.d.ts +39 -0
- package/dist/types/components/xpl-input/xpl-input.d.ts +13 -5
- package/dist/types/components/xpl-list/list.stories.d.ts +299 -13
- package/dist/types/components/xpl-list/listitem.d.ts +13 -0
- package/dist/types/components/xpl-list/xpl-list-item/xpl-list-item.d.ts +71 -0
- package/dist/types/components/xpl-list/xpl-list.d.ts +55 -2
- package/dist/types/components/xpl-panel/panel.stories.d.ts +2 -0
- package/dist/types/components/xpl-progress-indicator/progress-indicator.stories.d.ts +62 -0
- package/dist/types/components/xpl-progress-indicator/xpl-progress-indicator.d.ts +11 -0
- package/dist/types/components/xpl-spotlight/spotlight.stories.d.ts +197 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +101 -0
- package/dist/types/components/xpl-tab/xpl-tab.d.ts +14 -1
- package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +2 -1
- package/dist/types/components/xpl-table/table.stories.d.ts +161 -19
- package/dist/types/components/xpl-table/utils/move-row-dom.d.ts +3 -0
- package/dist/types/components/xpl-table/utils/table-internal.d.ts +8 -0
- package/dist/types/components/xpl-table/xpl-table-body/xpl-table-body.d.ts +3 -0
- package/dist/types/components/xpl-table/xpl-table-cell/xpl-table-cell.d.ts +11 -0
- package/dist/types/components/xpl-table/xpl-table-footer/xpl-table-footer.d.ts +3 -0
- package/dist/types/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.d.ts +4 -0
- package/dist/types/components/{xpl-table-header → xpl-table/xpl-table-header}/table-header.stories.d.ts +13 -16
- package/dist/types/components/{xpl-table-header-cell → xpl-table/xpl-table-header-cell}/table-header-cell.stories.d.ts +24 -20
- package/dist/types/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.d.ts +32 -0
- package/dist/types/components/xpl-table/xpl-table-row/xpl-table-row.d.ts +13 -0
- package/dist/types/components/xpl-table/xpl-table.d.ts +123 -21
- package/dist/types/components/xpl-tabs/segment-control.stories.d.ts +112 -0
- package/dist/types/components/xpl-tabs/tabs.shared.d.ts +156 -0
- package/dist/types/components/xpl-tabs/tabs.stories.d.ts +65 -12
- package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +37 -18
- package/dist/types/components/xpl-tag/tag.stories.d.ts +65 -0
- package/dist/types/components/xpl-tag/xpl-tag.d.ts +36 -1
- package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +471 -0
- package/dist/types/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.d.ts +18 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.d.ts +48 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav.d.ts +51 -0
- package/dist/types/components.d.ts +1888 -148
- package/dist/types/utils/lifecycle.d.ts +16 -0
- package/dist/types/utils/tab-a11y-ids.d.ts +4 -0
- package/package.json +3 -3
- package/dist/apollo-core/p-0bce3874.entry.js +0 -1
- package/dist/apollo-core/p-5549756c.entry.js +0 -1
- package/dist/apollo-core/p-56fa4941.entry.js +0 -1
- package/dist/apollo-core/p-76c324da.entry.js +0 -1
- package/dist/apollo-core/p-7a3224b4.entry.js +0 -1
- package/dist/apollo-core/p-7e924697.entry.js +0 -1
- package/dist/apollo-core/p-9efca9e1.entry.js +0 -1
- package/dist/apollo-core/p-b252b380.entry.js +0 -1
- package/dist/apollo-core/p-c91daac1.entry.js +0 -1
- package/dist/apollo-core/p-d9b62508.entry.js +0 -1
- package/dist/apollo-core/p-eaea16d1.entry.js +0 -1
- package/dist/apollo-core/p-eed13bca.entry.js +0 -1
- package/dist/apollo-core/p-f5af9539.entry.js +0 -1
- package/dist/cjs/xpl-list.cjs.entry.js +0 -32
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +0 -57
- package/dist/cjs/xpl-table-header.cjs.entry.js +0 -14
- package/dist/collection/components/xpl-progress/progress.stories.js +0 -106
- package/dist/collection/components/xpl-progress/xpl-progress.js +0 -60
- package/dist/collection/components/xpl-table-header/table-header.stories.js +0 -126
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +0 -7
- package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +0 -75
- package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +0 -188
- package/dist/components/xpl-progress.js +0 -1
- package/dist/docs/xpl-progress/readme.md +0 -22
- package/dist/docs/xpl-table-header-cell/readme.md +0 -47
- package/dist/esm/xpl-list.entry.js +0 -30
- package/dist/esm/xpl-table-header-cell.entry.js +0 -55
- package/dist/esm/xpl-table-header.entry.js +0 -12
- package/dist/types/components/xpl-progress/progress.stories.d.ts +0 -38
- package/dist/types/components/xpl-progress/xpl-progress.d.ts +0 -6
- package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +0 -13
- /package/dist/types/components/{xpl-table-header → xpl-table/xpl-table-header}/xpl-table-header.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as o,Host as s,transformTag as a}from"@stencil/core/internal/client";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectedItemCount=0}componentDidLoad(){const e=this.el.querySelector('[slot="actions-right"]');null!==e&&(e.style.marginLeft="auto")}listenToSelectedItemCountChange(e){this.selectedItemCount=e.detail.length}render(){return o(s,{key:"eda1f57ef1a207b82f622f090dd30f21d60bbc61",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},o("div",{key:"fe703bf7fb49ebe27f4eee7973ea1e24c5ed50a4",class:"toolbar"},o("p",{key:"d0d9cb84b4828688aabbabb3395ff3c18c4d2a78",class:"selected-item-count"},this.selectedItemCount," Selected"),o("div",{key:"c1259be179d245e4c18a3690f800eb493f491ba9",class:"actions"},o("slot",{key:"40000dda8efbfd0aa7175e0e5db1c1c9f4e7e89f",name:"actions-left"}),o("slot",{key:"255e21ebb1af8fde1bb76a1a1243eeadc4146d3d",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),n=c,l=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(a(e))||customElements.define(a(e),c))}))};export{n as XplToolbar,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,proxyCustomElement as t,HTMLElement as o,Host as i,transformTag as l}from"@stencil/core/internal/client";const
|
|
1
|
+
import{h as e,proxyCustomElement as t,HTMLElement as o,Host as i,transformTag as l}from"@stencil/core/internal/client";const d=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"14"},e("g",{filter:"url(#a)"},e("path",{d:"M0 5h15l-7.5 7.5L0 5Z"})),e("defs",null,e("filter",{id:"a",width:"20",height:"8.171",x:".5",y:"5","color-interpolation-filters":"sRGB",filterUnits:"userSpaceOnUse"},e("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e("feOffset",{dy:"1"}),e("feComposite",{in2:"hardAlpha",operator:"out"}),e("feColorMatrix",{values:"0 0 0 0 0.882353 0 0 0 0 0.886275 0 0 0 0 0.909804 0 0 0 1 0"}),e("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_20073_3067"}),e("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_20073_3067",result:"shape"})))),r=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.position="top-middle",this.hideArrow=!1}render(){return e(i,{key:"9890dea245d2fbd24c67fea6e39ce3430ffc8d81"},e("div",{key:"0930c7ee1f0e1f6a625f41e34f31d2432fdff7eb",class:"xpl-tooltip-container"},e("slot",{key:"3b9a8aebce020a13f3d7ef624b59c06e55398907"}),e("div",{key:"50fe33b8bef96df08899b449065558ea8f2ed820",class:`xpl-tooltip xpl-tooltip--${this.position}`},this.text),!this.hideArrow&&e("div",{key:"eddf77e8e8093eff29c5c22fdc3d2b882de4a0ca",class:"xpl-tooltip-arrow"},e(d,{key:"fad3bccade4af1d9734d288c32d7951527398853"}))))}},[260,"xpl-tooltip",{text:[1],position:[1],hideArrow:[4,"hide-arrow"]}]);function s(){"undefined"!=typeof customElements&&["xpl-tooltip"].forEach((e=>{"xpl-tooltip"===e&&(customElements.get(l(e))||customElements.define(l(e),r))}))}export{r as T,s as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplTopNavItem extends Components.XplTopNavItem, HTMLElement {}
|
|
4
|
+
export const XplTopNavItem: {
|
|
5
|
+
prototype: XplTopNavItem;
|
|
6
|
+
new (): XplTopNavItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as o,d as t}from"./xpl-top-nav-item2.js";const p=o,s=t;export{p as XplTopNavItem,s as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as e,Host as o,transformTag as n}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const r=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.navItemClick=s(this,"navItemClick",7),this.hasDropdown=!1,this.hostListitemRole=!1,this.open=!1,this.active=!1,this.icon="",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1)},this.handleClick=t=>{if(this.hasDropdown)return t.preventDefault(),t.stopPropagation(),this.broadcastCloseOtherDropdownHosts(),void(this.open=!this.open);this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown){if("Enter"===t.key)return;if(" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");return void(null==i||i.click())}}"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick(this.syntheticActivationClickFromKeyboard(t)))}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}connectedCallback(){this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){void 0!==this.deferredHasDropdownObserverSyncTimeoutId&&(clearTimeout(this.deferredHasDropdownObserverSyncTimeoutId),this.deferredHasDropdownObserverSyncTimeoutId=void 0),void 0!==this.deferredPostRenderTopNavItemTimeoutId&&(clearTimeout(this.deferredPostRenderTopNavItemTimeoutId),this.deferredPostRenderTopNavItemTimeoutId=void 0),this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}scheduleHasDropdownSyncFromObserver(){void 0!==this.deferredHasDropdownObserverSyncTimeoutId&&clearTimeout(this.deferredHasDropdownObserverSyncTimeoutId),this.deferredHasDropdownObserverSyncTimeoutId=setTimeout((()=>{this.deferredHasDropdownObserverSyncTimeoutId=void 0,this.el.isConnected&&this.syncHasDropdownFromDom()}),0)}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){var t;null===(t=this.dropdownSlotObserver)||void 0===t||t.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){var t,i;null===(t=this.parentListitemContextObserver)||void 0===t||t.disconnect(),this.parentListitemContextObserver=void 0,null===(i=this.selfListitemContextObserver)||void 0===i||i.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(null!=i?i:t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){void 0!==this.deferredPostRenderTopNavItemTimeoutId&&clearTimeout(this.deferredPostRenderTopNavItemTimeoutId),this.deferredPostRenderTopNavItemTimeoutId=setTimeout((()=>{this.deferredPostRenderTopNavItemTimeoutId=void 0,this.el.isConnected&&(this.syncHostListitemRole(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}),0)}syncDropdownDocListeners(){const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}syncHasDropdownFromDom(){this.hasDropdown=!!this.el.querySelector('[slot="dropdown"]')}getNavDropdownBroadcastRoot(){var t,i;return null!==(i=null!==(t=this.el.closest("xpl-top-nav"))&&void 0!==t?t:this.el.closest("xpl-nav-header-menu"))&&void 0!==i?i:this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}syntheticActivationClickFromKeyboard(t){var i;const s=this.el.querySelector(".xpl-top-nav-item__inner"),e=null==s?void 0:s.getBoundingClientRect();return new MouseEvent("click",{bubbles:!0,cancelable:!0,button:0,clientX:e?e.left+e.width/2:0,clientY:e?e.top+e.height/2:0,view:null!==(i=t.view)&&void 0!==i?i:void 0})}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((i=>{var s;if(i.nodeType===Node.TEXT_NODE)return Boolean(null===(s=i.textContent)||void 0===s?void 0:s.trim());if(i.nodeType===Node.ELEMENT_NODE){const s=i;return!t.isInternalRenderedHostChild(s)&&"dropdown"!==s.getAttribute("slot")}return!1}))}getInnerAriaLabel(){var t,i,s;if(null===(t=this.label)||void 0===t?void 0:t.trim())return;if(this.hasNonDropdownLightDomChild())return;return(null===(i=this.itemAriaLabel)||void 0===i?void 0:i.trim())||((null===(s=this.icon)||void 0===s?void 0:s.trim())?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===(null==i?void 0:i.getAttribute("role"))||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===(null==i?void 0:i.tagName.toLowerCase())&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,s=this.getInnerAriaLabel(),o=Object.assign(Object.assign({class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i},s?{"aria-label":s}:{}),{onClick:this.handleClick,onKeyDown:this.handleKeyDown});return null==this.href||this.hasDropdown?e("div",Object.assign({},o,{role:"button"}),this.icon&&e("xpl-icon",{size:16,icon:this.icon}),this.label?e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label):e("slot",null),this.hasDropdown&&e("xpl-icon",{icon:"chevron-down"})):e("a",Object.assign({},o,{href:this.href}),this.icon&&e("xpl-icon",{size:16,icon:this.icon}),this.label?e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label):e("slot",null))}render(){return e(o,Object.assign({key:"391dd693aabff902ffd5de50d710d3fab06573e2",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.open,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0}},this.hostListitemRole?{role:"listitem"}:{}),this.renderInner(),this.hasDropdown&&e("div",{key:"c5d5239d0279722d5a78bc7436a3ebb9247f904d",class:"xpl-top-nav-item__dropdown"},e("slot",{key:"f0a735798a09218822fd14174d0c845014c5e557",name:"dropdown"})))}get el(){return this}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}]}}},[260,"xpl-top-nav-item",{active:[516],href:[1],icon:[1],itemAriaLabel:[1,"item-aria-label"],label:[1],selected:[516],hasDropdown:[32],hostListitemRole:[32],open:[32]},[[0,"_xplCloseNavDropdown","handleCloseNavDropdownRequest"]],{hasDropdown:[{onHasDropdownChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["xpl-top-nav-item","xpl-icon"].forEach((t=>{switch(t){case"xpl-top-nav-item":customElements.get(n(t))||customElements.define(n(t),r);break;case"xpl-icon":customElements.get(n(t))||l()}}))}export{r as T,h as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplTopNav extends Components.XplTopNav, HTMLElement {}
|
|
4
|
+
export const XplTopNav: {
|
|
5
|
+
prototype: XplTopNav;
|
|
6
|
+
new (): XplTopNav;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as n,transformTag as o}from"@stencil/core/internal/client";import{d as a}from"./xpl-button2.js";import{d as l}from"./xpl-icon2.js";import{d as r}from"./xpl-popover2.js";import{d as h}from"./xpl-top-nav-item2.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=s(this,"brandClick",7),this.navOpen=s(this,"navOpen",7),this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{var t;this.navControlFocusTimeoutId=void 0,null===(t=this.el.querySelector(".xpl-top-nav__nav-control"))||void 0===t||t.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:e}=t;!0===e&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&this.focusNavControlAfterClose()},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const e=t.querySelector(".xpl-popover");(null==e?void 0:e.classList.contains("xpl-popover--is-open"))&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=null!=this.el.querySelector('[slot="brand-logo"]');t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=null!=this.el.querySelector('[slot="user-menu"]'),e=null!=this.el.querySelector('[slot="user-menu-trigger"]');t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),e!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=e)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocEscapeListener()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocEscapeListener(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocEscapeListener(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){var t,e;return null!==(e=null===(t=this.childAccountLabel)||void 0===t?void 0:t.trim())&&void 0!==e?e:""}get hasBrand(){var t,e,s,i;const n=null!==(e=null===(t=this.brandName)||void 0===t?void 0:t.trim())&&void 0!==e?e:"",o=null!==(i=null===(s=this.brandLogo)||void 0===s?void 0:s.trim())&&void 0!==i?i:"";return n.length>0||o.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let e=0;e<t.length;e+=1){const s=t[e].querySelector(".xpl-popover");if(null==s?void 0:s.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((()=>{this.scheduleSlotContentSyncFromObserver()})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const e=t.querySelector(".xpl-popover");e&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(e,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){var t;this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),null===(t=this.userPopoverDrawerOpenObserver)||void 0===t||t.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocEscapeListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDownEscape,!1)}scheduleSlotContentSyncFromObserver(){void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots())}),0)}syncDocEscapeListener(){this.removeDocEscapeListener(),this.navControl&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDownEscape,!1)}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&this.navOpen.emit(!1)}render(){var t,e,s,o;return i(n,{key:"7b9229d9aaa6e462102694f2af4cac513c0a897d",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"15e65c606ec67d5dcb3de7e14dbbb2983d23f097","aria-label":null!==(t=this.label)&&void 0!==t?t:"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"4dcd01744fac5acfd8370da93d3343fc9be1762c",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"07bd342a80a412922a6d22a789694e2457312e1d",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"1a69e0dac8d98b1331676e9e69fa76cac7a55de5",class:"xpl-top-nav__control-icon",icon:"menu",size:20})),this.hasBrand&&i("div",{key:"5af668cb6533a3f1e91101a1179c614215e3f431",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"f77e07635deb49f7db37fd965b389f5a3d379864",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},(null===(e=this.brandLogo)||void 0===e?void 0:e.trim())?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:(null===(s=this.brandName)||void 0===s?void 0:s.trim())?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,(null===(o=this.brandName)||void 0===o?void 0:o.trim())?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"f349c1fa2021e705602eed288e83db9a5dade455",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"718718595ec839e0aef4f703f766d1bedfd65c6b",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"ebcb856dc7c6bc247877a1306350073f9990ff18",name:"left-aside"})))),i("div",{key:"e582c5e3799d471b358c48c34d5c629a5b6db44d",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"eda8ef4e6252b5c7362f1e30e15f9f60df2e77d6",class:"xpl-nav-right__list"},i("div",{key:"f99115361d8ec8e8c964f434b1c713488ece962a",class:"xpl-top-nav__right-rail"},i("div",{key:"0eeea604e76f47ee71c7e2310f7a4764aa47bf39",class:"xpl-top-nav__right-lead"},i("slot",{key:"d4fd4fa67af3bc6dbdb4b641e24603fcfc14e920",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),p=c,d=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),c);break;case"xpl-button":customElements.get(o(t))||a();break;case"xpl-icon":customElements.get(o(t))||l();break;case"xpl-popover":customElements.get(o(t))||r();break;case"xpl-top-nav-item":customElements.get(o(t))||h()}}))};export{p as XplTopNav,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as i,createEvent as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as e,h as s,Host as n,transformTag as a}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const o=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.navOpen=e(this,"navOpen",7),this.open=!0}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return s(n,{key:"ace824cff0305860bce4dd4da2be0b2f8cf59672"},s("nav",{key:"0617af3b292b4459900c7e352c9486d666fc501e","aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?s("div",null,s("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle()},s("xpl-icon",{class:"xpl-utility-nav__bars",icon:"three-bars"})),s("slot",{name:"aside"})):s("slot",{name:"aside"}),s("slot",{key:"e060a576b15089bc70d030a6c692124294b7eb4e",name:"main"})))}},[260,"xpl-utility-bar",{navControl:[4,"nav-control"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],open:[32]}]),c=o,r=function(){"undefined"!=typeof customElements&&["xpl-utility-bar","xpl-icon"].forEach((t=>{switch(t){case"xpl-utility-bar":customElements.get(a(t))||customElements.define(a(t),o);break;case"xpl-icon":customElements.get(a(t))||l()}}))};export{c as XplUtilityBar,r as defineCustomElement}
|
|
@@ -1,37 +1,311 @@
|
|
|
1
1
|
# xpl-avatar
|
|
2
|
-
An Avatar is a visual representation of a user or entity. There are 5 types of avatar Figma component; Avatar Default, Avatar Group, Avatar Profile, Avatar Text, and Avatar Clickable. Each comes in a variety of sizes, faces and placeholder colors.
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
The **Avatar** component shows a person or entity: a photo, initials on a colored surface, or custom slot content. It aligns with Apollo’s Figma patterns for default avatars, profile layouts, stacked groups, and rows with supporting text.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- **Default (no `variant`)** — Inline UI: tables, nav, comments, lists. Supports image (`src`), initials from `name`, and an optional status dot (`status`).
|
|
8
|
+
- **Profile (`variant="profile"`)** — Large avatars for profile pages and settings surfaces; optional `status` dot uses the same badge palette as the default avatar.
|
|
9
|
+
- **Group (`variant="group"`)** — Stacked avatar groups with overflow count (`+N`). The `status` prop is not used (status dots are not shown for groups).
|
|
10
|
+
- **With Text (`variant="with-text"`)** — Horizontal layout with avatar paired with name and optional sub-text; optional `status` on the avatar image.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
| Variant | Purpose | `status` dot |
|
|
14
|
+
| ----------- | ------------------------------------------------------ | ------------ |
|
|
15
|
+
| *(none)* | Standard single avatar | Supported |
|
|
16
|
+
| `profile` | Larger profile-sized avatar for settings/profile pages | Supported |
|
|
17
|
+
| `group` | Stacked avatar group with overflow count (`+N`) | Not shown |
|
|
18
|
+
| `with-text` | Avatar paired with name and optional sub-text | Supported |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
### Basic Avatar (Image)
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<xpl-avatar name="Katie Wilson" src="https://example.com/photo.jpg"></xpl-avatar>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Initials Placeholder (No Image)
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<!-- Automatic initials from name -->
|
|
35
|
+
<xpl-avatar name="Katie Wilson" color="green"></xpl-avatar>
|
|
36
|
+
|
|
37
|
+
<!-- Custom initials via slot -->
|
|
38
|
+
<xpl-avatar color="primary">KW</xpl-avatar>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Status Dot
|
|
42
|
+
|
|
43
|
+
Status dots are rendered with [`xpl-badge`] using `dot-only` and `bordered`. The `status` prop sets the badge **variant** , so avatar status colors stay aligned with badge semantics across the system.
|
|
44
|
+
|
|
45
|
+
**Where `status` applies:** default (no `variant`), `profile`, and `with-text`. It does **not** apply to `group` — stacked groups ignore `status`.
|
|
46
|
+
|
|
47
|
+
**`status` values** (same names as `xpl-badge` `variant` palette values):
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| `status` | Badge palette | Typical meaning (choose per product copy) |
|
|
51
|
+
| -------- | ---------------- | ----------------------------------------- |
|
|
52
|
+
| `purple` | Purple (default) | Default / general presence |
|
|
53
|
+
| `green` | Green | Positive, available, success-aligned |
|
|
54
|
+
| `yellow` | Yellow | Caution, pending, away, warning-aligned |
|
|
55
|
+
| `orange` | Orange | Attention, busy, secondary emphasis |
|
|
56
|
+
| `gray` | Gray | Neutral, offline, inactive |
|
|
57
|
+
| `red` | Red | Error, do not disturb, critical |
|
|
58
|
+
| `blue` | Blue | Informational, notifications |
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<xpl-avatar name="Alex Chen" src="photo.jpg" status="green"></xpl-avatar>
|
|
63
|
+
<xpl-avatar name="Jordan Lee" status="red"></xpl-avatar>
|
|
64
|
+
<xpl-avatar name="Sam Smith" status="gray"></xpl-avatar>
|
|
65
|
+
<xpl-avatar variant="with-text" name="Riley Park" sub-text="Designer" src="photo.jpg" status="blue"></xpl-avatar>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Clickable Avatar (Link)
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<xpl-avatar name="Profile" src="photo.jpg" href="/profile" target="_blank"></xpl-avatar>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Variant Examples
|
|
77
|
+
|
|
78
|
+
### Profile Avatar (Larger Size)
|
|
79
|
+
|
|
80
|
+
For profile pages and settings surfaces. Optional `status` uses the same badge palette as other non-group variants.
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<!-- Large profile avatar (144px) -->
|
|
84
|
+
<xpl-avatar variant="profile" name="Katie Wilson" src="photo.jpg"></xpl-avatar>
|
|
85
|
+
|
|
86
|
+
<!-- With status dot -->
|
|
87
|
+
<xpl-avatar variant="profile" name="Katie Wilson" src="photo.jpg" status="green"></xpl-avatar>
|
|
88
|
+
|
|
89
|
+
<!-- Small profile avatar (80px) -->
|
|
90
|
+
<xpl-avatar variant="profile" name="Jordan Lee" size="sm"></xpl-avatar>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Avatar Group (Stacked)
|
|
94
|
+
|
|
95
|
+
Displays up to 4 visible avatars with a `+N` overflow pill for additional members. The `status` prop is not used in this layout (no per-avatar or group-level status dot).
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<!-- Basic group with JSON data -->
|
|
99
|
+
<xpl-avatar
|
|
100
|
+
variant="group"
|
|
101
|
+
group-data='[
|
|
102
|
+
{"name": "Alex", "color": "green"},
|
|
103
|
+
{"name": "Jordan", "color": "yellow"},
|
|
104
|
+
{"name": "Sam", "color": "pink"},
|
|
105
|
+
{"src": "https://example.com/photo.jpg", "name": "Dana"},
|
|
106
|
+
{"name": "Extra User"}
|
|
107
|
+
]'
|
|
108
|
+
></xpl-avatar>
|
|
109
|
+
|
|
110
|
+
<!-- Medium group -->
|
|
111
|
+
<xpl-avatar variant="group" size="md" group-data='[...]'></xpl-avatar>
|
|
112
|
+
|
|
113
|
+
<!-- Small group -->
|
|
114
|
+
<xpl-avatar variant="group" size="sm" group-data='[...]'></xpl-avatar>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Group data format:**
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
interface AvatarGroupItem {
|
|
121
|
+
src?: string; // Image URL (optional)
|
|
122
|
+
name?: string; // Used for initials and alt text
|
|
123
|
+
color?: 'green' | 'yellow' | 'pink' | 'primary' | 'secondary';
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Avatar with Text
|
|
128
|
+
|
|
129
|
+
Horizontal layout with avatar + name + optional sub-text (e.g., email).
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<!-- Basic with-text -->
|
|
133
|
+
<xpl-avatar
|
|
134
|
+
variant="with-text"
|
|
135
|
+
name="Katie Wilson"
|
|
136
|
+
sub-text="katie@example.com"
|
|
137
|
+
src="photo.jpg"
|
|
138
|
+
></xpl-avatar>
|
|
139
|
+
|
|
140
|
+
<!-- Clickable version -->
|
|
141
|
+
<xpl-avatar
|
|
142
|
+
variant="with-text"
|
|
143
|
+
name="View Profile"
|
|
144
|
+
sub-text="Product Designer"
|
|
145
|
+
src="photo.jpg"
|
|
146
|
+
href="/profile"
|
|
147
|
+
></xpl-avatar>
|
|
148
|
+
|
|
149
|
+
<!-- With status dot on the avatar -->
|
|
150
|
+
<xpl-avatar
|
|
151
|
+
variant="with-text"
|
|
152
|
+
name="Katie Wilson"
|
|
153
|
+
sub-text="katie@example.com"
|
|
154
|
+
src="photo.jpg"
|
|
155
|
+
status="green"
|
|
156
|
+
></xpl-avatar>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Size Options
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
| Size | Default Avatar | Profile Avatar | Group |
|
|
165
|
+
| -------- | -------------- | -------------- | ------------------ |
|
|
166
|
+
| *(none)* | 40×40px | 144×144px | 40×40px per avatar |
|
|
167
|
+
| `md` | 32×32px | — | 32×32px per avatar |
|
|
168
|
+
| `sm` | 24×24px | 80×80px | 24×24px per avatar |
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Status vs placeholder `color`
|
|
174
|
+
|
|
175
|
+
- **`status`** — Badge palette for the **status dot** (`purple` | `green` | `yellow` | `orange` | `gray` | `red` | `blue`). Passed through to `xpl-badge` as `variant`. Not used when `variant="group"`.
|
|
176
|
+
- **`color`** — Placeholder **surface** behind initials when there is no `src` (`green` | `yellow` | `pink` | `primary` | `secondary`). Unrelated to the status dot.
|
|
177
|
+
|
|
178
|
+
## Color Options (Placeholder Backgrounds)
|
|
179
|
+
|
|
180
|
+
Use `color` when no `src` is provided to set the placeholder background:
|
|
181
|
+
|
|
182
|
+
- `green` — Positive accent
|
|
183
|
+
- `yellow` — Highlight accent
|
|
184
|
+
- `pink` — Pink accent
|
|
185
|
+
- `primary` — Brand primary
|
|
186
|
+
- `secondary` — Action primary (purple)
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Design tokens
|
|
191
|
+
|
|
192
|
+
These are the main Apollo Foundation tokens used in `packages/apollo-core/src/css/avatar.css`. Use them when overriding or migrating styles.
|
|
193
|
+
|
|
194
|
+
| Role | Token(s) |
|
|
195
|
+
| ---- | -------- |
|
|
196
|
+
| Circular shape | `var(--xpl-border-radius-full)` |
|
|
197
|
+
| Placeholder surface (default) | `var(--xpl-background-brand-secondary)`, `var(--xpl-text-inverse)` |
|
|
198
|
+
| Placeholder `green` / `yellow` / `pink` | `var(--xpl-background-accent-positive)` / `var(--xpl-background-accent-highlight)` / `var(--xpl-background-accent-pink)` with `var(--xpl-text-inverse-on-light)` where applicable |
|
|
199
|
+
| Placeholder `primary` / `secondary` | `var(--xpl-background-accent-brand)` / `var(--xpl-background-brand-secondary)` |
|
|
200
|
+
| Link hover overlay | `var(--xpl-background-surface-transparent-25)` |
|
|
201
|
+
| Focus outline | `var(--xpl-border-accent-default)` base; `color` modifiers use `var(--xpl-border-positive)`, `var(--xpl-border-accent-highlight)`, `var(--xpl-border-accent-brand)`, etc. (`outline` / `outline-offset` per `avatar.css`) |
|
|
202
|
+
| With-text primary line | `var(--xpl-text-strong)`, `var(--xpl-font-size-title-5)`, `var(--xpl-font-weight-medium)` |
|
|
203
|
+
| With-text secondary line | `var(--xpl-text-subdued)`, `var(--xpl-font-size-body)` |
|
|
204
|
+
| Group overflow pill | `var(--xpl-background-surface-subtle)`, `var(--xpl-text-subdued)` |
|
|
205
|
+
| Group avatar ring | `box-shadow` using `var(--xpl-border-large)` and `var(--xpl-background-surface-default)` |
|
|
206
|
+
| Width / height | `var(--xpl-size-*)` for standard sizes; profile default uses `9rem` (documented in `TECH_DEBT.md`) |
|
|
207
|
+
| Spacing & overlap | `var(--xpl-space-*)`, `var(--xpl-z-index-*)` |
|
|
208
|
+
|
|
209
|
+
**Status dots** are styled by `xpl-badge`; see [`xpl-badge` readme](../xpl-badge/readme.md) for badge token usage.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Accessibility
|
|
214
|
+
|
|
215
|
+
- `name` is required for proper `alt` text on images and screen reader announcements
|
|
216
|
+
- **Status dots** are implemented via `xpl-badge` and marked `aria-hidden` (purely visual); convey meaning in surrounding UI copy or labels if required
|
|
217
|
+
- **Group overflow** includes `aria-label="{count} more"` for screen readers
|
|
218
|
+
- **Links** use native `<a>` elements with full keyboard support
|
|
219
|
+
- **Disabled state**: Use `disabled` prop to disable link behavior while keeping visual styles
|
|
220
|
+
- **Focus management**: All interactive avatars (links) use `:focus-visible` for keyboard focus indicators
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Best Practices
|
|
225
|
+
|
|
226
|
+
1. **Always provide `name`** — Essential for accessibility (alt text and screen readers; for placeholder initials, slot input has higher priority than the value passed in `name`)
|
|
227
|
+
2. **Use `color` for placeholder consistency** — Assign consistent colors to users based on ID or name hash
|
|
228
|
+
3. **Limit group data** — While the component handles any number, consider capping at reasonable numbers for UX
|
|
229
|
+
4. **Slot content** — Use the default slot sparingly; prefer `name` prop for consistent initials generation
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Migration Notes
|
|
234
|
+
|
|
235
|
+
### Status Dot Implementation:
|
|
236
|
+
|
|
237
|
+
**What changed:** Status dots are implemented with `xpl-badge` (`dot-only` + `bordered`). The `status` prop uses the **badge color palette** (`purple`, `green`, `yellow`, `orange`, `gray`, `red`, `blue`) — the same names as `xpl-badge` `variant` — so avatar status stays consistent with badge semantics.
|
|
238
|
+
|
|
239
|
+
**Impact:**
|
|
240
|
+
|
|
241
|
+
- **Internal markup:** The status dot renders as `<xpl-badge dot-only bordered variant="...">` (with `variant` from `status`), not legacy `.xpl-avatar__dot--` classes.
|
|
242
|
+
- **CSS targeting:** Custom selectors like `.xpl-avatar__dot--active` / `--warning` / `--inactive` are not used. Target `.xpl-avatar .xpl-badge--dot-only` if you must override styles.
|
|
243
|
+
- **Prop values:** Use palette names above. Older examples sometimes used labels like `active` / `warning` / `inactive`; map those concepts to the palette (e.g. available → `green`, caution → `yellow`, offline → `gray`) per your design guidelines.
|
|
244
|
+
|
|
245
|
+
**Recommended migration:**
|
|
246
|
+
|
|
247
|
+
1. Replace custom CSS on `.xpl-avatar__dot--` with `.xpl-avatar .xpl-badge--dot-only` if needed
|
|
248
|
+
2. Set `status` to the badge palette value that matches the intended color (see the status table in this readme)
|
|
249
|
+
3. Remember `status` applies to default, `profile`, and `with-text` only — not `group`
|
|
250
|
+
|
|
251
|
+
### Legacy `status` values — scheduled for removal (next major release)
|
|
252
|
+
|
|
253
|
+
**These legacy string values are deprecated.** They exist only for backward compatibility with older integrations. They **will be removed** in the **next major** version of `@xplortech/apollo-core`. Plan your migration now; do not introduce new usage of the legacy names.
|
|
254
|
+
|
|
255
|
+
| Deprecated `status` | Current mapping (temporary) | Replace with (badge palette) |
|
|
256
|
+
| ------------------- | --------------------------- | ---------------------------- |
|
|
257
|
+
| `active` | `green` | `green` |
|
|
258
|
+
| `inactive` | `gray` | `gray` |
|
|
259
|
+
| `warning` | `red` | `red` |
|
|
260
|
+
|
|
261
|
+
**Why:** Status dots use the same vocabulary as `xpl-badge` variants (`purple`, `green`, `yellow`, `orange`, `gray`, `red`, `blue`). The old semantic aliases (`active` / `warning` / `inactive`) duplicate that meaning with different names and increase maintenance cost, so they are being dropped from the public API.
|
|
262
|
+
|
|
263
|
+
**Action items before the major release:**
|
|
264
|
+
|
|
265
|
+
1. Search your codebase for `status="active"`, `status="inactive"`, and `status="warning"` on `<xpl-avatar>` (and framework wrappers).
|
|
266
|
+
2. Replace each with the **`green`**, **`gray`**, or **`red`** value from the table above, matching your product intent.
|
|
267
|
+
3. Re-test visuals: the mapped colors are unchanged today; after removal, only palette names will be accepted.
|
|
268
|
+
|
|
269
|
+
### Component Dependency
|
|
270
|
+
|
|
271
|
+
This component now depends on `xpl-badge`. Ensure `xpl-badge` is loaded in your application when using avatars with status dots.
|
|
5
272
|
|
|
6
|
-
There are 10 avatar faces and 10 corresponding colors. We suggest randomly generating placeholder colors to show a visual differentiator when multiple avatars or an avatar group is displayed.
|
|
7
273
|
|
|
8
274
|
<!-- Auto Generated Below -->
|
|
9
275
|
|
|
10
276
|
|
|
11
277
|
## Properties
|
|
12
278
|
|
|
13
|
-
| Property
|
|
14
|
-
|
|
|
15
|
-
| `color`
|
|
16
|
-
| `disabled`
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
279
|
+
| Property | Attribute | Description | Type | Default |
|
|
280
|
+
| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
281
|
+
| `color` | `color` | Background color when there is no image src | `"green" \| "pink" \| "primary" \| "secondary" \| "yellow"` | `undefined` |
|
|
282
|
+
| `disabled` | `disabled` | Sets a disabled state on the avatar when set to true | `boolean` | `false` |
|
|
283
|
+
| `groupData` | `group-data` | When `variant` is `group`, data for each face (max 4 visible + overflow count). Each item: { src?, name?, color? }. | `AvatarGroupItem[] \| string` | `undefined` |
|
|
284
|
+
| `href` | `href` | The URL if the avatar should be hyperlinked | `string` | `undefined` |
|
|
285
|
+
| `name` | `name` | Alt text for the image; also used for initials when no image and no slot. | `string` | `undefined` |
|
|
286
|
+
| `size` | `size` | Size of the avatar (and of each avatar in a group). | `"md" \| "sm"` | `undefined` |
|
|
287
|
+
| `src` | `src` | The image URL | `string` | `undefined` |
|
|
288
|
+
| `status` | `status` | <span style="color:red">**[DEPRECATED]**</span> :** `active`, `warning`, and `inactive` still map to `green`, `red`, and `gray` for existing consumers. Prefer palette names; legacy values are scheduled for removal in the next **major** release.<br/><br/>Shown for the default avatar, `profile`, and `with-text`; not shown when `variant` is `group`. **Legacy | `"active" \| "blue" \| "gray" \| "green" \| "inactive" \| "orange" \| "purple" \| "red" \| "warning" \| "yellow"` | `undefined` |
|
|
289
|
+
| `subText` | `sub-text` | Secondary text shown when `variant` is `with-text` (e.g. email). | `string` | `undefined` |
|
|
290
|
+
| `target` | `target` | Where to open the URL chosen for the `href` prop: `_self` (default), `_blank`, `_parent`, or `_top` | `string` | `undefined` |
|
|
291
|
+
| `variant` | `variant` | Optional layout: `profile` (large profile sizes), `group` (stacked faces + `groupData`; `status` not shown), `with-text` (avatar with `name` / `subText` beside it). Omit for the default single avatar. | `"group" \| "profile" \| "with-text"` | `undefined` |
|
|
23
292
|
|
|
24
293
|
|
|
25
294
|
## Dependencies
|
|
26
295
|
|
|
27
296
|
### Used by
|
|
28
297
|
|
|
29
|
-
- [xpl-list](../xpl-list)
|
|
298
|
+
- [xpl-list-item](../xpl-list/xpl-list-item)
|
|
299
|
+
|
|
300
|
+
### Depends on
|
|
301
|
+
|
|
302
|
+
- [xpl-badge](../xpl-badge)
|
|
30
303
|
|
|
31
304
|
### Graph
|
|
32
305
|
```mermaid
|
|
33
306
|
graph TD;
|
|
34
|
-
xpl-
|
|
307
|
+
xpl-avatar --> xpl-badge
|
|
308
|
+
xpl-list-item --> xpl-avatar
|
|
35
309
|
style xpl-avatar fill:#f9f,stroke:#333,stroke-width:4px
|
|
36
310
|
```
|
|
37
311
|
|
|
@@ -13,7 +13,11 @@ Badges support multiple **variants** (colors), **sizes**, **shapes**, and **dot
|
|
|
13
13
|
<xpl-badge variant="gray" size="small">Draft</xpl-badge>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Attach badges close to the item they describe (a label, row, chip, or control)
|
|
16
|
+
Attach badges close to the item they describe (a label, row, chip, or control). Prefer **short labels** (often one or two words) for readability.
|
|
17
|
+
|
|
18
|
+
### Label text and overflow
|
|
19
|
+
|
|
20
|
+
Slot content is rendered inside an internal `.xpl-badge__label` wrapper (you do not add this in your markup). Labels are **single-line**: text does not wrap to multiple lines. When horizontal space is tight (for example a narrow column or flex layout), overflowing text **truncates with an ellipsis** (`…`). The host respects the parent width (`max-width: 100%`). If truncation makes a label hard to read, shorten the copy or widen the layout; use a tooltip or similar only if your product needs the full string on hover.
|
|
17
21
|
|
|
18
22
|
## Sizes & shapes
|
|
19
23
|
|
|
@@ -44,17 +48,16 @@ Set `dot` to add a colored dot before the text, inside the pill:
|
|
|
44
48
|
### Dot-only badge (compact status / count)
|
|
45
49
|
|
|
46
50
|
> [!IMPORTANT]
|
|
47
|
-
>
|
|
51
|
+
> Dot-only badges are meant to be used with **numeric values** (or very short strings). For longer text labels, use the standard badge (without `dot-only`).
|
|
48
52
|
|
|
49
|
-
- When overlaying another element with a background color, use the `bordered` property
|
|
53
|
+
- When overlaying another element with a background color, use the `bordered` property so the badge separates clearly from what is behind it.
|
|
50
54
|
|
|
51
55
|
Set `dot-only` when you want a badge built around the dot:
|
|
52
56
|
|
|
53
57
|
- With **no children**: renders a small circular status dot.
|
|
54
|
-
- With **children**: renders a compact pill with
|
|
55
|
-
- **
|
|
56
|
-
|
|
57
|
-
- This version now have `bordered` prop that can be used to toggle the border around dot badge for better separation from avatar or wherever it is being used.
|
|
58
|
+
- With **children**: renders a compact pill with text or a number inside (for example an unread count).
|
|
59
|
+
- **Notification-style counts** are often appended to a label or another component. Dot-only label text follows the same **single-line truncation** rules as standard badges when space is limited.
|
|
60
|
+
- Use **`bordered`** to toggle a ring around the dot badge for separation from an avatar or similar surface.
|
|
58
61
|
|
|
59
62
|
```html
|
|
60
63
|
<!-- Status dot only -->
|
|
@@ -108,12 +111,14 @@ The legacy semantic names `success`, `warning`, `inactive`, and `error` are stil
|
|
|
108
111
|
|
|
109
112
|
### Used by
|
|
110
113
|
|
|
111
|
-
- [xpl-
|
|
114
|
+
- [xpl-avatar](../xpl-avatar)
|
|
115
|
+
- [xpl-list-item](../xpl-list/xpl-list-item)
|
|
112
116
|
|
|
113
117
|
### Graph
|
|
114
118
|
```mermaid
|
|
115
119
|
graph TD;
|
|
116
|
-
xpl-
|
|
120
|
+
xpl-avatar --> xpl-badge
|
|
121
|
+
xpl-list-item --> xpl-badge
|
|
117
122
|
style xpl-badge fill:#f9f,stroke:#333,stroke-width:4px
|
|
118
123
|
```
|
|
119
124
|
|
|
@@ -2,17 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
Banners display a system level or page level message at the top of the screen. The section-banner variant displays important messages inline within a section.
|
|
4
4
|
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Web component (`<xpl-banner>`)
|
|
8
|
+
|
|
9
|
+
Bar layout (default) with heading, description, primary action, and dismiss:
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<xpl-banner
|
|
13
|
+
appearance="information"
|
|
14
|
+
heading="Your session will expire soon."
|
|
15
|
+
description="Save your work to avoid losing changes."
|
|
16
|
+
action-text="Extend session"
|
|
17
|
+
is-dismissible="true"
|
|
18
|
+
></xpl-banner>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Section layout with optional secondary action and no leading icon:
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<xpl-banner
|
|
25
|
+
appearance="positive"
|
|
26
|
+
is-section="true"
|
|
27
|
+
has-icon="false"
|
|
28
|
+
heading="Changes saved"
|
|
29
|
+
description="Your updates are stored."
|
|
30
|
+
action-text="View details"
|
|
31
|
+
secondary-action-text="Undo"
|
|
32
|
+
></xpl-banner>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Plain HTML (BEM classes)
|
|
36
|
+
|
|
37
|
+
Use the same structure when styling with `banner.css` without the Stencil component. Switch bar vs section with host modifiers (`xpl-banner--section`, `xpl-banner--no-icon`, `xpl-banner--{appearance}`).
|
|
38
|
+
|
|
5
39
|
## Accessibility
|
|
6
40
|
|
|
7
|
-
`xpl-banner`
|
|
8
|
-
(e.g. "Information banner", "Positive banner", "Warning banner", "Error banner"). This makes the banner a navigable ARIA
|
|
9
|
-
landmark so assistive-technology users can locate and identify it without reading the full message content.
|
|
41
|
+
`xpl-banner` uses `role="region"` so the banner is a navigable landmark.
|
|
10
42
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
43
|
+
**`aria-label` on the host (never empty):**
|
|
44
|
+
|
|
45
|
+
| Layout | `aria-label` source |
|
|
46
|
+
| ------ | ------------------- |
|
|
47
|
+
| Bar (default) | Fixed label from `appearance`: `"Information banner"`, `"Positive banner"`, `"Warning banner"`, or `"Error banner"`. |
|
|
48
|
+
| Section | Trimmed `heading` when present; otherwise `"Section banner"`. |
|
|
49
|
+
|
|
50
|
+
Keyboard: **Tab** moves focus to action buttons and the dismiss control; **Enter** and **Space** activate `xpl-button` actions and the dismiss button. Focus rings use `:focus-visible` (dismiss uses appearance-specific outline tokens in CSS; actions use `xpl-button` focus styles).
|
|
51
|
+
|
|
52
|
+
- The leading icon wrapper carries `aria-hidden="true"` — the icon is decorative; the message text is the accessible content.
|
|
53
|
+
- The dismiss `<xpl-icon>` inside the dismiss button also carries `aria-hidden="true"` so the decorative icon is not announced in addition to the button label.
|
|
54
|
+
- The dismiss button `aria-label` is `"Dismiss banner"` in bar layout and `"Dismiss section banner"` when `is-section` is true.
|
|
16
55
|
|
|
17
56
|
## Token Use
|
|
18
57
|
|
|
@@ -83,9 +122,7 @@ Set `is-section` to render the section-banner layout:
|
|
|
83
122
|
|
|
84
123
|
Set `has-icon="false"` to hide the leading icon in the section layout. This applies `xpl-banner--no-icon` on the host, which shifts heading, description, and actions to start in the first grid column instead of the second. In bar layout the icon always renders regardless of `hasIcon`.
|
|
85
124
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Both the bar and section variants share the same DOM structure. Switch between them using only a class on the host:
|
|
125
|
+
Bar and section variants share the same DOM shape. Plain-HTML example (classes only):
|
|
89
126
|
|
|
90
127
|
```html
|
|
91
128
|
<!-- Bar variant -->
|