@pine-ds/core 3.27.0 → 3.29.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/components/i18n-format.js +1 -0
- package/components/pds-alert.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-link2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-tab.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/dist/cjs/i18n-format-CrpIhahc.js +64 -0
- package/dist/cjs/{index-DBhfI2Jq.js → index-BdFrBXCD.js} +5 -1
- package/dist/cjs/{index-DGBoDsAL.js → index-CKNNY-lQ.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-alert.cjs.entry.js +8 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +45 -8
- package/dist/cjs/pds-box.cjs.entry.js +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +2 -2
- package/dist/cjs/pds-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/pds-chip.cjs.entry.js +10 -5
- package/dist/cjs/pds-combobox.cjs.entry.js +1 -1
- package/dist/cjs/pds-container.cjs.entry.js +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/pds-filter.cjs.entry.js +2 -2
- package/dist/cjs/pds-filters.cjs.entry.js +1 -1
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +2 -2
- package/dist/cjs/pds-link.cjs.entry.js +12 -5
- package/dist/cjs/pds-loader.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +1 -1
- package/dist/cjs/pds-multiselect.cjs.entry.js +93 -14
- package/dist/cjs/pds-popover.cjs.entry.js +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-property.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio.cjs.entry.js +2 -2
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +2 -2
- package/dist/cjs/pds-tab.cjs.entry.js +41 -6
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +8 -3
- package/dist/cjs/pds-tabs.cjs.entry.js +74 -3
- package/dist/cjs/pds-text.cjs.entry.js +2 -2
- package/dist/cjs/pds-textarea.cjs.entry.js +14 -7
- package/dist/cjs/pds-toast.cjs.entry.js +10 -4
- package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/pine-core.cjs.js +2 -2
- package/dist/collection/components/pds-alert/pds-alert.js +30 -1
- package/dist/collection/components/pds-avatar/pds-avatar.css +29 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +133 -5
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +23 -0
- package/dist/collection/components/pds-button/pds-button.js +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +25 -0
- package/dist/collection/components/pds-chip/pds-chip.js +31 -3
- package/dist/collection/components/pds-link/pds-link.css +10 -0
- package/dist/collection/components/pds-link/pds-link.js +32 -2
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +14 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +358 -17
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +4 -4
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +161 -5
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +9 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +29 -1
- package/dist/collection/components/pds-tabs/pds-tabs.css +14 -0
- package/dist/collection/components/pds-tabs/pds-tabs.js +146 -4
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +43 -0
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +35 -5
- package/dist/collection/components/pds-toast/pds-toast.js +32 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/i18n/i18n-format.js +59 -0
- package/dist/collection/i18n/index.js +1 -0
- package/dist/docs.json +866 -13
- package/dist/esm/i18n-format-BKsJZTyn.js +61 -0
- package/dist/esm/{index-D4ys0pep.js → index-BjlFq0VD.js} +1 -1
- package/dist/esm/{index-CaRgVPt7.js → index-NNDTPCWx.js} +5 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mock-pds-modal.entry.js +1 -1
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-alert.entry.js +8 -2
- package/dist/esm/pds-avatar.entry.js +45 -8
- package/dist/esm/pds-box.entry.js +1 -1
- package/dist/esm/pds-button.entry.js +2 -2
- package/dist/esm/pds-checkbox.entry.js +2 -2
- package/dist/esm/pds-chip.entry.js +10 -5
- package/dist/esm/pds-combobox.entry.js +1 -1
- package/dist/esm/pds-container.entry.js +1 -1
- package/dist/esm/pds-copytext.entry.js +2 -2
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm/pds-filter.entry.js +2 -2
- package/dist/esm/pds-filters.entry.js +1 -1
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +1 -1
- package/dist/esm/pds-input.entry.js +2 -2
- package/dist/esm/pds-link.entry.js +12 -5
- package/dist/esm/pds-loader.entry.js +1 -1
- package/dist/esm/pds-modal-content.entry.js +1 -1
- package/dist/esm/pds-modal-footer.entry.js +1 -1
- package/dist/esm/pds-modal-header.entry.js +1 -1
- package/dist/esm/pds-modal.entry.js +1 -1
- package/dist/esm/pds-multiselect.entry.js +93 -14
- package/dist/esm/pds-popover.entry.js +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-property.entry.js +1 -1
- package/dist/esm/pds-radio-group.entry.js +2 -2
- package/dist/esm/pds-radio.entry.js +2 -2
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +2 -2
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +2 -2
- package/dist/esm/pds-tab.entry.js +41 -6
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +2 -2
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-row.entry.js +1 -1
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +8 -3
- package/dist/esm/pds-tabs.entry.js +74 -3
- package/dist/esm/pds-text.entry.js +2 -2
- package/dist/esm/pds-textarea.entry.js +14 -7
- package/dist/esm/pds-toast.entry.js +10 -4
- package/dist/esm/pds-tooltip.entry.js +3 -3
- package/dist/esm/pine-core.js +3 -3
- package/dist/esm-es5/i18n-format-BKsJZTyn.js +1 -0
- package/dist/esm-es5/{index-CaRgVPt7.js → index-NNDTPCWx.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/p-02805a93.system.entry.js +1 -0
- package/dist/pine-core/{p-e70c9002.entry.js → p-02977c6f.entry.js} +1 -1
- package/dist/pine-core/{p-4e49712d.entry.js → p-054f7011.entry.js} +1 -1
- package/dist/pine-core/{p-571d6bef.system.entry.js → p-076aaa00.system.entry.js} +1 -1
- package/dist/pine-core/{p-3fa80c5a.system.entry.js → p-092a72d2.system.entry.js} +1 -1
- package/dist/pine-core/p-0a09ccbe.entry.js +1 -0
- package/dist/pine-core/p-0a4f2d5f.system.entry.js +1 -0
- package/dist/pine-core/{p-f2cf8e76.entry.js → p-0d6daa35.entry.js} +1 -1
- package/dist/pine-core/p-12154189.system.entry.js +1 -0
- package/dist/pine-core/{p-44f58d33.system.entry.js → p-1deded6e.system.entry.js} +1 -1
- package/dist/pine-core/{p-fa81009f.system.entry.js → p-1f20608e.system.entry.js} +1 -1
- package/dist/pine-core/{p-27ac77c3.entry.js → p-1fb985bb.entry.js} +1 -1
- package/dist/pine-core/{p-855dfc31.system.entry.js → p-20e0d06c.system.entry.js} +1 -1
- package/dist/pine-core/p-24fcf841.system.entry.js +1 -0
- package/dist/pine-core/{p-c273210a.entry.js → p-292cf8f9.entry.js} +1 -1
- package/dist/pine-core/{p-db1572a3.entry.js → p-2a74b396.entry.js} +1 -1
- package/dist/pine-core/p-2d1cc047.entry.js +1 -0
- package/dist/pine-core/{p-002c420f.system.entry.js → p-2ec460e1.system.entry.js} +1 -1
- package/dist/pine-core/{p-e0cfb931.system.entry.js → p-2fc127b4.system.entry.js} +1 -1
- package/dist/pine-core/{p-d09ae46d.system.entry.js → p-3170d53b.system.entry.js} +1 -1
- package/dist/pine-core/{p-0451fdf7.entry.js → p-39ad92fc.entry.js} +1 -1
- package/dist/pine-core/{p-974bf0c5.entry.js → p-39c6e6c9.entry.js} +1 -1
- package/dist/pine-core/{p-d5c1f85e.system.entry.js → p-3c6300a8.system.entry.js} +1 -1
- package/dist/pine-core/{p-b0b6acdb.system.entry.js → p-3e3b3bf6.system.entry.js} +1 -1
- package/dist/pine-core/{p-52f7115b.entry.js → p-43a1d9d7.entry.js} +1 -1
- package/dist/pine-core/{p-13ec2343.entry.js → p-43ef94bc.entry.js} +1 -1
- package/dist/pine-core/{p-618ba6d5.system.entry.js → p-464ec4eb.system.entry.js} +1 -1
- package/dist/pine-core/{p-ee6f914c.entry.js → p-47708864.entry.js} +1 -1
- package/dist/pine-core/{p-ccb889d8.system.entry.js → p-507e831f.system.entry.js} +1 -1
- package/dist/pine-core/p-5c229a7f.entry.js +1 -0
- package/dist/pine-core/{p-5c6c2f79.system.entry.js → p-5c7a72aa.system.entry.js} +1 -1
- package/dist/pine-core/{p-71ca8845.system.entry.js → p-5e6e8d4e.system.entry.js} +1 -1
- package/dist/pine-core/{p-3ad9bcef.system.entry.js → p-5f4d2c5c.system.entry.js} +1 -1
- package/dist/pine-core/{p-6a2373d0.system.entry.js → p-606418b7.system.entry.js} +1 -1
- package/dist/pine-core/{p-22bfa998.entry.js → p-6254d112.entry.js} +1 -1
- package/dist/pine-core/{p-5a2df1e2.entry.js → p-62f75f84.entry.js} +1 -1
- package/dist/pine-core/{p-835d9f18.system.entry.js → p-69e47ffc.system.entry.js} +1 -1
- package/dist/pine-core/p-6f82e8dc.system.entry.js +1 -0
- package/dist/pine-core/{p-b1b317a5.entry.js → p-6fb68ad1.entry.js} +1 -1
- package/dist/pine-core/{p-1e3beca4.system.entry.js → p-7153efaf.system.entry.js} +1 -1
- package/dist/pine-core/{p-a982ac91.system.entry.js → p-72a1b563.system.entry.js} +1 -1
- package/dist/pine-core/{p-7aca41d9.system.entry.js → p-7803c5b6.system.entry.js} +1 -1
- package/dist/pine-core/{p-74e06c8d.system.entry.js → p-78cd9f97.system.entry.js} +1 -1
- package/dist/pine-core/{p-edf4e4eb.system.entry.js → p-79598750.system.entry.js} +1 -1
- package/dist/pine-core/p-7a7954b2.system.entry.js +1 -0
- package/dist/pine-core/{p-3ba36512.system.entry.js → p-7b85115b.system.entry.js} +1 -1
- package/dist/pine-core/{p-83eb33d4.entry.js → p-7bac161d.entry.js} +1 -1
- package/dist/pine-core/{p-bdf18687.entry.js → p-7d15b65e.entry.js} +1 -1
- package/dist/pine-core/p-7e065b59.entry.js +1 -0
- package/dist/pine-core/p-82af7d58.system.entry.js +1 -0
- package/dist/pine-core/{p-73b81009.entry.js → p-83e8f145.entry.js} +1 -1
- package/dist/pine-core/{p-cce6dcf0.system.entry.js → p-85f7428b.system.entry.js} +1 -1
- package/dist/pine-core/{p-ae840ec4.entry.js → p-87ba6d2b.entry.js} +1 -1
- package/dist/pine-core/p-8c0040c4.entry.js +1 -0
- package/dist/pine-core/{p-a659cce1.entry.js → p-8c85f53a.entry.js} +1 -1
- package/dist/pine-core/{p-20f39b93.system.entry.js → p-8d6fd5a7.system.entry.js} +1 -1
- package/dist/pine-core/{p-7247fb4f.entry.js → p-902b5790.entry.js} +1 -1
- package/dist/pine-core/{p-3f19666c.entry.js → p-92f648ba.entry.js} +1 -1
- package/dist/pine-core/{p-e620e492.system.entry.js → p-9374cf48.system.entry.js} +1 -1
- package/dist/pine-core/p-978b848b.system.entry.js +1 -0
- package/dist/pine-core/{p-babd0607.system.entry.js → p-9aaee1e9.system.entry.js} +1 -1
- package/dist/pine-core/p-9ba86e34.entry.js +1 -0
- package/dist/pine-core/{p-4abec102.system.entry.js → p-9f041a63.system.entry.js} +2 -2
- package/dist/pine-core/p-B1rytYxP.system.js +1 -0
- package/dist/pine-core/p-BKsJZTyn.js +1 -0
- package/dist/pine-core/p-Cr7-rJtJ.system.js +1 -0
- package/dist/pine-core/{p-CdwliqhD.system.js → p-DVZjHa4_.system.js} +2 -2
- package/dist/pine-core/p-NNDTPCWx.js +2 -0
- package/dist/pine-core/{p-ba88ff60.system.entry.js → p-a03c12a4.system.entry.js} +1 -1
- package/dist/pine-core/p-a9ef5295.entry.js +1 -0
- package/dist/pine-core/{p-334b7c30.entry.js → p-ac2775b5.entry.js} +1 -1
- package/dist/pine-core/{p-a1750a54.entry.js → p-b0058cb0.entry.js} +1 -1
- package/dist/pine-core/p-b0674b8d.entry.js +1 -0
- package/dist/pine-core/{p-1e1804ed.system.entry.js → p-b5c760c8.system.entry.js} +1 -1
- package/dist/pine-core/{p-3a1b7302.system.entry.js → p-b6812452.system.entry.js} +1 -1
- package/dist/pine-core/{p-2b0cb8c4.system.entry.js → p-b89583e7.system.entry.js} +1 -1
- package/dist/pine-core/{p-5584a56b.entry.js → p-b9380ce8.entry.js} +1 -1
- package/dist/pine-core/{p-568bb210.system.entry.js → p-ba54470a.system.entry.js} +1 -1
- package/dist/pine-core/{p-7a4da839.entry.js → p-bf759fc0.entry.js} +1 -1
- package/dist/pine-core/{p-791d357a.entry.js → p-c1932447.entry.js} +1 -1
- package/dist/pine-core/{p-cce83ef0.entry.js → p-c2688710.entry.js} +1 -1
- package/dist/pine-core/{p-46de2438.entry.js → p-c35fe2e2.entry.js} +1 -1
- package/dist/pine-core/{p-ef71710b.system.entry.js → p-c3748812.system.entry.js} +2 -2
- package/dist/pine-core/{p-59a5dd77.system.entry.js → p-c52ad43b.system.entry.js} +1 -1
- package/dist/pine-core/{p-3876b9be.entry.js → p-ce715993.entry.js} +1 -1
- package/dist/pine-core/{p-587a15ee.system.entry.js → p-cf389430.system.entry.js} +1 -1
- package/dist/pine-core/{p-7874fe2b.entry.js → p-d037308b.entry.js} +1 -1
- package/dist/pine-core/{p-52e9ec4f.entry.js → p-d281464e.entry.js} +1 -1
- package/dist/pine-core/{p-04f8b32a.entry.js → p-d70201bb.entry.js} +1 -1
- package/dist/pine-core/{p-9865431f.system.entry.js → p-d9cb26fe.system.entry.js} +1 -1
- package/dist/pine-core/{p-44388b8f.system.entry.js → p-dc460e2d.system.entry.js} +1 -1
- package/dist/pine-core/p-dc48f603.entry.js +1 -0
- package/dist/pine-core/{p-01dba061.entry.js → p-dcc4ee5e.entry.js} +1 -1
- package/dist/pine-core/{p-f366f064.entry.js → p-def5d3d3.entry.js} +1 -1
- package/dist/pine-core/p-e0fb06ea.system.entry.js +1 -0
- package/dist/pine-core/p-e4b69d10.entry.js +1 -0
- package/dist/pine-core/{p-ae2b466a.system.entry.js → p-e81b4d04.system.entry.js} +1 -1
- package/dist/pine-core/{p-c3a99f39.entry.js → p-eb42ca18.entry.js} +1 -1
- package/dist/pine-core/{p-59c60e5b.entry.js → p-ebe218f8.entry.js} +1 -1
- package/dist/pine-core/{p-889fce8a.entry.js → p-ec2c0e57.entry.js} +2 -2
- package/dist/pine-core/{p-fb68e503.system.entry.js → p-eed4b552.system.entry.js} +1 -1
- package/dist/pine-core/p-f6d1469d.entry.js +1 -0
- package/dist/pine-core/{p-65fb166c.system.entry.js → p-fb10caff.system.entry.js} +1 -1
- package/dist/pine-core/{p-0bf56f61.entry.js → p-ff1e9a32.entry.js} +1 -1
- package/dist/pine-core/p-ff3399ed.entry.js +1 -0
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +6 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +30 -0
- package/dist/types/components/pds-button/pds-button.d.ts +1 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +5 -0
- package/dist/types/components/pds-link/pds-link.d.ts +7 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +67 -4
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +42 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +5 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +25 -2
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +6 -0
- package/dist/types/components/pds-toast/pds-toast.d.ts +6 -0
- package/dist/types/components.d.ts +321 -14
- package/dist/types/i18n/i18n-format.d.ts +38 -0
- package/dist/types/i18n/index.d.ts +2 -0
- package/hydrate/index.js +402 -53
- package/hydrate/index.mjs +402 -53
- package/package.json +3 -2
- package/dist/pine-core/p-003f91b1.system.entry.js +0 -1
- package/dist/pine-core/p-006398c3.system.entry.js +0 -1
- package/dist/pine-core/p-190ba1df.entry.js +0 -1
- package/dist/pine-core/p-638e9cb3.entry.js +0 -1
- package/dist/pine-core/p-63e0d4a5.system.entry.js +0 -1
- package/dist/pine-core/p-68121613.system.entry.js +0 -1
- package/dist/pine-core/p-6c5aacad.entry.js +0 -1
- package/dist/pine-core/p-73dd2a2b.entry.js +0 -1
- package/dist/pine-core/p-7520a715.system.entry.js +0 -1
- package/dist/pine-core/p-7766e970.entry.js +0 -1
- package/dist/pine-core/p-7b71f1bf.system.entry.js +0 -1
- package/dist/pine-core/p-7b954dbf.entry.js +0 -1
- package/dist/pine-core/p-8065c732.entry.js +0 -1
- package/dist/pine-core/p-829c52dc.entry.js +0 -1
- package/dist/pine-core/p-C61CFP22.system.js +0 -1
- package/dist/pine-core/p-CaRgVPt7.js +0 -2
- package/dist/pine-core/p-a739bdfa.entry.js +0 -1
- package/dist/pine-core/p-ab957ace.system.entry.js +0 -1
- package/dist/pine-core/p-b88be8be.entry.js +0 -1
- package/dist/pine-core/p-e291db30.entry.js +0 -1
- package/dist/pine-core/p-e77c5c08.system.entry.js +0 -1
- package/dist/pine-core/p-f2315f2a.entry.js +0 -1
- package/dist/pine-core/p-f928817f.system.entry.js +0 -1
- /package/dist/esm-es5/{index-D4ys0pep.js → index-BjlFq0VD.js} +0 -0
- /package/dist/pine-core/{p-D4ys0pep.js → p-BjlFq0VD.js} +0 -0
- /package/dist/pine-core/{p-C62JIZmE.system.js → p-WYNNo1N0.system.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { Fragment, Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTab {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
@@ -6,6 +6,13 @@ export class PdsTab {
|
|
|
6
6
|
* @defaultValue false
|
|
7
7
|
*/
|
|
8
8
|
this.disabled = false;
|
|
9
|
+
/**
|
|
10
|
+
* Marks this tab as the current one in navigation mode (`href` set). Applies
|
|
11
|
+
* the active treatment and `aria-current="page"`. Ignored in panel mode, where
|
|
12
|
+
* the active tab is derived from the parent's `activeTabName`.
|
|
13
|
+
* @defaultValue false
|
|
14
|
+
*/
|
|
15
|
+
this.active = false;
|
|
9
16
|
/**
|
|
10
17
|
* Keeps track of the tabpanel selected state, this property is passed by parent component
|
|
11
18
|
*/
|
|
@@ -17,18 +24,46 @@ export class PdsTab {
|
|
|
17
24
|
return;
|
|
18
25
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
19
26
|
}
|
|
27
|
+
// An empty string is treated as "no destination" everywhere (isNav fallback,
|
|
28
|
+
// href attribute, role) so a nav tab never renders `href=""` (which would
|
|
29
|
+
// navigate to the current page).
|
|
30
|
+
get hasHref() {
|
|
31
|
+
return this.href != null && this.href !== '';
|
|
32
|
+
}
|
|
33
|
+
get isNav() {
|
|
34
|
+
var _a;
|
|
35
|
+
// The parent `pds-tabs` is authoritative when present (via `navMode`), so its
|
|
36
|
+
// tabs share one mode. Standalone, fall back to a usable `href`.
|
|
37
|
+
return (_a = this.navMode) !== null && _a !== void 0 ? _a : this.hasHref;
|
|
38
|
+
}
|
|
39
|
+
get isActive() {
|
|
40
|
+
// Navigation mode is server-driven via `active`; panel mode is parent-driven
|
|
41
|
+
// via `selected` (from `activeTabName`).
|
|
42
|
+
return this.isNav ? this.active : this.selected;
|
|
43
|
+
}
|
|
20
44
|
classNames() {
|
|
21
45
|
const classes = [
|
|
22
46
|
'pds-tab',
|
|
23
|
-
this.
|
|
47
|
+
this.isActive && 'is-active',
|
|
24
48
|
this.disabled && 'is-disabled',
|
|
25
49
|
];
|
|
26
50
|
return classes.filter(Boolean).join(' ');
|
|
27
51
|
}
|
|
28
52
|
render() {
|
|
29
|
-
const availabilityTabEdgeInlineStart = (h("span", {
|
|
30
|
-
const availabilityTabEdgeInlineEnd = (h("span", {
|
|
31
|
-
|
|
53
|
+
const availabilityTabEdgeInlineStart = (h("span", { class: "pds-tab-edge", role: "presentation" }));
|
|
54
|
+
const availabilityTabEdgeInlineEnd = (h("span", { class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
55
|
+
const content = (h(Fragment, null, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { class: "pds-tab__content" }, h("slot", null))));
|
|
56
|
+
// Navigation mode: a real anchor, so keyboard activation and navigation are
|
|
57
|
+
// native (and Turbo-driven when framed) with no controller — and the current
|
|
58
|
+
// item carries `aria-current="page"` rather than `role="tab"`/`aria-selected`.
|
|
59
|
+
if (this.isNav) {
|
|
60
|
+
return (h(Host, { variant: this.variant, slot: "tabs", index: this.index }, h("a", { href: this.disabled || !this.hasHref ? undefined : this.href,
|
|
61
|
+
// An anchor without an href (disabled, or forced into nav mode with no
|
|
62
|
+
// usable href) loses its implicit link role; restore it explicitly so
|
|
63
|
+
// assistive tech still announces the item rather than as plain text.
|
|
64
|
+
role: this.disabled || !this.hasHref ? "link" : undefined, id: this.parentComponentId + "__" + this.name, class: this.classNames(), target: this.target, rel: this.target === "_blank" ? "noopener noreferrer" : undefined, "aria-current": this.isActive ? "page" : undefined, "aria-disabled": this.disabled ? "true" : null, "data-turbo-frame": this.turboFrame || undefined, "data-turbo-action": this.turboAction || undefined }, content)));
|
|
65
|
+
}
|
|
66
|
+
return (h(Host, { variant: this.variant, slot: "tabs", index: this.index }, h("button", { role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.disabled ? "-1" : (this.selected ? "0" : "-1"), "aria-selected": this.selected ? "true" : "false", "aria-disabled": this.disabled ? "true" : null, disabled: this.disabled, class: this.classNames(), onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, content)));
|
|
32
67
|
}
|
|
33
68
|
static get is() { return "pds-tab"; }
|
|
34
69
|
static get originalStyleUrls() {
|
|
@@ -66,6 +101,105 @@ export class PdsTab {
|
|
|
66
101
|
"attribute": "disabled",
|
|
67
102
|
"defaultValue": "false"
|
|
68
103
|
},
|
|
104
|
+
"href": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "string",
|
|
109
|
+
"resolved": "string",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": true,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": "Turns the tab into a navigation link to this URL. When set, the tab renders\nan `<a href>` (marked `aria-current=\"page\"` when `active`) instead of a\n`role=\"tab\"` button, so each tab is its own page/URL \u2014 for tab strips that\nnavigate rather than switch in-page panels. Pairs with `pds-tabs` navigation\nmode; no `pds-tabpanel`s are needed. Apply `href` to all tabs in a\n`pds-tabs` or none \u2014 mixing navigation and panel tabs is not supported."
|
|
117
|
+
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
120
|
+
"reflect": false,
|
|
121
|
+
"attribute": "href"
|
|
122
|
+
},
|
|
123
|
+
"active": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "boolean",
|
|
128
|
+
"resolved": "boolean",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": true,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [{
|
|
135
|
+
"name": "defaultValue",
|
|
136
|
+
"text": "false"
|
|
137
|
+
}],
|
|
138
|
+
"text": "Marks this tab as the current one in navigation mode (`href` set). Applies\nthe active treatment and `aria-current=\"page\"`. Ignored in panel mode, where\nthe active tab is derived from the parent's `activeTabName`."
|
|
139
|
+
},
|
|
140
|
+
"getter": false,
|
|
141
|
+
"setter": false,
|
|
142
|
+
"reflect": false,
|
|
143
|
+
"attribute": "active",
|
|
144
|
+
"defaultValue": "false"
|
|
145
|
+
},
|
|
146
|
+
"target": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "'_blank' | '_self' | '_parent' | '_top'",
|
|
151
|
+
"resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
|
|
152
|
+
"references": {}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": true,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Where to open the linked URL, in navigation mode. Maps to the anchor's\n`target` attribute."
|
|
159
|
+
},
|
|
160
|
+
"getter": false,
|
|
161
|
+
"setter": false,
|
|
162
|
+
"reflect": false,
|
|
163
|
+
"attribute": "target"
|
|
164
|
+
},
|
|
165
|
+
"turboFrame": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "string",
|
|
170
|
+
"resolved": "string",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": true,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": "Navigation mode: the Turbo Frame to target. Maps to `data-turbo-frame` on the\nanchor, so a tab can swap a single frame (e.g. a page body) while leaving the\nrest of the page in place."
|
|
178
|
+
},
|
|
179
|
+
"getter": false,
|
|
180
|
+
"setter": false,
|
|
181
|
+
"reflect": false,
|
|
182
|
+
"attribute": "turbo-frame"
|
|
183
|
+
},
|
|
184
|
+
"turboAction": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "'advance' | 'replace'",
|
|
189
|
+
"resolved": "\"advance\" | \"replace\"",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "Navigation mode: the Turbo visit action. Maps to `data-turbo-action` on the\nanchor (`advance` gives each tab its own history entry)."
|
|
197
|
+
},
|
|
198
|
+
"getter": false,
|
|
199
|
+
"setter": false,
|
|
200
|
+
"reflect": false,
|
|
201
|
+
"attribute": "turbo-action"
|
|
202
|
+
},
|
|
69
203
|
"name": {
|
|
70
204
|
"type": "string",
|
|
71
205
|
"mutable": false,
|
|
@@ -173,6 +307,28 @@ export class PdsTab {
|
|
|
173
307
|
"reflect": false,
|
|
174
308
|
"attribute": "selected",
|
|
175
309
|
"defaultValue": "false"
|
|
310
|
+
},
|
|
311
|
+
"navMode": {
|
|
312
|
+
"type": "boolean",
|
|
313
|
+
"mutable": false,
|
|
314
|
+
"complexType": {
|
|
315
|
+
"original": "boolean",
|
|
316
|
+
"resolved": "boolean",
|
|
317
|
+
"references": {}
|
|
318
|
+
},
|
|
319
|
+
"required": false,
|
|
320
|
+
"optional": true,
|
|
321
|
+
"docs": {
|
|
322
|
+
"tags": [{
|
|
323
|
+
"name": "internal",
|
|
324
|
+
"text": undefined
|
|
325
|
+
}],
|
|
326
|
+
"text": ""
|
|
327
|
+
},
|
|
328
|
+
"getter": false,
|
|
329
|
+
"setter": false,
|
|
330
|
+
"reflect": false,
|
|
331
|
+
"attribute": "nav-mode"
|
|
176
332
|
}
|
|
177
333
|
};
|
|
178
334
|
}
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
:host(.pds-tabpanel--stretch-active) {
|
|
6
|
+
flex: 1 1 auto;
|
|
7
|
+
min-block-size: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(.pds-tabpanel--stretch-active) .pds-tabpanel.is-active {
|
|
11
|
+
block-size: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
.pds-tabpanel {
|
|
6
15
|
display: none;
|
|
7
16
|
margin-top: var(--tabs-dimension-panel-margin-top);
|
|
@@ -6,9 +6,14 @@ export class PdsTabpanel {
|
|
|
6
6
|
*/
|
|
7
7
|
/** @internal */
|
|
8
8
|
this.selected = false; // eslint-disable-line @stencil-community/strict-mutable
|
|
9
|
+
/**
|
|
10
|
+
* Keeps track of the parent `stretch` state so the active panel can fill height, this property is passed by parent component
|
|
11
|
+
*/
|
|
12
|
+
/** @internal */
|
|
13
|
+
this.stretch = false;
|
|
9
14
|
}
|
|
10
15
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '88dfc12ce8b2413824e6d3425aa38674fa14c764', slot: "tabpanels", class: this.stretch && this.selected ? "pds-tabpanel--stretch-active" : undefined }, h("div", { key: 'bcfe8be6480dc253b10d63d6e37caacec4a8fe7f', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, h("slot", { key: '96ee87a0917e5f538a5c053045a5d6821684cf3a' }))));
|
|
12
17
|
}
|
|
13
18
|
static get is() { return "pds-tabpanel"; }
|
|
14
19
|
static get originalStyleUrls() {
|
|
@@ -108,6 +113,29 @@ export class PdsTabpanel {
|
|
|
108
113
|
"reflect": false,
|
|
109
114
|
"attribute": "selected",
|
|
110
115
|
"defaultValue": "false"
|
|
116
|
+
},
|
|
117
|
+
"stretch": {
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "boolean",
|
|
122
|
+
"resolved": "boolean",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [{
|
|
129
|
+
"name": "internal",
|
|
130
|
+
"text": undefined
|
|
131
|
+
}],
|
|
132
|
+
"text": ""
|
|
133
|
+
},
|
|
134
|
+
"getter": false,
|
|
135
|
+
"setter": false,
|
|
136
|
+
"reflect": false,
|
|
137
|
+
"attribute": "stretch",
|
|
138
|
+
"defaultValue": "false"
|
|
111
139
|
}
|
|
112
140
|
};
|
|
113
141
|
}
|
|
@@ -16,6 +16,20 @@
|
|
|
16
16
|
gap: var(--pine-dimension-md);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
:host(.pds-tabs--divider) .pds-tabs__tablist {
|
|
20
|
+
border-block-end: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(.pds-tabs--stretch) {
|
|
24
|
+
block-size: 100%;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.pds-tabs--stretch) .pds-tabs__tablist {
|
|
30
|
+
flex: 0 0 auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
19
33
|
:host(.pds-tabs--availability) .pds-tabs__tablist {
|
|
20
34
|
gap: var(--pine-dimension-xs);
|
|
21
35
|
}
|
|
@@ -5,6 +5,27 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
* @part tab-list - Exposes the container element that holds all the tab buttons for styling.
|
|
6
6
|
*/
|
|
7
7
|
export class PdsTabs {
|
|
8
|
+
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* Adds a divider rule beneath the tab list.
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
this.divider = false;
|
|
14
|
+
/**
|
|
15
|
+
* Stretches the component so the active tab panel fills the remaining height.
|
|
16
|
+
* Requires the component to have a constrained height (e.g. a flex parent).
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
*/
|
|
19
|
+
this.stretch = false;
|
|
20
|
+
/**
|
|
21
|
+
* Renders the tab strip as navigation instead of an in-page panel switcher: each
|
|
22
|
+
* `pds-tab` becomes an `<a href>` inside a `<nav>` landmark (with `aria-current`
|
|
23
|
+
* on the `active` tab) rather than a `role="tab"` button over a `pds-tabpanel`.
|
|
24
|
+
* Give every `pds-tab` an `href` and omit `pds-tabpanel`s.
|
|
25
|
+
* @defaultValue false
|
|
26
|
+
*/
|
|
27
|
+
this.nav = false;
|
|
28
|
+
}
|
|
8
29
|
tabClickHandler(event) {
|
|
9
30
|
if (this.componentId === event.detail[1]) {
|
|
10
31
|
this.activeTabIndex = event.detail[0];
|
|
@@ -12,6 +33,10 @@ export class PdsTabs {
|
|
|
12
33
|
}
|
|
13
34
|
}
|
|
14
35
|
handleKeyDown(ev) {
|
|
36
|
+
// Navigation mode uses real links: Tab moves focus, Enter follows the href.
|
|
37
|
+
// The roving/arrow model is a panel-mode (role=tab) concern only.
|
|
38
|
+
if (this.isNav)
|
|
39
|
+
return;
|
|
15
40
|
const keySet = ["ArrowLeft", "ArrowRight", "Home", "End"];
|
|
16
41
|
// Only handle keyboard navigation if the event originated from a tab button
|
|
17
42
|
// that belongs to THIS tabs component
|
|
@@ -24,6 +49,32 @@ export class PdsTabs {
|
|
|
24
49
|
this.moveActiveTab(ev.key);
|
|
25
50
|
}
|
|
26
51
|
}
|
|
52
|
+
// Navigation mode is an explicit, single source of truth: `nav` drives both the
|
|
53
|
+
// container (<nav> of links vs role=tablist of buttons) and every child tab (via
|
|
54
|
+
// `navMode`), so the tabs present when the strip initializes can't mix the two.
|
|
55
|
+
// (Child discovery is load-time only, like `variant`/`id`; tabs added after load
|
|
56
|
+
// aren't managed.)
|
|
57
|
+
get isNav() {
|
|
58
|
+
return !!this.nav;
|
|
59
|
+
}
|
|
60
|
+
// `nav` and per-tab `href` should agree. Warn on the two authoring mistakes
|
|
61
|
+
// rather than silently rendering a link with no destination, or ignoring an href.
|
|
62
|
+
warnOnNavConfig() {
|
|
63
|
+
var _a;
|
|
64
|
+
if (!((_a = this.tabs) === null || _a === void 0 ? void 0 : _a.length))
|
|
65
|
+
return;
|
|
66
|
+
// An empty `href=""` is not a usable destination, so it counts as missing.
|
|
67
|
+
const withHref = this.tabs.filter((tab) => {
|
|
68
|
+
const href = tab.getAttribute('href');
|
|
69
|
+
return href != null && href !== '';
|
|
70
|
+
}).length;
|
|
71
|
+
if (this.nav && withHref < this.tabs.length) {
|
|
72
|
+
console.warn('pds-tabs: `nav` is set, so every pds-tab needs an `href`.');
|
|
73
|
+
}
|
|
74
|
+
else if (!this.nav && withHref > 0) {
|
|
75
|
+
console.warn('pds-tabs: a pds-tab has an `href` but `nav` is not set — add `nav` to pds-tabs for navigation mode; the href is ignored in panel mode.');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
27
78
|
moveActiveTab(key) {
|
|
28
79
|
const firstTabNumber = 0;
|
|
29
80
|
const lastTabNumber = this.tabs.length - 1;
|
|
@@ -62,13 +113,25 @@ export class PdsTabs {
|
|
|
62
113
|
child['index'] = index;
|
|
63
114
|
}
|
|
64
115
|
passPropsToChildren() {
|
|
116
|
+
var _a;
|
|
117
|
+
// Panel mode needs a selected tab so the tablist stays keyboard-reachable
|
|
118
|
+
// (an all-unselected tablist has every button at tabindex="-1"). Default to
|
|
119
|
+
// the first ENABLED tab when the consumer omits `activeTabName` — a disabled
|
|
120
|
+
// tab is itself tabindex="-1", so selecting it would recreate the trap. Nav
|
|
121
|
+
// mode has no roving/selection, so it's left unset there.
|
|
122
|
+
if (!this.nav && this.activeTabName == null && this.tabs.length) {
|
|
123
|
+
const firstEnabled = (_a = this.tabs.find((tab) => !tab.disabled)) !== null && _a !== void 0 ? _a : this.tabs[0];
|
|
124
|
+
this.activeTabName = firstEnabled.name;
|
|
125
|
+
}
|
|
65
126
|
this.tabs.forEach((child, index) => {
|
|
66
127
|
if (this.activeTabName === child.name)
|
|
67
128
|
this.activeTabIndex = index;
|
|
68
129
|
this.propGeneration(child, index);
|
|
130
|
+
child.navMode = this.nav;
|
|
69
131
|
});
|
|
70
132
|
this.tabPanels.forEach((child) => {
|
|
71
133
|
this.propGeneration(child);
|
|
134
|
+
child.stretch = this.stretch;
|
|
72
135
|
});
|
|
73
136
|
}
|
|
74
137
|
classNames() {
|
|
@@ -77,17 +140,27 @@ export class PdsTabs {
|
|
|
77
140
|
const variantClassName = `pds-tabs--${this.variant}`;
|
|
78
141
|
className += ' ' + variantClassName;
|
|
79
142
|
}
|
|
143
|
+
if (this.divider) {
|
|
144
|
+
className += ' pds-tabs--divider';
|
|
145
|
+
}
|
|
146
|
+
if (this.stretch) {
|
|
147
|
+
className += ' pds-tabs--stretch';
|
|
148
|
+
}
|
|
80
149
|
return className;
|
|
81
150
|
}
|
|
82
151
|
;
|
|
83
152
|
componentWillLoad() {
|
|
84
153
|
this.findAllChildren();
|
|
154
|
+
this.warnOnNavConfig();
|
|
85
155
|
}
|
|
86
156
|
componentWillRender() {
|
|
87
157
|
this.passPropsToChildren();
|
|
88
158
|
}
|
|
89
159
|
render() {
|
|
90
|
-
|
|
160
|
+
// Navigation mode: a <nav> landmark of links (aria-current marks the current
|
|
161
|
+
// page). Panel mode: the ARIA tablist of role=tab buttons over tabpanels.
|
|
162
|
+
const tabList = this.isNav ? (h("nav", { class: "pds-tabs__tablist", "aria-label": this.tablistLabel || undefined, part: "tab-list" }, h("slot", { name: "tabs" }))) : (h("div", { class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel, part: "tab-list" }, h("slot", { name: "tabs" })));
|
|
163
|
+
return (h(Host, { key: '97bb6d788bd7bdf393b46eaecea612d9b0c9dee4', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, tabList, h("slot", { key: '252855bfa496bc3e04fbe6dc0bcb7597c7360407', name: "tabpanels" })));
|
|
91
164
|
}
|
|
92
165
|
static get is() { return "pds-tabs"; }
|
|
93
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,6 +233,75 @@ export class PdsTabs {
|
|
|
160
233
|
"reflect": false,
|
|
161
234
|
"attribute": "variant"
|
|
162
235
|
},
|
|
236
|
+
"divider": {
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"mutable": false,
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "boolean",
|
|
241
|
+
"resolved": "boolean",
|
|
242
|
+
"references": {}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": true,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [{
|
|
248
|
+
"name": "defaultValue",
|
|
249
|
+
"text": "false"
|
|
250
|
+
}],
|
|
251
|
+
"text": "Adds a divider rule beneath the tab list."
|
|
252
|
+
},
|
|
253
|
+
"getter": false,
|
|
254
|
+
"setter": false,
|
|
255
|
+
"reflect": false,
|
|
256
|
+
"attribute": "divider",
|
|
257
|
+
"defaultValue": "false"
|
|
258
|
+
},
|
|
259
|
+
"stretch": {
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "boolean",
|
|
264
|
+
"resolved": "boolean",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": true,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [{
|
|
271
|
+
"name": "defaultValue",
|
|
272
|
+
"text": "false"
|
|
273
|
+
}],
|
|
274
|
+
"text": "Stretches the component so the active tab panel fills the remaining height.\nRequires the component to have a constrained height (e.g. a flex parent)."
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"reflect": false,
|
|
279
|
+
"attribute": "stretch",
|
|
280
|
+
"defaultValue": "false"
|
|
281
|
+
},
|
|
282
|
+
"nav": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "boolean",
|
|
287
|
+
"resolved": "boolean",
|
|
288
|
+
"references": {}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": true,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [{
|
|
294
|
+
"name": "defaultValue",
|
|
295
|
+
"text": "false"
|
|
296
|
+
}],
|
|
297
|
+
"text": "Renders the tab strip as navigation instead of an in-page panel switcher: each\n`pds-tab` becomes an `<a href>` inside a `<nav>` landmark (with `aria-current`\non the `active` tab) rather than a `role=\"tab\"` button over a `pds-tabpanel`.\nGive every `pds-tab` an `href` and omit `pds-tabpanel`s."
|
|
298
|
+
},
|
|
299
|
+
"getter": false,
|
|
300
|
+
"setter": false,
|
|
301
|
+
"reflect": false,
|
|
302
|
+
"attribute": "nav",
|
|
303
|
+
"defaultValue": "false"
|
|
304
|
+
},
|
|
163
305
|
"activeTabName": {
|
|
164
306
|
"type": "string",
|
|
165
307
|
"mutable": true,
|
|
@@ -168,11 +310,11 @@ export class PdsTabs {
|
|
|
168
310
|
"resolved": "string",
|
|
169
311
|
"references": {}
|
|
170
312
|
},
|
|
171
|
-
"required":
|
|
172
|
-
"optional":
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": true,
|
|
173
315
|
"docs": {
|
|
174
316
|
"tags": [],
|
|
175
|
-
"text": "Sets the starting active tab name and maintains the name as the component re-renders"
|
|
317
|
+
"text": "Sets the starting active tab name and maintains the name as the component re-renders.\nPanel mode only \u2014 in navigation mode (`nav`) the active tab is set per-tab via\n`active`, so this is not required there."
|
|
176
318
|
},
|
|
177
319
|
"getter": false,
|
|
178
320
|
"setter": false,
|
|
@@ -61,3 +61,46 @@ Availability.args = {
|
|
|
61
61
|
variant: 'availability',
|
|
62
62
|
tablistLabel: "Foo",
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
export const Divider = () => html`
|
|
66
|
+
<pds-tabs active-tab-name="Dollop" component-id="divider" tablist-label="Foo" variant="primary" divider>
|
|
67
|
+
<pds-tab name="Sturdy">Sturdy</pds-tab>
|
|
68
|
+
<pds-tab name="Dollop">Dollop</pds-tab>
|
|
69
|
+
<pds-tab name="Waffle">Waffle</pds-tab>
|
|
70
|
+
<pds-tabpanel name="Sturdy">Content Sturdy</pds-tabpanel>
|
|
71
|
+
<pds-tabpanel name="Dollop">Content Dollop</pds-tabpanel>
|
|
72
|
+
<pds-tabpanel name="Waffle">Content Waffle</pds-tabpanel>
|
|
73
|
+
</pds-tabs>
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
export const Stretch = () => html`
|
|
77
|
+
<div style="block-size: 240px; border: var(--pine-border-width-thin) solid var(--pine-color-border-subtle); display: flex;">
|
|
78
|
+
<pds-tabs active-tab-name="Dollop" component-id="stretch" tablist-label="Foo" variant="primary" divider stretch>
|
|
79
|
+
<pds-tab name="Sturdy">Sturdy</pds-tab>
|
|
80
|
+
<pds-tab name="Dollop">Dollop</pds-tab>
|
|
81
|
+
<pds-tab name="Waffle">Waffle</pds-tab>
|
|
82
|
+
<pds-tabpanel name="Sturdy">Content Sturdy</pds-tabpanel>
|
|
83
|
+
<pds-tabpanel name="Dollop">
|
|
84
|
+
<div style="align-items: end; background-color: var(--pine-color-background-muted); block-size: 100%; display: flex;">Composer pinned to the bottom</div>
|
|
85
|
+
</pds-tabpanel>
|
|
86
|
+
<pds-tabpanel name="Waffle">Content Waffle</pds-tabpanel>
|
|
87
|
+
</pds-tabs>
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
// Navigation mode: set `nav` on pds-tabs and give each pds-tab an `href` (plus
|
|
92
|
+
// optional Turbo props). The strip renders as a <nav> of links with aria-current
|
|
93
|
+
// on the active one — for per-URL tab strips (e.g. deep-linkable page tabs) rather
|
|
94
|
+
// than in-page panels. No pds-tabpanels; the destination URL renders the content.
|
|
95
|
+
//
|
|
96
|
+
// This story exercises every nav-mode prop: the active tab drives a Turbo Frame
|
|
97
|
+
// (turbo-frame/turbo-action), a disabled tab is dropped from tab order, and an
|
|
98
|
+
// external tab opens in a new tab (target="_blank" → rel="noopener noreferrer").
|
|
99
|
+
export const NavTabs = () => html`
|
|
100
|
+
<pds-tabs component-id="nav" tablist-label="Club sections" variant="primary" divider nav>
|
|
101
|
+
<pds-tab name="chat" href="/clubs/1/chat" active turbo-frame="clubs-body" turbo-action="advance">Chat</pds-tab>
|
|
102
|
+
<pds-tab name="resources" href="/clubs/1/resources" turbo-frame="clubs-body" turbo-action="advance">Resources</pds-tab>
|
|
103
|
+
<pds-tab name="members" href="/clubs/1/members" disabled>Members</pds-tab>
|
|
104
|
+
<pds-tab name="help" href="https://help.example.com/clubs" target="_blank">Help</pds-tab>
|
|
105
|
+
</pds-tabs>
|
|
106
|
+
`;
|
|
@@ -83,7 +83,7 @@ export class PdsText {
|
|
|
83
83
|
? `pds-text--decoration-${this.decoration}`
|
|
84
84
|
: ''}
|
|
85
85
|
`;
|
|
86
|
-
return (h(Tag, { key: '
|
|
86
|
+
return (h(Tag, { key: '9ae3d5a57202ca1308c69b76645168fc8e18953b', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content", tabIndex: this.truncate ? 0 : undefined }, h("slot", { key: 'e6c95b8240690a9c83927e206096bbd7615dd4d2' })));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "pds-text"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,6 +3,7 @@ import { assignDescription, isRequired, isSpecTest, messageId, exposeTypePropert
|
|
|
3
3
|
import { debounceEvent } from "../../utils/utils";
|
|
4
4
|
import { inheritAttributes, inheritAriaAttributes } from "../../utils/attributes";
|
|
5
5
|
import { danger } from "@pine-ds/icons/icons";
|
|
6
|
+
import { formatMessage } from "../../i18n";
|
|
6
7
|
/**
|
|
7
8
|
* @slot action - Content to be displayed in the label area, typically for help icons or links
|
|
8
9
|
*/
|
|
@@ -43,6 +44,12 @@ export class PdsTextarea {
|
|
|
43
44
|
* If true, the textarea has action content in the label area
|
|
44
45
|
*/
|
|
45
46
|
this.hasAction = false;
|
|
47
|
+
/**
|
|
48
|
+
* Template for the character-counter's accessible label. Pass a translated
|
|
49
|
+
* string to localize it; `{current}` and `{max}` are interpolated.
|
|
50
|
+
* @defaultValue '{current} of {max} characters'
|
|
51
|
+
*/
|
|
52
|
+
this.characterCountLabel = '{current} of {max} characters';
|
|
46
53
|
this.onBlur = (ev) => {
|
|
47
54
|
this.hasFocus = false;
|
|
48
55
|
if (this.focusedValue !== this.value) {
|
|
@@ -240,7 +247,7 @@ export class PdsTextarea {
|
|
|
240
247
|
return null;
|
|
241
248
|
}
|
|
242
249
|
const currentLength = this.getValue().length;
|
|
243
|
-
return (h("div", { class: "pds-textarea__character-counter", ref: (el) => this.characterCounter = el, role: "status", "aria-live": "polite", "aria-label":
|
|
250
|
+
return (h("div", { class: "pds-textarea__character-counter", ref: (el) => this.characterCounter = el, role: "status", "aria-live": "polite", "aria-label": formatMessage(this.characterCountLabel, { current: currentLength, max: this.maxLength }) }, currentLength, " / ", this.maxLength));
|
|
244
251
|
}
|
|
245
252
|
renderAction() {
|
|
246
253
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
@@ -294,10 +301,10 @@ export class PdsTextarea {
|
|
|
294
301
|
}
|
|
295
302
|
render() {
|
|
296
303
|
const value = this.getValue();
|
|
297
|
-
return (h(Host, { key: '
|
|
298
|
-
h("div", { key: '
|
|
299
|
-
h("p", { key: '
|
|
300
|
-
h("p", { key: '
|
|
304
|
+
return (h(Host, { key: 'd13869d989752c76c80a46ebb0291df2c0546cc2', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '19454f642896485dc22bc5dac8b6ed3b4ae5627a', class: "pds-textarea" }, this.label &&
|
|
305
|
+
h("div", { key: 'def9e117ba3667a542e8cec32c2eabfa701c3305', class: "pds-textarea__label-wrapper" }, h("label", { key: '893a1db325ece460c627e72b765289098823e49e', htmlFor: this.componentId }, h("span", { key: 'd047f17441aa81800057d7403af15f6e38c53f6c', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '7d0f2fab56fee9b9d9e0facabc7e607cb6bee23b', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: 'a3ecb78c5b8f42f8350abe623bacb55be6c4a0c0', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
|
|
306
|
+
h("p", { key: 'b5229a6ef0b2c4ee5dcb820ce2b9bbf6334adef8', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
307
|
+
h("p", { key: '8e6dfa97496d553b8e1e2a50c1221fad3ddb539a', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: 'f3ed2677239e6d135480cf55d1d908936d746322', icon: danger, size: "small" }), this.errorMessage))));
|
|
301
308
|
}
|
|
302
309
|
static get is() { return "pds-textarea"; }
|
|
303
310
|
static get encapsulation() { return "shadow"; }
|
|
@@ -654,6 +661,29 @@ export class PdsTextarea {
|
|
|
654
661
|
"reflect": false,
|
|
655
662
|
"attribute": "value",
|
|
656
663
|
"defaultValue": "''"
|
|
664
|
+
},
|
|
665
|
+
"characterCountLabel": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"mutable": false,
|
|
668
|
+
"complexType": {
|
|
669
|
+
"original": "string",
|
|
670
|
+
"resolved": "string",
|
|
671
|
+
"references": {}
|
|
672
|
+
},
|
|
673
|
+
"required": false,
|
|
674
|
+
"optional": false,
|
|
675
|
+
"docs": {
|
|
676
|
+
"tags": [{
|
|
677
|
+
"name": "defaultValue",
|
|
678
|
+
"text": "'{current} of {max} characters'"
|
|
679
|
+
}],
|
|
680
|
+
"text": "Template for the character-counter's accessible label. Pass a translated\nstring to localize it; `{current}` and `{max}` are interpolated."
|
|
681
|
+
},
|
|
682
|
+
"getter": false,
|
|
683
|
+
"setter": false,
|
|
684
|
+
"reflect": false,
|
|
685
|
+
"attribute": "character-count-label",
|
|
686
|
+
"defaultValue": "'{current} of {max} characters'"
|
|
657
687
|
}
|
|
658
688
|
};
|
|
659
689
|
}
|