@xplortech/apollo-core 2.12.0 → 3.0.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 +61 -0
- package/AGENTS.md +4 -4
- package/README.md +30 -3
- package/build/components/modal.css +1 -1
- package/build/components/table-body.css +1 -0
- package/build/components/table-footer-cell.css +1 -0
- package/build/components/table-footer.css +1 -0
- package/build/components/table-row.css +1 -0
- package/build/components/top-nav.css +1 -1
- package/build/components-manifest.json +13 -1
- package/build/core.css +1 -1
- package/build/style.css +1 -1
- package/dist/apollo-core/apollo-core.css +1 -1
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-d37488d4.entry.js → p-0368a1df.entry.js} +1 -1
- package/dist/apollo-core/p-056a99e4.entry.js +1 -0
- package/dist/apollo-core/p-068e3532.entry.js +1 -0
- package/dist/apollo-core/{p-121d1a4b.entry.js → p-06a9a27b.entry.js} +1 -1
- package/dist/apollo-core/{p-9747cf43.entry.js → p-0958c719.entry.js} +1 -1
- package/dist/apollo-core/p-0a0a6e43.entry.js +1 -0
- package/dist/apollo-core/{p-643c8038.entry.js → p-149ddd12.entry.js} +1 -1
- package/dist/apollo-core/p-1a94c2d9.entry.js +1 -0
- package/dist/apollo-core/{p-efa21ec0.entry.js → p-2139f9f6.entry.js} +1 -1
- package/dist/apollo-core/{p-76f64d65.entry.js → p-28bce81a.entry.js} +1 -1
- package/dist/apollo-core/{p-1a417191.entry.js → p-2938ab4f.entry.js} +1 -1
- package/dist/apollo-core/{p-4e61587f.entry.js → p-2c995d80.entry.js} +1 -1
- package/dist/apollo-core/p-2faa7b9c.entry.js +1 -0
- package/dist/apollo-core/p-30b1b700.entry.js +1 -0
- package/dist/apollo-core/p-32084caf.entry.js +1 -0
- package/dist/apollo-core/p-38586952.entry.js +1 -0
- package/dist/apollo-core/{p-707b1918.entry.js → p-47bda204.entry.js} +1 -1
- package/dist/apollo-core/{p-f199ad66.entry.js → p-4a2323b3.entry.js} +1 -1
- package/dist/apollo-core/{p-c25aebe5.entry.js → p-4ad79534.entry.js} +1 -1
- package/dist/apollo-core/{p-e4ae3f60.entry.js → p-4d4acd1f.entry.js} +1 -1
- package/dist/apollo-core/p-50fae269.entry.js +1 -0
- package/dist/apollo-core/{p-7f105d63.entry.js → p-54903322.entry.js} +1 -1
- package/dist/apollo-core/{p-8a81ef98.entry.js → p-5730d96c.entry.js} +1 -1
- package/dist/apollo-core/{p-46d21684.entry.js → p-581b702c.entry.js} +1 -1
- package/dist/apollo-core/{p-853418be.entry.js → p-5d9a593e.entry.js} +1 -1
- package/dist/apollo-core/{p-e00ed4f4.entry.js → p-60cb3cfb.entry.js} +1 -1
- package/dist/apollo-core/p-722b145a.entry.js +1 -0
- package/dist/apollo-core/p-75e5bfe0.entry.js +1 -0
- package/dist/apollo-core/p-77fe3cc1.entry.js +1 -0
- package/dist/apollo-core/{p-26861d09.entry.js → p-790709c0.entry.js} +1 -1
- package/dist/apollo-core/{p-7976cd3b.entry.js → p-82812126.entry.js} +1 -1
- package/dist/apollo-core/{p-c427a31d.entry.js → p-83bb7607.entry.js} +1 -1
- package/dist/apollo-core/p-8664d88b.entry.js +1 -0
- package/dist/apollo-core/{p-3d9c90ee.entry.js → p-9064badb.entry.js} +1 -1
- package/dist/apollo-core/{p-5ca18bc1.entry.js → p-91895c40.entry.js} +1 -1
- package/dist/apollo-core/p-969d5cca.entry.js +1 -0
- package/dist/apollo-core/p-99a79cf4.entry.js +1 -0
- package/dist/apollo-core/p-abdf199b.entry.js +1 -0
- package/dist/apollo-core/p-ae8a5f66.entry.js +1 -0
- package/dist/apollo-core/{p-9b0174b1.entry.js → p-af8ebf49.entry.js} +1 -1
- package/dist/apollo-core/p-b29025b2.entry.js +1 -0
- package/dist/apollo-core/{p-fd2756d8.entry.js → p-b45179fb.entry.js} +1 -1
- package/dist/apollo-core/p-b5a61076.entry.js +1 -0
- package/dist/apollo-core/p-bf7d8e18.entry.js +1 -0
- package/dist/apollo-core/p-c48e4884.entry.js +1 -0
- package/dist/apollo-core/{p-b537f72d.entry.js → p-ca4652b3.entry.js} +1 -1
- package/dist/apollo-core/{p-bb22ed2a.entry.js → p-cb5b15c2.entry.js} +1 -1
- package/dist/apollo-core/p-cc57f20d.entry.js +1 -0
- package/dist/apollo-core/{p-fef6c256.entry.js → p-cdacfcd4.entry.js} +1 -1
- package/dist/apollo-core/{p-616c5a32.entry.js → p-cdb5b5c4.entry.js} +1 -1
- package/dist/apollo-core/p-d0bc7c45.entry.js +1 -0
- package/dist/apollo-core/{p-ff8acf15.entry.js → p-d41b8f46.entry.js} +1 -1
- package/dist/apollo-core/{p-9bf2ff9f.entry.js → p-d443291f.entry.js} +1 -1
- package/dist/apollo-core/p-d724c419.entry.js +1 -0
- package/dist/apollo-core/p-d9070ae5.entry.js +1 -0
- package/dist/apollo-core/p-dca48977.entry.js +1 -0
- package/dist/apollo-core/p-e1833287.entry.js +1 -0
- package/dist/apollo-core/{p-601b3ab5.entry.js → p-e2890eb1.entry.js} +1 -1
- package/dist/apollo-core/p-e2b73b60.entry.js +1 -0
- package/dist/apollo-core/p-e7e445b0.entry.js +1 -0
- package/dist/apollo-core/p-f1c103ff.entry.js +1 -0
- package/dist/apollo-core/{p-0463c29f.entry.js → p-f3a2c79b.entry.js} +1 -1
- package/dist/apollo-core/p-ffc2f0cf.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/index-3cBvw409.js +16 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-accordion.cjs.entry.js +2 -2
- package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-avatar_3.cjs.entry.js +5 -4
- package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/xpl-badge.cjs.entry.js +1 -1
- package/dist/cjs/xpl-banner.cjs.entry.js +2 -2
- package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
- package/dist/cjs/xpl-button.cjs.entry.js +1 -1
- package/dist/cjs/xpl-calendar.cjs.entry.js +1 -1
- package/dist/cjs/xpl-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
- package/dist/cjs/xpl-content-area.cjs.entry.js +1 -1
- package/dist/cjs/xpl-dashboard.cjs.entry.js +1 -1
- package/dist/cjs/xpl-data-card.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dropdown_4.cjs.entry.js +14 -11
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-header-accordion.cjs.entry.js +1 -1
- package/dist/cjs/xpl-icon.cjs.entry.js +2 -2
- package/dist/cjs/xpl-input-color.cjs.entry.js +13 -13
- package/dist/cjs/xpl-input-phone.cjs.entry.js +5 -5
- package/dist/cjs/xpl-input-time.cjs.entry.js +2 -2
- package/dist/cjs/xpl-input_4.cjs.entry.js +15 -14
- package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
- package/dist/cjs/xpl-list.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-modal.cjs.entry.js +50 -21
- package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +2 -2
- package/dist/cjs/xpl-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-pagination.cjs.entry.js +4 -4
- package/dist/cjs/xpl-panel.cjs.entry.js +2 -2
- package/dist/cjs/xpl-popover.cjs.entry.js +4 -4
- package/dist/cjs/xpl-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/xpl-secondary-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-select_2.cjs.entry.js +8 -8
- package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-side-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-side-nav-section.cjs.entry.js +5 -5
- package/dist/cjs/xpl-side-nav.cjs.entry.js +7 -3
- package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/xpl-slideout.cjs.entry.js +1 -1
- package/dist/cjs/xpl-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-body.cjs.entry.js +14 -0
- package/dist/cjs/xpl-table-footer-cell.cjs.entry.js +18 -0
- package/dist/cjs/xpl-table-footer.cjs.entry.js +14 -0
- package/dist/cjs/xpl-table-header.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-row.cjs.entry.js +20 -0
- package/dist/cjs/xpl-table.cjs.entry.js +5 -5
- package/dist/cjs/xpl-tabs.cjs.entry.js +5 -5
- package/dist/cjs/xpl-toast.cjs.entry.js +2 -2
- package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
- package/dist/cjs/xpl-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/xpl-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/xpl-top-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +2 -2
- package/dist/cjs/xpl-top-nav.cjs.entry.js +5 -5
- package/dist/cjs/xpl-utility-bar.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +1 -0
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +3 -3
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +10 -7
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input-color/color-utils.js +5 -5
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +5 -5
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +7 -6
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +50 -21
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +4 -4
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
- package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
- package/dist/collection/components/xpl-select/select.shared.js +82 -0
- package/dist/collection/components/xpl-select/xpl-select.js +6 -6
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-header-item/xpl-side-nav-header-item.js +2 -2
- 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-section/xpl-side-nav-section.js +5 -5
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +8 -4
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +7 -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-row/xpl-table-row.js +78 -0
- 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/tabs.shared.js +0 -33
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
- package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-9VnxPQLs.js +1 -0
- package/dist/components/p-B2oLZUDD.js +1 -0
- package/dist/components/p-BYYFsuD3.js +1 -0
- package/dist/components/p-BZtxVB1R.js +1 -0
- package/dist/components/{p-BGqQbjLl.js → p-BdpZR4KO.js} +1 -1
- package/dist/components/{p-DywQ3S73.js → p-Chpgh5SL.js} +1 -1
- package/dist/components/{p-2jYZ7ACH.js → p-CiHTfk3E.js} +1 -1
- package/dist/components/p-CnVGKN63.js +1 -0
- package/dist/components/p-Cz7zDaI4.js +1 -0
- package/dist/components/{p-CjbPCnPP.js → p-D--kzomA.js} +1 -1
- package/dist/components/p-D4rv6CNJ.js +1 -0
- package/dist/components/{p-Dzp5p-eh.js → p-DAb-txW3.js} +1 -1
- package/dist/components/p-DYmvElhR.js +1 -0
- package/dist/components/{p-DsRsm61K.js → p-EfW0v54z.js} +1 -1
- package/dist/components/{p-DWUJ_jsx.js → p-JyNpXfDe.js} +1 -1
- package/dist/components/{p-DS2Kv5fl.js → p-U0JYwf4c.js} +1 -1
- package/dist/components/p-YG9Jza0y.js +1 -0
- package/dist/components/{p-imCMp2Nl.js → p-l3EZ-agL.js} +1 -1
- package/dist/components/p-oIn1krdu.js +1 -0
- package/dist/components/p-wIU7KUhA.js +1 -0
- package/dist/components/{p-BnTsRbko.js → p-xFsB212F.js} +1 -1
- package/dist/components/p-xtOHikY0.js +1 -0
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar.js +1 -1
- package/dist/components/xpl-backdrop.js +1 -1
- package/dist/components/xpl-badge.js +1 -1
- package/dist/components/xpl-banner.js +1 -1
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-content-area.js +1 -1
- package/dist/components/xpl-dashboard.js +1 -1
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider.js +1 -1
- package/dist/components/xpl-dropdown-group.js +1 -1
- package/dist/components/xpl-dropdown-heading.js +1 -1
- package/dist/components/xpl-dropdown-option.js +1 -1
- package/dist/components/xpl-dropdown.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon.js +1 -1
- package/dist/components/xpl-input-color.js +1 -1
- package/dist/components/xpl-input-date.js +1 -1
- package/dist/components/xpl-input-file.js +1 -1
- package/dist/components/xpl-input-phone.js +1 -1
- package/dist/components/xpl-input-search.js +1 -1
- package/dist/components/xpl-input-time.js +1 -1
- package/dist/components/xpl-input.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list-item.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-header-menu.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.js +1 -1
- package/dist/components/xpl-popover.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.js +1 -1
- package/dist/components/xpl-radio.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select.js +1 -1
- package/dist/components/xpl-side-nav-header-item.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav-section.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-spotlight.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-body.d.ts +11 -0
- package/dist/components/xpl-table-body.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.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.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-tag.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip.js +1 -1
- package/dist/components/xpl-top-nav-item.js +1 -1
- package/dist/components/xpl-top-nav-menu.js +1 -1
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-modal/readme.md +18 -2
- package/dist/docs/xpl-table/xpl-table-body/readme.md +16 -0
- package/dist/docs/xpl-table/xpl-table-footer/readme.md +16 -0
- package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +31 -0
- package/dist/docs/xpl-table/xpl-table-row/readme.md +34 -0
- package/dist/docs.json +207 -6
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/index-ukZKsqqq.js +16 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-accordion.entry.js +2 -2
- package/dist/esm/xpl-application-shell.entry.js +1 -1
- package/dist/esm/xpl-avatar_3.entry.js +5 -4
- package/dist/esm/xpl-backdrop.entry.js +1 -1
- package/dist/esm/xpl-badge.entry.js +1 -1
- package/dist/esm/xpl-banner.entry.js +2 -2
- package/dist/esm/xpl-breadcrumb-item.entry.js +1 -1
- package/dist/esm/xpl-breadcrumbs.entry.js +1 -1
- package/dist/esm/xpl-button-row.entry.js +1 -1
- package/dist/esm/xpl-button.entry.js +1 -1
- package/dist/esm/xpl-calendar.entry.js +1 -1
- package/dist/esm/xpl-checkbox.entry.js +3 -3
- package/dist/esm/xpl-choicelist.entry.js +1 -1
- package/dist/esm/xpl-content-area.entry.js +1 -1
- package/dist/esm/xpl-dashboard.entry.js +1 -1
- package/dist/esm/xpl-data-card.entry.js +2 -2
- package/dist/esm/xpl-dropdown_4.entry.js +14 -11
- package/dist/esm/xpl-dynamic-table-cell.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table-row.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table.entry.js +2 -2
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-header-accordion.entry.js +1 -1
- package/dist/esm/xpl-icon.entry.js +2 -2
- package/dist/esm/xpl-input-color.entry.js +13 -13
- package/dist/esm/xpl-input-phone.entry.js +5 -5
- package/dist/esm/xpl-input-time.entry.js +2 -2
- package/dist/esm/xpl-input_4.entry.js +15 -14
- package/dist/esm/xpl-large-card.entry.js +1 -1
- package/dist/esm/xpl-list.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +1 -1
- package/dist/esm/xpl-modal.entry.js +50 -21
- package/dist/esm/xpl-nav-header-menu.entry.js +2 -2
- package/dist/esm/xpl-nav-item.entry.js +2 -2
- package/dist/esm/xpl-pagination.entry.js +4 -4
- package/dist/esm/xpl-panel.entry.js +2 -2
- package/dist/esm/xpl-popover.entry.js +4 -4
- package/dist/esm/xpl-progress-bar.entry.js +2 -2
- package/dist/esm/xpl-progress-indicator.entry.js +1 -1
- package/dist/esm/xpl-secondary-nav.entry.js +1 -1
- package/dist/esm/xpl-select_2.entry.js +8 -8
- package/dist/esm/xpl-side-nav-header-item.entry.js +2 -2
- package/dist/esm/xpl-side-nav-item.entry.js +2 -2
- package/dist/esm/xpl-side-nav-section.entry.js +5 -5
- package/dist/esm/xpl-side-nav.entry.js +8 -4
- package/dist/esm/xpl-skeleton.entry.js +1 -1
- package/dist/esm/xpl-slideout.entry.js +1 -1
- package/dist/esm/xpl-tab-panel.entry.js +2 -2
- package/dist/esm/xpl-table-body.entry.js +12 -0
- package/dist/esm/xpl-table-footer-cell.entry.js +16 -0
- package/dist/esm/xpl-table-footer.entry.js +12 -0
- package/dist/esm/xpl-table-header.entry.js +1 -1
- package/dist/esm/xpl-table-row.entry.js +18 -0
- package/dist/esm/xpl-table.entry.js +5 -5
- package/dist/esm/xpl-tabs.entry.js +5 -5
- package/dist/esm/xpl-toast.entry.js +2 -2
- package/dist/esm/xpl-toggle.entry.js +3 -3
- package/dist/esm/xpl-toolbar.entry.js +2 -2
- package/dist/esm/xpl-tooltip.entry.js +1 -1
- package/dist/esm/xpl-top-nav-item.entry.js +2 -2
- package/dist/esm/xpl-top-nav-menu.entry.js +2 -2
- package/dist/esm/xpl-top-nav.entry.js +5 -5
- package/dist/esm/xpl-utility-bar.entry.js +1 -1
- package/dist/types/components/xpl-modal/xpl-modal.d.ts +7 -1
- package/dist/types/components/xpl-select/select.shared.d.ts +23 -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-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/xpl-table-row/xpl-table-row.d.ts +6 -0
- package/dist/types/components/xpl-tabs/tabs.shared.d.ts +0 -2
- package/dist/types/components.d.ts +98 -0
- package/hydrate/index.js +302 -176
- package/hydrate/index.mjs +302 -176
- package/package.json +42 -46
- package/dist/apollo-core/p-0095174c.entry.js +0 -1
- package/dist/apollo-core/p-020ecd66.entry.js +0 -1
- package/dist/apollo-core/p-091411e3.entry.js +0 -1
- package/dist/apollo-core/p-0be4dbb8.entry.js +0 -1
- package/dist/apollo-core/p-1139fac0.entry.js +0 -1
- package/dist/apollo-core/p-140a96c7.entry.js +0 -1
- package/dist/apollo-core/p-26b6a0ed.entry.js +0 -1
- package/dist/apollo-core/p-39e71d86.entry.js +0 -1
- package/dist/apollo-core/p-3dd1de49.entry.js +0 -1
- package/dist/apollo-core/p-4129d971.entry.js +0 -1
- package/dist/apollo-core/p-5afc9831.entry.js +0 -1
- package/dist/apollo-core/p-5d25a84a.entry.js +0 -1
- package/dist/apollo-core/p-5e5c5016.entry.js +0 -1
- package/dist/apollo-core/p-638fd9b1.entry.js +0 -1
- package/dist/apollo-core/p-724c5038.entry.js +0 -1
- package/dist/apollo-core/p-80a11cad.entry.js +0 -1
- package/dist/apollo-core/p-875e0eaa.entry.js +0 -1
- package/dist/apollo-core/p-8ddbf2e2.entry.js +0 -1
- package/dist/apollo-core/p-a33b0943.entry.js +0 -1
- package/dist/apollo-core/p-ba41bbd5.entry.js +0 -1
- package/dist/apollo-core/p-cde21f72.entry.js +0 -1
- package/dist/apollo-core/p-d288c1d1.entry.js +0 -1
- package/dist/apollo-core/p-d3f2b8b8.entry.js +0 -1
- package/dist/apollo-core/p-dfaba114.entry.js +0 -1
- package/dist/apollo-core/p-e2a16242.entry.js +0 -1
- package/dist/apollo-core/p-ec488f9c.entry.js +0 -1
- package/dist/apollo-core/p-f2bfe6a6.entry.js +0 -1
- package/dist/collection/components/xpl-accordion/accordion.stories.js +0 -84
- package/dist/collection/components/xpl-application-shell/application-shell.stories.js +0 -755
- package/dist/collection/components/xpl-avatar/avatar.stories.js +0 -157
- package/dist/collection/components/xpl-backdrop/backdrop.stories.js +0 -38
- package/dist/collection/components/xpl-badge/badge.stories.js +0 -104
- package/dist/collection/components/xpl-banner/banner.stories.js +0 -69
- package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +0 -139
- package/dist/collection/components/xpl-button/button.stories.js +0 -144
- package/dist/collection/components/xpl-button-row/button-row.stories.js +0 -68
- package/dist/collection/components/xpl-calendar/calendar.stories.js +0 -71
- package/dist/collection/components/xpl-checkbox/checkbox.stories.js +0 -92
- package/dist/collection/components/xpl-choicelist/choicelist.stories.js +0 -162
- package/dist/collection/components/xpl-content-area/content-area.stories.js +0 -44
- package/dist/collection/components/xpl-dashboard/dashboard.stories.js +0 -57
- package/dist/collection/components/xpl-data-card/data-card.stories.js +0 -170
- package/dist/collection/components/xpl-divider/divider.stories.js +0 -47
- package/dist/collection/components/xpl-dropdown/dropdown.stories.js +0 -395
- package/dist/collection/components/xpl-dynamic-table/dynamic-table.stories.js +0 -169
- package/dist/collection/components/xpl-grid/grid.stories.js +0 -85
- package/dist/collection/components/xpl-header-accordion/header-accordion.stories.js +0 -56
- package/dist/collection/components/xpl-icon/icons.stories.js +0 -161
- package/dist/collection/components/xpl-input/input.stories.js +0 -712
- package/dist/collection/components/xpl-large-card/large-card.stories.js +0 -155
- package/dist/collection/components/xpl-list/list.stories.js +0 -398
- package/dist/collection/components/xpl-main-nav/main-nav.stories.js +0 -312
- package/dist/collection/components/xpl-modal/modal.stories.js +0 -100
- package/dist/collection/components/xpl-pagination/pagination.stories.js +0 -65
- package/dist/collection/components/xpl-panel/panel.stories.js +0 -62
- package/dist/collection/components/xpl-popover/popover.stories.js +0 -174
- package/dist/collection/components/xpl-progress-bar/progress-bar.stories.js +0 -105
- package/dist/collection/components/xpl-progress-indicator/progress-indicator.stories.js +0 -126
- package/dist/collection/components/xpl-radio/radio.stories.js +0 -115
- package/dist/collection/components/xpl-secondary-nav/secondary-nav.stories.js +0 -83
- package/dist/collection/components/xpl-select/select.stories.js +0 -300
- package/dist/collection/components/xpl-side-nav/side-nav.stories.js +0 -1070
- package/dist/collection/components/xpl-skeleton/skeleton.stories.js +0 -80
- package/dist/collection/components/xpl-slideout/slideout.stories.js +0 -122
- package/dist/collection/components/xpl-spotlight/spotlight.stories.js +0 -392
- package/dist/collection/components/xpl-table/table.stories.js +0 -156
- package/dist/collection/components/xpl-table-header/table-header.stories.js +0 -134
- package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +0 -83
- package/dist/collection/components/xpl-tabs/segment-control.stories.js +0 -40
- package/dist/collection/components/xpl-tabs/tabs.stories.js +0 -43
- package/dist/collection/components/xpl-tag/tag.stories.js +0 -159
- package/dist/collection/components/xpl-toast/toast.stories.js +0 -112
- package/dist/collection/components/xpl-toggle/toggle.stories.js +0 -95
- package/dist/collection/components/xpl-toolbar/toolbar.stories.js +0 -39
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +0 -67
- package/dist/collection/components/xpl-top-nav/top-nav.stories.js +0 -764
- package/dist/collection/components/xpl-utility-bar/utility-bar.stories.js +0 -94
- package/dist/components/p-Bseq_BgD.js +0 -1
- package/dist/components/p-CCgZCY_A.js +0 -1
- package/dist/components/p-CJzsLWeV.js +0 -1
- package/dist/components/p-CRKY79vL.js +0 -1
- package/dist/components/p-Cjxw-qOg.js +0 -1
- package/dist/components/p-D6JUVA1x.js +0 -1
- package/dist/components/p-DFGw0APN.js +0 -1
- package/dist/components/p-DLLQBDCb.js +0 -1
- package/dist/components/p-Di1NDy0w.js +0 -1
- package/dist/components/p-DkM7jyQB.js +0 -1
- package/dist/components/p-Mehog36m.js +0 -1
- package/dist/components/p-RYnBuuDE.js +0 -1
- package/dist/css/typography.stories.js +0 -153
- package/dist/types/components/xpl-accordion/accordion.stories.d.ts +0 -46
- package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +0 -46
- package/dist/types/components/xpl-avatar/avatar.stories.d.ts +0 -39
- package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +0 -23
- package/dist/types/components/xpl-badge/badge.stories.d.ts +0 -87
- package/dist/types/components/xpl-banner/banner.stories.d.ts +0 -79
- package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +0 -40
- package/dist/types/components/xpl-button/button.stories.d.ts +0 -136
- package/dist/types/components/xpl-button-row/button-row.stories.d.ts +0 -34
- package/dist/types/components/xpl-calendar/calendar.stories.d.ts +0 -45
- package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +0 -51
- package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +0 -30
- package/dist/types/components/xpl-content-area/content-area.stories.d.ts +0 -19
- package/dist/types/components/xpl-dashboard/dashboard.stories.d.ts +0 -22
- package/dist/types/components/xpl-data-card/data-card.stories.d.ts +0 -113
- package/dist/types/components/xpl-divider/divider.stories.d.ts +0 -28
- package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +0 -177
- package/dist/types/components/xpl-dynamic-table/dynamic-table.stories.d.ts +0 -30
- package/dist/types/components/xpl-grid/grid.stories.d.ts +0 -109
- package/dist/types/components/xpl-header-accordion/header-accordion.stories.d.ts +0 -32
- package/dist/types/components/xpl-icon/icons.stories.d.ts +0 -31
- package/dist/types/components/xpl-input/input.stories.d.ts +0 -441
- package/dist/types/components/xpl-large-card/large-card.stories.d.ts +0 -57
- package/dist/types/components/xpl-list/list.stories.d.ts +0 -385
- package/dist/types/components/xpl-main-nav/main-nav.stories.d.ts +0 -19
- package/dist/types/components/xpl-modal/modal.stories.d.ts +0 -103
- package/dist/types/components/xpl-pagination/pagination.stories.d.ts +0 -31
- package/dist/types/components/xpl-panel/panel.stories.d.ts +0 -30
- package/dist/types/components/xpl-popover/popover.stories.d.ts +0 -21
- package/dist/types/components/xpl-progress-bar/progress-bar.stories.d.ts +0 -62
- package/dist/types/components/xpl-progress-indicator/progress-indicator.stories.d.ts +0 -64
- package/dist/types/components/xpl-radio/radio.stories.d.ts +0 -96
- package/dist/types/components/xpl-secondary-nav/secondary-nav.stories.d.ts +0 -8
- package/dist/types/components/xpl-select/select.stories.d.ts +0 -158
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +0 -173
- package/dist/types/components/xpl-skeleton/skeleton.stories.d.ts +0 -36
- package/dist/types/components/xpl-slideout/slideout.stories.d.ts +0 -124
- package/dist/types/components/xpl-spotlight/spotlight.stories.d.ts +0 -203
- package/dist/types/components/xpl-table/table.stories.d.ts +0 -67
- package/dist/types/components/xpl-table-header/table-header.stories.d.ts +0 -80
- package/dist/types/components/xpl-table-header-cell/table-header-cell.stories.d.ts +0 -36
- package/dist/types/components/xpl-tabs/segment-control.stories.d.ts +0 -134
- package/dist/types/components/xpl-tabs/tabs.stories.d.ts +0 -107
- package/dist/types/components/xpl-tag/tag.stories.d.ts +0 -68
- package/dist/types/components/xpl-toast/toast.stories.d.ts +0 -70
- package/dist/types/components/xpl-toggle/toggle.stories.d.ts +0 -53
- package/dist/types/components/xpl-toolbar/toolbar.stories.d.ts +0 -35
- package/dist/types/components/xpl-tooltip/tooltip.stories.d.ts +0 -29
- package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +0 -549
- package/dist/types/components/xpl-utility-bar/utility-bar.stories.d.ts +0 -27
- package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/.storybook/utils/story-function.d.ts +0 -11
- package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/.storybook/utils/wait-for-hydration.d.ts +0 -1
- package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/src/css/typography.stories.d.ts +0 -76
- /package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/{src/utils → utils}/form-bindings.d.ts +0 -0
- /package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/{src/utils → utils}/story-vrt.d.ts +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { v4 as uuid } from "uuid";
|
|
2
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
3
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
4
|
-
export default {
|
|
5
|
-
tags: ['vrt'],
|
|
6
|
-
beforeEach() {
|
|
7
|
-
setAutoSnapshotOptions({ enable: true });
|
|
8
|
-
},
|
|
9
|
-
async play({ canvasElement }) {
|
|
10
|
-
await waitForHydration(canvasElement);
|
|
11
|
-
},
|
|
12
|
-
title: 'Components/Table',
|
|
13
|
-
argTypes: {
|
|
14
|
-
freeze: { control: { type: 'boolean' } },
|
|
15
|
-
multiselect: { control: { type: 'boolean' } },
|
|
16
|
-
striped: { control: { type: 'boolean' } },
|
|
17
|
-
columns: { control: { type: 'object' } },
|
|
18
|
-
data: { control: { type: 'object' } },
|
|
19
|
-
footer: { control: { type: 'object' } },
|
|
20
|
-
isSortable: { control: { type: 'boolean' } },
|
|
21
|
-
sortableColumns: { control: { type: 'object' } },
|
|
22
|
-
},
|
|
23
|
-
parameters: {
|
|
24
|
-
actions: {
|
|
25
|
-
handles: ['tableSelect', 'sortChanged'],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
const columnsDefault = [
|
|
30
|
-
'Name',
|
|
31
|
-
'Total Days Played',
|
|
32
|
-
'Average Days Played',
|
|
33
|
-
'Seasons',
|
|
34
|
-
'Individual Immunity Wins',
|
|
35
|
-
'Votes Against',
|
|
36
|
-
];
|
|
37
|
-
const dataDefault = [
|
|
38
|
-
['Boston Rob Mariano', '152', '30.4', 'S4, S8, S20, S22, S40', '9', '24'],
|
|
39
|
-
['Parvati Shallow', '149', '37.25', 'S13, S16, S20', '4', '17'],
|
|
40
|
-
['Ozzy Lusth', '128', '32.0', 'S13, S16, S23, S34', '7', '34'],
|
|
41
|
-
['Cirie Fields', '121', '30.25', 'S12, S16, S20, S34', '2', '9'],
|
|
42
|
-
['Tyson Apostol', '116.5', '29.1', 'S18, S20, S27, S40', '4', '22'],
|
|
43
|
-
];
|
|
44
|
-
const selectedValuesDefault = [
|
|
45
|
-
'boston-rob-mariano',
|
|
46
|
-
'parvati-shallow',
|
|
47
|
-
'ozzy-lusth',
|
|
48
|
-
'cirie-fields',
|
|
49
|
-
'tyson-apostol',
|
|
50
|
-
];
|
|
51
|
-
const sortableColumnsDefault = [false, false, false, false, false, false];
|
|
52
|
-
const footerDefault = [['Total', '676.5', '159.75', 'All Seasons', '26', '106']];
|
|
53
|
-
const script = ({ columns, data, footer, id, selectedValues, isSortable, sortableColumns, }) => `
|
|
54
|
-
(function() {
|
|
55
|
-
const table = document.getElementById("${id}");
|
|
56
|
-
table.columns = ${JSON.stringify(columns)};
|
|
57
|
-
table.data = ${JSON.stringify(data)};
|
|
58
|
-
${footer ? `table.footer = ${JSON.stringify(footer)};` : ''}
|
|
59
|
-
table.selectedValues = ${JSON.stringify(selectedValues)};
|
|
60
|
-
table.sortableColumns = ${JSON.stringify(sortableColumns)};
|
|
61
|
-
table.isSortable = ${isSortable};
|
|
62
|
-
})();
|
|
63
|
-
`;
|
|
64
|
-
export const Table = ({ columns, data, footer, freeze, multiselect, selectedValues, striped, isSortable, sortableColumns, }) => {
|
|
65
|
-
const id = uuid();
|
|
66
|
-
let attrs = '';
|
|
67
|
-
if (freeze)
|
|
68
|
-
attrs += ' freeze';
|
|
69
|
-
if (multiselect)
|
|
70
|
-
attrs += ' multiselect';
|
|
71
|
-
if (isSortable)
|
|
72
|
-
attrs += ' isSortable';
|
|
73
|
-
if (striped)
|
|
74
|
-
attrs += ' striped';
|
|
75
|
-
return `
|
|
76
|
-
<div style="max-width: 600px;">
|
|
77
|
-
<xpl-table id="${id}"${attrs}></xpl-table>
|
|
78
|
-
</div>
|
|
79
|
-
<script>
|
|
80
|
-
${script({ id, columns, data, footer, selectedValues, sortableColumns, isSortable, freeze, multiselect, striped })}
|
|
81
|
-
</script>
|
|
82
|
-
`;
|
|
83
|
-
};
|
|
84
|
-
Table.args = {
|
|
85
|
-
freeze: true,
|
|
86
|
-
multiselect: false,
|
|
87
|
-
striped: false,
|
|
88
|
-
columns: columnsDefault,
|
|
89
|
-
data: dataDefault,
|
|
90
|
-
footer: footerDefault,
|
|
91
|
-
selectedValues: selectedValuesDefault,
|
|
92
|
-
isSortable: false,
|
|
93
|
-
sortableColumns: sortableColumnsDefault,
|
|
94
|
-
};
|
|
95
|
-
Table.parameters = {
|
|
96
|
-
layout: 'centered',
|
|
97
|
-
'web-component': {
|
|
98
|
-
render: (({ freeze, multiselect, striped }) => {
|
|
99
|
-
let attrs = '';
|
|
100
|
-
if (freeze)
|
|
101
|
-
attrs += ' freeze';
|
|
102
|
-
if (multiselect)
|
|
103
|
-
attrs += ' multiselect';
|
|
104
|
-
if (striped)
|
|
105
|
-
attrs += ' striped';
|
|
106
|
-
return [
|
|
107
|
-
`<xpl-table${attrs}></xpl-table>`,
|
|
108
|
-
`table.columns = [
|
|
109
|
-
"Name", "Total Days Played", ...
|
|
110
|
-
];`,
|
|
111
|
-
`table.data = [
|
|
112
|
-
["Boston Rob Mariano", ...],
|
|
113
|
-
["Parvati Shallow", ...],
|
|
114
|
-
...
|
|
115
|
-
];`,
|
|
116
|
-
];
|
|
117
|
-
})(Table.args),
|
|
118
|
-
},
|
|
119
|
-
html: {
|
|
120
|
-
render: (({ freeze, striped }) => {
|
|
121
|
-
let className = 'xpl-table';
|
|
122
|
-
if (striped)
|
|
123
|
-
className += ' xpl-table--striped';
|
|
124
|
-
if (freeze)
|
|
125
|
-
className += ' xpl-table--freeze';
|
|
126
|
-
return [
|
|
127
|
-
`WARNING: For \`multiselect\` tables, there is JS interactivity that is provided only by the web component. The code shown below does not reflect the additional \`multiselect\` table markup and interactivity.`,
|
|
128
|
-
`<div class="xpl-table-container">
|
|
129
|
-
<table class="${className}">
|
|
130
|
-
<thead>
|
|
131
|
-
<th>Name</th>
|
|
132
|
-
<th>Total Days Played</th>
|
|
133
|
-
...
|
|
134
|
-
</thead>
|
|
135
|
-
<tbody>
|
|
136
|
-
<tr>
|
|
137
|
-
<td>Boston Rob Mariano</td>
|
|
138
|
-
<td>152</td>
|
|
139
|
-
...
|
|
140
|
-
</tr>
|
|
141
|
-
<tr>
|
|
142
|
-
<td>Parvati Shallow</td>
|
|
143
|
-
<td>149</td>
|
|
144
|
-
...
|
|
145
|
-
</tr>
|
|
146
|
-
</tbody>
|
|
147
|
-
</table>
|
|
148
|
-
</div>`,
|
|
149
|
-
];
|
|
150
|
-
})(Table.args),
|
|
151
|
-
},
|
|
152
|
-
design: {
|
|
153
|
-
type: 'figma',
|
|
154
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=20-258&p=f&t=vVY2x58f7oPprNSr-11',
|
|
155
|
-
},
|
|
156
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
2
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Dynamic Table/Table Header',
|
|
5
|
-
component: 'xpl-table-header',
|
|
6
|
-
argTypes: {
|
|
7
|
-
firstCellType: {
|
|
8
|
-
control: 'select',
|
|
9
|
-
options: ['label', 'checkbox', 'icon'],
|
|
10
|
-
},
|
|
11
|
-
firstCellLabel: {
|
|
12
|
-
control: 'text',
|
|
13
|
-
},
|
|
14
|
-
firstCellIcon: {
|
|
15
|
-
control: 'select',
|
|
16
|
-
options: ['chevron-down', 'chevron-up', 'heart', 'dollar-sign'],
|
|
17
|
-
},
|
|
18
|
-
firstCellWidth: {
|
|
19
|
-
control: 'number',
|
|
20
|
-
},
|
|
21
|
-
firstCellSortable: { control: 'boolean' },
|
|
22
|
-
secondCellType: {
|
|
23
|
-
control: 'select',
|
|
24
|
-
options: ['label', 'checkbox', 'icon'],
|
|
25
|
-
},
|
|
26
|
-
secondCellLabel: {
|
|
27
|
-
control: 'text',
|
|
28
|
-
},
|
|
29
|
-
secondCellIcon: {
|
|
30
|
-
control: 'select',
|
|
31
|
-
options: ['chevron-down', 'chevron-up', 'heart', 'dollar-sign'],
|
|
32
|
-
},
|
|
33
|
-
secondCellWidth: {
|
|
34
|
-
control: 'number',
|
|
35
|
-
},
|
|
36
|
-
secondCellSortable: { control: 'boolean' },
|
|
37
|
-
thirdCellType: {
|
|
38
|
-
control: 'select',
|
|
39
|
-
options: ['label', 'checkbox', 'icon'],
|
|
40
|
-
},
|
|
41
|
-
thirdCellLabel: {
|
|
42
|
-
control: 'text',
|
|
43
|
-
},
|
|
44
|
-
thirdCellIcon: {
|
|
45
|
-
control: 'select',
|
|
46
|
-
options: ['chevron-down', 'chevron-up', 'heart', 'dollar-sign'],
|
|
47
|
-
},
|
|
48
|
-
thirdCellWidth: {
|
|
49
|
-
control: 'number',
|
|
50
|
-
},
|
|
51
|
-
thirdCellSortable: { control: 'boolean' },
|
|
52
|
-
},
|
|
53
|
-
tags: ['beta', 'vrt'],
|
|
54
|
-
beforeEach() {
|
|
55
|
-
setAutoSnapshotOptions({ enable: true });
|
|
56
|
-
},
|
|
57
|
-
async play({ canvasElement }) {
|
|
58
|
-
await waitForHydration(canvasElement);
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
export const TableHeader = ({ firstCellType, firstCellLabel, firstCellIcon, firstCellWidth, firstCellSortable, secondCellType, secondCellLabel, secondCellIcon, secondCellWidth, secondCellSortable, thirdCellType, thirdCellLabel, thirdCellIcon, thirdCellWidth, thirdCellSortable, }) => `
|
|
62
|
-
<xpl-dynamic-table>
|
|
63
|
-
<div slot="header">
|
|
64
|
-
<xpl-table-header>
|
|
65
|
-
<xpl-table-header-cell
|
|
66
|
-
type=${firstCellType}
|
|
67
|
-
label="${firstCellLabel}"
|
|
68
|
-
icon=${firstCellIcon}
|
|
69
|
-
width=${firstCellWidth}
|
|
70
|
-
sortable=${firstCellSortable}
|
|
71
|
-
></xpl-table-header-cell>
|
|
72
|
-
<xpl-table-header-cell
|
|
73
|
-
type=${secondCellType}
|
|
74
|
-
label="${secondCellLabel}"
|
|
75
|
-
icon=${secondCellIcon}
|
|
76
|
-
width=${secondCellWidth}
|
|
77
|
-
sortable=${secondCellSortable}
|
|
78
|
-
></xpl-table-header-cell>
|
|
79
|
-
<xpl-table-header-cell
|
|
80
|
-
type=${thirdCellType}
|
|
81
|
-
label="${thirdCellLabel}"
|
|
82
|
-
icon=${thirdCellIcon}
|
|
83
|
-
width=${thirdCellWidth}
|
|
84
|
-
sortable=${thirdCellSortable}
|
|
85
|
-
>
|
|
86
|
-
</xpl-table-header-cell>
|
|
87
|
-
</xpl-table-header>
|
|
88
|
-
</div>
|
|
89
|
-
</xpl-dynamic-table>
|
|
90
|
-
|
|
91
|
-
`;
|
|
92
|
-
TableHeader.args = {
|
|
93
|
-
firstCellType: 'label',
|
|
94
|
-
firstCellLabel: '',
|
|
95
|
-
firstCellIcon: 'heart',
|
|
96
|
-
firstCellWidth: 48,
|
|
97
|
-
firstCellSortable: false,
|
|
98
|
-
secondCellType: 'icon',
|
|
99
|
-
secondCellLabel: 'Column Item 2',
|
|
100
|
-
secondCellIcon: 'heart',
|
|
101
|
-
secondCellWidth: 48,
|
|
102
|
-
secondCellSortable: false,
|
|
103
|
-
thirdCellType: 'label',
|
|
104
|
-
thirdCellLabel: 'Column Item 3',
|
|
105
|
-
thirdCellIcon: 'heart',
|
|
106
|
-
thirdCellWidth: 208,
|
|
107
|
-
thirdCellSortable: true,
|
|
108
|
-
};
|
|
109
|
-
TableHeader.parameters = {
|
|
110
|
-
'web-component': {
|
|
111
|
-
render: TableHeader(TableHeader.args),
|
|
112
|
-
},
|
|
113
|
-
html: {
|
|
114
|
-
render: `
|
|
115
|
-
<tr class="xpl-table-header table-header">
|
|
116
|
-
<th class="header-cell">
|
|
117
|
-
<span></span>
|
|
118
|
-
</th>
|
|
119
|
-
<th class="header-cell">
|
|
120
|
-
<xpl-icon class="header-icon" icon="heart"></xpl-icon>
|
|
121
|
-
</th>
|
|
122
|
-
<th class="header-cell">
|
|
123
|
-
<button class="sortable">
|
|
124
|
-
<span class="sortable-text">Column Item 3</span>
|
|
125
|
-
<xpl-icon class="sort-icon" icon="arrow-down"></xpl-icon>
|
|
126
|
-
</button>
|
|
127
|
-
</th>
|
|
128
|
-
</tr>`,
|
|
129
|
-
},
|
|
130
|
-
design: {
|
|
131
|
-
type: 'figma',
|
|
132
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=14764-42036&p=f&t=xrSF2t7u1Brg2fnZ-11',
|
|
133
|
-
},
|
|
134
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
2
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Dynamic Table/Table Header Cell',
|
|
5
|
-
component: 'xpl-table-header-cell',
|
|
6
|
-
argTypes: {
|
|
7
|
-
type: {
|
|
8
|
-
control: 'select',
|
|
9
|
-
options: ['label', 'checkbox', 'icon'],
|
|
10
|
-
},
|
|
11
|
-
label: {
|
|
12
|
-
control: 'text',
|
|
13
|
-
},
|
|
14
|
-
icon: {
|
|
15
|
-
control: 'select',
|
|
16
|
-
options: ['chevron-down', 'chevron-up', 'heart', 'dollar-sign'],
|
|
17
|
-
},
|
|
18
|
-
width: {
|
|
19
|
-
control: 'number',
|
|
20
|
-
},
|
|
21
|
-
sortable: { control: 'boolean' },
|
|
22
|
-
},
|
|
23
|
-
tags: ['beta', 'vrt'],
|
|
24
|
-
beforeEach() {
|
|
25
|
-
setAutoSnapshotOptions({ enable: true });
|
|
26
|
-
},
|
|
27
|
-
async play({ canvasElement }) {
|
|
28
|
-
await waitForHydration(canvasElement);
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
export const TableHeaderCell = ({ type, label, icon, width, sortable, }) => `
|
|
32
|
-
<xpl-table-header-cell
|
|
33
|
-
type=${type}
|
|
34
|
-
label="${label}"
|
|
35
|
-
icon=${icon}
|
|
36
|
-
width=${width}
|
|
37
|
-
sortable=${sortable}
|
|
38
|
-
></xpl-table-header-cell>
|
|
39
|
-
`;
|
|
40
|
-
TableHeaderCell.args = {
|
|
41
|
-
type: 'label',
|
|
42
|
-
label: 'Column Item',
|
|
43
|
-
icon: 'chevron-down',
|
|
44
|
-
width: null,
|
|
45
|
-
sortable: false,
|
|
46
|
-
};
|
|
47
|
-
TableHeaderCell.parameters = {
|
|
48
|
-
'web-component': {
|
|
49
|
-
render: TableHeaderCell(TableHeaderCell.args),
|
|
50
|
-
},
|
|
51
|
-
html: {
|
|
52
|
-
render: ({ type, label, icon, width, sortable }) => {
|
|
53
|
-
const renderContent = () => {
|
|
54
|
-
switch (type) {
|
|
55
|
-
case 'label':
|
|
56
|
-
return `<span>${label}</span>`;
|
|
57
|
-
case 'checkbox':
|
|
58
|
-
return `<input type="checkbox" class="xpl-checkbox">`;
|
|
59
|
-
case 'icon':
|
|
60
|
-
return `<xpl-icon icon="${icon}"></xpl-icon>`;
|
|
61
|
-
default:
|
|
62
|
-
return '';
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return `
|
|
66
|
-
<th class="header-cell" style="width: ${width}px">
|
|
67
|
-
${sortable
|
|
68
|
-
? `
|
|
69
|
-
<button class="sortable">
|
|
70
|
-
${renderContent()}
|
|
71
|
-
<xpl-icon icon="arrow-down"></xpl-icon>
|
|
72
|
-
</button>
|
|
73
|
-
`
|
|
74
|
-
: `<div class="non-sortable">renderContent()</div>`}
|
|
75
|
-
</th>
|
|
76
|
-
`;
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
design: {
|
|
80
|
-
type: 'figma',
|
|
81
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=14764-42036&p=f&t=xrSF2t7u1Brg2fnZ-11',
|
|
82
|
-
},
|
|
83
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
2
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
3
|
-
import { renderTabsStoryMarkup, segmentControlDefaultArgs, segmentControlStoryArgTypes, tabsPlainDomSegmentStoryHtml, } from "./tabs.shared";
|
|
4
|
-
export default {
|
|
5
|
-
tags: ['vrt'],
|
|
6
|
-
beforeEach() {
|
|
7
|
-
setAutoSnapshotOptions({ enable: true });
|
|
8
|
-
},
|
|
9
|
-
async play({ canvasElement }) {
|
|
10
|
-
await waitForHydration(canvasElement);
|
|
11
|
-
},
|
|
12
|
-
title: 'Components/Segment Control',
|
|
13
|
-
component: 'xpl-tabs',
|
|
14
|
-
parameters: {
|
|
15
|
-
actions: {
|
|
16
|
-
handles: ['tabChange'],
|
|
17
|
-
},
|
|
18
|
-
docs: {
|
|
19
|
-
description: {
|
|
20
|
-
component: '**Segment Control** is `xpl-tabs` with `type="segment"`. For underline tabs see **Components/Tabs**.',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
argTypes: segmentControlStoryArgTypes,
|
|
25
|
-
};
|
|
26
|
-
export const SegmentControl = (args, context) => renderTabsStoryMarkup(args, context ?? {});
|
|
27
|
-
SegmentControl.args = segmentControlDefaultArgs;
|
|
28
|
-
SegmentControl.parameters = {
|
|
29
|
-
layout: 'padded',
|
|
30
|
-
'web-component': {
|
|
31
|
-
render: renderTabsStoryMarkup(segmentControlDefaultArgs),
|
|
32
|
-
},
|
|
33
|
-
html: {
|
|
34
|
-
render: tabsPlainDomSegmentStoryHtml,
|
|
35
|
-
},
|
|
36
|
-
design: {
|
|
37
|
-
type: 'figma',
|
|
38
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=6405-96230',
|
|
39
|
-
},
|
|
40
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
2
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
3
|
-
import { renderTabsStoryMarkup, tabsPlainDomUnderlineStoryHtml, tabsStoryBaseArgTypes, tabsUnderlineDefaultArgs, } from "./tabs.shared";
|
|
4
|
-
export default {
|
|
5
|
-
tags: ['vrt'],
|
|
6
|
-
beforeEach() {
|
|
7
|
-
setAutoSnapshotOptions({ enable: true });
|
|
8
|
-
},
|
|
9
|
-
async play({ canvasElement }) {
|
|
10
|
-
await waitForHydration(canvasElement);
|
|
11
|
-
},
|
|
12
|
-
title: 'Components/Tabs',
|
|
13
|
-
component: 'xpl-tabs',
|
|
14
|
-
parameters: {
|
|
15
|
-
actions: {
|
|
16
|
-
handles: ['tabChange'],
|
|
17
|
-
},
|
|
18
|
-
docs: {
|
|
19
|
-
description: {
|
|
20
|
-
component: 'Underline tabs use `xpl-tabs` with `type="tabs"` (default). **Segment Control** is the same component with `type="segment"` — see **Components/Segment Control** in the sidebar.',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
argTypes: {
|
|
25
|
-
...tabsStoryBaseArgTypes,
|
|
26
|
-
type: { ...tabsStoryBaseArgTypes.type, table: { disable: true } },
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export const Tabs = (args, context) => renderTabsStoryMarkup(args, context ?? {});
|
|
30
|
-
Tabs.args = tabsUnderlineDefaultArgs;
|
|
31
|
-
Tabs.parameters = {
|
|
32
|
-
layout: 'padded',
|
|
33
|
-
'web-component': {
|
|
34
|
-
render: renderTabsStoryMarkup(tabsUnderlineDefaultArgs),
|
|
35
|
-
},
|
|
36
|
-
html: {
|
|
37
|
-
render: tabsPlainDomUnderlineStoryHtml,
|
|
38
|
-
},
|
|
39
|
-
design: {
|
|
40
|
-
type: 'figma',
|
|
41
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=1536-178224&p=f&t=vVY2x58f7oPprNSr-11',
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { setAutoSnapshotOptions } from "vitest-plugin-vis";
|
|
2
|
-
import { waitForHydration } from "../../../../.storybook/utils/wait-for-hydration";
|
|
3
|
-
function tagAttrs(args) {
|
|
4
|
-
const { disabled, dismissible, isDraggable, size, tagId } = args;
|
|
5
|
-
return [
|
|
6
|
-
`size="${size}"`,
|
|
7
|
-
disabled ? 'disabled' : '',
|
|
8
|
-
dismissible ? '' : 'dismissible="false"',
|
|
9
|
-
isDraggable ? 'is-draggable' : '',
|
|
10
|
-
tagId ? `tag-id="${tagId}"` : '',
|
|
11
|
-
]
|
|
12
|
-
.filter(Boolean)
|
|
13
|
-
.join(' ');
|
|
14
|
-
}
|
|
15
|
-
export default {
|
|
16
|
-
tags: ['vrt'],
|
|
17
|
-
beforeEach() {
|
|
18
|
-
setAutoSnapshotOptions({ enable: true });
|
|
19
|
-
},
|
|
20
|
-
async play({ canvasElement }) {
|
|
21
|
-
await waitForHydration(canvasElement);
|
|
22
|
-
},
|
|
23
|
-
title: 'Components/Tag',
|
|
24
|
-
component: 'xpl-tag',
|
|
25
|
-
argTypes: {
|
|
26
|
-
size: {
|
|
27
|
-
options: ['default', 'sm'],
|
|
28
|
-
control: { type: 'select' },
|
|
29
|
-
},
|
|
30
|
-
disabled: { control: 'boolean' },
|
|
31
|
-
dismissible: { control: 'boolean' },
|
|
32
|
-
isDraggable: { control: 'boolean' },
|
|
33
|
-
slot: { control: 'text' },
|
|
34
|
-
tagId: { control: 'text' },
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
export const Tag = (args) => {
|
|
38
|
-
const attrs = tagAttrs(args);
|
|
39
|
-
const text = args.slot ?? '';
|
|
40
|
-
return `
|
|
41
|
-
<div style="padding: var(--xpl-space-32);">
|
|
42
|
-
<xpl-tag ${attrs}>${text}</xpl-tag>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<hr style="margin: var(--xpl-space-32) 0; border: none; border-top: var(--xpl-border-small) solid var(--xpl-border-subtle)" />
|
|
46
|
-
|
|
47
|
-
<p style="margin: 0 0 var(--xpl-space-12); color: var(--xpl-text-subdued)">Drag tags to reorder them within the container.</p>
|
|
48
|
-
<div
|
|
49
|
-
id="drag-playground"
|
|
50
|
-
style="display: flex; flex-wrap: wrap; gap: var(--xpl-space-8); padding: var(--xpl-space-16); border: var(--xpl-border-large) dashed var(--xpl-border-default); border-radius: var(--xpl-border-radius-default); min-height: var(--xpl-size-300); transition: border-color 0.2s"
|
|
51
|
-
>
|
|
52
|
-
<xpl-tag tag-id="tag-design" is-draggable ${attrs}>Design</xpl-tag>
|
|
53
|
-
<xpl-tag tag-id="tag-develop" is-draggable ${attrs}>Development</xpl-tag>
|
|
54
|
-
<xpl-tag tag-id="tag-qa" is-draggable ${attrs}>QA</xpl-tag>
|
|
55
|
-
<xpl-tag tag-id="tag-release" is-draggable ${attrs}>Release</xpl-tag>
|
|
56
|
-
</div>
|
|
57
|
-
<script>
|
|
58
|
-
(function() {
|
|
59
|
-
const container = document.getElementById('drag-playground');
|
|
60
|
-
if (!container) return;
|
|
61
|
-
let draggedElement = null;
|
|
62
|
-
|
|
63
|
-
container.addEventListener('dragstart', function(e) {
|
|
64
|
-
const tag = e.target instanceof Element ? e.target.closest('xpl-tag') : null;
|
|
65
|
-
if (tag) {
|
|
66
|
-
draggedElement = tag;
|
|
67
|
-
container.style.borderColor = 'var(--xpl-border-accent-information)';
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
container.addEventListener('dragend', function() {
|
|
72
|
-
draggedElement = null;
|
|
73
|
-
container.style.borderColor = '';
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
container.addEventListener('dragover', function(e) {
|
|
77
|
-
e.preventDefault();
|
|
78
|
-
if (!draggedElement) return;
|
|
79
|
-
const afterElement = getDragAfterElement(container, e.clientX);
|
|
80
|
-
if (afterElement == null) {
|
|
81
|
-
container.appendChild(draggedElement);
|
|
82
|
-
} else {
|
|
83
|
-
container.insertBefore(draggedElement, afterElement);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
function getDragAfterElement(cont, x) {
|
|
88
|
-
const els = [...cont.querySelectorAll('xpl-tag')].filter(el => el !== draggedElement);
|
|
89
|
-
return els.reduce((closest, child) => {
|
|
90
|
-
const box = child.getBoundingClientRect();
|
|
91
|
-
const offset = x - box.left - box.width / 2;
|
|
92
|
-
return offset < 0 && offset > closest.offset
|
|
93
|
-
? { offset, element: child }
|
|
94
|
-
: closest;
|
|
95
|
-
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
|
96
|
-
}
|
|
97
|
-
})();
|
|
98
|
-
</script>
|
|
99
|
-
`;
|
|
100
|
-
};
|
|
101
|
-
Tag.args = {
|
|
102
|
-
disabled: false,
|
|
103
|
-
dismissible: true,
|
|
104
|
-
isDraggable: false,
|
|
105
|
-
size: 'default',
|
|
106
|
-
slot: 'Tag label',
|
|
107
|
-
tagId: '',
|
|
108
|
-
};
|
|
109
|
-
Tag.parameters = {
|
|
110
|
-
layout: 'padded',
|
|
111
|
-
docs: {
|
|
112
|
-
description: {
|
|
113
|
-
story: 'Tags represent interactive keywords for labeling and categorization. Use `size` to switch between Default (24px) and Small (20px) variants. Set `dismissible={false}` to hide the close button. Set `disabled` to disable interaction. Try long text in the `slot` control to see truncation at max-width.',
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
'web-component': {
|
|
117
|
-
render: (() => {
|
|
118
|
-
const args = { ...Tag.args };
|
|
119
|
-
const attrs = tagAttrs(args);
|
|
120
|
-
return `<xpl-tag ${attrs}>${args.slot ?? ''}</xpl-tag>`;
|
|
121
|
-
})(),
|
|
122
|
-
},
|
|
123
|
-
html: {
|
|
124
|
-
render: (() => {
|
|
125
|
-
const args = { ...Tag.args };
|
|
126
|
-
const sizeMod = args.size === 'sm' ? 'xpl-tag--sm' : '';
|
|
127
|
-
const disabledMod = args.disabled ? 'xpl-tag--disabled' : '';
|
|
128
|
-
const dismissibleMod = args.dismissible ? 'xpl-tag--dismissible' : '';
|
|
129
|
-
const dragEnabled = args.isDraggable && !args.disabled;
|
|
130
|
-
const draggableMod = dragEnabled ? 'xpl-tag--draggable' : '';
|
|
131
|
-
const hostClasses = [
|
|
132
|
-
'xpl-tag',
|
|
133
|
-
'xpl-tag-container',
|
|
134
|
-
sizeMod,
|
|
135
|
-
disabledMod,
|
|
136
|
-
dismissibleMod,
|
|
137
|
-
draggableMod,
|
|
138
|
-
]
|
|
139
|
-
.filter(Boolean)
|
|
140
|
-
.join(' ');
|
|
141
|
-
const contentTag = dragEnabled ? 'div' : 'button';
|
|
142
|
-
const disabledAttr = args.disabled ? ' disabled' : '';
|
|
143
|
-
const contentAttrs = dragEnabled
|
|
144
|
-
? 'role="button" tabindex="0" draggable="true"'
|
|
145
|
-
: `type="button"${disabledAttr}`;
|
|
146
|
-
const contentEl = `<${contentTag} class="xpl-tag__content xpl-tag" ${contentAttrs}>${args.slot ?? ''}</${contentTag}>`;
|
|
147
|
-
const dismissLabelBase = (args.slot ?? '').trim() || 'tag';
|
|
148
|
-
const dismissAriaLabel = `Dismiss ${dismissLabelBase}`.replace(/"/g, '"');
|
|
149
|
-
const dismissButton = args.dismissible
|
|
150
|
-
? `<button class="xpl-tag__dismiss xpl-tag__close" type="button" aria-label="${dismissAriaLabel}"${disabledAttr}><xpl-icon icon="xmark" size="10"></xpl-icon></button>`
|
|
151
|
-
: '';
|
|
152
|
-
return `<div class="${hostClasses}">${contentEl}${dismissButton}</div>`;
|
|
153
|
-
})(),
|
|
154
|
-
},
|
|
155
|
-
design: {
|
|
156
|
-
type: 'figma',
|
|
157
|
-
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=15243-65363',
|
|
158
|
-
},
|
|
159
|
-
};
|