@pine-ds/core 4.7.2 → 4.9.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/attributes.js +1 -1
- package/components/floating-ui.dom.js +1 -1
- package/components/index.js +1 -1
- package/components/index2.js +1 -1
- package/components/keep-hydrated.js +1 -0
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-alert.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-drawer-content.js +1 -1
- package/components/pds-drawer-footer.js +1 -1
- package/components/pds-drawer-header.js +1 -1
- package/components/pds-drawer.js +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filters.js +1 -1
- package/components/pds-image.js +1 -1
- package/components/pds-input2.js +1 -1
- package/components/pds-link2.js +1 -1
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +1 -1
- package/components/pds-table-head-cell2.js +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.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/components/tabbable.js +1 -0
- package/components/truncation-tooltip.js +1 -1
- package/dist/cjs/{attributes-BJ7KBHql.js → attributes-CW49XqaL.js} +1 -1
- package/dist/cjs/{floating-ui.dom-Dc8Anyel.js → floating-ui.dom-Dw41zbyY.js} +1 -0
- package/dist/cjs/{index-jl_Q819j.js → index-BsWY_xEJ.js} +1 -1
- package/dist/cjs/{index-5Azb8EQG.js → index-Do70atou.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{keep-hydrated-CiXgkEYd.js → keep-hydrated-AKoh0DG4.js} +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
- package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/pds-alert.cjs.entry.js +17 -4
- package/dist/cjs/pds-avatar.cjs.entry.js +23 -13
- package/dist/cjs/pds-box.cjs.entry.js +4 -4
- package/dist/cjs/pds-button.cjs.entry.js +80 -45
- package/dist/cjs/pds-checkbox.cjs.entry.js +16 -8
- package/dist/cjs/pds-chip.cjs.entry.js +8 -8
- package/dist/cjs/pds-combobox.cjs.entry.js +43 -13
- package/dist/cjs/pds-container.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js +7 -7
- package/dist/cjs/pds-datepicker.cjs.entry.js +6 -6
- package/dist/cjs/pds-divider.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +34 -5
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +8 -8
- package/dist/cjs/pds-filter.cjs.entry.js +4 -4
- package/dist/cjs/pds-filters.cjs.entry.js +3 -3
- package/dist/cjs/pds-icon.cjs.entry.js +2 -2
- package/dist/cjs/pds-image.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.cjs.entry.js +6 -6
- package/dist/cjs/pds-link.cjs.entry.js +15 -6
- package/dist/cjs/pds-loader.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-content.cjs.entry.js +34 -32
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal.cjs.entry.js +9 -89
- package/dist/cjs/pds-multiselect.cjs.entry.js +9 -9
- package/dist/cjs/pds-popover.cjs.entry.js +416 -163
- package/dist/cjs/pds-progress.cjs.entry.js +4 -4
- package/dist/cjs/pds-property.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/pds-radio.cjs.entry.js +24 -11
- package/dist/cjs/pds-row.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.cjs.entry.js +132 -21
- package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
- package/dist/cjs/pds-switch.cjs.entry.js +7 -7
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js +6 -6
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
- package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-table.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabpanel.cjs.entry.js +4 -4
- package/dist/cjs/pds-tabs.cjs.entry.js +4 -4
- package/dist/cjs/pds-text.cjs.entry.js +5 -5
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
- package/dist/cjs/pds-toast.cjs.entry.js +14 -8
- package/dist/cjs/pds-tooltip.cjs.entry.js +115 -44
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/cjs/tabbable-CddSt_Hi.js +85 -0
- package/dist/cjs/{truncation-tooltip-DO9xli2e.js → truncation-tooltip-O5nQmXPw.js} +32 -7
- package/dist/collection/components/pds-alert/pds-alert.css +13 -0
- package/dist/collection/components/pds-alert/pds-alert.js +36 -1
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +4 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +42 -10
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +2 -0
- package/dist/collection/components/pds-box/pds-box.js +1 -1
- package/dist/collection/components/pds-button/pds-button.js +36 -44
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +3 -3
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +79 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +36 -5
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +38 -0
- package/dist/collection/components/pds-chip/pds-chip.js +2 -2
- package/dist/collection/components/pds-combobox/pds-combobox.css +33 -0
- package/dist/collection/components/pds-combobox/pds-combobox.js +62 -9
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +44 -0
- package/dist/collection/components/pds-container/pds-container.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2 -2
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +1 -1
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +2 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +8 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +81 -7
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +4 -4
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +39 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
- package/dist/collection/components/pds-filters/pds-filters.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +2 -2
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +6 -6
- package/dist/collection/components/pds-link/pds-link.js +34 -3
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +3 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +32 -30
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.js +5 -85
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +5 -5
- package/dist/collection/components/pds-popover/pds-popover.css +6 -0
- package/dist/collection/components/pds-popover/pds-popover.js +465 -159
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +31 -0
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +57 -0
- package/dist/collection/components/pds-radio/pds-radio.js +45 -9
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +15 -0
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +45 -0
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +128 -17
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -2
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +3 -3
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +4 -4
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -2
- package/dist/collection/components/pds-toast/pds-toast.css +13 -0
- package/dist/collection/components/pds-toast/pds-toast.js +33 -5
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +4 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +113 -41
- package/dist/collection/utils/aria-references.js +42 -0
- package/dist/collection/utils/tabbable.js +81 -0
- package/dist/collection/utils/truncation-tooltip.js +31 -6
- package/dist/docs.json +367 -13
- package/dist/esm/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm/{index-Cw9J31qd.js → index-BFSwd-GQ.js} +1 -1
- package/dist/esm/{index-BJXk71tO.js → index-m3pqpeWg.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +3 -3
- package/dist/esm/pds-alert.entry.js +17 -4
- package/dist/esm/pds-avatar.entry.js +23 -13
- package/dist/esm/pds-box.entry.js +4 -4
- package/dist/esm/pds-button.entry.js +80 -45
- package/dist/esm/pds-checkbox.entry.js +16 -8
- package/dist/esm/pds-chip.entry.js +8 -8
- package/dist/esm/pds-combobox.entry.js +43 -13
- package/dist/esm/pds-container.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js +7 -7
- package/dist/esm/pds-datepicker.entry.js +6 -6
- package/dist/esm/pds-divider.entry.js +3 -3
- package/dist/esm/pds-drawer-content.entry.js +3 -3
- package/dist/esm/pds-drawer-footer.entry.js +3 -3
- package/dist/esm/pds-drawer-header.entry.js +3 -3
- package/dist/esm/pds-drawer.entry.js +4 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +34 -5
- package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu.entry.js +8 -8
- package/dist/esm/pds-filter.entry.js +4 -4
- package/dist/esm/pds-filters.entry.js +3 -3
- package/dist/esm/pds-icon.entry.js +2 -2
- package/dist/esm/pds-image.entry.js +4 -4
- package/dist/esm/pds-input.entry.js +6 -6
- package/dist/esm/pds-link.entry.js +15 -6
- package/dist/esm/pds-loader.entry.js +4 -4
- package/dist/esm/pds-modal-content.entry.js +34 -32
- package/dist/esm/pds-modal-footer.entry.js +3 -3
- package/dist/esm/pds-modal-header.entry.js +3 -3
- package/dist/esm/pds-modal.entry.js +7 -87
- package/dist/esm/pds-multiselect.entry.js +9 -9
- package/dist/esm/pds-popover.entry.js +416 -163
- package/dist/esm/pds-progress.entry.js +4 -4
- package/dist/esm/pds-property.entry.js +3 -3
- package/dist/esm/pds-radio-group.entry.js +6 -6
- package/dist/esm/pds-radio.entry.js +24 -11
- package/dist/esm/pds-row.entry.js +4 -4
- package/dist/esm/pds-select.entry.js +132 -21
- package/dist/esm/pds-sortable-item.entry.js +5 -5
- package/dist/esm/pds-sortable.entry.js +4 -4
- package/dist/esm/pds-switch.entry.js +7 -7
- package/dist/esm/pds-tab.entry.js +3 -3
- package/dist/esm/pds-table-body.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js +6 -6
- package/dist/esm/pds-table-head-cell.entry.js +5 -5
- package/dist/esm/pds-table-head.entry.js +3 -3
- package/dist/esm/pds-table-row.entry.js +3 -3
- package/dist/esm/pds-table.entry.js +2 -2
- package/dist/esm/pds-tabpanel.entry.js +4 -4
- package/dist/esm/pds-tabs.entry.js +4 -4
- package/dist/esm/pds-text.entry.js +5 -5
- package/dist/esm/pds-textarea.entry.js +8 -8
- package/dist/esm/pds-toast.entry.js +14 -8
- package/dist/esm/pds-tooltip.entry.js +115 -44
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm/tabbable-DCKBKRUy.js +83 -0
- package/dist/esm/{truncation-tooltip-DRXsdKk1.js → truncation-tooltip-D_gvhB9r.js} +32 -7
- package/dist/esm-es5/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm-es5/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm-es5/{index-Cw9J31qd.js → index-BFSwd-GQ.js} +2 -2
- package/dist/esm-es5/{index-BJXk71tO.js → index-m3pqpeWg.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- 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-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.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 +2 -2
- 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/esm-es5/tabbable-DCKBKRUy.js +1 -0
- package/dist/esm-es5/truncation-tooltip-D_gvhB9r.js +1 -0
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/p-001d4b86.entry.js +1 -0
- package/dist/pine-core/p-06279b93.system.entry.js +1 -0
- package/dist/pine-core/{p-b75b0d09.system.entry.js → p-0790dd0d.system.entry.js} +1 -1
- package/dist/pine-core/p-079c39d1.entry.js +1 -0
- package/dist/pine-core/p-07b4524e.entry.js +1 -0
- package/dist/pine-core/{p-b60ac7eb.system.entry.js → p-08bbd3e6.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5c9ed36.system.entry.js → p-0bd61097.system.entry.js} +1 -1
- package/dist/pine-core/p-0c60f577.system.entry.js +1 -0
- package/dist/pine-core/{p-6d603d16.system.entry.js → p-110b4051.system.entry.js} +1 -1
- package/dist/pine-core/p-11e7d660.entry.js +1 -0
- package/dist/pine-core/p-14d872d3.entry.js +1 -0
- package/dist/pine-core/p-17fc76e7.system.entry.js +1 -0
- package/dist/pine-core/{p-0913f696.system.entry.js → p-1e5648bf.system.entry.js} +1 -1
- package/dist/pine-core/{p-e803f629.system.entry.js → p-22ae92f7.system.entry.js} +1 -1
- package/dist/pine-core/p-239774c9.entry.js +1 -0
- package/dist/pine-core/{p-0b71ecb6.system.entry.js → p-25bf2f26.system.entry.js} +2 -2
- package/dist/pine-core/{p-e7a95a49.system.entry.js → p-272b24ad.system.entry.js} +1 -1
- package/dist/pine-core/{p-d2c91e7a.entry.js → p-2c0047cd.entry.js} +1 -1
- package/dist/pine-core/p-2d5b1deb.entry.js +1 -0
- package/dist/pine-core/{p-e8cb76e8.entry.js → p-3556f6ad.entry.js} +1 -1
- package/dist/pine-core/{p-BGLP3keB.js → p-35s7h-dk.js} +1 -1
- package/dist/pine-core/{p-080cb087.system.entry.js → p-38b87aa2.system.entry.js} +1 -1
- package/dist/pine-core/{p-355e4cf9.entry.js → p-3afb1208.entry.js} +1 -1
- package/dist/pine-core/p-3b5b8f73.entry.js +1 -0
- package/dist/pine-core/{p-8c8cc079.system.entry.js → p-3cc19ea8.system.entry.js} +1 -1
- package/dist/pine-core/{p-bd67156b.system.entry.js → p-3ce7e72e.system.entry.js} +1 -1
- package/dist/pine-core/p-3f62581a.system.entry.js +1 -0
- package/dist/pine-core/p-414faecf.entry.js +1 -0
- package/dist/pine-core/p-463a29fa.entry.js +1 -0
- package/dist/pine-core/{p-f029b7da.system.entry.js → p-4ee44585.system.entry.js} +1 -1
- package/dist/pine-core/p-50af67ea.system.entry.js +1 -0
- package/dist/pine-core/p-5133e8be.system.entry.js +1 -0
- package/dist/pine-core/p-55fce29e.entry.js +1 -0
- package/dist/pine-core/{p-77395d62.system.entry.js → p-568a9a79.system.entry.js} +1 -1
- package/dist/pine-core/p-5967d9fa.system.entry.js +1 -0
- package/dist/pine-core/{p-5870b092.system.entry.js → p-5c46553f.system.entry.js} +1 -1
- package/dist/pine-core/{p-f0d24298.system.entry.js → p-5ce5836e.system.entry.js} +1 -1
- package/dist/pine-core/p-5f3242c8.system.entry.js +1 -0
- package/dist/pine-core/{p-80e6f3a0.system.entry.js → p-60d27247.system.entry.js} +1 -1
- package/dist/pine-core/{p-bd26a5e8.entry.js → p-60e3b1af.entry.js} +1 -1
- package/dist/pine-core/{p-ca0a8f5c.entry.js → p-64283f7b.entry.js} +1 -1
- package/dist/pine-core/p-6602b4d0.entry.js +1 -0
- package/dist/pine-core/p-6845867f.system.entry.js +1 -0
- package/dist/pine-core/{p-1ee86d87.system.entry.js → p-68fdfb8f.system.entry.js} +1 -1
- package/dist/pine-core/p-6b6ae1be.entry.js +1 -0
- package/dist/pine-core/{p-e5420660.entry.js → p-6d64e6c7.entry.js} +1 -1
- package/dist/pine-core/{p-3a959459.system.entry.js → p-6dad76cb.system.entry.js} +1 -1
- package/dist/pine-core/p-6f34ad9c.entry.js +1 -0
- package/dist/pine-core/{p-55224683.entry.js → p-7073146f.entry.js} +1 -1
- package/dist/pine-core/{p-f1702281.entry.js → p-735b3631.entry.js} +1 -1
- package/dist/pine-core/p-7a14473e.entry.js +1 -0
- package/dist/pine-core/{p-9880d251.system.entry.js → p-7a19477e.system.entry.js} +1 -1
- package/dist/pine-core/{p-88ff1604.entry.js → p-7d3a20ba.entry.js} +1 -1
- package/dist/pine-core/{p-a939b471.entry.js → p-7fcf3d37.entry.js} +1 -1
- package/dist/pine-core/{p-26642718.entry.js → p-87642228.entry.js} +1 -1
- package/dist/pine-core/p-89fefe36.entry.js +1 -0
- package/dist/pine-core/p-8b97dd57.system.entry.js +1 -0
- package/dist/pine-core/{p-0092444c.system.entry.js → p-9201b497.system.entry.js} +1 -1
- package/dist/pine-core/{p-ebd0bff2.entry.js → p-92a8cf7d.entry.js} +1 -1
- package/dist/pine-core/{p-e836a041.entry.js → p-94597b73.entry.js} +1 -1
- package/dist/pine-core/p-9713d6a5.system.entry.js +1 -0
- package/dist/pine-core/p-97be00f4.system.entry.js +1 -0
- package/dist/pine-core/{p-2ac2457b.system.entry.js → p-98843402.system.entry.js} +1 -1
- package/dist/pine-core/{p-b914dde8.entry.js → p-98cc327b.entry.js} +2 -2
- package/dist/pine-core/p-9a8971e2.system.entry.js +1 -0
- package/dist/pine-core/p-9a8d2985.system.entry.js +3 -0
- package/dist/pine-core/{p-cfc52b95.system.entry.js → p-9dbc017f.system.entry.js} +1 -1
- package/dist/pine-core/p-9fbcba0d.entry.js +1 -0
- package/dist/pine-core/p-9fe4a64a.entry.js +1 -0
- package/dist/pine-core/{p-COtCa1Md.system.js → p-BNTlHhoO.system.js} +1 -1
- package/dist/pine-core/p-BZ1l3LGl.system.js +1 -0
- package/dist/pine-core/p-BgNaWLoS.js +1 -0
- package/dist/pine-core/{p-CmSJytt1.js → p-BplEmwUQ.js} +2 -2
- package/dist/pine-core/{p-Cy8cvR7I.system.js → p-CANeE7Ss.system.js} +1 -1
- package/dist/pine-core/{p-XW4H0W6i.system.js → p-CNXspDYs.system.js} +1 -1
- package/dist/pine-core/{p-JtdHT_W5.js → p-CirzxZ33.js} +1 -1
- package/dist/pine-core/{p-CGRdQc49.system.js → p-CjRCtzPD.system.js} +2 -2
- package/dist/pine-core/{p-BPqJgIq6.js → p-Cuc0DYlm.js} +1 -1
- package/dist/pine-core/p-D52aRqFx.system.js +1 -0
- package/dist/pine-core/p-DCKBKRUy.js +1 -0
- package/dist/pine-core/p-DXO1yd32.system.js +1 -0
- package/dist/pine-core/{p-n3_ytl_p.system.js → p-DaCT2ssj.system.js} +1 -1
- package/dist/pine-core/p-a2078add.entry.js +1 -0
- package/dist/pine-core/{p-97d0b89e.system.entry.js → p-a48b025a.system.entry.js} +1 -1
- package/dist/pine-core/{p-9713fb36.entry.js → p-a7d25143.entry.js} +1 -1
- package/dist/pine-core/{p-9dcd2cdb.entry.js → p-ad3b1ec3.entry.js} +1 -1
- package/dist/pine-core/p-b017eb99.system.entry.js +1 -0
- package/dist/pine-core/p-b037dcbd.system.entry.js +1 -0
- package/dist/pine-core/{p-db17c626.system.entry.js → p-b243767b.system.entry.js} +1 -1
- package/dist/pine-core/{p-341c38f1.system.entry.js → p-b33ad96e.system.entry.js} +1 -1
- package/dist/pine-core/p-b6edfdfe.entry.js +2 -0
- package/dist/pine-core/{p-8191498f.system.entry.js → p-b7cbd913.system.entry.js} +1 -1
- package/dist/pine-core/{p-8f531063.entry.js → p-b9d71b76.entry.js} +1 -1
- package/dist/pine-core/p-bcf57566.entry.js +1 -0
- package/dist/pine-core/{p-4fd454f6.entry.js → p-bda7e3be.entry.js} +1 -1
- package/dist/pine-core/p-bdde1e53.entry.js +1 -0
- package/dist/pine-core/{p-cb6a3e4c.system.entry.js → p-be3b4f12.system.entry.js} +1 -1
- package/dist/pine-core/{p-b1548a20.entry.js → p-bfdfbe9f.entry.js} +1 -1
- package/dist/pine-core/p-c02a32ec.entry.js +1 -0
- package/dist/pine-core/p-c1da80e5.entry.js +1 -0
- package/dist/pine-core/{p-d8570b4b.system.entry.js → p-c233866c.system.entry.js} +1 -1
- package/dist/pine-core/{p-fc25b956.system.entry.js → p-cb560aab.system.entry.js} +1 -1
- package/dist/pine-core/{p-02088776.entry.js → p-ce554098.entry.js} +1 -1
- package/dist/pine-core/p-ced6a814.system.entry.js +1 -0
- package/dist/pine-core/{p-0a84d220.entry.js → p-d7930540.entry.js} +1 -1
- package/dist/pine-core/{p-11d98408.system.entry.js → p-d7db749a.system.entry.js} +1 -1
- package/dist/pine-core/{p-7a5b21d2.system.entry.js → p-d8bedb58.system.entry.js} +1 -1
- package/dist/pine-core/{p-1dc5a7e0.system.entry.js → p-d9243653.system.entry.js} +1 -1
- package/dist/pine-core/{p-9ab95438.entry.js → p-d94ebe84.entry.js} +1 -1
- package/dist/pine-core/{p-9109b90a.entry.js → p-de176bd9.entry.js} +1 -1
- package/dist/pine-core/{p-57a2f927.entry.js → p-dea2a254.entry.js} +1 -1
- package/dist/pine-core/p-dfadfcd1.entry.js +1 -0
- package/dist/pine-core/{p-1437585e.system.entry.js → p-e1fdd53a.system.entry.js} +1 -1
- package/dist/pine-core/{p-4435fff6.system.entry.js → p-e70cb112.system.entry.js} +1 -1
- package/dist/pine-core/{p-01aa382c.system.entry.js → p-e9a53a88.system.entry.js} +1 -1
- package/dist/pine-core/p-eb93cc6e.entry.js +1 -0
- package/dist/pine-core/{p-4d03d1e2.system.entry.js → p-ebf0c51b.system.entry.js} +1 -1
- package/dist/pine-core/p-ebf74c43.system.entry.js +1 -0
- package/dist/pine-core/{p-cde8eb81.entry.js → p-ee449a4b.entry.js} +1 -1
- package/dist/pine-core/p-ef4d8fea.entry.js +1 -0
- package/dist/pine-core/p-f09f27ab.system.entry.js +1 -0
- package/dist/pine-core/{p-ff3de72e.entry.js → p-f2c487e6.entry.js} +1 -1
- package/dist/pine-core/p-f549f2bc.entry.js +1 -0
- package/dist/pine-core/p-fc743f6e.entry.js +1 -0
- package/dist/pine-core/{p-BJXk71tO.js → p-m3pqpeWg.js} +1 -1
- package/dist/pine-core/p-wXfuz0Bd.system.js +1 -0
- 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 +10 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +8 -0
- package/dist/types/components/pds-button/pds-button.d.ts +5 -6
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +7 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +9 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +20 -3
- package/dist/types/components/pds-link/pds-link.d.ts +8 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +2 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +87 -21
- package/dist/types/components/pds-radio/pds-radio.d.ts +9 -3
- package/dist/types/components/pds-select/pds-select.d.ts +32 -4
- package/dist/types/components/pds-toast/pds-toast.d.ts +9 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +31 -0
- package/dist/types/components.d.ts +139 -18
- package/dist/types/utils/aria-references.d.ts +24 -0
- package/dist/types/utils/tabbable.d.ts +2 -0
- package/dist/types/utils/truncation-tooltip.d.ts +4 -4
- package/dist/types/utils/types.d.ts +1 -0
- package/dist/vscode.html-data.json +129 -14
- package/hydrate/index.js +1040 -416
- package/hydrate/index.mjs +1040 -416
- package/package.json +2 -2
- package/dist/esm-es5/truncation-tooltip-DRXsdKk1.js +0 -1
- package/dist/pine-core/p-049f126a.entry.js +0 -1
- package/dist/pine-core/p-153ba77b.entry.js +0 -1
- package/dist/pine-core/p-208c7dbf.entry.js +0 -1
- package/dist/pine-core/p-258770cf.system.entry.js +0 -1
- package/dist/pine-core/p-2cb5483a.system.entry.js +0 -1
- package/dist/pine-core/p-432d5ec7.entry.js +0 -1
- package/dist/pine-core/p-5442d983.system.entry.js +0 -1
- package/dist/pine-core/p-576cf904.system.entry.js +0 -1
- package/dist/pine-core/p-5c90091e.system.entry.js +0 -1
- package/dist/pine-core/p-602c197f.entry.js +0 -1
- package/dist/pine-core/p-645a482b.system.entry.js +0 -1
- package/dist/pine-core/p-72865997.entry.js +0 -1
- package/dist/pine-core/p-75ee0403.entry.js +0 -1
- package/dist/pine-core/p-7a287635.system.entry.js +0 -1
- package/dist/pine-core/p-7bf6563a.system.entry.js +0 -1
- package/dist/pine-core/p-7fa66cad.entry.js +0 -1
- package/dist/pine-core/p-80a698ae.entry.js +0 -1
- package/dist/pine-core/p-82cf4ec6.entry.js +0 -1
- package/dist/pine-core/p-86040cac.system.entry.js +0 -1
- package/dist/pine-core/p-875b0436.system.entry.js +0 -1
- package/dist/pine-core/p-8cc302aa.system.entry.js +0 -1
- package/dist/pine-core/p-8d292b48.entry.js +0 -1
- package/dist/pine-core/p-92ae6082.entry.js +0 -1
- package/dist/pine-core/p-94593f20.system.entry.js +0 -1
- package/dist/pine-core/p-993d1043.entry.js +0 -1
- package/dist/pine-core/p-99459e27.entry.js +0 -1
- package/dist/pine-core/p-BLG6RDBt.js +0 -1
- package/dist/pine-core/p-BR5nujVX.system.js +0 -1
- package/dist/pine-core/p-CuSNnuFu.system.js +0 -1
- package/dist/pine-core/p-a0960b3d.system.entry.js +0 -1
- package/dist/pine-core/p-a1230a74.system.entry.js +0 -1
- package/dist/pine-core/p-a19cd59c.entry.js +0 -1
- package/dist/pine-core/p-a787b34a.system.entry.js +0 -1
- package/dist/pine-core/p-a826f290.entry.js +0 -1
- package/dist/pine-core/p-aa032a5e.system.entry.js +0 -1
- package/dist/pine-core/p-acce8eb2.entry.js +0 -1
- package/dist/pine-core/p-b69f04b7.entry.js +0 -1
- package/dist/pine-core/p-bb68431a.entry.js +0 -1
- package/dist/pine-core/p-bb73ad66.entry.js +0 -2
- package/dist/pine-core/p-beb23781.entry.js +0 -1
- package/dist/pine-core/p-bf30dec0.entry.js +0 -1
- package/dist/pine-core/p-c36b490e.entry.js +0 -1
- package/dist/pine-core/p-c81d8ac8.entry.js +0 -1
- package/dist/pine-core/p-ca0d48e8.entry.js +0 -1
- package/dist/pine-core/p-cfd012d4.entry.js +0 -1
- package/dist/pine-core/p-e0917a26.entry.js +0 -1
- package/dist/pine-core/p-e836f3ec.system.entry.js +0 -3
- package/dist/pine-core/p-ea4d4741.system.entry.js +0 -1
- package/dist/pine-core/p-f2c253d8.entry.js +0 -1
- package/dist/pine-core/p-f474d7de.entry.js +0 -1
- package/dist/pine-core/p-f77905aa.system.entry.js +0 -1
- package/dist/pine-core/p-qhdoK1Jp.system.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as n,createEvent as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as n,createEvent as e,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{H as a}from"./attributes.js";
|
|
2
2
|
/**!
|
|
3
3
|
* Sortable 1.15.7
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/function s(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var e=i.call(t,n);if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return t+""}(t,"string");return"symbol"==typeof n?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function u(){return u=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)({}).hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},u.apply(null,arguments)}function l(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function c(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?l(Object(i),!0).forEach((function(n){s(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var d=h(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=h(/Edge/i),m=h(/firefox/i),p=h(/safari/i)&&!h(/chrome/i)&&!h(/android/i),b=h(/iP(ad|od|hone)/i),g=h(/chrome/i)&&h(/android/i),w={capture:!1,passive:!1};function y(t,n,i){t.addEventListener(n,i,!d&&w)}function E(t,n,i){t.removeEventListener(n,i,!d&&w)}function S(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function x(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function T(t,n,i,e){if(t){i=i||document;do{if(null!=n&&(">"===n[0]?t.parentNode===i&&S(t,n):S(t,n))||e&&t===i)return t;if(t===i)break}while(t=x(t))}return null}var M,I=/\s+/g;function O(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var e=(" "+t.className+" ").replace(I," ").replace(" "+n+" "," ");t.className=(e+(i?" "+n:"")).replace(I," ")}}function D(t,n,i){var e=t&&t.style;if(e){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===n?i:i[n];n in e||-1!==n.indexOf("webkit")||(n="-webkit-"+n),e[n]=i+("string"==typeof i?"":"px")}}function C(t,n){var i="";if("string"==typeof t)i=t;else do{var e=D(t,"transform");e&&"none"!==e&&(i=e+" "+i)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function _(t,n,i){if(t){var e=t.getElementsByTagName(n),o=0,r=e.length;if(i)for(;o<r;o++)i(e[o],o);return e}return[]}function k(){return document.scrollingElement||document.documentElement}function j(t,n,i,e,o){if(t.getBoundingClientRect||t===window){var r,a,s,u,l,c,f;if(t!==window&&t.parentNode&&t!==k()?(a=(r=t.getBoundingClientRect()).top,s=r.left,u=r.bottom,l=r.right,c=r.height,f=r.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(n||i)&&t!==window&&(o=o||t.parentNode,!d))do{if(o&&o.getBoundingClientRect&&("none"!==D(o,"transform")||i&&"static"!==D(o,"position"))){var h=o.getBoundingClientRect();a-=h.top+parseInt(D(o,"border-top-width")),s-=h.left+parseInt(D(o,"border-left-width")),u=a+r.height,l=s+r.width;break}}while(o=o.parentNode);if(e&&t!==window){var v=C(o||t),m=v&&v.a,p=v&&v.d;v&&(u=(a/=p)+(c/=p),l=(s/=m)+(f/=m))}return{top:a,left:s,bottom:u,right:l,width:f,height:c}}}function A(t,n,i){for(var e=H(t,!0),o=j(t)[n];e;){if(!(o>=j(e)[i]))return e;if(e===k())break;e=H(e,!1)}return!1}function z(t,n,i,e){for(var o=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Lt.ghost&&(e||a[r]!==Lt.dragged)&&T(a[r],i.draggable,t,!1)){if(o===n)return a[r];o++}r++}return null}function N(t,n){for(var i=t.lastElementChild;i&&(i===Lt.ghost||"none"===D(i,"display")||n&&!S(i,n));)i=i.previousElementSibling;return i||null}function P(t,n){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Lt.clone||n&&!S(t,n)||i++;return i}function F(t){var n=0,i=0,e=k();if(t)do{var o=C(t);n+=t.scrollLeft*o.a,i+=t.scrollTop*o.d}while(t!==e&&(t=t.parentNode));return[n,i]}function H(t,n){if(!t||!t.getBoundingClientRect)return k();var i=t,e=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=D(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return k();if(e||n)return i;e=!0}}}while(i=i.parentNode);return k()}function B(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}function G(t,n){return function(){if(!M){var i=arguments;1===i.length?t.call(this,i[0]):t.apply(this,i),M=setTimeout((function(){M=void 0}),n)}}}function L(t,n,i){t.scrollLeft+=n,t.scrollTop+=i}function R(t){var n=window.Polymer,i=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function W(t,n,i){var e={};return Array.from(t.children).forEach((function(o){var r,a,s,u;if(T(o,n.draggable,t,!1)&&!o.animated&&o!==i){var l=j(o);e.left=Math.min(null!==(r=e.left)&&void 0!==r?r:1/0,l.left),e.top=Math.min(null!==(a=e.top)&&void 0!==a?a:1/0,l.top),e.right=Math.max(null!==(s=e.right)&&void 0!==s?s:-1/0,l.right),e.bottom=Math.max(null!==(u=e.bottom)&&void 0!==u?u:-1/0,l.bottom)}})),e.width=e.right-e.left,e.height=e.bottom-e.top,e.x=e.left,e.y=e.top,e}var X="Sortable"+(new Date).getTime();var Y=[],U={initializeByDefault:!0},V={mount:function(t){for(var n in U)U.hasOwnProperty(n)&&!(n in t)&&(t[n]=U[n]);Y.forEach((function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Y.push(t)},pluginEvent:function(t,n,i){var e=this;this.eventCanceled=!1,i.cancel=function(){e.eventCanceled=!0};var o=t+"Global";Y.forEach((function(e){n[e.pluginName]&&(n[e.pluginName][o]&&n[e.pluginName][o](c({sortable:n},i)),n.options[e.pluginName]&&n[e.pluginName][t]&&n[e.pluginName][t](c({sortable:n},i)))}))},initializePlugins:function(t,n,i){for(var e in Y.forEach((function(e){var o=e.pluginName;if(t.options[o]||e.initializeByDefault){var r=new e(t,n,t.options);r.sortable=t,r.options=t.options,t[o]=r,u(i,r.defaults)}})),t.options)if(t.options.hasOwnProperty(e)){var o=this.modifyOption(t,e,t.options[e]);void 0!==o&&(t.options[e]=o)}},getEventProperties:function(t,n){var i={};return Y.forEach((function(e){"function"==typeof e.eventProperties&&u(i,e.eventProperties.call(n[e.pluginName],t))})),i},modifyOption:function(t,n,i){var e;return Y.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[n]&&(e=o.optionListeners[n].call(t[o.pluginName],i))})),e}},Z=["evt"],$=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=i.evt,o=function(t,n){if(null==t)return{};var i,e,o=function(t,n){if(null==t)return{};var i={};for(var e in t)if({}.hasOwnProperty.call(t,e)){if(-1!==n.indexOf(e))continue;i[e]=t[e]}return i}(t,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(e=0;e<r.length;e++)-1===n.indexOf(i=r[e])&&{}.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}(i,Z);V.pluginEvent.bind(Lt)(t,n,c({dragEl:J,parentEl:K,ghostEl:Q,rootEl:tt,nextEl:nt,lastDownEl:it,cloneEl:et,cloneHidden:ot,dragStarted:bt,putSortable:ct,activeSortable:Lt.active,originalEvent:e,oldIndex:rt,oldDraggableIndex:st,newIndex:at,newDraggableIndex:ut,hideGhostForTarget:Ft,unhideGhostForTarget:Ht,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){q({sortable:n,name:t,originalEvent:e})}},o))};function q(t){!function(t){var n=t.sortable,i=t.rootEl,e=t.name,o=t.targetEl,r=t.cloneEl,a=t.toEl,s=t.fromEl,u=t.oldIndex,l=t.newIndex,f=t.oldDraggableIndex,h=t.newDraggableIndex,m=t.originalEvent,p=t.putSortable,b=t.extraEventProperties;if(n=n||i&&i[X]){var g,w=n.options,y="on"+e.charAt(0).toUpperCase()+e.substr(1);!window.CustomEvent||d||v?(g=document.createEvent("Event")).initEvent(e,!0,!0):g=new CustomEvent(e,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=s||i,g.item=o||i,g.clone=r,g.oldIndex=u,g.newIndex=l,g.oldDraggableIndex=f,g.newDraggableIndex=h,g.originalEvent=m,g.pullMode=p?p.lastPutMode:void 0;var E=c(c({},b),V.getEventProperties(e,n));for(var S in E)g[S]=E[S];i&&i.dispatchEvent(g),w[y]&&w[y].call(n,g)}}(c({putSortable:ct,cloneEl:et,targetEl:J,rootEl:tt,oldIndex:rt,oldDraggableIndex:st,newIndex:at,newDraggableIndex:ut},t))}var J,K,Q,tt,nt,it,et,ot,rt,at,st,ut,lt,ct,ft,ht,dt,vt,mt,pt,bt,gt,wt,yt,Et,St=!1,xt=!1,Tt=[],Mt=!1,It=!1,Ot=[],Dt=!1,Ct=[],_t="undefined"!=typeof document,kt=b,jt=v||d?"cssFloat":"float",At=_t&&!g&&!b&&"draggable"in document.createElement("div"),zt=function(){if(_t){if(d)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Nt=function(t,n){var i=D(t),e=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=z(t,0,n),r=z(t,1,n),a=o&&D(o),s=r&&D(r),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+j(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+j(r).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":o&&a.float&&"none"!==a.float?!r||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=e&&"none"===i[jt]||r&&"none"===i[jt]&&u+l>e)?"vertical":"horizontal"},Pt=function(t){function n(t,i){return function(e,o,r,a){if(null==t&&(i||e.options.group.name&&o.options.group.name&&e.options.group.name===o.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return n(t(e,o,r,a),i)(e,o,r,a);var s=(i?e:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},e=t.group;e&&"object"==f(e)||(e={name:e}),i.name=e.name,i.checkPull=n(e.pull,!0),i.checkPut=n(e.put),i.revertClone=e.revertClone,t.group=i},Ft=function(){!zt&&Q&&D(Q,"display","none")},Ht=function(){!zt&&Q&&D(Q,"display","")};_t&&!g&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Bt=function(t){if(J){var n=function(t,n){var i;return Tt.some((function(e){var o=e[X].options.emptyInsertThreshold;if(o&&!N(e)){var r=j(e);return t>=r.left-o&&t<=r.right+o&&n>=r.top-o&&n<=r.bottom+o?i=e:void 0}})),i}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(n){var i={};for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[X]._onDragOver(i)}}},Gt=function(t){J&&J.parentNode[X]._isOutsideThisEl(t.target)};function Lt(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=u({},n),t[X]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Lt.supportPointer&&"PointerEvent"in window&&(!p||b),emptyInsertThreshold:5};for(var e in V.initializePlugins(this,t,i),i)!(e in n)&&(n[e]=i[e]);for(var o in Pt(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&At,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Tt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),u(this,function(){var t,n=[];return{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==D(t,"display")&&t!==Lt.ghost){n.push({target:t,rect:j(t)});var i=c({},n[n.length-1].rect);if(t.thisAnimationDuration){var e=C(t,!0);e&&(i.top-=e.f,i.left-=e.e)}t.fromRect=i}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,n){for(var i in t)if(t.hasOwnProperty(i))for(var e in n)if(n.hasOwnProperty(e)&&n[e]===t[i][e])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(i){var e=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,r=0;n.forEach((function(t){var n=0,i=t.target,a=i.fromRect,s=j(i),u=i.prevFromRect,l=i.prevToRect,c=t.rect,f=C(i,!0);f&&(s.top-=f.f,s.left-=f.e),i.toRect=s,i.thisAnimationDuration&&B(u,s)&&!B(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(t,n,i,e){return Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))/Math.sqrt(Math.pow(n.top-i.top,2)+Math.pow(n.left-i.left,2))*e.animation}(c,u,l,e.options)),B(s,a)||(i.prevFromRect=a,i.prevToRect=s,n||(n=e.options.animation),e.animate(i,c,s,n)),n&&(o=!0,r=Math.max(r,n),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),n),i.thisAnimationDuration=n)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),r):"function"==typeof i&&i(),n=[]},animate:function(t,n,i,e){if(e){D(t,"transition",""),D(t,"transform","");var o=C(this.el),r=(n.left-i.left)/(o&&o.a||1),a=(n.top-i.top)/(o&&o.d||1);t.animatingX=!!r,t.animatingY=!!a,D(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),D(t,"transition","transform "+e+"ms"+(this.options.easing?" "+this.options.easing:"")),D(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){D(t,"transition",""),D(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),e)}}}}())}function Rt(t,n,i,e,o,r,a,s){var u,l,c=t[X],f=c.options.onMove;return!window.CustomEvent||d||v?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=n,u.from=t,u.dragged=i,u.draggedRect=e,u.related=o||n,u.relatedRect=r||j(n),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),f&&(l=f.call(c,u,a)),l}function Wt(t){t.draggable=!1}function Xt(){Dt=!1}function Yt(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,e=0;i--;)e+=n.charCodeAt(i);return e.toString(36)}function Ut(t){return setTimeout(t,0)}function Vt(t){return clearTimeout(t)}Lt.prototype={constructor:Lt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,J):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,e=this.options,o=e.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=e.filter;if(function(t){Ct.length=0;for(var n=t.getElementsByTagName("input"),i=n.length;i--;){var e=n[i];e.checked&&Ct.push(e)}}(i),!J&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||e.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=T(s,e.draggable,i,!1))&&s.animated||it===s)){if(rt=P(s),st=P(s,e.draggable),"function"==typeof l){if(l.call(this,t,s,this))return q({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:i,fromEl:i}),$("filter",n,{evt:t}),void(o&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(e){if(e=T(u,e.trim(),i,!1))return q({sortable:n,rootEl:e,name:"filter",targetEl:s,fromEl:i,toEl:i}),$("filter",n,{evt:t}),!0}))))return void(o&&t.preventDefault());e.handle&&!T(u,e.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,n,i){var e,o=this,r=o.el,a=o.options,s=r.ownerDocument;if(i&&!J&&i.parentNode===r){var u=j(i);if(tt=r,K=(J=i).parentNode,nt=J.nextSibling,it=i,lt=a.group,Lt.dragged=J,mt=(ft={target:J,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-u.left,pt=ft.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,J.style["will-change"]="all",e=function(){$("delayEnded",o,{evt:t}),Lt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!m&&o.nativeDraggable&&(J.draggable=!0),o._triggerDragStart(t,n),q({sortable:o,name:"choose",originalEvent:t}),O(J,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){_(J,t.trim(),Wt)})),y(s,"dragover",Bt),y(s,"mousemove",Bt),y(s,"touchmove",Bt),a.supportPointer?(y(s,"pointerup",o._onDrop),!this.nativeDraggable&&y(s,"pointercancel",o._onDrop)):(y(s,"mouseup",o._onDrop),y(s,"touchend",o._onDrop),y(s,"touchcancel",o._onDrop)),m&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),$("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!n||this.nativeDraggable&&(v||d))e();else{if(Lt.eventCanceled)return void this._onDrop();a.supportPointer?(y(s,"pointerup",o._disableDelayedDrag),y(s,"pointercancel",o._disableDelayedDrag)):(y(s,"mouseup",o._disableDelayedDrag),y(s,"touchend",o._disableDelayedDrag),y(s,"touchcancel",o._disableDelayedDrag)),y(s,"mousemove",o._delayedDragTouchMoveHandler),y(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&y(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(e,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&Wt(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"pointerup",this._disableDelayedDrag),E(t,"pointercancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?y(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(y(J,"dragend",this),y(tt,"dragstart",this._onDragStart));try{document.selection?Ut((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(St=!1,tt&&J){$("dragStarted",this,{evt:n}),this.nativeDraggable&&y(document,"dragover",Gt);var i=this.options;!t&&O(J,i.dragClass,!1),O(J,i.ghostClass,!0),Lt.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Ft();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==n;)n=t;if(J.parentNode[X]._isOutsideThisEl(t),n)do{if(n[X]&&n[X]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=x(n));Ht()}},_onTouchMove:function(t){if(ft){var n=this.options,i=n.fallbackTolerance,e=n.fallbackOffset,o=t.touches?t.touches[0]:t,r=Q&&C(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,u=kt&&Et&&F(Et),l=(o.clientX-ft.clientX+e.x)/(a||1)+(u?u[0]-Ot[0]:0)/(a||1),c=(o.clientY-ft.clientY+e.y)/(s||1)+(u?u[1]-Ot[1]:0)/(s||1);if(!Lt.active&&!St){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Q){r?(r.e+=l-(dt||0),r.f+=c-(vt||0)):r={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");D(Q,"webkitTransform",f),D(Q,"mozTransform",f),D(Q,"msTransform",f),D(Q,"transform",f),dt=l,vt=c,ht=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Q){var t=this.options.fallbackOnBody?document.body:tt,n=j(J,!0,kt,!0,t),i=this.options;if(kt){for(Et=t;"static"===D(Et,"position")&&"none"===D(Et,"transform")&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=k()),n.top+=Et.scrollTop,n.left+=Et.scrollLeft):Et=k(),Ot=F(Et)}O(Q=J.cloneNode(!0),i.ghostClass,!1),O(Q,i.fallbackClass,!0),O(Q,i.dragClass,!0),D(Q,"transition",""),D(Q,"transform",""),D(Q,"box-sizing","border-box"),D(Q,"margin",0),D(Q,"top",n.top),D(Q,"left",n.left),D(Q,"width",n.width),D(Q,"height",n.height),D(Q,"opacity","0.8"),D(Q,"position",kt?"absolute":"fixed"),D(Q,"zIndex","100000"),D(Q,"pointerEvents","none"),Lt.ghost=Q,t.appendChild(Q),D(Q,"transform-origin",mt/parseInt(Q.style.width)*100+"% "+pt/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,e=t.dataTransfer,o=i.options;$("dragStart",this,{evt:t}),Lt.eventCanceled?this._onDrop():($("setupClone",this),Lt.eventCanceled||((et=R(J)).removeAttribute("id"),et.draggable=!1,et.style["will-change"]="",this._hideClone(),O(et,this.options.chosenClass,!1),Lt.clone=et),i.cloneId=Ut((function(){$("clone",i),Lt.eventCanceled||(i.options.removeCloneOnHide||tt.insertBefore(et,J),i._hideClone(),q({sortable:i,name:"clone"}))})),!n&&O(J,o.dragClass,!0),n?(xt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(E(document,"mouseup",i._onDrop),E(document,"touchend",i._onDrop),E(document,"touchcancel",i._onDrop),e&&(e.effectAllowed="move",o.setData&&o.setData.call(i,e,J)),y(document,"drop",i),D(J,"transform","translateZ(0)")),St=!0,i._dragStartId=Ut(i._dragStarted.bind(i,n,t)),y(document,"selectstart",i),bt=!0,window.getSelection().removeAllRanges(),p&&D(document.body,"user-select","none"))},_onDragOver:function(t){var n,i,e,o,r=this.el,a=t.target,s=this.options,u=s.group,l=Lt.active,f=lt===u,h=s.sort,d=ct||l,v=this,m=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=T(a,s.draggable,r,!0),H("dragOver"),Lt.eventCanceled)return m;if(J.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return G(!1);if(xt=!1,l&&!s.disabled&&(f?h||(e=K!==tt):ct===this||(this.lastPutMode=lt.checkPull(this,l,J,t))&&u.checkPut(this,l,J,t))){if(o="vertical"===this._getDirection(t,a),n=j(J),H("dragOverValid"),Lt.eventCanceled)return m;if(e)return K=tt,B(),this._hideClone(),H("revert"),Lt.eventCanceled||(nt?tt.insertBefore(J,nt):tt.appendChild(J)),G(!0);var p=N(r,s.draggable);if(!p||function(t,n,i){var e=j(N(i.el,i.options.draggable)),o=W(i.el,i.options,Q);return n?t.clientX>o.right+10||t.clientY>e.bottom&&t.clientX>e.left:t.clientY>o.bottom+10||t.clientX>e.right&&t.clientY>e.top}(t,o,this)&&!p.animated){if(p===J)return G(!1);if(p&&r===t.target&&(a=p),a&&(i=j(a)),!1!==Rt(tt,r,J,n,a,i,t,!!a))return B(),p&&p.nextSibling?r.insertBefore(J,p.nextSibling):r.appendChild(J),K=r,R(),G(!0)}else if(p&&function(t,n,i){var e=j(z(i.el,0,i.options,!0)),o=W(i.el,i.options,Q);return n?t.clientX<o.left-10||t.clientY<e.top&&t.clientX<e.right:t.clientY<o.top-10||t.clientY<e.bottom&&t.clientX<e.left}(t,o,this)){var b=z(r,0,s,!0);if(b===J)return G(!1);if(i=j(a=b),!1!==Rt(tt,r,J,n,a,i,t,!1))return B(),r.insertBefore(J,b),K=r,R(),G(!0)}else if(a.parentNode===r){i=j(a);var g,w,y,E=J.parentNode!==r,S=!function(t,n,i){var e=i?t.left:t.top,o=i?n.left:n.top;return e===o||(i?t.right:t.bottom)===(i?n.right:n.bottom)||e+(i?t.width:t.height)/2===o+(i?n.width:n.height)/2}(J.animated&&J.toRect||n,a.animated&&a.toRect||i,o),x=o?"top":"left",M=A(a,"top","top")||A(J,"top","top"),I=M?M.scrollTop:void 0;if(gt!==a&&(w=i[x],Mt=!1,It=!S&&s.invertSwap||E),g=function(t,n,i,e,o,r,a,s){var u=e?t.clientY:t.clientX,l=e?i.height:i.width,c=e?i.top:i.left,f=e?i.bottom:i.right,h=!1;if(!a)if(s&&yt<l*o){if(!Mt&&(1===wt?u>c+l*r/2:u<f-l*r/2)&&(Mt=!0),Mt)h=!0;else if(1===wt?u<c+yt:u>f-yt)return-wt}else if(u>c+l*(1-o)/2&&u<f-l*(1-o)/2)return function(t){return P(J)<P(t)?1:-1}(n);return(h=h||a)&&(u<c+l*r/2||u>f-l*r/2)?u>c+l/2?1:-1:0}(t,a,i,o,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,It,gt===a),0!==g){var C=P(J);do{y=K.children[C-=g]}while(y&&("none"===D(y,"display")||y===Q))}if(0===g||y===a)return G(!1);gt=a,wt=g;var _=a.nextElementSibling,k=!1,F=Rt(tt,r,J,n,a,i,t,k=1===g);if(!1!==F)return 1!==F&&-1!==F||(k=1===F),Dt=!0,setTimeout(Xt,30),B(),k&&!_?r.appendChild(J):a.parentNode.insertBefore(J,k?_:a),M&&L(M,0,I-M.scrollTop),K=J.parentNode,void 0===w||It||(yt=Math.abs(w-j(a)[x])),R(),G(!0)}if(r.contains(J))return G(!1)}return!1}function H(s,u){$(s,v,c({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:e,dragRect:n,targetRect:i,canSort:h,fromSortable:d,target:a,completed:G,onMove:function(i,e){return Rt(tt,r,J,n,i,j(i),t,e)},changed:R},u))}function B(){H("dragOverAnimationCapture"),v.captureAnimationState(),v!==d&&d.captureAnimationState()}function G(n){return H("dragOverCompleted",{insertion:n}),n&&(f?l._hideClone():l._showClone(v),v!==d&&(O(J,ct?ct.options.ghostClass:l.options.ghostClass,!1),O(J,s.ghostClass,!0)),ct!==v&&v!==Lt.active?ct=v:v===Lt.active&&ct&&(ct=null),d===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){H("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===J&&!J.animated||a===r&&!a.animated)&&(gt=null),s.dragoverBubble||t.rootEl||a===document||(J.parentNode[X]._isOutsideThisEl(t.target),!n&&Bt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function R(){at=P(J),ut=P(J,s.draggable),q({sortable:v,name:"change",toEl:r,newIndex:at,newDraggableIndex:ut,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",Bt),E(document,"mousemove",Bt),E(document,"touchmove",Bt)},_offUpEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._onDrop),E(t,"touchend",this._onDrop),E(t,"pointerup",this._onDrop),E(t,"pointercancel",this._onDrop),E(t,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;at=P(J),ut=P(J,i.draggable),$("drop",this,{evt:t}),K=J&&J.parentNode,at=P(J),ut=P(J,i.draggable),Lt.eventCanceled||(St=!1,It=!1,Mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vt(this.cloneId),Vt(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&D(document.body,"user-select",""),D(J,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(tt===K||ct&&"clone"!==ct.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),J&&(this.nativeDraggable&&E(J,"dragend",this),Wt(J),J.style["will-change"]="",bt&&!St&&O(J,ct?ct.options.ghostClass:this.options.ghostClass,!1),O(J,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==K?(at>=0&&(q({rootEl:K,name:"add",toEl:K,fromEl:tt,originalEvent:t}),q({sortable:this,name:"remove",toEl:K,originalEvent:t}),q({rootEl:K,name:"sort",toEl:K,fromEl:tt,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),ct&&ct.save()):at!==rt&&at>=0&&(q({sortable:this,name:"update",toEl:K,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),Lt.active&&(null!=at&&-1!==at||(at=rt,ut=st),q({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),tt=J=K=Q=nt=et=it=ot=ft=ht=bt=at=ut=rt=st=gt=wt=ct=lt=Lt.dragged=Lt.ghost=Lt.clone=Lt.active=null;var t=this.el;Ct.forEach((function(n){t.contains(n)&&(n.checked=!0)})),Ct.length=dt=vt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":J&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,e=0,o=i.length,r=this.options;e<o;e++)T(t=i[e],r.draggable,this.el,!1)&&n.push(t.getAttribute(r.dataIdAttr)||Yt(t));return n},sort:function(t,n){var i={},e=this.el;this.toArray().forEach((function(t,n){var o=e.children[n];T(o,this.options.draggable,e,!1)&&(i[t]=o)}),this),n&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(e.removeChild(i[t]),e.appendChild(i[t]))})),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return T(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(void 0===n)return i[t];var e=V.modifyOption(this,t,n);i[t]=void 0!==e?e:n,"group"===t&&Pt(i)},destroy:function(){$("destroy",this);var t=this.el;t[X]=null,E(t,"mousedown",this._onTapStart),E(t,"touchstart",this._onTapStart),E(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(t,"dragover",this),E(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Tt.splice(Tt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if($("hideClone",this),Lt.eventCanceled)return;D(et,"display","none"),this.options.removeCloneOnHide&&et.parentNode&&et.parentNode.removeChild(et),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if($("showClone",this),Lt.eventCanceled)return;J.parentNode!=tt||this.options.group.revertClone?nt?tt.insertBefore(et,nt):tt.appendChild(et):tt.insertBefore(et,J),this.options.group.revertClone&&this.animate(J,et),D(et,"display",""),ot=!1}}else this._hideClone()}},_t&&y(document,"touchmove",(function(t){(Lt.active||St)&&t.cancelable&&t.preventDefault()})),Lt.utils={on:y,off:E,css:D,find:_,is:function(t,n){return!!T(t,n,t,!1)},extend:function(t,n){if(t&&n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t},throttle:G,closest:T,toggleClass:O,clone:R,index:P,nextTick:Ut,cancelNextTick:Vt,detectDirection:Nt,getChild:z,expando:X},Lt.get=function(t){return t[X]},Lt.mount=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];n[0].constructor===Array&&(n=n[0]),n.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Lt.utils=c(c({},Lt.utils),t.utils)),V.mount(t)}))},Lt.create=function(t,n){return new Lt(t,n)},Lt.version="1.15.7";var Zt,$t,qt,Jt,Kt,Qt,tn=[],nn=!1;function en(){tn.forEach((function(t){clearInterval(t.pid)})),tn=[]}function on(){clearInterval(Qt)}var rn=G((function(t,n,i,e){if(n.scroll){var o,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=n.scrollSensitivity,u=n.scrollSpeed,l=k(),c=!1;$t!==i&&($t=i,en(),o=n.scrollFn,!0===(Zt=n.scroll)&&(Zt=H(i,!0)));var f=0,h=Zt;do{var d=h,v=j(d),m=v.top,p=v.bottom,b=v.left,g=v.right,w=v.width,y=v.height,E=void 0,S=void 0,x=d.scrollWidth,T=d.scrollHeight,M=D(d),I=d.scrollLeft,O=d.scrollTop;d===l?(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY));var C=E&&(Math.abs(g-r)<=s&&I+w<x)-(Math.abs(b-r)<=s&&!!I),_=S&&(Math.abs(p-a)<=s&&O+y<T)-(Math.abs(m-a)<=s&&!!O);if(!tn[f])for(var A=0;A<=f;A++)tn[A]||(tn[A]={});tn[f].vx==C&&tn[f].vy==_&&tn[f].el===d||(tn[f].el=d,tn[f].vx=C,tn[f].vy=_,clearInterval(tn[f].pid),0==C&&0==_||(c=!0,tn[f].pid=setInterval(function(){e&&0===this.layer&&Lt.active._onTouchMove(Kt);var n=tn[this.layer].vy?tn[this.layer].vy*u:0,i=tn[this.layer].vx?tn[this.layer].vx*u:0;"function"==typeof o&&"continue"!==o.call(Lt.dragged.parentNode[X],i,n,t,Kt,tn[this.layer].el)||L(tn[this.layer].el,i,n)}.bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==l&&(h=H(h,!1)));nn=c}}),30),an=function(t){var n=t.originalEvent,i=t.putSortable,e=t.dragEl,o=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(n){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(s.clientX,s.clientY);r(),a&&!a.el.contains(u)&&(o("spill"),this.onSpill({dragEl:e,putSortable:i}))}};function sn(){}function un(){}sn.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var e=z(this.sortable.el,this.startIndex,this.options);e?this.sortable.el.insertBefore(n,e):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:an},u(sn,{pluginName:"revertOnSpill"}),un.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:an},u(un,{pluginName:"removeOnSpill"}),Lt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):y(document,this.options.supportPointer?"pointermove":n.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),on(),en(),clearTimeout(M),M=void 0},nulling:function(){Kt=$t=Zt=nn=Qt=qt=Jt=null,tn.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,e=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(e,o);if(Kt=t,n||this.options.forceAutoScrollFallback||v||d||p){rn(t,this.options,r,n);var a=H(r,!0);!nn||Qt&&e===qt&&o===Jt||(Qt&&on(),Qt=setInterval((function(){var r=H(document.elementFromPoint(e,o),!0);r!==a&&(a=r,en()),rn(t,i.options,r,n)}),10),qt=e,Jt=o)}else{if(!this.options.bubbleScroll||H(r,!0)===k())return void en();rn(t,this.options,H(r,!1),!1)}}},u(t,{pluginName:"scroll",initializeByDefault:!0})}),Lt.mount(un,sn);const ln=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.pdsSortableItemMoved=i(this,"pdsSortableItemMoved",7),this.border=!1,this.disabled=!1,this.dividers=!1,this.handleType="row",this.hostKeeper=new a}handleDisabledChange(){var t;null===(t=this.sortableInstance)||void 0===t||t.option("disabled",this.disabled)}classNames(){const t=["pds-sortable"];return this.border&&t.push("pds-sortable--bordered"),this.disabled&&t.push("pds-sortable--disabled"),this.dividers&&t.push("pds-sortable--divided"),void 0!==this.handleType&&t.push("pds-sortable--handle-type-"+this.handleType),t.join(" ")}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidLoad(){let t={animation:150,disabled:this.disabled,ghostClass:"pds-sortable-item--ghost",dragClass:"pds-sortable-item--drag",onEnd:t=>{this.pdsSortableItemMoved.emit(t)}};"handle"===this.handleType&&(t=Object.assign(Object.assign({},t),{handle:".pds-sortable-item__handle"})),this.sortableInstance=Lt.create(this.el,t)}render(){const t=this.classNames();return this.hostKeeper.record(t),e(o,{key:"a0e532d31561748b4632a6be9163562f990af804",class:t,id:this.componentId},e("slot",{key:"d1b0defb683f841e6708374fff4bf62eb7fd5080"}))}get el(){return this}static get watchers(){return{disabled:[{handleDisabledChange:0}]}}static get style(){return".pds-sortable.sc-pds-sortable-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--pine-border);border-radius:var(--pine-dimension-2xs)}"}},[262,"pds-sortable",{border:[516],disabled:[516],componentId:[1,"component-id"],dividers:[516],handleType:[1,"handle-type"]},void 0,{disabled:[{handleDisabledChange:0}]}]),cn=ln,fn=function(){"undefined"!=typeof customElements&&["pds-sortable"].forEach((t=>{"pds-sortable"===t&&(customElements.get(r(t))||customElements.define(r(t),ln))}))};export{cn as PdsSortable,fn as defineCustomElement}
|
|
7
|
+
*/function s(t,n,e){return(n=function(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return t+""}(t,"string");return"symbol"==typeof n?n:n+""}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function u(){return u=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},u.apply(null,arguments)}function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function c(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){s(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var d=h(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=h(/Edge/i),m=h(/firefox/i),p=h(/safari/i)&&!h(/chrome/i)&&!h(/android/i),b=h(/iP(ad|od|hone)/i),g=h(/chrome/i)&&h(/android/i),w={capture:!1,passive:!1};function y(t,n,e){t.addEventListener(n,e,!d&&w)}function E(t,n,e){t.removeEventListener(n,e,!d&&w)}function S(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function x(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function T(t,n,e,i){if(t){e=e||document;do{if(null!=n&&(">"===n[0]?t.parentNode===e&&S(t,n):S(t,n))||i&&t===e)return t;if(t===e)break}while(t=x(t))}return null}var M,I=/\s+/g;function O(t,n,e){if(t&&n)if(t.classList)t.classList[e?"add":"remove"](n);else{var i=(" "+t.className+" ").replace(I," ").replace(" "+n+" "," ");t.className=(i+(e?" "+n:"")).replace(I," ")}}function D(t,n,e){var i=t&&t.style;if(i){if(void 0===e)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(e=t.currentStyle),void 0===n?e:e[n];n in i||-1!==n.indexOf("webkit")||(n="-webkit-"+n),i[n]=e+("string"==typeof e?"":"px")}}function C(t,n){var e="";if("string"==typeof t)e=t;else do{var i=D(t,"transform");i&&"none"!==i&&(e=i+" "+e)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function _(t,n,e){if(t){var i=t.getElementsByTagName(n),o=0,r=i.length;if(e)for(;o<r;o++)e(i[o],o);return i}return[]}function k(){return document.scrollingElement||document.documentElement}function j(t,n,e,i,o){if(t.getBoundingClientRect||t===window){var r,a,s,u,l,c,f;if(t!==window&&t.parentNode&&t!==k()?(a=(r=t.getBoundingClientRect()).top,s=r.left,u=r.bottom,l=r.right,c=r.height,f=r.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(n||e)&&t!==window&&(o=o||t.parentNode,!d))do{if(o&&o.getBoundingClientRect&&("none"!==D(o,"transform")||e&&"static"!==D(o,"position"))){var h=o.getBoundingClientRect();a-=h.top+parseInt(D(o,"border-top-width")),s-=h.left+parseInt(D(o,"border-left-width")),u=a+r.height,l=s+r.width;break}}while(o=o.parentNode);if(i&&t!==window){var v=C(o||t),m=v&&v.a,p=v&&v.d;v&&(u=(a/=p)+(c/=p),l=(s/=m)+(f/=m))}return{top:a,left:s,bottom:u,right:l,width:f,height:c}}}function A(t,n,e){for(var i=H(t,!0),o=j(t)[n];i;){if(!(o>=j(i)[e]))return i;if(i===k())break;i=H(i,!1)}return!1}function z(t,n,e,i){for(var o=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Lt.ghost&&(i||a[r]!==Lt.dragged)&&T(a[r],e.draggable,t,!1)){if(o===n)return a[r];o++}r++}return null}function N(t,n){for(var e=t.lastElementChild;e&&(e===Lt.ghost||"none"===D(e,"display")||n&&!S(e,n));)e=e.previousElementSibling;return e||null}function P(t,n){var e=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Lt.clone||n&&!S(t,n)||e++;return e}function F(t){var n=0,e=0,i=k();if(t)do{var o=C(t);n+=t.scrollLeft*o.a,e+=t.scrollTop*o.d}while(t!==i&&(t=t.parentNode));return[n,e]}function H(t,n){if(!t||!t.getBoundingClientRect)return k();var e=t,i=!1;do{if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=D(e);if(e.clientWidth<e.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||e.clientHeight<e.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!e.getBoundingClientRect||e===document.body)return k();if(i||n)return e;i=!0}}}while(e=e.parentNode);return k()}function B(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}function G(t,n){return function(){if(!M){var e=arguments;1===e.length?t.call(this,e[0]):t.apply(this,e),M=setTimeout((function(){M=void 0}),n)}}}function L(t,n,e){t.scrollLeft+=n,t.scrollTop+=e}function R(t){var n=window.Polymer,e=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):e?e(t).clone(!0)[0]:t.cloneNode(!0)}function W(t,n,e){var i={};return Array.from(t.children).forEach((function(o){var r,a,s,u;if(T(o,n.draggable,t,!1)&&!o.animated&&o!==e){var l=j(o);i.left=Math.min(null!==(r=i.left)&&void 0!==r?r:1/0,l.left),i.top=Math.min(null!==(a=i.top)&&void 0!==a?a:1/0,l.top),i.right=Math.max(null!==(s=i.right)&&void 0!==s?s:-1/0,l.right),i.bottom=Math.max(null!==(u=i.bottom)&&void 0!==u?u:-1/0,l.bottom)}})),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var X="Sortable"+(new Date).getTime();var Y=[],U={initializeByDefault:!0},V={mount:function(t){for(var n in U)U.hasOwnProperty(n)&&!(n in t)&&(t[n]=U[n]);Y.forEach((function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Y.push(t)},pluginEvent:function(t,n,e){var i=this;this.eventCanceled=!1,e.cancel=function(){i.eventCanceled=!0};var o=t+"Global";Y.forEach((function(i){n[i.pluginName]&&(n[i.pluginName][o]&&n[i.pluginName][o](c({sortable:n},e)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](c({sortable:n},e)))}))},initializePlugins:function(t,n,e){for(var i in Y.forEach((function(i){var o=i.pluginName;if(t.options[o]||i.initializeByDefault){var r=new i(t,n,t.options);r.sortable=t,r.options=t.options,t[o]=r,u(e,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);void 0!==o&&(t.options[i]=o)}},getEventProperties:function(t,n){var e={};return Y.forEach((function(i){"function"==typeof i.eventProperties&&u(e,i.eventProperties.call(n[i.pluginName],t))})),e},modifyOption:function(t,n,e){var i;return Y.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[n]&&(i=o.optionListeners[n].call(t[o.pluginName],e))})),i}},Z=["evt"],$=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.evt,o=function(t,n){if(null==t)return{};var e,i,o=function(t,n){if(null==t)return{};var e={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==n.indexOf(i))continue;e[i]=t[i]}return e}(t,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)-1===n.indexOf(e=r[i])&&{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(e,Z);V.pluginEvent.bind(Lt)(t,n,c({dragEl:J,parentEl:K,ghostEl:Q,rootEl:tt,nextEl:nt,lastDownEl:et,cloneEl:it,cloneHidden:ot,dragStarted:bt,putSortable:ct,activeSortable:Lt.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:st,newIndex:at,newDraggableIndex:ut,hideGhostForTarget:Ft,unhideGhostForTarget:Ht,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){q({sortable:n,name:t,originalEvent:i})}},o))};function q(t){!function(t){var n=t.sortable,e=t.rootEl,i=t.name,o=t.targetEl,r=t.cloneEl,a=t.toEl,s=t.fromEl,u=t.oldIndex,l=t.newIndex,f=t.oldDraggableIndex,h=t.newDraggableIndex,m=t.originalEvent,p=t.putSortable,b=t.extraEventProperties;if(n=n||e&&e[X]){var g,w=n.options,y="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||d||v?(g=document.createEvent("Event")).initEvent(i,!0,!0):g=new CustomEvent(i,{bubbles:!0,cancelable:!0}),g.to=a||e,g.from=s||e,g.item=o||e,g.clone=r,g.oldIndex=u,g.newIndex=l,g.oldDraggableIndex=f,g.newDraggableIndex=h,g.originalEvent=m,g.pullMode=p?p.lastPutMode:void 0;var E=c(c({},b),V.getEventProperties(i,n));for(var S in E)g[S]=E[S];e&&e.dispatchEvent(g),w[y]&&w[y].call(n,g)}}(c({putSortable:ct,cloneEl:it,targetEl:J,rootEl:tt,oldIndex:rt,oldDraggableIndex:st,newIndex:at,newDraggableIndex:ut},t))}var J,K,Q,tt,nt,et,it,ot,rt,at,st,ut,lt,ct,ft,ht,dt,vt,mt,pt,bt,gt,wt,yt,Et,St=!1,xt=!1,Tt=[],Mt=!1,It=!1,Ot=[],Dt=!1,Ct=[],_t="undefined"!=typeof document,kt=b,jt=v||d?"cssFloat":"float",At=_t&&!g&&!b&&"draggable"in document.createElement("div"),zt=function(){if(_t){if(d)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Nt=function(t,n){var e=D(t),i=parseInt(e.width)-parseInt(e.paddingLeft)-parseInt(e.paddingRight)-parseInt(e.borderLeftWidth)-parseInt(e.borderRightWidth),o=z(t,0,n),r=z(t,1,n),a=o&&D(o),s=r&&D(r),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+j(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+j(r).width;return"flex"===e.display?"column"===e.flexDirection||"column-reverse"===e.flexDirection?"vertical":"horizontal":"grid"===e.display?e.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":o&&a.float&&"none"!==a.float?!r||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=i&&"none"===e[jt]||r&&"none"===e[jt]&&u+l>i)?"vertical":"horizontal"},Pt=function(t){function n(t,e){return function(i,o,r,a){if(null==t&&(e||i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name))return!0;if(null==t||!1===t)return!1;if(e&&"clone"===t)return t;if("function"==typeof t)return n(t(i,o,r,a),e)(i,o,r,a);var s=(e?i:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var e={},i=t.group;i&&"object"==f(i)||(i={name:i}),e.name=i.name,e.checkPull=n(i.pull,!0),e.checkPut=n(i.put),e.revertClone=i.revertClone,t.group=e},Ft=function(){!zt&&Q&&D(Q,"display","none")},Ht=function(){!zt&&Q&&D(Q,"display","")};_t&&!g&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Bt=function(t){if(J){var n=function(t,n){var e;return Tt.some((function(i){var o=i[X].options.emptyInsertThreshold;if(o&&!N(i)){var r=j(i);return t>=r.left-o&&t<=r.right+o&&n>=r.top-o&&n<=r.bottom+o?e=i:void 0}})),e}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(n){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.target=e.rootEl=n,e.preventDefault=void 0,e.stopPropagation=void 0,n[X]._onDragOver(e)}}},Gt=function(t){J&&J.parentNode[X]._isOutsideThisEl(t.target)};function Lt(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=u({},n),t[X]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Lt.supportPointer&&"PointerEvent"in window&&(!p||b),emptyInsertThreshold:5};for(var i in V.initializePlugins(this,t,e),e)!(i in n)&&(n[i]=e[i]);for(var o in Pt(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&At,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Tt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),u(this,function(){var t,n=[];return{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==D(t,"display")&&t!==Lt.ghost){n.push({target:t,rect:j(t)});var e=c({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,n){for(var e in t)if(t.hasOwnProperty(e))for(var i in n)if(n.hasOwnProperty(i)&&n[i]===t[e][i])return Number(e);return-1}(n,{target:t}),1)},animateAll:function(e){var i=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var o=!1,r=0;n.forEach((function(t){var n=0,e=t.target,a=e.fromRect,s=j(e),u=e.prevFromRect,l=e.prevToRect,c=t.rect,f=C(e,!0);f&&(s.top-=f.f,s.left-=f.e),e.toRect=s,e.thisAnimationDuration&&B(u,s)&&!B(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(t,n,e,i){return Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))/Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))*i.animation}(c,u,l,i.options)),B(s,a)||(e.prevFromRect=a,e.prevToRect=s,n||(n=i.options.animation),i.animate(e,c,s,n)),n&&(o=!0,r=Math.max(r,n),clearTimeout(e.animationResetTimer),e.animationResetTimer=setTimeout((function(){e.animationTime=0,e.prevFromRect=null,e.fromRect=null,e.prevToRect=null,e.thisAnimationDuration=null}),n),e.thisAnimationDuration=n)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),n=[]},animate:function(t,n,e,i){if(i){D(t,"transition",""),D(t,"transform","");var o=C(this.el),r=(n.left-e.left)/(o&&o.a||1),a=(n.top-e.top)/(o&&o.d||1);t.animatingX=!!r,t.animatingY=!!a,D(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),D(t,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),D(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){D(t,"transition",""),D(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),i)}}}}())}function Rt(t,n,e,i,o,r,a,s){var u,l,c=t[X],f=c.options.onMove;return!window.CustomEvent||d||v?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=n,u.from=t,u.dragged=e,u.draggedRect=i,u.related=o||n,u.relatedRect=r||j(n),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),f&&(l=f.call(c,u,a)),l}function Wt(t){t.draggable=!1}function Xt(){Dt=!1}function Yt(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,e=n.length,i=0;e--;)i+=n.charCodeAt(e);return i.toString(36)}function Ut(t){return setTimeout(t,0)}function Vt(t){return clearTimeout(t)}Lt.prototype={constructor:Lt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,J):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,e=this.el,i=this.options,o=i.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=i.filter;if(function(t){Ct.length=0;for(var n=t.getElementsByTagName("input"),e=n.length;e--;){var i=n[e];i.checked&&Ct.push(i)}}(e),!J&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||i.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=T(s,i.draggable,e,!1))&&s.animated||et===s)){if(rt=P(s),st=P(s,i.draggable),"function"==typeof l){if(l.call(this,t,s,this))return q({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:e,fromEl:e}),$("filter",n,{evt:t}),void(o&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(i){if(i=T(u,i.trim(),e,!1))return q({sortable:n,rootEl:i,name:"filter",targetEl:s,fromEl:e,toEl:e}),$("filter",n,{evt:t}),!0}))))return void(o&&t.preventDefault());i.handle&&!T(u,i.handle,e,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,n,e){var i,o=this,r=o.el,a=o.options,s=r.ownerDocument;if(e&&!J&&e.parentNode===r){var u=j(e);if(tt=r,K=(J=e).parentNode,nt=J.nextSibling,et=e,lt=a.group,Lt.dragged=J,mt=(ft={target:J,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-u.left,pt=ft.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,J.style["will-change"]="all",i=function(){$("delayEnded",o,{evt:t}),Lt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!m&&o.nativeDraggable&&(J.draggable=!0),o._triggerDragStart(t,n),q({sortable:o,name:"choose",originalEvent:t}),O(J,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){_(J,t.trim(),Wt)})),y(s,"dragover",Bt),y(s,"mousemove",Bt),y(s,"touchmove",Bt),a.supportPointer?(y(s,"pointerup",o._onDrop),!this.nativeDraggable&&y(s,"pointercancel",o._onDrop)):(y(s,"mouseup",o._onDrop),y(s,"touchend",o._onDrop),y(s,"touchcancel",o._onDrop)),m&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),$("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!n||this.nativeDraggable&&(v||d))i();else{if(Lt.eventCanceled)return void this._onDrop();a.supportPointer?(y(s,"pointerup",o._disableDelayedDrag),y(s,"pointercancel",o._disableDelayedDrag)):(y(s,"mouseup",o._disableDelayedDrag),y(s,"touchend",o._disableDelayedDrag),y(s,"touchcancel",o._disableDelayedDrag)),y(s,"mousemove",o._delayedDragTouchMoveHandler),y(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&y(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&Wt(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"pointerup",this._disableDelayedDrag),E(t,"pointercancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?y(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(y(J,"dragend",this),y(tt,"dragstart",this._onDragStart));try{document.selection?Ut((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(St=!1,tt&&J){$("dragStarted",this,{evt:n}),this.nativeDraggable&&y(document,"dragover",Gt);var e=this.options;!t&&O(J,e.dragClass,!1),O(J,e.ghostClass,!0),Lt.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Ft();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==n;)n=t;if(J.parentNode[X]._isOutsideThisEl(t),n)do{if(n[X]&&n[X]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=x(n));Ht()}},_onTouchMove:function(t){if(ft){var n=this.options,e=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,r=Q&&C(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,u=kt&&Et&&F(Et),l=(o.clientX-ft.clientX+i.x)/(a||1)+(u?u[0]-Ot[0]:0)/(a||1),c=(o.clientY-ft.clientY+i.y)/(s||1)+(u?u[1]-Ot[1]:0)/(s||1);if(!Lt.active&&!St){if(e&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<e)return;this._onDragStart(t,!0)}if(Q){r?(r.e+=l-(dt||0),r.f+=c-(vt||0)):r={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");D(Q,"webkitTransform",f),D(Q,"mozTransform",f),D(Q,"msTransform",f),D(Q,"transform",f),dt=l,vt=c,ht=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Q){var t=this.options.fallbackOnBody?document.body:tt,n=j(J,!0,kt,!0,t),e=this.options;if(kt){for(Et=t;"static"===D(Et,"position")&&"none"===D(Et,"transform")&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=k()),n.top+=Et.scrollTop,n.left+=Et.scrollLeft):Et=k(),Ot=F(Et)}O(Q=J.cloneNode(!0),e.ghostClass,!1),O(Q,e.fallbackClass,!0),O(Q,e.dragClass,!0),D(Q,"transition",""),D(Q,"transform",""),D(Q,"box-sizing","border-box"),D(Q,"margin",0),D(Q,"top",n.top),D(Q,"left",n.left),D(Q,"width",n.width),D(Q,"height",n.height),D(Q,"opacity","0.8"),D(Q,"position",kt?"absolute":"fixed"),D(Q,"zIndex","100000"),D(Q,"pointerEvents","none"),Lt.ghost=Q,t.appendChild(Q),D(Q,"transform-origin",mt/parseInt(Q.style.width)*100+"% "+pt/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(t,n){var e=this,i=t.dataTransfer,o=e.options;$("dragStart",this,{evt:t}),Lt.eventCanceled?this._onDrop():($("setupClone",this),Lt.eventCanceled||((it=R(J)).removeAttribute("id"),it.draggable=!1,it.style["will-change"]="",this._hideClone(),O(it,this.options.chosenClass,!1),Lt.clone=it),e.cloneId=Ut((function(){$("clone",e),Lt.eventCanceled||(e.options.removeCloneOnHide||tt.insertBefore(it,J),e._hideClone(),q({sortable:e,name:"clone"}))})),!n&&O(J,o.dragClass,!0),n?(xt=!0,e._loopId=setInterval(e._emulateDragOver,50)):(E(document,"mouseup",e._onDrop),E(document,"touchend",e._onDrop),E(document,"touchcancel",e._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(e,i,J)),y(document,"drop",e),D(J,"transform","translateZ(0)")),St=!0,e._dragStartId=Ut(e._dragStarted.bind(e,n,t)),y(document,"selectstart",e),bt=!0,window.getSelection().removeAllRanges(),p&&D(document.body,"user-select","none"))},_onDragOver:function(t){var n,e,i,o,r=this.el,a=t.target,s=this.options,u=s.group,l=Lt.active,f=lt===u,h=s.sort,d=ct||l,v=this,m=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=T(a,s.draggable,r,!0),H("dragOver"),Lt.eventCanceled)return m;if(J.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return G(!1);if(xt=!1,l&&!s.disabled&&(f?h||(i=K!==tt):ct===this||(this.lastPutMode=lt.checkPull(this,l,J,t))&&u.checkPut(this,l,J,t))){if(o="vertical"===this._getDirection(t,a),n=j(J),H("dragOverValid"),Lt.eventCanceled)return m;if(i)return K=tt,B(),this._hideClone(),H("revert"),Lt.eventCanceled||(nt?tt.insertBefore(J,nt):tt.appendChild(J)),G(!0);var p=N(r,s.draggable);if(!p||function(t,n,e){var i=j(N(e.el,e.options.draggable)),o=W(e.el,e.options,Q);return n?t.clientX>o.right+10||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>o.bottom+10||t.clientX>i.right&&t.clientY>i.top}(t,o,this)&&!p.animated){if(p===J)return G(!1);if(p&&r===t.target&&(a=p),a&&(e=j(a)),!1!==Rt(tt,r,J,n,a,e,t,!!a))return B(),p&&p.nextSibling?r.insertBefore(J,p.nextSibling):r.appendChild(J),K=r,R(),G(!0)}else if(p&&function(t,n,e){var i=j(z(e.el,0,e.options,!0)),o=W(e.el,e.options,Q);return n?t.clientX<o.left-10||t.clientY<i.top&&t.clientX<i.right:t.clientY<o.top-10||t.clientY<i.bottom&&t.clientX<i.left}(t,o,this)){var b=z(r,0,s,!0);if(b===J)return G(!1);if(e=j(a=b),!1!==Rt(tt,r,J,n,a,e,t,!1))return B(),r.insertBefore(J,b),K=r,R(),G(!0)}else if(a.parentNode===r){e=j(a);var g,w,y,E=J.parentNode!==r,S=!function(t,n,e){var i=e?t.left:t.top,o=e?n.left:n.top;return i===o||(e?t.right:t.bottom)===(e?n.right:n.bottom)||i+(e?t.width:t.height)/2===o+(e?n.width:n.height)/2}(J.animated&&J.toRect||n,a.animated&&a.toRect||e,o),x=o?"top":"left",M=A(a,"top","top")||A(J,"top","top"),I=M?M.scrollTop:void 0;if(gt!==a&&(w=e[x],Mt=!1,It=!S&&s.invertSwap||E),g=function(t,n,e,i,o,r,a,s){var u=i?t.clientY:t.clientX,l=i?e.height:e.width,c=i?e.top:e.left,f=i?e.bottom:e.right,h=!1;if(!a)if(s&&yt<l*o){if(!Mt&&(1===wt?u>c+l*r/2:u<f-l*r/2)&&(Mt=!0),Mt)h=!0;else if(1===wt?u<c+yt:u>f-yt)return-wt}else if(u>c+l*(1-o)/2&&u<f-l*(1-o)/2)return function(t){return P(J)<P(t)?1:-1}(n);return(h=h||a)&&(u<c+l*r/2||u>f-l*r/2)?u>c+l/2?1:-1:0}(t,a,e,o,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,It,gt===a),0!==g){var C=P(J);do{y=K.children[C-=g]}while(y&&("none"===D(y,"display")||y===Q))}if(0===g||y===a)return G(!1);gt=a,wt=g;var _=a.nextElementSibling,k=!1,F=Rt(tt,r,J,n,a,e,t,k=1===g);if(!1!==F)return 1!==F&&-1!==F||(k=1===F),Dt=!0,setTimeout(Xt,30),B(),k&&!_?r.appendChild(J):a.parentNode.insertBefore(J,k?_:a),M&&L(M,0,I-M.scrollTop),K=J.parentNode,void 0===w||It||(yt=Math.abs(w-j(a)[x])),R(),G(!0)}if(r.contains(J))return G(!1)}return!1}function H(s,u){$(s,v,c({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:i,dragRect:n,targetRect:e,canSort:h,fromSortable:d,target:a,completed:G,onMove:function(e,i){return Rt(tt,r,J,n,e,j(e),t,i)},changed:R},u))}function B(){H("dragOverAnimationCapture"),v.captureAnimationState(),v!==d&&d.captureAnimationState()}function G(n){return H("dragOverCompleted",{insertion:n}),n&&(f?l._hideClone():l._showClone(v),v!==d&&(O(J,ct?ct.options.ghostClass:l.options.ghostClass,!1),O(J,s.ghostClass,!0)),ct!==v&&v!==Lt.active?ct=v:v===Lt.active&&ct&&(ct=null),d===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){H("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===J&&!J.animated||a===r&&!a.animated)&&(gt=null),s.dragoverBubble||t.rootEl||a===document||(J.parentNode[X]._isOutsideThisEl(t.target),!n&&Bt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function R(){at=P(J),ut=P(J,s.draggable),q({sortable:v,name:"change",toEl:r,newIndex:at,newDraggableIndex:ut,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",Bt),E(document,"mousemove",Bt),E(document,"touchmove",Bt)},_offUpEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._onDrop),E(t,"touchend",this._onDrop),E(t,"pointerup",this._onDrop),E(t,"pointercancel",this._onDrop),E(t,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(t){var n=this.el,e=this.options;at=P(J),ut=P(J,e.draggable),$("drop",this,{evt:t}),K=J&&J.parentNode,at=P(J),ut=P(J,e.draggable),Lt.eventCanceled||(St=!1,It=!1,Mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vt(this.cloneId),Vt(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&D(document.body,"user-select",""),D(J,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!e.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(tt===K||ct&&"clone"!==ct.lastPutMode)&&it&&it.parentNode&&it.parentNode.removeChild(it),J&&(this.nativeDraggable&&E(J,"dragend",this),Wt(J),J.style["will-change"]="",bt&&!St&&O(J,ct?ct.options.ghostClass:this.options.ghostClass,!1),O(J,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==K?(at>=0&&(q({rootEl:K,name:"add",toEl:K,fromEl:tt,originalEvent:t}),q({sortable:this,name:"remove",toEl:K,originalEvent:t}),q({rootEl:K,name:"sort",toEl:K,fromEl:tt,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),ct&&ct.save()):at!==rt&&at>=0&&(q({sortable:this,name:"update",toEl:K,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),Lt.active&&(null!=at&&-1!==at||(at=rt,ut=st),q({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),tt=J=K=Q=nt=it=et=ot=ft=ht=bt=at=ut=rt=st=gt=wt=ct=lt=Lt.dragged=Lt.ghost=Lt.clone=Lt.active=null;var t=this.el;Ct.forEach((function(n){t.contains(n)&&(n.checked=!0)})),Ct.length=dt=vt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":J&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],e=this.el.children,i=0,o=e.length,r=this.options;i<o;i++)T(t=e[i],r.draggable,this.el,!1)&&n.push(t.getAttribute(r.dataIdAttr)||Yt(t));return n},sort:function(t,n){var e={},i=this.el;this.toArray().forEach((function(t,n){var o=i.children[n];T(o,this.options.draggable,i,!1)&&(e[t]=o)}),this),n&&this.captureAnimationState(),t.forEach((function(t){e[t]&&(i.removeChild(e[t]),i.appendChild(e[t]))})),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return T(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var e=this.options;if(void 0===n)return e[t];var i=V.modifyOption(this,t,n);e[t]=void 0!==i?i:n,"group"===t&&Pt(e)},destroy:function(){$("destroy",this);var t=this.el;t[X]=null,E(t,"mousedown",this._onTapStart),E(t,"touchstart",this._onTapStart),E(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(t,"dragover",this),E(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Tt.splice(Tt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if($("hideClone",this),Lt.eventCanceled)return;D(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if($("showClone",this),Lt.eventCanceled)return;J.parentNode!=tt||this.options.group.revertClone?nt?tt.insertBefore(it,nt):tt.appendChild(it):tt.insertBefore(it,J),this.options.group.revertClone&&this.animate(J,it),D(it,"display",""),ot=!1}}else this._hideClone()}},_t&&y(document,"touchmove",(function(t){(Lt.active||St)&&t.cancelable&&t.preventDefault()})),Lt.utils={on:y,off:E,css:D,find:_,is:function(t,n){return!!T(t,n,t,!1)},extend:function(t,n){if(t&&n)for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t},throttle:G,closest:T,toggleClass:O,clone:R,index:P,nextTick:Ut,cancelNextTick:Vt,detectDirection:Nt,getChild:z,expando:X},Lt.get=function(t){return t[X]},Lt.mount=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];n[0].constructor===Array&&(n=n[0]),n.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Lt.utils=c(c({},Lt.utils),t.utils)),V.mount(t)}))},Lt.create=function(t,n){return new Lt(t,n)},Lt.version="1.15.7";var Zt,$t,qt,Jt,Kt,Qt,tn=[],nn=!1;function en(){tn.forEach((function(t){clearInterval(t.pid)})),tn=[]}function on(){clearInterval(Qt)}var rn=G((function(t,n,e,i){if(n.scroll){var o,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=n.scrollSensitivity,u=n.scrollSpeed,l=k(),c=!1;$t!==e&&($t=e,en(),o=n.scrollFn,!0===(Zt=n.scroll)&&(Zt=H(e,!0)));var f=0,h=Zt;do{var d=h,v=j(d),m=v.top,p=v.bottom,b=v.left,g=v.right,w=v.width,y=v.height,E=void 0,S=void 0,x=d.scrollWidth,T=d.scrollHeight,M=D(d),I=d.scrollLeft,O=d.scrollTop;d===l?(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY));var C=E&&(Math.abs(g-r)<=s&&I+w<x)-(Math.abs(b-r)<=s&&!!I),_=S&&(Math.abs(p-a)<=s&&O+y<T)-(Math.abs(m-a)<=s&&!!O);if(!tn[f])for(var A=0;A<=f;A++)tn[A]||(tn[A]={});tn[f].vx==C&&tn[f].vy==_&&tn[f].el===d||(tn[f].el=d,tn[f].vx=C,tn[f].vy=_,clearInterval(tn[f].pid),0==C&&0==_||(c=!0,tn[f].pid=setInterval(function(){i&&0===this.layer&&Lt.active._onTouchMove(Kt);var n=tn[this.layer].vy?tn[this.layer].vy*u:0,e=tn[this.layer].vx?tn[this.layer].vx*u:0;"function"==typeof o&&"continue"!==o.call(Lt.dragged.parentNode[X],e,n,t,Kt,tn[this.layer].el)||L(tn[this.layer].el,e,n)}.bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==l&&(h=H(h,!1)));nn=c}}),30),an=function(t){var n=t.originalEvent,e=t.putSortable,i=t.dragEl,o=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(n){var a=e||t.activeSortable;(0,t.hideGhostForTarget)();var s=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(s.clientX,s.clientY);r(),a&&!a.el.contains(u)&&(o("spill"),this.onSpill({dragEl:i,putSortable:e}))}};function sn(){}function un(){}sn.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var n=t.dragEl,e=t.putSortable;this.sortable.captureAnimationState(),e&&e.captureAnimationState();var i=z(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),e&&e.animateAll()},drop:an},u(sn,{pluginName:"revertOnSpill"}),un.prototype={onSpill:function(t){var n=t.dragEl,e=t.putSortable||this.sortable;e.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),e.animateAll()},drop:an},u(un,{pluginName:"removeOnSpill"}),Lt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):y(document,this.options.supportPointer?"pointermove":n.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),on(),en(),clearTimeout(M),M=void 0},nulling:function(){Kt=$t=Zt=nn=Qt=qt=Jt=null,tn.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var e=this,i=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(i,o);if(Kt=t,n||this.options.forceAutoScrollFallback||v||d||p){rn(t,this.options,r,n);var a=H(r,!0);!nn||Qt&&i===qt&&o===Jt||(Qt&&on(),Qt=setInterval((function(){var r=H(document.elementFromPoint(i,o),!0);r!==a&&(a=r,en()),rn(t,e.options,r,n)}),10),qt=i,Jt=o)}else{if(!this.options.bubbleScroll||H(r,!0)===k())return void en();rn(t,this.options,H(r,!1),!1)}}},u(t,{pluginName:"scroll",initializeByDefault:!0})}),Lt.mount(un,sn);const ln=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.pdsSortableItemMoved=e(this,"pdsSortableItemMoved",7),this.border=!1,this.disabled=!1,this.dividers=!1,this.handleType="row",this.hostKeeper=new a}handleDisabledChange(){var t;null===(t=this.sortableInstance)||void 0===t||t.option("disabled",this.disabled)}classNames(){const t=["pds-sortable"];return this.border&&t.push("pds-sortable--bordered"),this.disabled&&t.push("pds-sortable--disabled"),this.dividers&&t.push("pds-sortable--divided"),void 0!==this.handleType&&t.push("pds-sortable--handle-type-"+this.handleType),t.join(" ")}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidLoad(){let t={animation:150,disabled:this.disabled,ghostClass:"pds-sortable-item--ghost",dragClass:"pds-sortable-item--drag",onEnd:t=>{this.pdsSortableItemMoved.emit(t)}};"handle"===this.handleType&&(t=Object.assign(Object.assign({},t),{handle:".pds-sortable-item__handle"})),this.sortableInstance=Lt.create(this.el,t)}render(){const t=this.classNames();return this.hostKeeper.record(t),i(o,{key:"6e9e7b769f57ebfd81541fbecbe17b3fb4ad3e47",class:t,id:this.componentId},i("slot",{key:"c9466a216862c0a3e578f3fcfc1ac1e26146722b"}))}get el(){return this}static get watchers(){return{disabled:[{handleDisabledChange:0}]}}static get style(){return".pds-sortable.sc-pds-sortable-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--pine-border);border-radius:var(--pine-dimension-2xs)}"}},[262,"pds-sortable",{border:[516],disabled:[516],componentId:[1,"component-id"],dividers:[516],handleType:[1,"handle-type"]},void 0,{disabled:[{handleDisabledChange:0}]}]),cn=ln,fn=function(){"undefined"!=typeof customElements&&["pds-sortable"].forEach((t=>{"pds-sortable"===t&&(customElements.get(r(t))||customElements.define(r(t),ln))}))};export{cn as PdsSortable,fn as defineCustomElement}
|
package/components/pds-switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as s,h as t,Host as r,transformTag as a}from"@stencil/core/internal/client";import{e as n,i as o,a as l,m as c}from"./form.js";import{h as d}from"./index2.js";import{H as h,i as p}from"./attributes.js";import{d as b}from"./pds-icon2.js";const m=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsSwitchChange=s(this,"pdsSwitchChange",7),this.inheritedAttributes={},this._type="checkbox",this.hostKeeper=new h,this.hasLabelSlot=!1,this.checked=!1,this.disabled=!1,this.invalid=!1,this.required=!1,this.onSwitchUpdate=e=>{this.disabled||(this.checked=e.target.checked,this.updateFormValue(),this.pdsSwitchChange.emit(e))},this.switchClassNames=()=>{let e="pds-switch";return!0===this.invalid&&(e+=" pds-switch--error"),void 0!==this.helperMessage&&(e+=" pds-switch--message"),this.hasLabelSlot&&(e+=" pds-switch--label-slot"),e},this.updateHasLabelSlot=()=>{this.hasLabelSlot=Array.from(this.el.children).some((e=>"label"===e.getAttribute("slot")))}}connectedCallback(){this.hostKeeper.connect(this.el),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals()),n(this.el,(()=>this._type))}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidLoad(){this.updateFormValue()}checkedChanged(){this.updateFormValue()}updateFormValue(){o()||(this.internals&&this.internals.setFormValue&&this.internals.setFormValue(this.checked?this.value||"on":null),this.internals&&this.internals.setValidity&&this.internals.setValidity({}))}formStateRestoreCallback(e){if(e instanceof FormData){const i=this.value||"on";this.checked=e.get(this.name||this.componentId)===i}else"string"==typeof e&&(this.checked=e===(this.value||"on"))}formDisabledCallback(e){e&&!this.el.closest("fieldset[disabled]")||(this.disabled=e)}componentWillLoad(){this.inheritedAttributes=Object.assign({},p(this.el)),this.updateHasLabelSlot()}render(){const e=this.switchClassNames(),i=this.disabled?"true":null;return this.hostKeeper.record(e,{},{"aria-disabled":i}),t(r,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as s,h as t,Host as r,transformTag as a}from"@stencil/core/internal/client";import{e as n,i as o,a as l,m as c}from"./form.js";import{h as d}from"./index2.js";import{H as h,i as p}from"./attributes.js";import{d as b}from"./pds-icon2.js";const m=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsSwitchChange=s(this,"pdsSwitchChange",7),this.inheritedAttributes={},this._type="checkbox",this.hostKeeper=new h,this.hasLabelSlot=!1,this.checked=!1,this.disabled=!1,this.invalid=!1,this.required=!1,this.onSwitchUpdate=e=>{this.disabled||(this.checked=e.target.checked,this.updateFormValue(),this.pdsSwitchChange.emit(e))},this.switchClassNames=()=>{let e="pds-switch";return!0===this.invalid&&(e+=" pds-switch--error"),void 0!==this.helperMessage&&(e+=" pds-switch--message"),this.hasLabelSlot&&(e+=" pds-switch--label-slot"),e},this.updateHasLabelSlot=()=>{this.hasLabelSlot=Array.from(this.el.children).some((e=>"label"===e.getAttribute("slot")))}}connectedCallback(){this.hostKeeper.connect(this.el),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals()),n(this.el,(()=>this._type))}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidLoad(){this.updateFormValue()}checkedChanged(){this.updateFormValue()}updateFormValue(){o()||(this.internals&&this.internals.setFormValue&&this.internals.setFormValue(this.checked?this.value||"on":null),this.internals&&this.internals.setValidity&&this.internals.setValidity({}))}formStateRestoreCallback(e){if(e instanceof FormData){const i=this.value||"on";this.checked=e.get(this.name||this.componentId)===i}else"string"==typeof e&&(this.checked=e===(this.value||"on"))}formDisabledCallback(e){e&&!this.el.closest("fieldset[disabled]")||(this.disabled=e)}componentWillLoad(){this.inheritedAttributes=Object.assign({},p(this.el)),this.updateHasLabelSlot()}render(){const e=this.switchClassNames(),i=this.disabled?"true":null;return this.hostKeeper.record(e,{},{"aria-disabled":i}),t(r,{key:"0fa5beb83232b381ea5cdfa82d143afcb69eb4e1",class:e,"aria-disabled":i},t("label",{key:"df5d08344d11cb334ef69a432d1c02557caacc96",htmlFor:this.componentId},t("input",Object.assign({key:"6908b328f0e2da2085ffbffe0d1e4d09f2c6fd86","aria-describedby":l(this.componentId,this.invalid,this.helperMessage,this.errorMessage),"aria-invalid":this.invalid?"true":void 0,checked:this.checked,class:"pds-switch__input",disabled:this.disabled,id:this.componentId,name:this.name?this.name:this.componentId,onChange:this.onSwitchUpdate,required:this.required,type:"checkbox",value:this.value},this.inheritedAttributes)),t("span",{key:"1108ab3eae63a371f9e9b80f011211cba8287b67",class:this.hideLabel?"visually-hidden":""},t("slot",{key:"8aac1d9b81deab92e1e27c06debf2b87bc697874",name:"label",onSlotchange:this.updateHasLabelSlot}),!this.hasLabelSlot&&this.label)),this.helperMessage&&t("div",{key:"ef829fb6bc66060805a144995f60e2bebb915615",class:"pds-switch__message",id:c(this.componentId,"helper")},this.helperMessage),this.errorMessage&&t("div",{key:"42ad678cc2179b4a26ed09151de41c2293b98011",class:"pds-switch__message pds-switch__message--error",id:c(this.componentId,"error"),"aria-live":"assertive"},t("pds-icon",{key:"8dc0b29b522247762010edb3b1e8e5fc8c8788fa","aria-hidden":"true",icon:d,size:"small"}),this.errorMessage))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{checked:[{checkedChanged:0}]}}static get style(){return':host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--sizing-input-toggle-size:calc(var(--pine-dimension-250) - (var(--pine-dimension-025) * 2));--pine-dimension-025:2px;--spacing-message-inline:calc(var(--pine-dimension-450) + var(--pine-dimension-150));--number-transition-timing:var(--pine-motion-duration-fast) ease-out;-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-flow:row wrap;flex-flow:row wrap;position:relative}:host(.pds-switch--error){color:var(--pine-color-text-message-danger)}:host(.pds-switch--error) input,:host(.pds-switch--error) input:checked,:host(.pds-switch--error) input:hover:not(:disabled):not(:checked){background-color:var(--pine-color-danger)}:host(.pds-switch--error) input:focus-visible:not(:disabled):not(:checked){outline-color:var(--pine-color-focus-ring-danger)}:host(.pds-switch--error) label{color:var(--color-text-error)}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-neutral);border:0;border-radius:var(--pine-dimension-sm);cursor:pointer;display:inline-block;-ms-flex-negative:0;flex-shrink:0;height:var(--pine-dimension-250);margin:0;padding:0;position:relative;-webkit-transition:var(--number-transition-timing);transition:var(--number-transition-timing);-webkit-transition-property:background, border, color;transition-property:background, border, color;width:var(--pine-dimension-450)}input::after{background:var(--pine-color-secondary);border-radius:var(--pine-border-radius-full);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);content:"";display:block;height:var(--sizing-input-toggle-size);inset-block-start:50%;inset-inline-start:var(--pine-dimension-025);position:absolute;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:inset-inline-start var(--number-transition-timing);transition:inset-inline-start var(--number-transition-timing);width:var(--sizing-input-toggle-size)}label{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-150)}:host(.pds-switch--label-slot) label{-ms-flex-align:center;align-items:center}.pds-switch--error label{color:inherit}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-switch__message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-xs);margin-block-start:var(--pine-dimension-xs);-webkit-margin-start:var(--spacing-message-inline);margin-inline-start:var(--spacing-message-inline);width:100%}.pds-switch__message+.pds-switch__message{-webkit-margin-before:var(--spacing-message-inline);margin-block-start:var(--spacing-message-inline)}.pds-switch__message--error{color:inherit;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-switch__message--error pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}input:disabled{background-color:var(--pine-color-neutral-disabled);cursor:not-allowed}input:disabled~label{cursor:initial}input:disabled:hover::after{background-color:var(--pine-color-secondary)}input:disabled .pds-switch__message{color:initial}input:hover:not(:disabled){background-color:var(--pine-color-neutral-hover)}input:focus-visible:not(:disabled){outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}input:checked::after{inset-inline-start:calc(100% - var(--sizing-input-toggle-size) - var(--pine-dimension-025))}input:checked:not(:disabled){background-color:currentColor;color:var(--pine-color-accent)}input:checked:not(:disabled):hover{border-color:currentColor;color:var(--pine-color-accent-hover)}'}},[321,"pds-switch",{componentId:[1,"component-id"],checked:[1028],disabled:[4],errorMessage:[1,"error-message"],hideLabel:[4,"hide-label"],helperMessage:[1,"helper-message"],invalid:[4],label:[1],name:[1],required:[4],value:[1],hasLabelSlot:[32]},void 0,{checked:[{checkedChanged:0}]}]),g=m,u=function(){"undefined"!=typeof customElements&&["pds-switch","pds-icon"].forEach((e=>{switch(e){case"pds-switch":customElements.get(a(e))||customElements.define(a(e),m);break;case"pds-icon":customElements.get(a(e))||b()}}))};export{g as PdsSwitch,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return o(r,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return o(r,{key:"4f1cba9505f56ff1ab0a19f9a88318d66a02eacc",role:"rowgroup",part:"body"},o("slot",{key:"ea0c620a15fcbe2915189e870d0815c5cbffdf8c"}))}static get style(){return":host{border-color:inherit;display:table-row-group;vertical-align:middle}"}},[257,"pds-table-body"]),a=c,l=function(){"undefined"!=typeof customElements&&["pds-table-body"].forEach((e=>{"pds-table-body"===e&&(customElements.get(s(e))||customElements.define(s(e),c))}))};export{a as PdsTableBody,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as i,h as s,Host as e,transformTag as n}from"@stencil/core/internal/client";import{i as l}from"./scroll.js";import{s as o}from"./truncation-tooltip.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.scrollContainer=null,this.setupRetries=0,this.truncationCleanup=null,this.hasLoaded=!1,this.tableScrolling=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}}}componentWillRender(){this.tableRef=this.hostElement.closest("pds-table")}connectedCallback(){this.hasLoaded&&(this.tableRef=this.hostElement.closest("pds-table"),this.cleanupScrollListener(),this.needsScrollShadow&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip())}componentDidLoad(){this.hasLoaded=!0,this.needsScrollShadow&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.cleanupScrollListener(),this.destroyTruncationTooltip()}get needsScrollShadow(){var t;return Boolean((null===(t=this.tableRef)||void 0===t?void 0:t.responsive)&&this.tableRef.fixedColumn)}setupScrollListener(){var t;if(!this.tableRef)return;const i=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");i?(this.scrollContainer=i,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.truncationCleanup=o({hostEl:this.hostElement,contentEl:this.hostElement,getTooltipText:()=>this.hostElement.textContent||""})}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-cell--align-${this.cellAlign}`),this.truncate&&t.push("is-truncated"),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),t.join(" ")}render(){return s(e,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,h as s,Host as e,transformTag as n}from"@stencil/core/internal/client";import{i as l}from"./scroll.js";import{s as o}from"./truncation-tooltip.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.scrollContainer=null,this.setupRetries=0,this.truncationCleanup=null,this.hasLoaded=!1,this.tableScrolling=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}}}componentWillRender(){this.tableRef=this.hostElement.closest("pds-table")}connectedCallback(){this.hasLoaded&&(this.tableRef=this.hostElement.closest("pds-table"),this.cleanupScrollListener(),this.needsScrollShadow&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip())}componentDidLoad(){this.hasLoaded=!0,this.needsScrollShadow&&this.setupScrollListener(),this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.cleanupScrollListener(),this.destroyTruncationTooltip()}get needsScrollShadow(){var t;return Boolean((null===(t=this.tableRef)||void 0===t?void 0:t.responsive)&&this.tableRef.fixedColumn)}setupScrollListener(){var t;if(!this.tableRef)return;const i=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");i?(this.scrollContainer=i,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.truncationCleanup=o({hostEl:this.hostElement,contentEl:this.hostElement,getTooltipText:()=>this.hostElement.textContent||""})}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-cell--align-${this.cellAlign}`),this.truncate&&t.push("is-truncated"),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),t.join(" ")}render(){return s(e,{key:"fd84150bcb9bd5d2029624394d4f69b0a7234bc0",class:this.classNames(),role:"gridcell",part:"cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},s("slot",{key:"9256f033ec58b9cb2acc74d705acc9726507668b"}))}get hostElement(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}]}}static get style(){return":host{--box-shadow-fixed:3px 3px 6px -2px rgba(0, 0, 0, 0.2);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);inset-inline-start:var(--pine-dimension-none);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);vertical-align:middle}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:0;position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host-context([dir=rtl]){--box-shadow-fixed:-3px 3px 6px -2px rgba(0, 0, 0, 0.2)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-fixed);box-shadow:var(--box-shadow-fixed)}:host(.is-truncated){max-width:var(--pds-table-cell-truncate-max-width, 100px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(.has-checkbox){vertical-align:middle;width:16px}:host(.pds-table-cell--align-start){text-align:start}:host(.pds-table-cell--align-center){text-align:center}:host(.pds-table-cell--align-end){text-align:end}:host(.pds-table-cell--align-justify){text-align:justify}"}},[257,"pds-table-cell",{cellAlign:[1,"cell-align"],truncate:[4],tableScrolling:[32]},void 0,{truncate:[{handleTruncateChange:0}]}]);function h(){"undefined"!=typeof customElements&&["pds-table-cell"].forEach((t=>{"pds-table-cell"===t&&(customElements.get(n(t))||customElements.define(n(t),a))}))}export{a as P,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as e,Host as a,transformTag as o}from"@stencil/core/internal/client";import{u as r,d as n}from"./index2.js";import{i as l}from"./scroll.js";import{d as h}from"./pds-icon2.js";const d=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsTableSort=s(this,"pdsTableSort",7),this.scrollContainer=null,this.setupRetries=0,this.sortingDirection="asc",this.tableScrolling=!1,this.isSelected=!1,this.hasHeadBorder=!1,this.hasHeadBackground=!1,this.isActive=!1,this.handleScroll=()=>{if(this.scrollContainer)try{this.tableScrolling=l(this.scrollContainer)}catch(t){console.warn("Scroll handler error:",t)}},this.toggleSort=()=>{if(this.sortable){if(!this.tableRef)return;const t=this.hostElement.innerText.trim();this.sortingDirection="asc"===this.sortingDirection?"desc":"asc",this.tableRef.querySelectorAll("pds-table-head-cell").forEach((async t=>{if(t!==this.hostElement){const i=t;await i.clearActiveSort()}})),this.isActive=!0,this.hostElement.classList.add("is-active"),this.pdsTableSort.emit({column:t,direction:this.sortingDirection})}}}async setActiveSort(t){this.sortable&&(this.sortingDirection=t,this.isActive=!0,this.hostElement.classList.add("is-active"))}async clearActiveSort(){this.isActive=!1,this.hostElement.classList.remove("is-active")}componentWillLoad(){this.tableRef=this.hostElement.closest("pds-table");const t=this.hostElement.closest("pds-table-head");t&&(this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background"))}componentDidLoad(){this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn&&this.setupScrollListener();const t=this.hostElement.closest("pds-table-head");t&&"undefined"!=typeof MutationObserver&&(this.headObserver&&this.headObserver.disconnect(),this.headObserver=new MutationObserver((()=>{this.hasHeadBorder=t.hasAttribute("border"),this.hasHeadBackground=t.hasAttribute("background")})),this.headObserver.observe(t,{attributes:!0,attributeFilter:["border","background"]}))}disconnectedCallback(){this.cleanupScrollListener(),this.headObserver&&this.headObserver.disconnect()}setupScrollListener(){var t;if(!this.tableRef)return;const i=null===(t=this.tableRef.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-table-responsive-container");i?(this.scrollContainer=i,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),this.setupRetries=0):this.setupTimer=window.setTimeout((()=>{this.scrollContainer||(this.setupRetries=(this.setupRetries||0)+1,this.setupRetries<=50?this.setupScrollListener():console.warn("Failed to find responsive container after 50 attempts"))}),100)}cleanupScrollListener(){this.scrollContainer&&(this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=null),void 0!==this.setupTimer&&(window.clearTimeout(this.setupTimer),this.setupTimer=void 0),this.setupRetries=0}classNames(){const t=[];return this.tableRef&&this.tableRef.compact&&t.push("is-compact"),this.cellAlign&&t.push(`pds-table-head-cell--align-${this.cellAlign}`),this.sortable&&t.push("is-sortable"),this.sortable&&null!==this.sortingDirection&&t.push("sort-"+this.sortingDirection),this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling&&t.push("has-scrolled"),this.hasHeadBackground&&t.push("has-head-background"),this.hasHeadBorder&&t.push("has-head-border"),t.join(" ")}render(){return e(a,{key:"d609309180968913315c1428d0403c3974a4bfc0",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,part:"head-cell",style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},e("slot",{key:"7aff5994fe4c5250ce83516960183dbd9ffa9c69"}),this.sortable&&this.isActive&&e("pds-icon",{key:"0a7b99ab2c56ea0cfb3aa6f810bf802422a29bef",icon:"asc"===this.sortingDirection?r:n,part:"sort-icon","aria-hidden":"true"}))}get hostElement(){return this}static get style(){return":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);--box-shadow-default:3px 3px 6px -2px rgba(0, 0, 0, 0.1);-webkit-border-after:var(--border-head-cell-default);border-block-end:var(--border-head-cell-default);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);position:relative;text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(.is-fixed.has-head-background){background-color:var(--pine-color-background-subtle)}:host(.has-head-border){-webkit-border-before:var(--border-head-cell-default);border-block-start:var(--border-head-cell-default)}:host-context([dir=rtl]){--box-shadow-default:-3px 3px 6px -2px rgba(0, 0, 0, 0.1)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);-webkit-padding-before:2px;padding-block-start:2px;position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--pine-color-text-strong)}:host(.pds-table-head-cell--align-start){text-align:start}:host(.pds-table-head-cell--align-center){text-align:center}:host(.pds-table-head-cell--align-end){text-align:end}:host(.pds-table-head-cell--align-justify){text-align:justify}"}},[257,"pds-table-head-cell",{cellAlign:[1,"cell-align"],sortable:[4],sortingDirection:[32],tableScrolling:[32],isSelected:[32],hasHeadBorder:[32],hasHeadBackground:[32],isActive:[32],setActiveSort:[64],clearActiveSort:[64]}]);function c(){"undefined"!=typeof customElements&&["pds-table-head-cell","pds-icon"].forEach((t=>{switch(t){case"pds-table-head-cell":customElements.get(o(t))||customElements.define(o(t),d);break;case"pds-icon":customElements.get(o(t))||h()}}))}export{d as P,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as o,Host as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as o,Host as i,transformTag as d}from"@stencil/core/internal/client";import{c as s}from"./closest.js";import{d as l}from"./pds-checkbox2.js";import{d as a}from"./pds-icon2.js";import{d as b}from"./pds-table-head-cell2.js";const c=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableSelectAll=t(this,"pdsTableSelectAll",7),this.border=!1,this.background=!1,this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`,this.handleInput=e=>{this.isSelected=!e.target.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{this.indeterminate=!1,s("pds-table-head",this.hostElement)&&this.pdsTableSelectAll.emit({isSelected:e})}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-head-cell:first-child");null==e||e.classList.add("is-fixed")}}render(){return o(i,{key:"4fb8d7bf4a9b0bce672208651c0600fbc94214af",role:"row",part:"head"},this.tableRef&&this.tableRef.selectable&&o("pds-table-head-cell",{key:"20b86146540208178bd63bd136e14e5534c7ec76",part:this.tableRef.selectable?"checkbox-cell":""},!this.tableRef.disableSelectAll&&o("pds-checkbox",{key:"fa8054dd7ee36c6401e9eeb9c962a820d3a02558",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",hideLabel:!0,checked:this.isSelected,part:"select-all-checkbox"})),o("slot",{key:"a0000270ae6ed1cab1c6e802ccc53ba0de3e54c9"}))}get hostElement(){return this}static get style(){return":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}"}},[257,"pds-table-head",{indeterminate:[1028],isSelected:[1028,"is-selected"],border:[516],background:[516]}]),n=c,h=function(){"undefined"!=typeof customElements&&["pds-table-head","pds-checkbox","pds-icon","pds-table-head-cell"].forEach((e=>{switch(e){case"pds-table-head":customElements.get(d(e))||customElements.define(d(e),c);break;case"pds-checkbox":customElements.get(d(e))||l();break;case"pds-icon":customElements.get(d(e))||a();break;case"pds-table-head-cell":customElements.get(d(e))||b()}}))};export{n as PdsTableHead,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{c as l}from"./closest.js";import{d as c}from"./pds-checkbox2.js";import{d}from"./pds-icon2.js";import{d as h}from"./pds-table-cell2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableRowSelected=s(this,"pdsTableRowSelected",7),this.observer=null,this.bodyObserver=null,this.hasDivider=!1,this.isLastRow=!1,this.handleCheckboxChange=e=>{this.isSelected=e.detail.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{if(this.indeterminate=!1,!l("pds-table-head",this.hostElement)){const t=Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);this.pdsTableRowSelected.emit({rowIndex:t,isSelected:e})}},this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`}classNames(){const e=[];return this.isSelected&&e.push("is-selected"),this.hasDivider&&e.push("has-divider"),this.isLastRow&&e.push("is-last-row"),e.join(" ")}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-cell");null==e||e.classList.add("is-fixed")}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}connectedCallback(){this.tableRef=this.hostElement.closest("pds-table"),this.setupObservers(),this.updateDividerState()}disconnectedCallback(){this.cleanupObservers()}cleanupObservers(){this.observer&&(this.observer.disconnect(),this.observer=null),this.bodyObserver&&(this.bodyObserver.disconnect(),this.bodyObserver=null)}setupObservers(){this.cleanupObservers(),this.tableRef&&"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.updateDividerState()})),this.observer.observe(this.tableRef,{attributes:!0,attributeFilter:["row-dividers"]}));const e=this.hostElement.closest("pds-table-body");e&&"undefined"!=typeof MutationObserver&&(this.bodyObserver=new MutationObserver((()=>{this.updateLastRowState()})),this.bodyObserver.observe(e,{childList:!0}))}shouldHaveDivider(){return this.tableRef||(this.tableRef=this.hostElement.closest("pds-table")),!(!this.tableRef||!this.tableRef.rowDividers)}updateDividerState(){this.hasDivider=this.shouldHaveDivider(),this.updateLastRowState()}updateLastRowState(){if(!this.hasDivider)return void(this.isLastRow=!1);const e=this.hostElement.closest("pds-table-body");if(e){const t=Array.from(e.querySelectorAll("pds-table-row"));this.isLastRow=t[t.length-1]===this.hostElement}else this.isLastRow=!1}render(){return i(o,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{c as l}from"./closest.js";import{d as c}from"./pds-checkbox2.js";import{d}from"./pds-icon2.js";import{d as h}from"./pds-table-cell2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsTableRowSelected=s(this,"pdsTableRowSelected",7),this.observer=null,this.bodyObserver=null,this.hasDivider=!1,this.isLastRow=!1,this.handleCheckboxChange=e=>{this.isSelected=e.detail.checked,this.handleSelect(this.isSelected)},this.handleSelect=e=>{if(this.indeterminate=!1,!l("pds-table-head",this.hostElement)){const t=Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement);this.pdsTableRowSelected.emit({rowIndex:t,isSelected:e})}},this.generateUniqueId=()=>`${Math.random().toString(36).substring(2,8)}-${(new Date).toISOString().replace(/[:.]/g,"-")}`}classNames(){const e=[];return this.isSelected&&e.push("is-selected"),this.hasDivider&&e.push("has-divider"),this.isLastRow&&e.push("is-last-row"),e.join(" ")}componentWillRender(){if(this.tableRef=this.hostElement.closest("pds-table"),this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-cell");null==e||e.classList.add("is-fixed")}}componentWillLoad(){this.isSelected&&this.handleSelect(this.isSelected)}connectedCallback(){this.tableRef=this.hostElement.closest("pds-table"),this.setupObservers(),this.updateDividerState()}disconnectedCallback(){this.cleanupObservers()}cleanupObservers(){this.observer&&(this.observer.disconnect(),this.observer=null),this.bodyObserver&&(this.bodyObserver.disconnect(),this.bodyObserver=null)}setupObservers(){this.cleanupObservers(),this.tableRef&&"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.updateDividerState()})),this.observer.observe(this.tableRef,{attributes:!0,attributeFilter:["row-dividers"]}));const e=this.hostElement.closest("pds-table-body");e&&"undefined"!=typeof MutationObserver&&(this.bodyObserver=new MutationObserver((()=>{this.updateLastRowState()})),this.bodyObserver.observe(e,{childList:!0}))}shouldHaveDivider(){return this.tableRef||(this.tableRef=this.hostElement.closest("pds-table")),!(!this.tableRef||!this.tableRef.rowDividers)}updateDividerState(){this.hasDivider=this.shouldHaveDivider(),this.updateLastRowState()}updateLastRowState(){if(!this.hasDivider)return void(this.isLastRow=!1);const e=this.hostElement.closest("pds-table-body");if(e){const t=Array.from(e.querySelectorAll("pds-table-row"));this.isLastRow=t[t.length-1]===this.hostElement}else this.isLastRow=!1}render(){return i(o,{key:"dc956e7253971bdadc003448822a83953ed4658f",class:this.classNames(),role:"row",part:"row"},this.tableRef&&this.tableRef.selectable&&i("pds-table-cell",{key:"1f119c5036ab1d27c5138106968a40492222b6f3",part:"checkbox-cell",class:this.tableRef.selectable?"has-checkbox":""},i("pds-checkbox",{key:"f7a3534eceeabe478fb85e6e476f814e03988cfb",componentId:this.generateUniqueId(),onPdsCheckboxChange:this.handleCheckboxChange,indeterminate:this.indeterminate,label:"Select Row",hideLabel:!0,checked:this.isSelected,part:"row-checkbox"})),i("slot",{key:"287c0fe2c39bac5df7a977e31290aeddd0cd46b3"}))}get hostElement(){return this}static get style(){return":host{--color-background-interactive:var(--pine-color-background-subtle);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}"}},[257,"pds-table-row",{indeterminate:[1028],isSelected:[1028,"is-selected"],hasDivider:[32],isLastRow:[32]}]),n=a,b=function(){"undefined"!=typeof customElements&&["pds-table-row","pds-checkbox","pds-icon","pds-table-cell"].forEach((e=>{switch(e){case"pds-table-row":customElements.get(r(e))||customElements.define(r(e),a);break;case"pds-checkbox":customElements.get(r(e))||c();break;case"pds-icon":customElements.get(r(e))||d();break;case"pds-table-cell":customElements.get(r(e))||h()}}))};export{n as PdsTableRow,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as s,Host as a,transformTag as n}from"@stencil/core/internal/client";import{H as i}from"./attributes.js";import{u as l}from"./reconnected-content.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hostKeeper=new i,this.selected=!1,this.stretch=!1}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidRender(){l(this.el.querySelector(".pds-tabpanel"),".pds-tabpanel")}render(){const t=this.stretch&&this.selected?"pds-tabpanel--stretch-active":"";return this.hostKeeper.record(t,{},{slot:"tabpanels"}),s(a,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as s,Host as a,transformTag as n}from"@stencil/core/internal/client";import{H as i}from"./attributes.js";import{u as l}from"./reconnected-content.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hostKeeper=new i,this.selected=!1,this.stretch=!1}connectedCallback(){this.hostKeeper.connect(this.el)}disconnectedCallback(){this.hostKeeper.disconnect()}componentDidRender(){l(this.el.querySelector(".pds-tabpanel"),".pds-tabpanel")}render(){const t=this.stretch&&this.selected?"pds-tabpanel--stretch-active":"";return this.hostKeeper.record(t,{},{slot:"tabpanels"}),s(a,{key:"b649c0f9e0c103a2d7dad43b7db0a092194b4ba0",slot:"tabpanels",class:t||void 0},s("div",{key:"a578722d33f7d04726185e393771838870833984",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"},s("slot",{key:"2ebe5745c444563333ee175bb3a1f7401ba77ec1"})))}get el(){return this}static get style(){return":host{display:block}:host(.pds-tabpanel--stretch-active){-ms-flex:1 1 auto;flex:1 1 auto;min-block-size:0}:host(.pds-tabpanel--stretch-active) .pds-tabpanel.is-active{block-size:100%}.pds-tabpanel{display:none;margin-top:var(--tabs-dimension-panel-margin-top);padding:var(--tabs-dimension-panel-padding)}.pds-tabpanel:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabpanel.is-active{display:block}"}},[260,"pds-tabpanel",{name:[1],parentComponentId:[1,"parent-component-id"],variant:[1],selected:[1028],stretch:[4]}]),o=p,d=function(){"undefined"!=typeof customElements&&["pds-tabpanel"].forEach((t=>{"pds-tabpanel"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{o as PdsTabpanel,d as defineCustomElement}
|
package/components/pds-tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,h as i,Host as e,transformTag as a}from"@stencil/core/internal/client";import{H as n}from"./attributes.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hostKeeper=new n,this.slotChangeScheduled=!1,this.lastFocusedTab=null,this.handleFocusIn=t=>{var s;const i=null===(s=t.target)||void 0===s?void 0:s.closest("pds-tab");i&&i.closest("pds-tabs")===this.el&&(this.lastFocusedTab=i)},this.handleFocusOut=t=>{const s=this.lastFocusedTab;t.relatedTarget?this.lastFocusedTab=null:queueMicrotask((()=>{this.lastFocusedTab===s&&(null==s?void 0:s.isConnected)&&(this.lastFocusedTab=null)}))},this.divider=!1,this.stretch=!1,this.nav=!1,this.handleSlotChange=()=>{this.slotChangeScheduled||(this.slotChangeScheduled=!0,this.activeTabNameBeforeSlotChange=this.activeTabName,queueMicrotask((()=>{this.slotChangeScheduled=!1,this.recollectAfterSlotChange()})))}}connectedCallback(){this.hostKeeper.connect(this.el),this.el.addEventListener("focusin",this.handleFocusIn),this.el.addEventListener("focusout",this.handleFocusOut);const t=null!=this.tabsSlot;this.setupSlotChangeListeners(),t&&this.handleSlotChange()}disconnectedCallback(){var t,s;this.hostKeeper.disconnect(),this.el.removeEventListener("focusin",this.handleFocusIn),this.el.removeEventListener("focusout",this.handleFocusOut),null===(t=this.tabsSlot)||void 0===t||t.removeEventListener("slotchange",this.handleSlotChange),null===(s=this.tabPanelsSlot)||void 0===s||s.removeEventListener("slotchange",this.handleSlotChange)}componentDidLoad(){this.setupSlotChangeListeners()}tabClickHandler(t){this.componentId===t.detail[1]&&(this.activeTabIndex=t.detail[0],this.activeTabName=this.tabs[this.activeTabIndex].name)}handleKeyDown(t){if(this.isNav)return;const s=t.target.closest("pds-tab"),i=s&&s.closest("pds-tabs")===this.el;["ArrowLeft","ArrowRight","Home","End"].includes(t.key)&&i&&(t.preventDefault(),this.moveActiveTab(t.key))}get isNav(){return!!this.nav}warnOnNavConfig(){var t;if(!(null===(t=this.tabs)||void 0===t?void 0:t.length))return;const s=this.tabs.filter((t=>{const s=t.getAttribute("href");return null!=s&&""!==s})).length;this.nav&&s<this.tabs.length?console.warn("pds-tabs: `nav` is set, so every pds-tab needs an `href`."):!this.nav&&s>0&&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.")}moveActiveTab(t){const s=this.tabs.length-1;let i=null;switch(t){case"ArrowLeft":i=0===this.activeTabIndex?s:this.activeTabIndex+-1;break;case"ArrowRight":i=this.activeTabIndex===s?0:this.activeTabIndex+1;break;case"Home":i=0;break;case"End":i=s}this.tabs[i].children[0].focus(),this.activeTabName=this.tabs[i].name,this.activeTabIndex=i}findAllChildren(){const t=Array.from(this.el.querySelectorAll("pds-tab")),s=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=t.filter((t=>t.closest("pds-tabs")===this.el)),this.tabPanels=s.filter((t=>t.closest("pds-tabs")===this.el))}setupSlotChangeListeners(){var t,s,i,e;this.tabsSlot=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="tabs"]'),this.tabPanelsSlot=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector('slot[name="tabpanels"]'),null===(i=this.tabsSlot)||void 0===i||i.addEventListener("slotchange",this.handleSlotChange),null===(e=this.tabPanelsSlot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}recollectAfterSlotChange(){const t=this.activeTabNameBeforeSlotChange,s=!this.isNav&&null!=this.lastFocusedTab&&!this.lastFocusedTab.isConnected;this.findAllChildren(),this.warnOnNavConfig(),null==t||this.tabs.some((s=>s.name===t))||(this.activeTabName=void 0),this.passPropsToChildren(),s&&(this.lastFocusedTab=null,requestAnimationFrame((()=>{var t;const s=document.activeElement;if(s&&s!==document.body)return;const i=this.tabs.find((t=>t.name===this.activeTabName));null===(t=null==i?void 0:i.querySelector("button"))||void 0===t||t.focus()})))}propGeneration(t,s=0){t.parentComponentId=""+this.componentId,t.variant=this.variant,t.selected=this.activeTabName===t.name,t.index=s}passPropsToChildren(){var t;if(!this.nav&&null==this.activeTabName&&this.tabs.length){const s=null!==(t=this.tabs.find((t=>!t.disabled)))&&void 0!==t?t:this.tabs[0];this.activeTabName=s.name}this.tabs.forEach(((t,s)=>{this.activeTabName===t.name&&(this.activeTabIndex=s),this.propGeneration(t,s),t.navMode=this.nav})),this.tabPanels.forEach((t=>{this.propGeneration(t),t.stretch=this.stretch}))}classNames(){let t="pds-tabs";return this.variant&&"primary"!=this.variant&&(t+=" pds-tabs--"+this.variant),this.divider&&(t+=" pds-tabs--divider"),this.stretch&&(t+=" pds-tabs--stretch"),t}componentWillLoad(){this.findAllChildren(),this.warnOnNavConfig()}componentWillRender(){this.passPropsToChildren()}render(){const t=this.isNav?i("nav",{class:"pds-tabs__tablist","aria-label":this.tablistLabel||void 0,part:"tab-list"},i("slot",{name:"tabs"})):i("div",{class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},i("slot",{name:"tabs"})),s=this.classNames();return this.hostKeeper.record(s),i(e,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,h as i,Host as e,transformTag as a}from"@stencil/core/internal/client";import{H as n}from"./attributes.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hostKeeper=new n,this.slotChangeScheduled=!1,this.lastFocusedTab=null,this.handleFocusIn=t=>{var s;const i=null===(s=t.target)||void 0===s?void 0:s.closest("pds-tab");i&&i.closest("pds-tabs")===this.el&&(this.lastFocusedTab=i)},this.handleFocusOut=t=>{const s=this.lastFocusedTab;t.relatedTarget?this.lastFocusedTab=null:queueMicrotask((()=>{this.lastFocusedTab===s&&(null==s?void 0:s.isConnected)&&(this.lastFocusedTab=null)}))},this.divider=!1,this.stretch=!1,this.nav=!1,this.handleSlotChange=()=>{this.slotChangeScheduled||(this.slotChangeScheduled=!0,this.activeTabNameBeforeSlotChange=this.activeTabName,queueMicrotask((()=>{this.slotChangeScheduled=!1,this.recollectAfterSlotChange()})))}}connectedCallback(){this.hostKeeper.connect(this.el),this.el.addEventListener("focusin",this.handleFocusIn),this.el.addEventListener("focusout",this.handleFocusOut);const t=null!=this.tabsSlot;this.setupSlotChangeListeners(),t&&this.handleSlotChange()}disconnectedCallback(){var t,s;this.hostKeeper.disconnect(),this.el.removeEventListener("focusin",this.handleFocusIn),this.el.removeEventListener("focusout",this.handleFocusOut),null===(t=this.tabsSlot)||void 0===t||t.removeEventListener("slotchange",this.handleSlotChange),null===(s=this.tabPanelsSlot)||void 0===s||s.removeEventListener("slotchange",this.handleSlotChange)}componentDidLoad(){this.setupSlotChangeListeners()}tabClickHandler(t){this.componentId===t.detail[1]&&(this.activeTabIndex=t.detail[0],this.activeTabName=this.tabs[this.activeTabIndex].name)}handleKeyDown(t){if(this.isNav)return;const s=t.target.closest("pds-tab"),i=s&&s.closest("pds-tabs")===this.el;["ArrowLeft","ArrowRight","Home","End"].includes(t.key)&&i&&(t.preventDefault(),this.moveActiveTab(t.key))}get isNav(){return!!this.nav}warnOnNavConfig(){var t;if(!(null===(t=this.tabs)||void 0===t?void 0:t.length))return;const s=this.tabs.filter((t=>{const s=t.getAttribute("href");return null!=s&&""!==s})).length;this.nav&&s<this.tabs.length?console.warn("pds-tabs: `nav` is set, so every pds-tab needs an `href`."):!this.nav&&s>0&&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.")}moveActiveTab(t){const s=this.tabs.length-1;let i=null;switch(t){case"ArrowLeft":i=0===this.activeTabIndex?s:this.activeTabIndex+-1;break;case"ArrowRight":i=this.activeTabIndex===s?0:this.activeTabIndex+1;break;case"Home":i=0;break;case"End":i=s}this.tabs[i].children[0].focus(),this.activeTabName=this.tabs[i].name,this.activeTabIndex=i}findAllChildren(){const t=Array.from(this.el.querySelectorAll("pds-tab")),s=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=t.filter((t=>t.closest("pds-tabs")===this.el)),this.tabPanels=s.filter((t=>t.closest("pds-tabs")===this.el))}setupSlotChangeListeners(){var t,s,i,e;this.tabsSlot=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="tabs"]'),this.tabPanelsSlot=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector('slot[name="tabpanels"]'),null===(i=this.tabsSlot)||void 0===i||i.addEventListener("slotchange",this.handleSlotChange),null===(e=this.tabPanelsSlot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}recollectAfterSlotChange(){const t=this.activeTabNameBeforeSlotChange,s=!this.isNav&&null!=this.lastFocusedTab&&!this.lastFocusedTab.isConnected;this.findAllChildren(),this.warnOnNavConfig(),null==t||this.tabs.some((s=>s.name===t))||(this.activeTabName=void 0),this.passPropsToChildren(),s&&(this.lastFocusedTab=null,requestAnimationFrame((()=>{var t;const s=document.activeElement;if(s&&s!==document.body)return;const i=this.tabs.find((t=>t.name===this.activeTabName));null===(t=null==i?void 0:i.querySelector("button"))||void 0===t||t.focus()})))}propGeneration(t,s=0){t.parentComponentId=""+this.componentId,t.variant=this.variant,t.selected=this.activeTabName===t.name,t.index=s}passPropsToChildren(){var t;if(!this.nav&&null==this.activeTabName&&this.tabs.length){const s=null!==(t=this.tabs.find((t=>!t.disabled)))&&void 0!==t?t:this.tabs[0];this.activeTabName=s.name}this.tabs.forEach(((t,s)=>{this.activeTabName===t.name&&(this.activeTabIndex=s),this.propGeneration(t,s),t.navMode=this.nav})),this.tabPanels.forEach((t=>{this.propGeneration(t),t.stretch=this.stretch}))}classNames(){let t="pds-tabs";return this.variant&&"primary"!=this.variant&&(t+=" pds-tabs--"+this.variant),this.divider&&(t+=" pds-tabs--divider"),this.stretch&&(t+=" pds-tabs--stretch"),t}componentWillLoad(){this.findAllChildren(),this.warnOnNavConfig()}componentWillRender(){this.passPropsToChildren()}render(){const t=this.isNav?i("nav",{class:"pds-tabs__tablist","aria-label":this.tablistLabel||void 0,part:"tab-list"},i("slot",{name:"tabs"})):i("div",{class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},i("slot",{name:"tabs"})),s=this.classNames();return this.hostKeeper.record(s),i(e,{key:"08ac02be358bebbd95dd5edca30cd99789445f50","active-tab-name":this.activeTabName,class:s,id:this.componentId},t,i("slot",{key:"02395c056f80f46f1fa9117eafde68ef170b4188",name:"tabpanels"}))}get el(){return this}static get style(){return":host{--tabs-dimension-panel-margin-top:var(--pine-dimension-none);--tabs-dimension-panel-padding:0;display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-md)}:host(.pds-tabs--divider) .pds-tabs__tablist{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.pds-tabs--stretch){block-size:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.pds-tabs--stretch) .pds-tabs__tablist{-ms-flex:0 0 auto;flex:0 0 auto}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--pine-dimension-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--pine-dimension-sm)}:host(.pds-tabs--pill) .pds-tabs__tablist{background-color:var(--pine-color-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}"}},[257,"pds-tabs",{tablistLabel:[1,"tablist-label"],componentId:[1,"component-id"],variant:[1],divider:[4],stretch:[4],nav:[4],activeTabName:[1025,"active-tab-name"],activeTabIndex:[1026,"active-tab-index"]},[[16,"pdsTabClick","tabClickHandler"],[0,"keydown","handleKeyDown"]]]),o=l,h=function(){"undefined"!=typeof customElements&&["pds-tabs"].forEach((t=>{"pds-tabs"===t&&(customElements.get(a(t))||customElements.define(a(t),l))}))};export{o as PdsTabs,h as defineCustomElement}
|
package/components/pds-text2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as i,transformTag as n}from"@stencil/core/internal/client";import{s}from"./utils.js";import{s as a}from"./truncation-tooltip.js";const o=["2xl","xl","lg","md","sm","xs","2xs","h1","h2","h3","h4","h5","h6"],r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.truncationCleanup=null,this.tag="p"}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}validateSize(t){if(null!=t&&""!==t&&!o.includes(t)){const e=t.length>80?`${t.slice(0,80)}…`:t;console.warn(`pds-text: invalid size "${e}". Valid values are: ${o.join(", ")}.`)}}componentWillLoad(){this.validateSize(this.size)}connectedCallback(){this.truncate&&this.contentEl&&this.initTruncationTooltip()}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.contentEl&&(this.truncationCleanup=a({hostEl:this.el,contentEl:this.contentEl,getTooltipText:()=>this.el.textContent||""}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}render(){const t=this.tag,e=`\n pds-text\n ${null!=this.align&&""!==this.align.trim()?`pds-text--align-${this.align}`:""}\n ${null!=this.gutter&&""!==this.gutter.trim()?`pds-text--gutter-${this.gutter}`:""}\n ${null!=this.size&&""!==this.size.trim()?`pds-text--size-${this.size}`:""}\n ${null!=this.weight&&""!==this.weight.trim()?`pds-text--weight-${this.weight}`:""}\n ${null!=this.decoration&&""!==this.decoration.trim()?`pds-text--decoration-${this.decoration}`:""}\n `;return i(t,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as i,transformTag as n}from"@stencil/core/internal/client";import{s}from"./utils.js";import{s as a}from"./truncation-tooltip.js";const o=["2xl","xl","lg","md","sm","xs","2xs","h1","h2","h3","h4","h5","h6"],r=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.truncationCleanup=null,this.tag="p"}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}validateSize(t){if(null!=t&&""!==t&&!o.includes(t)){const e=t.length>80?`${t.slice(0,80)}…`:t;console.warn(`pds-text: invalid size "${e}". Valid values are: ${o.join(", ")}.`)}}componentWillLoad(){this.validateSize(this.size)}connectedCallback(){this.truncate&&this.contentEl&&this.initTruncationTooltip()}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.contentEl&&(this.truncationCleanup=a({hostEl:this.el,contentEl:this.contentEl,getTooltipText:()=>this.el.textContent||""}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}render(){const t=this.tag,e=`\n pds-text\n ${null!=this.align&&""!==this.align.trim()?`pds-text--align-${this.align}`:""}\n ${null!=this.gutter&&""!==this.gutter.trim()?`pds-text--gutter-${this.gutter}`:""}\n ${null!=this.size&&""!==this.size.trim()?`pds-text--size-${this.size}`:""}\n ${null!=this.weight&&""!==this.weight.trim()?`pds-text--weight-${this.weight}`:""}\n ${null!=this.decoration&&""!==this.decoration.trim()?`pds-text--decoration-${this.decoration}`:""}\n `;return i(t,{key:"b79a6e67f11024cb025cb26bbf77231547bd63a4",ref:t=>this.contentEl=t,style:this.color&&s(this.color),class:e,part:"content"},i("slot",{key:"ae1f8ca39899894541eac3c07fb21ead4ab98f40"}))}get el(){return this}static get watchers(){return{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}}static get style(){return":host{display:inline}:host([decoration=underline-dotted])>*{-webkit-text-decoration-color:var(--pine-color-text-tertiary);text-decoration-color:var(--pine-color-text-tertiary);-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:12%;text-underline-offset:0.3rem;text-underline-position:under}:host([decoration=strikethrough])>*{text-decoration:line-through}h1{font:var(--pine-typography-heading-1);letter-spacing:var(--pine-letter-spacing-heading-1)}h2{font:var(--pine-typography-heading-2);letter-spacing:var(--pine-letter-spacing-heading-2)}h3{font:var(--pine-typography-heading-3);letter-spacing:var(--pine-letter-spacing-heading-3)}h4{font:var(--pine-typography-heading-4);letter-spacing:var(--pine-letter-spacing-heading-4)}h5{font:var(--pine-typography-heading-5);letter-spacing:var(--pine-letter-spacing-heading-5)}h6{font:var(--pine-typography-heading-6);letter-spacing:var(--pine-letter-spacing-heading-6)}code,em,p,pre,strong{font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing)}code,pre{font-family:monospace;letter-spacing:0;line-height:1}em{font-style:normal}strong{font-weight:bolder}:host([truncate]){display:block;min-width:0}:host([truncate])>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([italic])>*{font-style:italic}.pds-text{color:var(--color, var(--pine-color-text));margin:var(--pine-dimension-none)}.pds-text--size-2xl{font-size:var(--pine-font-size-body-2xl)}.pds-text--size-xl{font-size:var(--pine-font-size-body-xl)}.pds-text--size-lg{font-size:var(--pine-font-size-body-lg)}.pds-text--size-md{font-size:var(--pine-font-size-body-md)}.pds-text--size-sm{font-size:var(--pine-font-size-body-sm)}.pds-text--size-xs{font-size:var(--pine-font-size-body-xs)}.pds-text--size-2xs{font-size:var(--pine-font-size-body-2xs)}.pds-text--size-h1{font-size:var(--pine-font-size-heading-1)}.pds-text--size-h2{font-size:var(--pine-font-size-heading-2)}.pds-text--size-h3{font-size:var(--pine-font-size-heading-3)}.pds-text--size-h4{font-size:var(--pine-font-size-heading-4)}.pds-text--size-h5{font-size:var(--pine-font-size-heading-5)}.pds-text--size-h6{font-size:var(--pine-font-size-heading-6)}.pds-text--weight-extra-light{font-weight:var(--pine-font-weight-extra-light)}.pds-text--weight-light{font-weight:var(--pine-font-weight-light)}.pds-text--weight-regular{font-weight:var(--pine-font-weight-regular)}.pds-text--weight-medium{font-weight:var(--pine-font-weight-medium)}.pds-text--weight-semibold{font-weight:var(--pine-font-weight-semi-bold)}.pds-text--weight-bold{font-weight:var(--pine-font-weight-bold)}.pds-text--gutter-2xl{-webkit-margin-after:var(--pine-dimension-2xl);margin-block-end:var(--pine-dimension-2xl)}.pds-text--gutter-xl{-webkit-margin-after:var(--pine-dimension-xl);margin-block-end:var(--pine-dimension-xl)}.pds-text--gutter-lg{-webkit-margin-after:var(--pine-dimension-lg);margin-block-end:var(--pine-dimension-lg)}.pds-text--gutter-md{-webkit-margin-after:var(--pine-dimension-md);margin-block-end:var(--pine-dimension-md)}.pds-text--gutter-sm{-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-text--gutter-xs{-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-text--gutter-2xs{-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-text--align-start{text-align:start}.pds-text--align-center{text-align:center}.pds-text--align-end{text-align:end}.pds-text--align-justify{text-align:justify}"}},[257,"pds-text",{align:[1],color:[1],decoration:[1],gutter:[1],italic:[4],size:[1],weight:[1],tag:[1],truncate:[516]},void 0,{truncate:[{handleTruncateChange:0}],size:[{validateSize:0}]}]);function d(){"undefined"!=typeof customElements&&["pds-text"].forEach((t=>{"pds-text"===t&&(customElements.get(n(t))||customElements.define(n(t),r))}))}export{r as P,o as T,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,b as n,e as l,a as d,m as c}from"./form.js";import{d as h,f as p,c as b}from"./utils.js";import{i as u,a as m}from"./attributes.js";import{h as x}from"./index2.js";import{f as v}from"./i18n-format.js";import{d as g}from"./pds-icon2.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsTextareaChange=i(this,"pdsTextareaChange",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this._type="textarea",this.disabled=!1,this.invalid=!1,this.name=this.componentId,this.readonly=!1,this.required=!1,this.value="",this.hasFocus=!1,this.hasAction=!1,this.characterCountLabel="{current} of {max} characters",this.onBlur=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocus=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onInput=e=>{const t=e.target;t&&(this.maxLength&&t.value.length>this.maxLength&&(t.value=t.value.substring(0,this.maxLength)),this.value=t.value||""),this.emitInputChange(e),this.maxLength&&"undefined"!=typeof ResizeObserver&&requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))},this.onTextareaChange=e=>{this.emitValueChange(e)},this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeTextarea&&this.nativeTextarea.focus()}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=void 0===t?null!=i?i:e:h(e,t),p(e)}valueChanged(){const e=this.nativeTextarea,t=this.getValue();e&&e.value!==t&&(e.value=t),this.updateFormValue(),this.maxLength&&"undefined"!=typeof ResizeObserver&&this.updateCharacterCounterPosition()}maxLengthChanged(){if(this.resizeObserver&&this.resizeObserver.disconnect(),this.maxLength&&this.nativeTextarea&&this.setupResizeObserver(),!o()&&this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;n(t,this);const{value:i}=t,a=null==i?i:""+i;this.focusedValue=a,this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];return this.invalid&&!0===this.invalid&&e.push("is-invalid"),e.join(" ")}connectedCallback(){var e;null!==(e=this.originalPdsInput)&&void 0!==e||(this.originalPdsInput=this.pdsInput),this.debounceChanged(),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}disconnectedCallback(){b(this.pdsInput),this.resizeObserver&&this.resizeObserver.disconnect()}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},u(this.el)),m(this.el)),this.hasAction=null!==this.el.querySelector('[slot="action"]')}componentDidLoad(){this.updateFormValue(),this.setupResizeObserver(),l(this.el,(()=>this._type))}setupResizeObserver(){this.maxLength&&this.nativeTextarea&&"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))})),this.resizeObserver.observe(this.nativeTextarea),requestAnimationFrame((()=>{this.updateCharacterCounterPosition()})))}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if("undefined"==typeof ResizeObserver)return;if(0===this.characterCounter.offsetWidth||0===this.characterCounter.offsetHeight)return;const e=this.nativeTextarea.offsetWidth,t=this.nativeTextarea.offsetHeight,i=this.characterCounter.offsetWidth,a=this.characterCounter.offsetHeight,s=t-a-8,r=Math.max(8,Math.min(e-i-8,e-i-8)),o=Math.max(8,Math.min(s,t-a-8));this.characterCounter.style.position="absolute",this.characterCounter.style.left=r+"px",this.characterCounter.style.top=o+"px",this.characterCounter.style.right="auto",this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength)return null;const e=this.getValue().length;return a("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":v(this.characterCountLabel,{current:e,max:this.maxLength})},e," / ",this.maxLength)}renderAction(){return null!==this.el.querySelector('[slot="action"]')?a("div",{class:"pds-textarea__action",part:"action"},a("slot",{name:"action"})):null}updateFormValue(){if(!o()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeTextarea&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const t=e.get(this.name);"string"==typeof t&&(this.value=t)}}render(){const e=this.getValue();return a(s,{key:"5933dab0c3cd25b1cf2f6851ece8e8064bc7f3b9","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},a("div",{key:"4f1752514d8e5b0f0e3439515cb9e5f043607da1",class:"pds-textarea"},this.label&&a("div",{key:"d4e6df0b381d781b70eeae72ff2f0e9428c0d901",class:"pds-textarea__label-wrapper"},a("label",{key:"747d82067eb571d02840cfd981865821099f288b",htmlFor:this.componentId},a("span",{key:"bfab6e8ede66d0169dd020b7dd97e125aba417b0",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),a("div",{key:"a18611c03270e7491c1af69f931419c832192c06",class:"pds-textarea__field-wrapper"},a("textarea",Object.assign({key:"868382c7b04a4e59c0daa9d98afcdc9048f6224f",ref:e=>this.nativeTextarea=e,"aria-describedby":d(this.componentId,this.invalid,this.helperMessage,this.errorMessage),"aria-invalid":this.invalid?"true":void 0,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),e),this.renderCharacterCounter()),this.helperMessage&&a("p",{key:"dcb36f21443d2a782c25b7c29c4ce6215f3b212b",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&a("p",{key:"be30fb1a38453296e26b775955389c0ec569df67","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},a("pds-icon",{key:"d93dce10d9d9db5815ac5f331848940aed735ba0",icon:x,size:"small"}),this.errorMessage)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}}static get style(){return":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}"}},[321,"pds-textarea",{autocomplete:[1],componentId:[1,"component-id"],disabled:[4],debounce:[2],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[1028],label:[1],hideLabel:[4,"hide-label"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],maxLength:[514,"max-length"],highlight:[516],value:[1025],characterCountLabel:[1,"character-count-label"],hasFocus:[32],hasAction:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}]),_=f,y=function(){"undefined"!=typeof customElements&&["pds-textarea","pds-icon"].forEach((e=>{switch(e){case"pds-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"pds-icon":customElements.get(r(e))||g()}}))};export{_ as PdsTextarea,y as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,b as n,e as l,a as d,m as c}from"./form.js";import{d as h,f as p,c as b}from"./utils.js";import{i as u,a as m}from"./attributes.js";import{h as x}from"./index2.js";import{f as v}from"./i18n-format.js";import{d as g}from"./pds-icon2.js";const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsTextareaChange=i(this,"pdsTextareaChange",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this._type="textarea",this.disabled=!1,this.invalid=!1,this.name=this.componentId,this.readonly=!1,this.required=!1,this.value="",this.hasFocus=!1,this.hasAction=!1,this.characterCountLabel="{current} of {max} characters",this.onBlur=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocus=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onInput=e=>{const t=e.target;t&&(this.maxLength&&t.value.length>this.maxLength&&(t.value=t.value.substring(0,this.maxLength)),this.value=t.value||""),this.emitInputChange(e),this.maxLength&&"undefined"!=typeof ResizeObserver&&requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))},this.onTextareaChange=e=>{this.emitValueChange(e)},this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeTextarea&&this.nativeTextarea.focus()}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=void 0===t?null!=i?i:e:h(e,t),p(e)}valueChanged(){const e=this.nativeTextarea,t=this.getValue();e&&e.value!==t&&(e.value=t),this.updateFormValue(),this.maxLength&&"undefined"!=typeof ResizeObserver&&this.updateCharacterCounterPosition()}maxLengthChanged(){if(this.resizeObserver&&this.resizeObserver.disconnect(),this.maxLength&&this.nativeTextarea&&this.setupResizeObserver(),!o()&&this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;n(t,this);const{value:i}=t,a=null==i?i:""+i;this.focusedValue=a,this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];return this.invalid&&!0===this.invalid&&e.push("is-invalid"),e.join(" ")}connectedCallback(){var e;null!==(e=this.originalPdsInput)&&void 0!==e||(this.originalPdsInput=this.pdsInput),this.debounceChanged(),this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}disconnectedCallback(){b(this.pdsInput),this.resizeObserver&&this.resizeObserver.disconnect()}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},u(this.el)),m(this.el)),this.hasAction=null!==this.el.querySelector('[slot="action"]')}componentDidLoad(){this.updateFormValue(),this.setupResizeObserver(),l(this.el,(()=>this._type))}setupResizeObserver(){this.maxLength&&this.nativeTextarea&&"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))})),this.resizeObserver.observe(this.nativeTextarea),requestAnimationFrame((()=>{this.updateCharacterCounterPosition()})))}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if("undefined"==typeof ResizeObserver)return;if(0===this.characterCounter.offsetWidth||0===this.characterCounter.offsetHeight)return;const e=this.nativeTextarea.offsetWidth,t=this.nativeTextarea.offsetHeight,i=this.characterCounter.offsetWidth,a=this.characterCounter.offsetHeight,s=t-a-8,r=Math.max(8,Math.min(e-i-8,e-i-8)),o=Math.max(8,Math.min(s,t-a-8));this.characterCounter.style.position="absolute",this.characterCounter.style.left=r+"px",this.characterCounter.style.top=o+"px",this.characterCounter.style.right="auto",this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength)return null;const e=this.getValue().length;return a("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":v(this.characterCountLabel,{current:e,max:this.maxLength})},e," / ",this.maxLength)}renderAction(){return null!==this.el.querySelector('[slot="action"]')?a("div",{class:"pds-textarea__action",part:"action"},a("slot",{name:"action"})):null}updateFormValue(){if(!o()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeTextarea&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const t=e.get(this.name);"string"==typeof t&&(this.value=t)}}render(){const e=this.getValue();return a(s,{key:"76e445d135191df3090620f2c2eaf6ed8d7eb9cb","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},a("div",{key:"836815333b0ca925bc205a4b8b25086fe82fcedc",class:"pds-textarea"},this.label&&a("div",{key:"e8633457c994d3387ec277fd9945afb2c653d27a",class:"pds-textarea__label-wrapper"},a("label",{key:"977bb1c171b68242ab06e01ef94ecc4e4cb26880",htmlFor:this.componentId},a("span",{key:"ef87433d6524296b3153e8d04e6406c9287e3f2e",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),a("div",{key:"92952c76f5f4a87da4953f792a9a5589d7765451",class:"pds-textarea__field-wrapper"},a("textarea",Object.assign({key:"a61f39d0e299cb6b3e6d1beed37805ad9a71b579",ref:e=>this.nativeTextarea=e,"aria-describedby":d(this.componentId,this.invalid,this.helperMessage,this.errorMessage),"aria-invalid":this.invalid?"true":void 0,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),e),this.renderCharacterCounter()),this.helperMessage&&a("p",{key:"811065b7ce7b45d902d821dbceb25fef4231db94",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&a("p",{key:"f95f566b79215a4a128fe92c02be244219f843e5","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},a("pds-icon",{key:"08f649e4b32551d59d60b978262cd7beaa99e08d","aria-hidden":"true",icon:x,size:"small"}),this.errorMessage)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}}static get style(){return":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}"}},[321,"pds-textarea",{autocomplete:[1],componentId:[1,"component-id"],disabled:[4],debounce:[2],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[1028],label:[1],hideLabel:[4,"hide-label"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],maxLength:[514,"max-length"],highlight:[516],value:[1025],characterCountLabel:[1,"character-count-label"],hasFocus:[32],hasAction:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}],maxLength:[{maxLengthChanged:0}]}]),_=f,y=function(){"undefined"!=typeof customElements&&["pds-textarea","pds-icon"].forEach((e=>{switch(e){case"pds-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"pds-icon":customElements.get(r(e))||g()}}))};export{_ as PdsTextarea,y as defineCustomElement}
|