@xplortech/apollo-core 2.6.0 → 2.7.1
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 +626 -35
- package/build/style.css +5949 -3070
- package/dist/apollo-core/apollo-core.css +29 -19
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-0bf50890.entry.js +1 -0
- package/dist/apollo-core/p-1947e7a8.entry.js +1 -0
- package/dist/apollo-core/p-27928cb0.entry.js +1 -0
- package/dist/apollo-core/{p-5549756c.entry.js → p-34438721.entry.js} +1 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +1 -0
- package/dist/apollo-core/p-368c81f1.entry.js +1 -0
- package/dist/apollo-core/{p-f5af9539.entry.js → p-36ba29da.entry.js} +1 -1
- package/dist/apollo-core/p-406b27a8.entry.js +1 -0
- package/dist/apollo-core/p-5d63b4ce.entry.js +1 -0
- package/dist/apollo-core/{p-02167464.entry.js → p-6a15f1e0.entry.js} +1 -1
- package/dist/apollo-core/p-8d692d05.entry.js +1 -0
- package/dist/apollo-core/{p-C_Z2nG0p.js → p-C7bgJs6C.js} +2 -2
- package/dist/apollo-core/{p-42016063.entry.js → p-b61d7952.entry.js} +1 -1
- package/dist/apollo-core/{p-8a1affce.entry.js → p-ca127ee8.entry.js} +1 -1
- package/dist/apollo-core/p-d1c9c233.entry.js +1 -0
- package/dist/apollo-core/p-dc205893.entry.js +1 -0
- package/dist/apollo-core/p-e2a5d41c.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-DH6pgWru.js → index-BQ97-AWw.js} +18 -7
- 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_54.cjs.entry.js} +3726 -536
- 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-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 +4 -4
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +11 -5
- 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 +25 -3
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +77 -7
- 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 +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/pagination.stories.js +18 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +7 -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 +58 -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/xpl-table.js +5 -5
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- 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/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-header.js +1 -1
- 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 +12 -11
- package/dist/docs/xpl-divider/readme.md +6 -4
- package/dist/docs/xpl-dropdown/readme.md +14 -12
- package/dist/docs/xpl-icon/readme.md +14 -2
- 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 +19 -16
- 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-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 -8
- 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_54.entry.js} +3719 -536
- 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-table-header-cell.entry.js +1 -1
- package/dist/esm/xpl-table-header.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 +2 -1
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +5 -0
- 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-pagination/pagination.stories.d.ts +13 -0
- 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-select/xpl-select.d.ts +3 -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-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 +1521 -83
- package/dist/types/utils/lifecycle.d.ts +16 -0
- package/dist/types/utils/tab-a11y-ids.d.ts +4 -0
- package/package.json +12 -3
- package/dist/apollo-core/p-0bce3874.entry.js +0 -1
- package/dist/apollo-core/p-1fd3dc87.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/cjs/xpl-list.cjs.entry.js +0 -32
- package/dist/collection/components/xpl-progress/progress.stories.js +0 -106
- package/dist/collection/components/xpl-progress/xpl-progress.js +0 -60
- package/dist/components/xpl-progress.js +0 -1
- package/dist/docs/xpl-progress/readme.md +0 -22
- package/dist/esm/xpl-list.entry.js +0 -30
- package/dist/types/components/xpl-progress/progress.stories.d.ts +0 -38
- package/dist/types/components/xpl-progress/xpl-progress.d.ts +0 -6
|
@@ -1,16 +1,153 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
const LEGACY_STATUS_TO_BADGE = {
|
|
3
|
+
active: 'green',
|
|
4
|
+
inactive: 'gray',
|
|
5
|
+
warning: 'red',
|
|
6
|
+
};
|
|
7
|
+
const MAX_GROUP_VISIBLE = 4;
|
|
8
|
+
const MAX_INITIALS = 3;
|
|
9
|
+
function getInitials(name) {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
if (!name || !name.trim())
|
|
12
|
+
return '';
|
|
13
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
14
|
+
if (parts.length === 0)
|
|
15
|
+
return '';
|
|
16
|
+
if (parts.length === 1)
|
|
17
|
+
return parts[0].slice(0, MAX_INITIALS).toUpperCase();
|
|
18
|
+
const first = (_a = parts[0][0]) !== null && _a !== void 0 ? _a : '';
|
|
19
|
+
const last = (_b = parts[parts.length - 1][0]) !== null && _b !== void 0 ? _b : '';
|
|
20
|
+
const mid = parts.length > 2 ? ((_c = parts[1][0]) !== null && _c !== void 0 ? _c : '') : '';
|
|
21
|
+
return (first + mid + last).slice(0, MAX_INITIALS).toUpperCase();
|
|
22
|
+
}
|
|
23
|
+
function formatRemainingCount(n) {
|
|
24
|
+
if (n <= 0)
|
|
25
|
+
return '';
|
|
26
|
+
if (n <= 999)
|
|
27
|
+
return `+${n}`;
|
|
28
|
+
const rounded = Math.round(n / 500) * 500;
|
|
29
|
+
const k = rounded / 1000;
|
|
30
|
+
const label = k % 1 === 0 ? `${k}k` : `${k.toFixed(1)}k`;
|
|
31
|
+
return `+${label}`;
|
|
32
|
+
}
|
|
2
33
|
export class Avatar {
|
|
3
34
|
constructor() {
|
|
35
|
+
this.cachedGroupItems = [];
|
|
36
|
+
this.cachedSlotContent = '';
|
|
4
37
|
this.disabled = false;
|
|
5
38
|
}
|
|
39
|
+
onGroupDataChange(newValue) {
|
|
40
|
+
this.cachedGroupItems = Avatar.parseGroupData(newValue);
|
|
41
|
+
}
|
|
42
|
+
componentWillLoad() {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
this.cachedSlotContent = (_c = (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim().slice(0, MAX_INITIALS)) !== null && _c !== void 0 ? _c : '';
|
|
45
|
+
this.onGroupDataChange(this.groupData);
|
|
46
|
+
}
|
|
47
|
+
static parseGroupData(raw) {
|
|
48
|
+
if (raw == null)
|
|
49
|
+
return [];
|
|
50
|
+
if (typeof raw === 'string') {
|
|
51
|
+
try {
|
|
52
|
+
const parsed = JSON.parse(raw);
|
|
53
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
54
|
+
}
|
|
55
|
+
catch (_a) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return Array.isArray(raw) ? raw : [];
|
|
60
|
+
}
|
|
61
|
+
get groupItems() {
|
|
62
|
+
return this.cachedGroupItems;
|
|
63
|
+
}
|
|
64
|
+
get statusBadgeVariant() {
|
|
65
|
+
var _a;
|
|
66
|
+
const s = this.status;
|
|
67
|
+
if (s === undefined)
|
|
68
|
+
return undefined;
|
|
69
|
+
return ((_a = LEGACY_STATUS_TO_BADGE[s]) !== null && _a !== void 0 ? _a : s);
|
|
70
|
+
}
|
|
71
|
+
getPlaceholderText() {
|
|
72
|
+
if (this.cachedSlotContent.length > 0)
|
|
73
|
+
return this.cachedSlotContent;
|
|
74
|
+
return getInitials(this.name);
|
|
75
|
+
}
|
|
76
|
+
static getSingleAvatarClasses(size, color, isProfileSize, disabled) {
|
|
77
|
+
return {
|
|
78
|
+
'xpl-avatar': true,
|
|
79
|
+
[`xpl-avatar--${size}`]: !!size,
|
|
80
|
+
[`xpl-avatar--${color}`]: !!color,
|
|
81
|
+
'xpl-avatar--profile': !!isProfileSize,
|
|
82
|
+
'xpl-avatar--disabled': !!disabled,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
getAnchorProps(className) {
|
|
86
|
+
var _a;
|
|
87
|
+
return {
|
|
88
|
+
href: this.href,
|
|
89
|
+
target: this.target,
|
|
90
|
+
rel: this.target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
91
|
+
'aria-label': (_a = this.name) !== null && _a !== void 0 ? _a : 'Profile',
|
|
92
|
+
class: className,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static renderAvatarMedia(src, name, placeholderText, ariaLabelFallback, showSlot = true) {
|
|
96
|
+
if (src) {
|
|
97
|
+
return h("img", { alt: name !== null && name !== void 0 ? name : '', src: src });
|
|
98
|
+
}
|
|
99
|
+
return (h("div", { class: "xpl-avatar__placeholder", role: "img", "aria-label": name !== null && name !== void 0 ? name : ariaLabelFallback }, placeholderText || (showSlot ? h("slot", null) : null)));
|
|
100
|
+
}
|
|
101
|
+
renderAvatarMediaWithStatusBadge(wrapperClass) {
|
|
102
|
+
const placeholderText = this.getPlaceholderText();
|
|
103
|
+
return (h("div", Object.assign({}, (wrapperClass ? { class: wrapperClass } : {})), Avatar.renderAvatarMedia(this.src, this.name, placeholderText, 'Profile', true), this.statusBadgeVariant && (h("xpl-badge", { dotOnly: true, bordered: true, variant: this.statusBadgeVariant, "aria-hidden": "true" }))));
|
|
104
|
+
}
|
|
105
|
+
renderGroupItem(item, index) {
|
|
106
|
+
const placeholderText = item.name ? getInitials(item.name) : '';
|
|
107
|
+
return (h("div", { class: {
|
|
108
|
+
'xpl-avatar-group__item': true,
|
|
109
|
+
'xpl-avatar': true,
|
|
110
|
+
[`xpl-avatar--${this.size}`]: !!this.size,
|
|
111
|
+
[`xpl-avatar--${item.color}`]: !!item.color,
|
|
112
|
+
} }, h("div", null, Avatar.renderAvatarMedia(item.src, item.name, placeholderText, `Member ${index + 1}`, false))));
|
|
113
|
+
}
|
|
114
|
+
renderWithTextContent() {
|
|
115
|
+
return (h("div", { class: "xpl-avatar__with-text-content" }, h("div", { class: "xpl-avatar__with-text-name" }, this.name), this.subText && h("div", { class: "xpl-avatar__with-text-sub" }, this.subText)));
|
|
116
|
+
}
|
|
6
117
|
render() {
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
118
|
+
const v = this.variant;
|
|
119
|
+
if (v === 'group') {
|
|
120
|
+
const items = this.groupItems;
|
|
121
|
+
const visible = items.slice(0, MAX_GROUP_VISIBLE);
|
|
122
|
+
const remaining = items.length - MAX_GROUP_VISIBLE;
|
|
123
|
+
const showCount = remaining > 0;
|
|
124
|
+
const countLabel = showCount ? formatRemainingCount(remaining) : '';
|
|
125
|
+
return (h(Host, null, h("div", { class: {
|
|
126
|
+
'xpl-avatar-group': true,
|
|
127
|
+
[`xpl-avatar-group--${this.size}`]: !!this.size,
|
|
128
|
+
}, role: "group", "aria-label": `${items.length} members` }, visible.map((item, i) => (h("div", { key: i, class: "xpl-avatar-group__wrap" }, this.renderGroupItem(item, i)))), showCount && (h("div", { class: {
|
|
129
|
+
'xpl-avatar-group__count': true,
|
|
130
|
+
[`xpl-avatar-group__count--${this.size}`]: !!this.size,
|
|
131
|
+
}, "aria-label": `${remaining} more` }, countLabel)))));
|
|
132
|
+
}
|
|
133
|
+
if (v === 'with-text') {
|
|
134
|
+
const avatarBlock = this.renderAvatarMediaWithStatusBadge('xpl-avatar__with-text-avatar');
|
|
135
|
+
const withTextClasses = {
|
|
136
|
+
'xpl-avatar': true,
|
|
137
|
+
'xpl-avatar--with-text': true,
|
|
138
|
+
[`xpl-avatar--${this.color}`]: !!this.color,
|
|
139
|
+
'xpl-avatar--disabled': !!this.disabled,
|
|
140
|
+
};
|
|
141
|
+
return (h(Host, null, this.href && !this.disabled ? (h("a", Object.assign({}, this.getAnchorProps('xpl-avatar__with-text-link')), h("div", { class: withTextClasses }, avatarBlock, this.renderWithTextContent()))) : (h("div", { class: withTextClasses, "aria-disabled": this.disabled ? 'true' : undefined }, avatarBlock, this.renderWithTextContent()))));
|
|
142
|
+
}
|
|
143
|
+
const isProfile = v === 'profile';
|
|
144
|
+
const singleSize = isProfile && this.size === 'md' ? undefined : this.size;
|
|
145
|
+
const singleClasses = Avatar.getSingleAvatarClasses(singleSize, this.color, isProfile, this.disabled);
|
|
146
|
+
const content = this.renderAvatarMediaWithStatusBadge();
|
|
147
|
+
if (this.href && !this.disabled) {
|
|
148
|
+
return (h(Host, null, h("a", Object.assign({}, this.getAnchorProps(singleClasses)), content)));
|
|
149
|
+
}
|
|
150
|
+
return (h(Host, null, h("div", { class: singleClasses, "aria-disabled": this.disabled ? 'true' : undefined }, content)));
|
|
14
151
|
}
|
|
15
152
|
static get is() { return "xpl-avatar"; }
|
|
16
153
|
static get properties() {
|
|
@@ -19,9 +156,15 @@ export class Avatar {
|
|
|
19
156
|
"type": "string",
|
|
20
157
|
"mutable": false,
|
|
21
158
|
"complexType": {
|
|
22
|
-
"original": "
|
|
159
|
+
"original": "AvatarColor",
|
|
23
160
|
"resolved": "\"green\" | \"pink\" | \"primary\" | \"secondary\" | \"yellow\"",
|
|
24
|
-
"references": {
|
|
161
|
+
"references": {
|
|
162
|
+
"AvatarColor": {
|
|
163
|
+
"location": "local",
|
|
164
|
+
"path": "/home/runner/work/apollo/apollo/packages/apollo-core/src/components/components/xpl-avatar/xpl-avatar.tsx",
|
|
165
|
+
"id": "src/components/components/xpl-avatar/xpl-avatar.tsx::AvatarColor"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
25
168
|
},
|
|
26
169
|
"required": false,
|
|
27
170
|
"optional": true,
|
|
@@ -54,6 +197,31 @@ export class Avatar {
|
|
|
54
197
|
"attribute": "disabled",
|
|
55
198
|
"defaultValue": "false"
|
|
56
199
|
},
|
|
200
|
+
"groupData": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"mutable": false,
|
|
203
|
+
"complexType": {
|
|
204
|
+
"original": "AvatarGroupItem[] | string",
|
|
205
|
+
"resolved": "AvatarGroupItem[] | string",
|
|
206
|
+
"references": {
|
|
207
|
+
"AvatarGroupItem": {
|
|
208
|
+
"location": "local",
|
|
209
|
+
"path": "/home/runner/work/apollo/apollo/packages/apollo-core/src/components/components/xpl-avatar/xpl-avatar.tsx",
|
|
210
|
+
"id": "src/components/components/xpl-avatar/xpl-avatar.tsx::AvatarGroupItem"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"required": false,
|
|
215
|
+
"optional": true,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": "When `variant` is `group`, data for each face (max 4 visible + overflow count). Each item: { src?, name?, color? }."
|
|
219
|
+
},
|
|
220
|
+
"getter": false,
|
|
221
|
+
"setter": false,
|
|
222
|
+
"reflect": false,
|
|
223
|
+
"attribute": "group-data"
|
|
224
|
+
},
|
|
57
225
|
"href": {
|
|
58
226
|
"type": "string",
|
|
59
227
|
"mutable": false,
|
|
@@ -85,7 +253,7 @@ export class Avatar {
|
|
|
85
253
|
"optional": true,
|
|
86
254
|
"docs": {
|
|
87
255
|
"tags": [],
|
|
88
|
-
"text": "Alt text for the image
|
|
256
|
+
"text": "Alt text for the image; also used for initials when no image and no slot."
|
|
89
257
|
},
|
|
90
258
|
"getter": false,
|
|
91
259
|
"setter": false,
|
|
@@ -104,7 +272,7 @@ export class Avatar {
|
|
|
104
272
|
"optional": true,
|
|
105
273
|
"docs": {
|
|
106
274
|
"tags": [],
|
|
107
|
-
"text": "Size of the avatar"
|
|
275
|
+
"text": "Size of the avatar (and of each avatar in a group)."
|
|
108
276
|
},
|
|
109
277
|
"getter": false,
|
|
110
278
|
"setter": false,
|
|
@@ -134,20 +302,48 @@ export class Avatar {
|
|
|
134
302
|
"type": "string",
|
|
135
303
|
"mutable": false,
|
|
136
304
|
"complexType": {
|
|
137
|
-
"original": "
|
|
138
|
-
"resolved": "\"active\" | \"inactive\" | \"warning\"",
|
|
305
|
+
"original": "AvatarStatus",
|
|
306
|
+
"resolved": "\"active\" | \"blue\" | \"gray\" | \"green\" | \"inactive\" | \"orange\" | \"purple\" | \"red\" | \"warning\" | \"yellow\"",
|
|
307
|
+
"references": {
|
|
308
|
+
"AvatarStatus": {
|
|
309
|
+
"location": "local",
|
|
310
|
+
"path": "/home/runner/work/apollo/apollo/packages/apollo-core/src/components/components/xpl-avatar/xpl-avatar.tsx",
|
|
311
|
+
"id": "src/components/components/xpl-avatar/xpl-avatar.tsx::AvatarStatus"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"required": false,
|
|
316
|
+
"optional": true,
|
|
317
|
+
"docs": {
|
|
318
|
+
"tags": [{
|
|
319
|
+
"name": "deprecated",
|
|
320
|
+
"text": ":** `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."
|
|
321
|
+
}],
|
|
322
|
+
"text": "Shown for the default avatar, `profile`, and `with-text`; not shown when `variant` is `group`.\n**Legacy"
|
|
323
|
+
},
|
|
324
|
+
"getter": false,
|
|
325
|
+
"setter": false,
|
|
326
|
+
"reflect": false,
|
|
327
|
+
"attribute": "status"
|
|
328
|
+
},
|
|
329
|
+
"subText": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "string",
|
|
334
|
+
"resolved": "string",
|
|
139
335
|
"references": {}
|
|
140
336
|
},
|
|
141
337
|
"required": false,
|
|
142
338
|
"optional": true,
|
|
143
339
|
"docs": {
|
|
144
340
|
"tags": [],
|
|
145
|
-
"text": "
|
|
341
|
+
"text": "Secondary text shown when `variant` is `with-text` (e.g. email)."
|
|
146
342
|
},
|
|
147
343
|
"getter": false,
|
|
148
344
|
"setter": false,
|
|
149
345
|
"reflect": false,
|
|
150
|
-
"attribute": "
|
|
346
|
+
"attribute": "sub-text"
|
|
151
347
|
},
|
|
152
348
|
"target": {
|
|
153
349
|
"type": "string",
|
|
@@ -167,7 +363,45 @@ export class Avatar {
|
|
|
167
363
|
"setter": false,
|
|
168
364
|
"reflect": false,
|
|
169
365
|
"attribute": "target"
|
|
366
|
+
},
|
|
367
|
+
"variant": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"mutable": false,
|
|
370
|
+
"complexType": {
|
|
371
|
+
"original": "AvatarVariant",
|
|
372
|
+
"resolved": "\"group\" | \"profile\" | \"with-text\"",
|
|
373
|
+
"references": {
|
|
374
|
+
"AvatarVariant": {
|
|
375
|
+
"location": "local",
|
|
376
|
+
"path": "/home/runner/work/apollo/apollo/packages/apollo-core/src/components/components/xpl-avatar/xpl-avatar.tsx",
|
|
377
|
+
"id": "src/components/components/xpl-avatar/xpl-avatar.tsx::AvatarVariant"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"required": false,
|
|
382
|
+
"optional": true,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "Optional layout: `profile` (large profile sizes), `group` (stacked faces + `groupData`; `status` not shown),\n`with-text` (avatar with `name` / `subText` beside it). Omit for the default single avatar."
|
|
386
|
+
},
|
|
387
|
+
"getter": false,
|
|
388
|
+
"setter": false,
|
|
389
|
+
"reflect": false,
|
|
390
|
+
"attribute": "variant"
|
|
170
391
|
}
|
|
171
392
|
};
|
|
172
393
|
}
|
|
394
|
+
static get states() {
|
|
395
|
+
return {
|
|
396
|
+
"cachedGroupItems": {},
|
|
397
|
+
"cachedSlotContent": {}
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
static get elementRef() { return "el"; }
|
|
401
|
+
static get watchers() {
|
|
402
|
+
return [{
|
|
403
|
+
"propName": "groupData",
|
|
404
|
+
"methodName": "onGroupDataChange"
|
|
405
|
+
}];
|
|
406
|
+
}
|
|
173
407
|
}
|
|
@@ -4,7 +4,7 @@ export class Backdrop {
|
|
|
4
4
|
this.relative = false;
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '072fedf411c5d8671ec2d8a6ff639e5adf93e15c', class: {
|
|
8
8
|
'xpl-backdrop': true,
|
|
9
9
|
'xpl-backdrop--fixed': !this.relative,
|
|
10
10
|
'xpl-backdrop--relative': this.relative,
|
|
@@ -87,37 +87,5 @@ Badge.parameters = Object.assign(Object.assign({}, commonParameters), { 'web-com
|
|
|
87
87
|
return `<xpl-badge ${attrs}>${(_a = args.text) !== null && _a !== void 0 ? _a : ''}</xpl-badge>`;
|
|
88
88
|
})(),
|
|
89
89
|
}, html: {
|
|
90
|
-
render: `<div class="xpl-badge xpl-badge--dot xpl-badge--purple xpl-badge--size-default xpl-badge--shape-rounded">Badge</div>`,
|
|
91
|
-
} });
|
|
92
|
-
const PALETTE = ['purple', 'green', 'yellow', 'orange', 'gray', 'red', 'blue'];
|
|
93
|
-
export const AllVariants = () => `
|
|
94
|
-
<div style="padding: 2rem; max-width: 56rem;">
|
|
95
|
-
<h3 style="margin: 0 0 1rem; font: inherit; font-weight: 600; color: var(--xpl-text-default);">Palette (pill)</h3>
|
|
96
|
-
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
97
|
-
${PALETTE.map((v) => `<xpl-badge variant="${v}">${v}</xpl-badge>`).join('')}
|
|
98
|
-
</div>
|
|
99
|
-
<h3 style="margin: 0 0 1rem; font: inherit; font-weight: 600; color: var(--xpl-text-default);">With dot</h3>
|
|
100
|
-
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
101
|
-
${PALETTE.map((v) => `<xpl-badge variant="${v}" dot>Label</xpl-badge>`).join('')}
|
|
102
|
-
</div>
|
|
103
|
-
<h3 style="margin: 0 0 1rem; font: inherit; font-weight: 600; color: var(--xpl-text-default);">Dot-only</h3>
|
|
104
|
-
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
105
|
-
${PALETTE.map((v) => `<xpl-badge variant="${v}" dot-only>3</xpl-badge>`).join('')}
|
|
106
|
-
</div>
|
|
107
|
-
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
108
|
-
${PALETTE.map((v) => `<xpl-badge variant="${v}" dot-only></xpl-badge>`).join('')}
|
|
109
|
-
</div>
|
|
110
|
-
<h3 style="margin: 0 0 1rem; font: inherit; font-weight: 600; color: var(--xpl-text-default);">Legacy semantic → mapped</h3>
|
|
111
|
-
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
|
|
112
|
-
<xpl-badge variant="success" dot>success</xpl-badge>
|
|
113
|
-
<xpl-badge variant="warning" dot>warning</xpl-badge>
|
|
114
|
-
<xpl-badge variant="inactive" dot>inactive</xpl-badge>
|
|
115
|
-
<xpl-badge variant="error" dot>error</xpl-badge>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
`;
|
|
119
|
-
AllVariants.parameters = Object.assign(Object.assign({}, commonParameters), { controls: { disable: true }, 'web-component': {
|
|
120
|
-
render: '<!-- See canvas: AllVariants gallery -->',
|
|
121
|
-
}, html: {
|
|
122
|
-
render: '<!-- See canvas: AllVariants gallery -->',
|
|
90
|
+
render: `<div class="xpl-badge xpl-badge--dot xpl-badge--purple xpl-badge--size-default xpl-badge--shape-rounded"><span class="xpl-badge__label">Badge</span></div>`,
|
|
123
91
|
} });
|
|
@@ -27,7 +27,7 @@ export class Badge {
|
|
|
27
27
|
[`xpl-badge--size-${this.size}`]: !!this.size,
|
|
28
28
|
[`xpl-badge--shape-${this.shape}`]: !this.dotOnly && !!this.shape,
|
|
29
29
|
};
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'f1a45af398443a5330afe856ac2442aa34cadf24' }, h("div", { key: 'fecb691b2b11414de0a03e119dd63332ade79a3c', class: className }, h("span", { key: '6c4169ea3d4f0f7cdaa03841ec72ac15f9e209f3', class: "xpl-badge__label" }, h("slot", { key: 'c7d96b70e9bcd161c279bf943c2cbc7248e2a53e' })))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "xpl-badge"; }
|
|
33
33
|
static get properties() {
|
|
@@ -38,8 +38,9 @@ export class Banner {
|
|
|
38
38
|
}
|
|
39
39
|
getAriaLabel() {
|
|
40
40
|
var _a;
|
|
41
|
-
if (this.isSection)
|
|
41
|
+
if (this.isSection) {
|
|
42
42
|
return ((_a = this.heading) === null || _a === void 0 ? void 0 : _a.trim()) || 'Section banner';
|
|
43
|
+
}
|
|
43
44
|
return {
|
|
44
45
|
information: 'Information banner',
|
|
45
46
|
positive: 'Positive banner',
|
|
@@ -55,13 +56,13 @@ export class Banner {
|
|
|
55
56
|
const actionState = this.getActionButtonState();
|
|
56
57
|
const isHeadingPresent = !!((_c = this.heading) === null || _c === void 0 ? void 0 : _c.trim());
|
|
57
58
|
const isDescPresent = !!((_d = this.description) === null || _d === void 0 ? void 0 : _d.trim());
|
|
58
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '373b38c40719c248968ed93381309584f24697a9', class: {
|
|
59
60
|
'xpl-banner': true,
|
|
60
61
|
'xpl-banner--section': this.isSection,
|
|
61
62
|
[`xpl-banner--${this.appearance}`]: true,
|
|
62
63
|
'xpl-banner--truncate-desc': this.truncateDesc,
|
|
63
64
|
'xpl-banner--no-icon': this.isSection && !this.hasIcon,
|
|
64
|
-
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: '
|
|
65
|
+
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: 'b12f8facbdad390e2069374163048099a33aa309', class: "xpl-banner__icon", "aria-hidden": "true" }, h("xpl-icon", { key: '35ee47db756bc0f6b6cd0a2b0cd890a4ec10ff7c', icon: this.getIcon(), size: 24 }))), h("div", { key: '8aaca62cbd7b3cf353bfb35fc2f679932f2b0ade', class: "xpl-banner__body" }, isHeadingPresent && h("p", { key: 'fded85ef43b5186704195312621a33b7b823d19d', class: "xpl-banner__heading" }, this.heading), isDescPresent && (h("p", { key: '1b7386b32891789f8cc425da922f7c3ee60fe5a6', class: "xpl-banner__description", title: this.truncateDesc ? this.description : undefined }, this.description))), (hasAction || hasSecondaryAction) && (h("div", { key: '0b4b8e89db7cc6c4a55e207cf0be1b36956fe243', class: "xpl-banner__actions" }, hasAction && (h("xpl-button", { key: 'c15e5cb0ff332f2ca809dcf912fc7a4c68d47538', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.action.emit() }, this.actionText)), hasSecondaryAction && (h("xpl-button", { key: '6f20f721df8eb994ef9935d2c6f634b3460d9d77', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.secondaryAction.emit() }, this.secondaryActionText)))), this.isDismissible && (h("button", { key: '2fab1fec767aaed2bb36ee2b40bcf84a48ad6ead', class: "xpl-banner__dismiss", type: "button", "aria-label": `Dismiss ${this.isSection ? 'section ' : ''}banner`, onClick: () => this.dismiss.emit() }, h("xpl-icon", { key: '7747d3e4aae5426d0e3344fb7aab92a4f003cf4e', icon: "xmark", size: 24, "aria-hidden": "true" })))));
|
|
65
66
|
}
|
|
66
67
|
static get is() { return "xpl-banner"; }
|
|
67
68
|
static get properties() {
|
package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js
CHANGED
|
@@ -7,7 +7,7 @@ export class BreadcrumbItem {
|
|
|
7
7
|
`;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '98314b8841ba9d900dbba227363865efb26faf4c', class: "xpl-breadcrumb-item", role: "listitem" }, h("li", { key: '26bf86067dc2348b6ca96243bd1f9513ca187a00', role: "none" }, h("slot", { key: '802b606cce1052ea7fb859260627d6c6801ed78f' })), h("span", { key: '22de35338bf4439a23f8c08a7ea46d1d4f2b68e8', innerHTML: this.chevron })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "xpl-breadcrumb-item"; }
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class Breadcrumbs {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '36533f6524e01aed62e293ebe93d8eea34b6b59a' }, h("nav", { key: '6a5562e639044f9d9d12a6365df69c5181f5bbba', class: "xpl-breadcrumbs", "aria-label": "Breadcrumb" }, h("ol", { key: '99463e4808425aa8478a5e8fa2a113831eae1ecf', role: "list" }, h("slot", { key: 'f4d20df3a834f100663786d47881f742c9691969' })))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-breadcrumbs"; }
|
|
7
7
|
}
|
|
@@ -44,7 +44,8 @@ export class Button {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
|
|
47
|
+
var _a;
|
|
48
|
+
return (h(Host, { key: 'fc2207b2f07ecccd8c076846406b7c5d2ed6854d', class: {
|
|
48
49
|
'xpl-button': true,
|
|
49
50
|
[`xpl-button--${this.size}`]: true,
|
|
50
51
|
[`xpl-button--${this.variant}`]: true,
|
|
@@ -54,16 +55,33 @@ export class Button {
|
|
|
54
55
|
'xpl-button--icon-only': this.iconOnly,
|
|
55
56
|
'xpl-button--disabled': this.disabled,
|
|
56
57
|
'xpl-button--loading': this.isLoading && !this.link,
|
|
57
|
-
} }, this.link ? (h("slot", null)) : (h("button", { disabled: this.disabled, onClick: (e) => this.handleLoadingState(e), type: this.isLoading &&
|
|
58
|
+
} }, this.link ? (h("slot", null)) : (h("button", Object.assign({}, ((_a = this.controlAttrs) !== null && _a !== void 0 ? _a : {}), { disabled: this.disabled, onClick: (e) => this.handleLoadingState(e), type: this.isLoading &&
|
|
58
59
|
(this.type === 'submit' ||
|
|
59
60
|
this.type === 'reset' ||
|
|
60
61
|
this.type === undefined)
|
|
61
62
|
? 'button'
|
|
62
|
-
: this.type, name: this.name, value: this.value, form: this.form, "aria-busy": this.isLoading ? 'true' : undefined }, this.icon && h("span", { class: "xpl-button__icon" }, this.renderIcon()), h("slot", null), this.isLoading && (h("span", { class: "xpl-button__loading-overlay", "aria-hidden": "true" }, h("span", { class: "xpl-button__loading-spinner" }, h("xpl-icon", { icon: "loader-4" }))))))));
|
|
63
|
+
: this.type, name: this.name, value: this.value, form: this.form, "aria-busy": this.isLoading ? 'true' : undefined }), this.icon && h("span", { class: "xpl-button__icon" }, this.renderIcon()), h("slot", null), this.isLoading && (h("span", { class: "xpl-button__loading-overlay", "aria-hidden": "true" }, h("span", { class: "xpl-button__loading-spinner" }, h("xpl-icon", { icon: "loader-4" }))))))));
|
|
63
64
|
}
|
|
64
65
|
static get is() { return "xpl-button"; }
|
|
65
66
|
static get properties() {
|
|
66
67
|
return {
|
|
68
|
+
"controlAttrs": {
|
|
69
|
+
"type": "unknown",
|
|
70
|
+
"mutable": false,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "{\n id?: string;\n role?: string;\n 'aria-controls'?: string;\n 'aria-selected'?: 'true' | 'false';\n 'aria-current'?: string;\n }",
|
|
73
|
+
"resolved": "{ id?: string; role?: string; 'aria-controls'?: string; 'aria-selected'?: \"true\" | \"false\"; 'aria-current'?: string; }",
|
|
74
|
+
"references": {}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": true,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": "Attributes to apply to the inner native `<button>` (e.g., tab a11y wiring).\nUse this instead of setting `id` / `role` / `aria-*` on the host when the\ninner control is the element that needs them (e.g., WAI-ARIA composite widgets)."
|
|
81
|
+
},
|
|
82
|
+
"getter": false,
|
|
83
|
+
"setter": false
|
|
84
|
+
},
|
|
67
85
|
"disabled": {
|
|
68
86
|
"type": "boolean",
|
|
69
87
|
"mutable": false,
|
|
@@ -6,7 +6,7 @@ export class ButtonRow {
|
|
|
6
6
|
this.onTertiary = () => this.clickTertiary.emit();
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '184ee5671a9d1bbb967dd8e6e4427df30d62a007', class: "xpl-button-row" }, h("div", { key: '44b583d0899af8b158f7093b87918f0843366e44', class: "xpl-button-row-inner" }, h("div", { key: '31754284b0b87a1e58ccbded4b46b453c3b717ca', class: "xpl-button-row__left" }, this.secondary && (h("xpl-button", { key: '27a9c164af5e72a66380dfda4072cfb5d3b3a34d', variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary))), h("div", { key: '7ba9299532405aa9dceca481dae675a5129d2b51', class: "xpl-button-row__right" }, this.tertiary && (h("xpl-button", { key: 'bcb3524b921e6de30a1f6d870e04eeb9592762bb', variant: "subtle", type: "button", onClick: this.onTertiary }, this.tertiary)), this.secondary && (h("xpl-button", { key: '5e10208c958143476df430b7f9877965b7fadc08', variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary)), this.primary && (h("xpl-button", { key: 'ebb24794d37fd6dce72fa776b97ec59edeaab1dc', class: "xpl-button-row__primary", onClick: this.onPrimary }, this.primary))))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "xpl-button-row"; }
|
|
12
12
|
static get properties() {
|
|
@@ -52,7 +52,7 @@ export class Calendar {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '56cd65b62892b0c3e939f6cd77e9ba507baf4a68', class: "xpl-calendar" }, h("input", { key: '296222d3b6c0bf3e7c400d4d8c40d7d48774ea57', class: "xpl-calendar-input", type: "text", id: this.calendarInputId, ref: (el) => {
|
|
56
56
|
this.inputElement = el;
|
|
57
57
|
} })));
|
|
58
58
|
}
|
|
@@ -3,6 +3,7 @@ import { v4 as uuid } from "uuid";
|
|
|
3
3
|
export class Checkbox {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.id = uuid();
|
|
6
|
+
this.ariaLabel = '';
|
|
6
7
|
this.onChange = (event) => {
|
|
7
8
|
const target = event.target;
|
|
8
9
|
if (this.value) {
|
|
@@ -14,14 +15,15 @@ export class Checkbox {
|
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
|
-
|
|
18
|
+
var _a;
|
|
19
|
+
return (h(Host, { key: 'a73acf5a3394c8f1060f9095682093a1db3b09db', class: {
|
|
18
20
|
'xpl-checkbox-radio-container': true,
|
|
19
21
|
styled: this.styled,
|
|
20
22
|
disabled: this.disabled,
|
|
21
|
-
} }, h("input", { key: '
|
|
23
|
+
} }, h("input", { key: '7da5f17d827bfb6d63a4933977daee75c9845899', class: "xpl-checkbox", type: "checkbox", "aria-label": ((_a = this.ariaLabel) !== null && _a !== void 0 ? _a : '').trim() || undefined, checked: this.checked, "data-id": this.dataId, disabled: this.disabled, id: this.id, indeterminate: this.indeterminate, onChange: this.onChange, name: this.name, required: this.required, value: this.value }), h("label", { key: '86669521b030289b55279bd6fceecb5d060c7138', class: {
|
|
22
24
|
'xpl-label': true,
|
|
23
25
|
'xpl-label--disabled': this.disabled,
|
|
24
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
26
|
+
}, htmlFor: this.id }, h("slot", { key: 'b40aafb664cbac2092938afd45683cfc0313beac' }), this.description && (h("small", { key: '06e2245639b577f5d09afdf9000e43d076758e80', class: {
|
|
25
27
|
'xpl-description': true,
|
|
26
28
|
'xpl-description--disabled': this.disabled,
|
|
27
29
|
} }, this.description)))));
|
|
@@ -29,6 +31,26 @@ export class Checkbox {
|
|
|
29
31
|
static get is() { return "xpl-checkbox"; }
|
|
30
32
|
static get properties() {
|
|
31
33
|
return {
|
|
34
|
+
"ariaLabel": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "string",
|
|
39
|
+
"resolved": "string",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Accessible name for the native checkbox input (sets `aria-label` on the `input`).\nUse when there is no visible label text in the default slot.\nDefaults to `''`; empty or whitespace-only values omit `aria-label` on the input so a visible `<label>` remains the sole name source."
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"reflect": false,
|
|
51
|
+
"attribute": "aria-label",
|
|
52
|
+
"defaultValue": "''"
|
|
53
|
+
},
|
|
32
54
|
"checked": {
|
|
33
55
|
"type": "boolean",
|
|
34
56
|
"mutable": false,
|
|
@@ -35,7 +35,7 @@ export class Choicelist {
|
|
|
35
35
|
this.onChoicesPropChange(this.choices);
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '003270ebbe4ccd9c204774f2c41302e64697a358', class: "xpl-choicelist-container" }, this.heading !== undefined || this.description !== undefined ? (h("div", { class: "xpl-choicelist-heading" }, this.heading && h("h3", null, this.heading), this.description && h("p", null, this.description))) : null, this.choices && (h("ul", { key: '388763663e1e9dc48f53b4e8569c3c58942fb631', class: {
|
|
39
39
|
'xpl-choicelist': true,
|
|
40
40
|
'xpl-choicelist--styled': this.styled,
|
|
41
41
|
} }, this.choices.map((choice, i) => {
|
|
@@ -4,7 +4,7 @@ export class ContentArea {
|
|
|
4
4
|
this.size = 'wide';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '2fe4c1c077c12e47600c737cc9266ae2eff8aaec' }, h("main", { key: '2e6c6f4b83cea96d629bb5af65c4ce6a4d20570e', class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { key: '033e707fbc48ae523fafb25dd2952d3de9214908', class: "xpl-content-area" }, h("slot", { key: '04afc15969c2b1fb7e2feb3d8ae46248ee0f6e31' })))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "xpl-content-area"; }
|
|
10
10
|
static get properties() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class Dashboard {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'ceeb8b27d9537c70e88360de21238c9ce2a3f90b' }, h("dl", { key: '3c4fcb92f472f14885053a1cb1db893618a6d8a8', class: "xpl-dashboard" }, h("slot", { key: 'fe4fa8fdec2ce84bdedc7aa404ab647abd189d11' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-dashboard"; }
|
|
7
7
|
}
|
|
@@ -31,8 +31,8 @@ export class DataCard {
|
|
|
31
31
|
: this.smallStatVariant === 'negative'
|
|
32
32
|
? 'arrow-down-right'
|
|
33
33
|
: 'dash';
|
|
34
|
-
return (h(Host, { key: '
|
|
35
|
-
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '
|
|
34
|
+
return (h(Host, { key: '917b6ae82a30b849b100e878dc6be08eb4171214', role: "group", class: `xpl-data-card ${this.link ? 'xpl-data-card__link' : ''}`, tabindex: "0" }, h("dt", { key: '21573d19d14f861eea6562529f78e93affc1e5d2', class: headerClasses }, h("header", { key: '1af52bd082f4d12239db85e78eaf74ed2eb7e027' }, !!this.leadingIcon && this.icon && (h("span", { key: 'dfdcc25ae67fdc766ee3075a479fbfeeac2561ab', class: `xpl-data-card__icon--${this.variant}` }, h("xpl-icon", { key: '4072018714c05bd5bae20bfb9e5b6a04561474da', icon: this.icon, "background-color": bgColorHue, size: 20 }))), h("slot", { key: 'f81204887ad6c229cb50e8d3ff654c1aa4703368', name: "title" }, this.name)), this.link && (h("span", { key: '6d8d61f8611fdbc5cd09fc20ba15194e0e1e7b56', class: "xpl-data-card__header-arrow" }, h("xpl-icon", { key: '863e66734bbbd6aa178f140b22f8afb3dd401127', icon: "chevron-right", size: 16 })))), h("dd", { key: '08a5e4af6873c267336f7daff6d3455e75a2883e', class: "xpl-data-card__body" }, h("div", { key: 'ec8ff889fb93d99e7ef51361e041edbaaaf5cd62', class: "xpl-data-card__left" }, h("span", { key: '4787e6aadc3832830fe707ffc08e5614a7abde7b', class: "xpl-data-card-stat xpl-data-card-stat--long" }, this.stat), this.tooltipTextStat ? (h("xpl-tooltip", { text: this.tooltipTextStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, this.shortStat ? this.shortStat : this.stat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, h("abbr", { title: this.stat }, this.shortStat ? this.shortStat : this.stat))), this.smallStatVariant ? (this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (this.smallStatIcon &&
|
|
35
|
+
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '2060dba53f12917e37747a6bc52c7f03fe4dadc7', class: "xpl-data-card__detail" }, this.detail)), hasContentSlot && (h("div", { key: '7a091cce8bc0abae2af7b15d6d1a63acd16854c5', class: "xpl-data-card__right" }, h("slot", { key: 'd83790136435a0d5427fd746d2cba5a08cf914eb', name: contentSlot }))))));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "xpl-data-card"; }
|
|
38
38
|
static get properties() {
|