@getflip/swirl-components 0.12.0 → 0.14.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.
Files changed (961) hide show
  1. package/components.json +648 -106
  2. package/dist/cjs/balancetext-7a0bdee3.js +763 -0
  3. package/dist/cjs/file-manager.cjs.entry.js +3 -1
  4. package/dist/cjs/{floating-ui.dom.esm-75453e4e.js → floating-ui.dom.esm-35943202.js} +0 -0
  5. package/dist/cjs/{index-72831c5f.js → index-83363034.js} +584 -274
  6. package/dist/cjs/loader.cjs.js +4 -3
  7. package/dist/cjs/swirl-action-list-item.cjs.entry.js +9 -4
  8. package/dist/cjs/swirl-action-list-section.cjs.entry.js +2 -1
  9. package/dist/cjs/swirl-action-list.cjs.entry.js +2 -2
  10. package/dist/cjs/swirl-app-layout_5.cjs.entry.js +41 -9
  11. package/dist/cjs/swirl-autocomplete.cjs.entry.js +22 -11
  12. package/dist/cjs/swirl-avatar-group.cjs.entry.js +2 -1
  13. package/dist/cjs/swirl-avatar.cjs.entry.js +13 -7
  14. package/dist/cjs/swirl-badge.cjs.entry.js +3 -1
  15. package/dist/cjs/swirl-banner.cjs.entry.js +9 -7
  16. package/dist/cjs/swirl-button-group.cjs.entry.js +4 -1
  17. package/dist/cjs/swirl-button.cjs.entry.js +20 -6
  18. package/dist/cjs/swirl-card.cjs.entry.js +5 -1
  19. package/dist/cjs/swirl-checkbox.cjs.entry.js +11 -3
  20. package/dist/cjs/swirl-chip.cjs.entry.js +7 -4
  21. package/dist/cjs/swirl-components.cjs.js +10 -3
  22. package/dist/cjs/swirl-console-layout.cjs.entry.js +14 -8
  23. package/dist/cjs/swirl-date-input.cjs.entry.js +23 -8
  24. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +19 -82
  25. package/dist/cjs/swirl-description-list-item.cjs.entry.js +2 -1
  26. package/dist/cjs/swirl-description-list.cjs.entry.js +1 -1
  27. package/dist/cjs/swirl-dialog.cjs.entry.js +7 -3
  28. package/dist/cjs/swirl-file-uploader.cjs.entry.js +12 -5
  29. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +40 -16
  30. package/dist/cjs/swirl-form-control.cjs.entry.js +24 -2
  31. package/dist/cjs/swirl-form-group.cjs.entry.js +1 -1
  32. package/dist/cjs/swirl-heading.cjs.entry.js +19 -2
  33. package/dist/cjs/swirl-icon-add-photo.cjs.entry.js +1 -1
  34. package/dist/cjs/swirl-icon-add_4.cjs.entry.js +1 -1
  35. package/dist/cjs/swirl-icon-admin-panel-settings.cjs.entry.js +1 -1
  36. package/dist/cjs/swirl-icon-arrow-back.cjs.entry.js +1 -1
  37. package/dist/cjs/swirl-icon-arrow-downward_2.cjs.entry.js +1 -1
  38. package/dist/cjs/swirl-icon-arrow-forward.cjs.entry.js +1 -1
  39. package/dist/cjs/swirl-icon-arrow-left_3.cjs.entry.js +1 -1
  40. package/dist/cjs/swirl-icon-arrow-right-small.cjs.entry.js +1 -1
  41. package/dist/cjs/swirl-icon-attachment.cjs.entry.js +1 -1
  42. package/dist/cjs/swirl-icon-block.cjs.entry.js +1 -1
  43. package/dist/cjs/swirl-icon-cancel_4.cjs.entry.js +1 -1
  44. package/dist/cjs/swirl-icon-chat-bubble.cjs.entry.js +1 -1
  45. package/dist/cjs/swirl-icon-chats-filled.cjs.entry.js +1 -1
  46. package/dist/cjs/swirl-icon-chats-outlined.cjs.entry.js +1 -1
  47. package/dist/cjs/swirl-icon-check-circle.cjs.entry.js +1 -1
  48. package/dist/cjs/swirl-icon-check-small_4.cjs.entry.js +3452 -0
  49. package/dist/cjs/swirl-icon-check-strong.cjs.entry.js +1 -1
  50. package/dist/cjs/swirl-icon-check.cjs.entry.js +1 -1
  51. package/dist/cjs/swirl-icon-chevron-left.cjs.entry.js +1 -1
  52. package/dist/cjs/swirl-icon-chevron-right.cjs.entry.js +1 -1
  53. package/dist/cjs/swirl-icon-close-small.cjs.entry.js +1 -1
  54. package/dist/cjs/swirl-icon-close.cjs.entry.js +1 -1
  55. package/dist/cjs/swirl-icon-cloud-upload.cjs.entry.js +1 -1
  56. package/dist/cjs/swirl-icon-column.cjs.entry.js +1 -1
  57. package/dist/cjs/swirl-icon-comment.cjs.entry.js +1 -1
  58. package/dist/cjs/swirl-icon-copy.cjs.entry.js +1 -1
  59. package/dist/cjs/swirl-icon-date-range.cjs.entry.js +1 -1
  60. package/dist/cjs/swirl-icon-delete.cjs.entry.js +1 -1
  61. package/dist/cjs/swirl-icon-description.cjs.entry.js +1 -1
  62. package/dist/cjs/swirl-icon-edit.cjs.entry.js +1 -1
  63. package/dist/cjs/swirl-icon-emoji-mood.cjs.entry.js +1 -1
  64. package/dist/cjs/swirl-icon-emoji-satisfied.cjs.entry.js +1 -1
  65. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +5 -3
  66. package/dist/cjs/swirl-icon-expand-more.cjs.entry.js +1 -1
  67. package/dist/cjs/swirl-icon-file.cjs.entry.js +1 -1
  68. package/dist/cjs/swirl-icon-filter.cjs.entry.js +1 -1
  69. package/dist/cjs/swirl-icon-folder-shared.cjs.entry.js +1 -1
  70. package/dist/cjs/swirl-icon-group-assign.cjs.entry.js +1 -1
  71. package/dist/cjs/swirl-icon-groups-custom.cjs.entry.js +1 -1
  72. package/dist/cjs/swirl-icon-groups-filled.cjs.entry.js +1 -1
  73. package/dist/cjs/swirl-icon-groups-outlined.cjs.entry.js +1 -1
  74. package/dist/cjs/swirl-icon-groups.cjs.entry.js +1 -1
  75. package/dist/cjs/swirl-icon-help.cjs.entry.js +1 -1
  76. package/dist/cjs/swirl-icon-image.cjs.entry.js +1 -1
  77. package/dist/cjs/swirl-icon-info.cjs.entry.js +1 -1
  78. package/dist/cjs/swirl-icon-inventory.cjs.entry.js +1 -1
  79. package/dist/cjs/swirl-icon-like.cjs.entry.js +1 -1
  80. package/dist/cjs/swirl-icon-link.cjs.entry.js +1 -1
  81. package/dist/cjs/swirl-icon-lock.cjs.entry.js +1 -1
  82. package/dist/cjs/swirl-icon-logout.cjs.entry.js +1 -1
  83. package/dist/cjs/swirl-icon-mail.cjs.entry.js +1 -1
  84. package/dist/cjs/swirl-icon-manage-accounts.cjs.entry.js +1 -1
  85. package/dist/cjs/swirl-icon-mention.cjs.entry.js +1 -1
  86. package/dist/cjs/swirl-icon-menu-filled.cjs.entry.js +1 -1
  87. package/dist/cjs/swirl-icon-menu-outlined.cjs.entry.js +1 -1
  88. package/dist/cjs/swirl-icon-menu.cjs.entry.js +1 -1
  89. package/dist/cjs/swirl-icon-message.cjs.entry.js +1 -1
  90. package/dist/cjs/swirl-icon-more-horizontal.cjs.entry.js +1 -1
  91. package/dist/cjs/swirl-icon-more-vertikal.cjs.entry.js +1 -1
  92. package/dist/cjs/swirl-icon-news-filled.cjs.entry.js +1 -1
  93. package/dist/cjs/swirl-icon-news-outlined.cjs.entry.js +1 -1
  94. package/dist/cjs/swirl-icon-notifications-active.cjs.entry.js +1 -1
  95. package/dist/cjs/swirl-icon-notifications-off.cjs.entry.js +1 -1
  96. package/dist/cjs/swirl-icon-notifications.cjs.entry.js +1 -1
  97. package/dist/cjs/swirl-icon-open-in-new.cjs.entry.js +1 -1
  98. package/dist/cjs/swirl-icon-people-alt.cjs.entry.js +1 -1
  99. package/dist/cjs/swirl-icon-person-off.cjs.entry.js +1 -1
  100. package/dist/cjs/swirl-icon-person.cjs.entry.js +1 -1
  101. package/dist/cjs/swirl-icon-phone.cjs.entry.js +1 -1
  102. package/dist/cjs/swirl-icon-poll.cjs.entry.js +1 -1
  103. package/dist/cjs/swirl-icon-print.cjs.entry.js +1 -1
  104. package/dist/cjs/swirl-icon-recieved.cjs.entry.js +1 -1
  105. package/dist/cjs/swirl-icon-search-strong.cjs.entry.js +1 -1
  106. package/dist/cjs/swirl-icon-search.cjs.entry.js +1 -1
  107. package/dist/cjs/swirl-icon-send.cjs.entry.js +1 -1
  108. package/dist/cjs/swirl-icon-settings.cjs.entry.js +1 -1
  109. package/dist/cjs/swirl-icon-sync.cjs.entry.js +1 -1
  110. package/dist/cjs/swirl-icon-tasks-filled.cjs.entry.js +1 -1
  111. package/dist/cjs/swirl-icon-tasks-outlined.cjs.entry.js +1 -1
  112. package/dist/cjs/swirl-icon-time-filled.cjs.entry.js +1 -1
  113. package/dist/cjs/swirl-icon-time-outlined.cjs.entry.js +1 -1
  114. package/dist/cjs/swirl-icon-user-assign.cjs.entry.js +1 -1
  115. package/dist/cjs/swirl-icon-video-camera.cjs.entry.js +1 -1
  116. package/dist/cjs/swirl-icon-warning.cjs.entry.js +1 -1
  117. package/dist/cjs/swirl-lightbox.cjs.entry.js +10 -8
  118. package/dist/cjs/swirl-link.cjs.entry.js +4 -1
  119. package/dist/cjs/swirl-list.cjs.entry.js +1 -1
  120. package/dist/cjs/swirl-modal.cjs.entry.js +9 -6
  121. package/dist/cjs/swirl-option-list-section.cjs.entry.js +2 -1
  122. package/dist/cjs/swirl-pagination.cjs.entry.js +11 -8
  123. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +16 -12
  124. package/dist/cjs/swirl-popover.cjs.entry.js +14 -9
  125. package/dist/cjs/swirl-progress-indicator.cjs.entry.js +2 -1
  126. package/dist/cjs/swirl-radio-group.cjs.entry.js +3 -1
  127. package/dist/cjs/swirl-radio.cjs.entry.js +9 -3
  128. package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +9 -4
  129. package/dist/cjs/swirl-search.cjs.entry.js +10 -4
  130. package/dist/cjs/swirl-select.cjs.entry.js +14 -4
  131. package/dist/cjs/swirl-separator.cjs.entry.js +1 -1
  132. package/dist/cjs/swirl-skeleton-box.cjs.entry.js +34 -0
  133. package/dist/cjs/swirl-skeleton-text.cjs.entry.js +26 -0
  134. package/dist/cjs/swirl-stack.cjs.entry.js +1 -1
  135. package/dist/cjs/swirl-switch.cjs.entry.js +8 -4
  136. package/dist/cjs/swirl-tab.cjs.entry.js +4 -1
  137. package/dist/cjs/swirl-table-cell.cjs.entry.js +1 -1
  138. package/dist/cjs/swirl-table-column.cjs.entry.js +6 -1
  139. package/dist/cjs/swirl-table-row-group.cjs.entry.js +2 -1
  140. package/dist/cjs/swirl-table-row.cjs.entry.js +3 -1
  141. package/dist/cjs/swirl-table.cjs.entry.js +9 -3
  142. package/dist/cjs/swirl-tabs.cjs.entry.js +4 -1
  143. package/dist/cjs/swirl-tag.cjs.entry.js +5 -3
  144. package/dist/cjs/swirl-text-input.cjs.entry.js +34 -10
  145. package/dist/cjs/swirl-text.cjs.entry.js +19 -3
  146. package/dist/cjs/swirl-theme-provider.cjs.entry.js +2 -1
  147. package/dist/cjs/swirl-thumbnail.cjs.entry.js +3 -1
  148. package/dist/cjs/swirl-toast-provider.cjs.entry.js +3 -2
  149. package/dist/cjs/swirl-toast.cjs.entry.js +9 -4
  150. package/dist/cjs/swirl-tooltip.cjs.entry.js +7 -5
  151. package/dist/cjs/swirl-tree-navigation-item.cjs.entry.js +4 -1
  152. package/dist/cjs/swirl-video-thumbnail.cjs.entry.js +4 -1
  153. package/dist/cjs/swirl-visually-hidden.cjs.entry.js +1 -1
  154. package/dist/cjs/{utils-9c9476b4.js → utils-a07ee0db.js} +18 -0
  155. package/dist/cjs/wc-datepicker.cjs.entry.js +471 -0
  156. package/dist/collection/collection-manifest.json +13 -3
  157. package/dist/collection/components/swirl-action-list/swirl-action-list.js +12 -10
  158. package/dist/collection/components/swirl-action-list-item/swirl-action-list-item.js +146 -139
  159. package/dist/collection/components/swirl-action-list-section/swirl-action-list-section.js +36 -31
  160. package/dist/collection/components/swirl-app-layout/swirl-app-layout.js +425 -427
  161. package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.js +310 -275
  162. package/dist/collection/components/swirl-avatar/swirl-avatar.js +238 -228
  163. package/dist/collection/components/swirl-avatar-group/swirl-avatar-group.js +36 -30
  164. package/dist/collection/components/swirl-badge/swirl-badge.js +114 -106
  165. package/dist/collection/components/swirl-banner/swirl-banner.js +192 -187
  166. package/dist/collection/components/swirl-box/swirl-box.js +144 -134
  167. package/dist/collection/components/swirl-button/swirl-button.js +382 -360
  168. package/dist/collection/components/swirl-button-group/swirl-button-group.js +93 -85
  169. package/dist/collection/components/swirl-card/swirl-card.js +104 -96
  170. package/dist/collection/components/swirl-checkbox/swirl-checkbox.js +210 -204
  171. package/dist/collection/components/swirl-chip/swirl-chip.js +108 -102
  172. package/dist/collection/components/swirl-console-layout/swirl-console-layout.js +312 -322
  173. package/dist/collection/components/swirl-date-input/swirl-date-input.css +11 -0
  174. package/dist/collection/components/swirl-date-input/swirl-date-input.js +294 -223
  175. package/dist/collection/components/swirl-date-picker/swirl-date-picker.css +168 -121
  176. package/dist/collection/components/swirl-date-picker/swirl-date-picker.js +134 -199
  177. package/dist/collection/components/swirl-date-picker/swirl-date-picker.stories.js +0 -5
  178. package/dist/collection/components/swirl-description-list/swirl-description-list.js +12 -10
  179. package/dist/collection/components/swirl-description-list-item/swirl-description-list-item.js +36 -31
  180. package/dist/collection/components/swirl-dialog/swirl-dialog.js +182 -174
  181. package/dist/collection/components/swirl-empty-state/swirl-empty-state.js +53 -50
  182. package/dist/collection/components/swirl-file-uploader/swirl-file-uploader.js +249 -241
  183. package/dist/collection/components/swirl-file-viewer/swirl-file-viewer.js +214 -208
  184. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-audio/swirl-file-viewer-audio.js +90 -79
  185. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-csv/swirl-file-viewer-csv.js +87 -77
  186. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-image/swirl-file-viewer-image.js +160 -148
  187. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +224 -214
  188. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-text/swirl-file-viewer-text.js +87 -75
  189. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-video/swirl-file-viewer-video.js +90 -79
  190. package/dist/collection/components/swirl-form-control/swirl-form-control.css +22 -0
  191. package/dist/collection/components/swirl-form-control/swirl-form-control.js +167 -122
  192. package/dist/collection/components/swirl-form-group/swirl-form-group.js +38 -33
  193. package/dist/collection/components/swirl-heading/swirl-heading.js +154 -102
  194. package/dist/collection/components/swirl-heading/swirl-heading.stories.js +6 -1
  195. package/dist/collection/components/swirl-icon/icons/swirl-icon-add-photo.js +38 -38
  196. package/dist/collection/components/swirl-icon/icons/swirl-icon-add.js +38 -38
  197. package/dist/collection/components/swirl-icon/icons/swirl-icon-admin-panel-settings.js +38 -41
  198. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-back.js +38 -38
  199. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-downward.js +38 -38
  200. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-forward.js +38 -38
  201. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-left.js +38 -38
  202. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-right-small.js +38 -38
  203. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-right.js +38 -38
  204. package/dist/collection/components/swirl-icon/icons/swirl-icon-arrow-upward.js +38 -38
  205. package/dist/collection/components/swirl-icon/icons/swirl-icon-attachment.js +38 -38
  206. package/dist/collection/components/swirl-icon/icons/swirl-icon-block.js +38 -38
  207. package/dist/collection/components/swirl-icon/icons/swirl-icon-cancel.js +38 -38
  208. package/dist/collection/components/swirl-icon/icons/swirl-icon-chat-bubble.js +38 -38
  209. package/dist/collection/components/swirl-icon/icons/swirl-icon-chats-filled.js +38 -38
  210. package/dist/collection/components/swirl-icon/icons/swirl-icon-chats-outlined.js +38 -44
  211. package/dist/collection/components/swirl-icon/icons/swirl-icon-check-circle.js +38 -38
  212. package/dist/collection/components/swirl-icon/icons/swirl-icon-check-small.js +38 -38
  213. package/dist/collection/components/swirl-icon/icons/swirl-icon-check-strong.js +38 -38
  214. package/dist/collection/components/swirl-icon/icons/swirl-icon-check.js +38 -38
  215. package/dist/collection/components/swirl-icon/icons/swirl-icon-chevron-left.js +38 -38
  216. package/dist/collection/components/swirl-icon/icons/swirl-icon-chevron-right.js +38 -38
  217. package/dist/collection/components/swirl-icon/icons/swirl-icon-close-small.js +38 -38
  218. package/dist/collection/components/swirl-icon/icons/swirl-icon-close.js +38 -38
  219. package/dist/collection/components/swirl-icon/icons/swirl-icon-cloud-upload.js +38 -38
  220. package/dist/collection/components/swirl-icon/icons/swirl-icon-column.js +38 -38
  221. package/dist/collection/components/swirl-icon/icons/swirl-icon-comment.js +38 -41
  222. package/dist/collection/components/swirl-icon/icons/swirl-icon-copy.js +38 -38
  223. package/dist/collection/components/swirl-icon/icons/swirl-icon-date-range.js +38 -38
  224. package/dist/collection/components/swirl-icon/icons/swirl-icon-delete.js +38 -41
  225. package/dist/collection/components/swirl-icon/icons/swirl-icon-description.js +38 -38
  226. package/dist/collection/components/swirl-icon/icons/swirl-icon-download.js +38 -38
  227. package/dist/collection/components/swirl-icon/icons/swirl-icon-drag-handle.js +52 -0
  228. package/dist/collection/components/swirl-icon/icons/swirl-icon-edit.js +38 -38
  229. package/dist/collection/components/swirl-icon/icons/swirl-icon-emoji-mood.js +38 -38
  230. package/dist/collection/components/swirl-icon/icons/swirl-icon-emoji-satisfied.js +38 -38
  231. package/dist/collection/components/swirl-icon/icons/swirl-icon-error.js +38 -38
  232. package/dist/collection/components/swirl-icon/icons/swirl-icon-expand-less.js +38 -38
  233. package/dist/collection/components/swirl-icon/icons/swirl-icon-expand-more.js +38 -38
  234. package/dist/collection/components/swirl-icon/icons/swirl-icon-file.js +38 -38
  235. package/dist/collection/components/swirl-icon/icons/swirl-icon-filter.js +38 -38
  236. package/dist/collection/components/swirl-icon/icons/swirl-icon-folder-shared.js +38 -38
  237. package/dist/collection/components/swirl-icon/icons/swirl-icon-fullscreen-exit.js +38 -38
  238. package/dist/collection/components/swirl-icon/icons/swirl-icon-fullscreen.js +38 -38
  239. package/dist/collection/components/swirl-icon/icons/swirl-icon-group-assign.js +38 -38
  240. package/dist/collection/components/swirl-icon/icons/swirl-icon-groups-custom.js +38 -53
  241. package/dist/collection/components/swirl-icon/icons/swirl-icon-groups-filled.js +38 -53
  242. package/dist/collection/components/swirl-icon/icons/swirl-icon-groups-outlined.js +38 -53
  243. package/dist/collection/components/swirl-icon/icons/swirl-icon-groups.js +38 -38
  244. package/dist/collection/components/swirl-icon/icons/swirl-icon-help.js +38 -38
  245. package/dist/collection/components/swirl-icon/icons/swirl-icon-image.js +38 -38
  246. package/dist/collection/components/swirl-icon/icons/swirl-icon-info.js +38 -38
  247. package/dist/collection/components/swirl-icon/icons/swirl-icon-inventory.js +38 -38
  248. package/dist/collection/components/swirl-icon/icons/swirl-icon-like.js +38 -41
  249. package/dist/collection/components/swirl-icon/icons/swirl-icon-link.js +38 -38
  250. package/dist/collection/components/swirl-icon/icons/swirl-icon-lock.js +38 -38
  251. package/dist/collection/components/swirl-icon/icons/swirl-icon-logout.js +38 -38
  252. package/dist/collection/components/swirl-icon/icons/swirl-icon-mail.js +38 -38
  253. package/dist/collection/components/swirl-icon/icons/swirl-icon-manage-accounts.js +38 -44
  254. package/dist/collection/components/swirl-icon/icons/swirl-icon-mention.js +38 -38
  255. package/dist/collection/components/swirl-icon/icons/swirl-icon-menu-filled.js +38 -47
  256. package/dist/collection/components/swirl-icon/icons/swirl-icon-menu-outlined.js +38 -47
  257. package/dist/collection/components/swirl-icon/icons/swirl-icon-menu.js +38 -38
  258. package/dist/collection/components/swirl-icon/icons/swirl-icon-message.js +38 -38
  259. package/dist/collection/components/swirl-icon/icons/swirl-icon-more-horizontal.js +38 -38
  260. package/dist/collection/components/swirl-icon/icons/swirl-icon-more-vertikal.js +38 -38
  261. package/dist/collection/components/swirl-icon/icons/swirl-icon-news-filled.js +38 -38
  262. package/dist/collection/components/swirl-icon/icons/swirl-icon-news-outlined.js +38 -44
  263. package/dist/collection/components/swirl-icon/icons/swirl-icon-notifications-active.js +38 -38
  264. package/dist/collection/components/swirl-icon/icons/swirl-icon-notifications-off.js +38 -38
  265. package/dist/collection/components/swirl-icon/icons/swirl-icon-notifications.js +38 -38
  266. package/dist/collection/components/swirl-icon/icons/swirl-icon-open-in-new.js +38 -38
  267. package/dist/collection/components/swirl-icon/icons/swirl-icon-people-alt.js +38 -47
  268. package/dist/collection/components/swirl-icon/icons/swirl-icon-person-off.js +38 -38
  269. package/dist/collection/components/swirl-icon/icons/swirl-icon-person.js +38 -38
  270. package/dist/collection/components/swirl-icon/icons/swirl-icon-phone.js +38 -38
  271. package/dist/collection/components/swirl-icon/icons/swirl-icon-poll.js +38 -38
  272. package/dist/collection/components/swirl-icon/icons/swirl-icon-print.js +38 -38
  273. package/dist/collection/components/swirl-icon/icons/swirl-icon-recieved.js +38 -41
  274. package/dist/collection/components/swirl-icon/icons/swirl-icon-remove.js +38 -38
  275. package/dist/collection/components/swirl-icon/icons/swirl-icon-search-strong.js +38 -38
  276. package/dist/collection/components/swirl-icon/icons/swirl-icon-search.js +38 -38
  277. package/dist/collection/components/swirl-icon/icons/swirl-icon-send.js +38 -38
  278. package/dist/collection/components/swirl-icon/icons/swirl-icon-settings.js +38 -38
  279. package/dist/collection/components/swirl-icon/icons/swirl-icon-sync.js +38 -38
  280. package/dist/collection/components/swirl-icon/icons/swirl-icon-tasks-filled.js +38 -38
  281. package/dist/collection/components/swirl-icon/icons/swirl-icon-tasks-outlined.js +38 -41
  282. package/dist/collection/components/swirl-icon/icons/swirl-icon-time-filled.js +38 -38
  283. package/dist/collection/components/swirl-icon/icons/swirl-icon-time-outlined.js +38 -38
  284. package/dist/collection/components/swirl-icon/icons/swirl-icon-today.js +38 -38
  285. package/dist/collection/components/swirl-icon/icons/swirl-icon-user-assign.js +38 -38
  286. package/dist/collection/components/swirl-icon/icons/swirl-icon-video-camera.js +38 -38
  287. package/dist/collection/components/swirl-icon/icons/swirl-icon-visibility-off.js +38 -38
  288. package/dist/collection/components/swirl-icon/icons/swirl-icon-visibility.js +38 -38
  289. package/dist/collection/components/swirl-icon/icons/swirl-icon-warning.js +38 -38
  290. package/dist/collection/components/swirl-inline-error/swirl-inline-error.js +56 -52
  291. package/dist/collection/components/swirl-lightbox/swirl-lightbox.js +170 -178
  292. package/dist/collection/components/swirl-link/swirl-link.js +74 -63
  293. package/dist/collection/components/swirl-list/swirl-list.js +12 -10
  294. package/dist/collection/components/swirl-modal/swirl-modal.js +205 -200
  295. package/dist/collection/components/swirl-option-list/swirl-option-list.js +364 -126
  296. package/dist/collection/components/swirl-option-list/swirl-option-list.stories.js +6 -8
  297. package/dist/collection/components/swirl-option-list-item/swirl-option-list-item.css +64 -1
  298. package/dist/collection/components/swirl-option-list-item/swirl-option-list-item.js +234 -123
  299. package/dist/collection/components/swirl-option-list-item/swirl-option-list-item.stories.js +8 -0
  300. package/dist/collection/components/swirl-option-list-section/swirl-option-list-section.js +36 -31
  301. package/dist/collection/components/swirl-pagination/swirl-pagination.js +218 -223
  302. package/dist/collection/components/swirl-pdf-reader/swirl-pdf-reader.js +233 -245
  303. package/dist/collection/components/swirl-popover/swirl-popover.js +263 -249
  304. package/dist/collection/components/swirl-progress-indicator/swirl-progress-indicator.js +93 -89
  305. package/dist/collection/components/swirl-radio/swirl-radio.js +183 -176
  306. package/dist/collection/components/swirl-radio-group/swirl-radio-group.js +70 -60
  307. package/dist/collection/components/swirl-resource-list/swirl-resource-list.js +34 -29
  308. package/dist/collection/components/swirl-resource-list-file-item/swirl-resource-list-file-item.js +158 -156
  309. package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +240 -232
  310. package/dist/collection/components/swirl-search/swirl-search.js +216 -205
  311. package/dist/collection/components/swirl-select/swirl-select.css +4 -0
  312. package/dist/collection/components/swirl-select/swirl-select.js +186 -153
  313. package/dist/collection/components/swirl-separator/swirl-separator.js +12 -9
  314. package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.css +54 -0
  315. package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.js +130 -0
  316. package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.stories.js +20 -0
  317. package/dist/collection/components/swirl-skeleton-text/swirl-skeleton-text.css +173 -0
  318. package/dist/collection/components/swirl-skeleton-text/swirl-skeleton-text.js +89 -0
  319. package/dist/collection/components/swirl-skeleton-text/swirl-skeleton-text.stories.js +19 -0
  320. package/dist/collection/components/swirl-spinner/swirl-spinner.js +55 -53
  321. package/dist/collection/components/swirl-stack/swirl-stack.js +135 -127
  322. package/dist/collection/components/swirl-switch/swirl-switch.js +169 -160
  323. package/dist/collection/components/swirl-tab/swirl-tab.js +70 -61
  324. package/dist/collection/components/swirl-table/swirl-table.js +90 -88
  325. package/dist/collection/components/swirl-table-cell/swirl-table-cell.js +12 -9
  326. package/dist/collection/components/swirl-table-column/swirl-table-column.js +123 -117
  327. package/dist/collection/components/swirl-table-row/swirl-table-row.js +53 -44
  328. package/dist/collection/components/swirl-table-row-group/swirl-table-row-group.js +36 -30
  329. package/dist/collection/components/swirl-tabs/swirl-tabs.js +112 -101
  330. package/dist/collection/components/swirl-tag/swirl-tag.js +111 -104
  331. package/dist/collection/components/swirl-text/swirl-text.js +197 -146
  332. package/dist/collection/components/swirl-text/swirl-text.stories.js +5 -0
  333. package/dist/collection/components/swirl-text-input/swirl-text-input.css +21 -0
  334. package/dist/collection/components/swirl-text-input/swirl-text-input.js +594 -557
  335. package/dist/collection/components/swirl-theme-provider/swirl-theme-provider.js +141 -122
  336. package/dist/collection/components/swirl-thumbnail/swirl-thumbnail.js +93 -85
  337. package/dist/collection/components/swirl-toast/swirl-toast.js +165 -155
  338. package/dist/collection/components/swirl-toast-provider/swirl-toast-provider.js +112 -104
  339. package/dist/collection/components/swirl-tooltip/swirl-tooltip.js +122 -113
  340. package/dist/collection/components/swirl-tree-navigation-item/swirl-tree-navigation-item.js +68 -61
  341. package/dist/collection/components/swirl-video-thumbnail/swirl-video-thumbnail.js +85 -83
  342. package/dist/collection/components/swirl-visually-hidden/swirl-visually-hidden.js +12 -9
  343. package/dist/collection/prototypes/file-manager/file-manager.js +12 -22
  344. package/dist/collection/utils.js +17 -0
  345. package/dist/components/balancetext.js +761 -0
  346. package/dist/components/file-manager.js +36 -29
  347. package/dist/components/index.d.ts +9 -172
  348. package/dist/components/index.js +1 -170
  349. package/dist/components/index2.js +35 -2
  350. package/dist/components/swirl-action-list-item.js +7 -3
  351. package/dist/components/swirl-action-list-section.js +1 -1
  352. package/dist/components/swirl-action-list.js +0 -1
  353. package/dist/components/swirl-app-layout2.js +20 -6
  354. package/dist/components/swirl-autocomplete.js +33 -16
  355. package/dist/components/swirl-avatar-group.js +1 -1
  356. package/dist/components/swirl-avatar.js +12 -7
  357. package/dist/components/swirl-badge.js +2 -1
  358. package/dist/components/swirl-banner.js +7 -6
  359. package/dist/components/swirl-box2.js +4 -1
  360. package/dist/components/swirl-button-group2.js +3 -1
  361. package/dist/components/swirl-button2.js +18 -5
  362. package/dist/components/swirl-card.js +4 -1
  363. package/dist/components/swirl-checkbox.js +10 -3
  364. package/dist/components/swirl-chip.js +5 -3
  365. package/dist/components/swirl-console-layout.js +12 -7
  366. package/dist/components/swirl-date-input.js +38 -16
  367. package/dist/components/swirl-date-picker2.js +26 -86
  368. package/dist/components/swirl-description-list-item.js +1 -1
  369. package/dist/components/swirl-description-list.js +0 -1
  370. package/dist/components/swirl-dialog.js +6 -3
  371. package/dist/components/swirl-empty-state2.js +2 -1
  372. package/dist/components/swirl-file-uploader.js +11 -5
  373. package/dist/components/swirl-file-viewer-audio2.js +3 -1
  374. package/dist/components/swirl-file-viewer-csv2.js +5 -2
  375. package/dist/components/swirl-file-viewer-image2.js +6 -5
  376. package/dist/components/swirl-file-viewer-pdf2.js +12 -9
  377. package/dist/components/swirl-file-viewer-text2.js +4 -1
  378. package/dist/components/swirl-file-viewer-video2.js +3 -1
  379. package/dist/components/swirl-file-viewer2.js +8 -5
  380. package/dist/components/swirl-form-control.js +24 -2
  381. package/dist/components/swirl-form-group.js +0 -1
  382. package/dist/components/swirl-heading2.js +20 -3
  383. package/dist/components/swirl-icon-add-photo.js +0 -1
  384. package/dist/components/swirl-icon-add2.js +0 -1
  385. package/dist/components/swirl-icon-admin-panel-settings.js +0 -1
  386. package/dist/components/swirl-icon-arrow-back.js +0 -1
  387. package/dist/components/swirl-icon-arrow-downward2.js +0 -1
  388. package/dist/components/swirl-icon-arrow-forward.js +0 -1
  389. package/dist/components/swirl-icon-arrow-left2.js +0 -1
  390. package/dist/components/swirl-icon-arrow-right-small.js +0 -1
  391. package/dist/components/swirl-icon-arrow-right2.js +0 -1
  392. package/dist/components/swirl-icon-arrow-upward2.js +0 -1
  393. package/dist/components/swirl-icon-attachment.js +0 -1
  394. package/dist/components/swirl-icon-block.js +0 -1
  395. package/dist/components/swirl-icon-cancel2.js +0 -1
  396. package/dist/components/swirl-icon-chat-bubble.js +0 -1
  397. package/dist/components/swirl-icon-chats-filled.js +0 -1
  398. package/dist/components/swirl-icon-chats-outlined.js +0 -1
  399. package/dist/components/swirl-icon-check-circle.js +0 -1
  400. package/dist/components/swirl-icon-check-small2.js +0 -1
  401. package/dist/components/swirl-icon-check-strong2.js +0 -1
  402. package/dist/components/swirl-icon-check.js +0 -1
  403. package/dist/components/swirl-icon-chevron-left.js +0 -1
  404. package/dist/components/swirl-icon-chevron-right.js +0 -1
  405. package/dist/components/swirl-icon-close-small.js +0 -1
  406. package/dist/components/swirl-icon-close2.js +0 -1
  407. package/dist/components/swirl-icon-cloud-upload2.js +0 -1
  408. package/dist/components/swirl-icon-column.js +0 -1
  409. package/dist/components/swirl-icon-comment.js +0 -1
  410. package/dist/components/swirl-icon-copy.js +0 -1
  411. package/dist/components/swirl-icon-date-range.js +0 -1
  412. package/dist/components/swirl-icon-delete.js +0 -1
  413. package/dist/components/swirl-icon-description.js +0 -1
  414. package/dist/components/swirl-icon-download2.js +0 -1
  415. package/dist/components/swirl-icon-drag-handle.d.ts +11 -0
  416. package/dist/components/swirl-icon-drag-handle.js +6 -0
  417. package/dist/components/swirl-icon-drag-handle2.js +36 -0
  418. package/dist/components/swirl-icon-edit.js +0 -1
  419. package/dist/components/swirl-icon-emoji-mood.js +0 -1
  420. package/dist/components/swirl-icon-emoji-satisfied.js +0 -1
  421. package/dist/components/swirl-icon-error2.js +0 -1
  422. package/dist/components/swirl-icon-expand-less2.js +0 -1
  423. package/dist/components/swirl-icon-expand-more2.js +0 -1
  424. package/dist/components/swirl-icon-file.js +0 -1
  425. package/dist/components/swirl-icon-filter.js +0 -1
  426. package/dist/components/swirl-icon-folder-shared.js +0 -1
  427. package/dist/components/swirl-icon-fullscreen-exit2.js +0 -1
  428. package/dist/components/swirl-icon-fullscreen2.js +0 -1
  429. package/dist/components/swirl-icon-group-assign.js +0 -1
  430. package/dist/components/swirl-icon-groups-custom.js +0 -1
  431. package/dist/components/swirl-icon-groups-filled.js +0 -1
  432. package/dist/components/swirl-icon-groups-outlined.js +0 -1
  433. package/dist/components/swirl-icon-groups.js +0 -1
  434. package/dist/components/swirl-icon-help.js +0 -1
  435. package/dist/components/swirl-icon-image.js +0 -1
  436. package/dist/components/swirl-icon-info.js +0 -1
  437. package/dist/components/swirl-icon-inventory.js +0 -1
  438. package/dist/components/swirl-icon-like.js +0 -1
  439. package/dist/components/swirl-icon-link.js +0 -1
  440. package/dist/components/swirl-icon-lock.js +0 -1
  441. package/dist/components/swirl-icon-logout.js +0 -1
  442. package/dist/components/swirl-icon-mail.js +0 -1
  443. package/dist/components/swirl-icon-manage-accounts.js +0 -1
  444. package/dist/components/swirl-icon-mention.js +0 -1
  445. package/dist/components/swirl-icon-menu-filled.js +0 -1
  446. package/dist/components/swirl-icon-menu-outlined.js +0 -1
  447. package/dist/components/swirl-icon-menu.js +0 -1
  448. package/dist/components/swirl-icon-message.js +0 -1
  449. package/dist/components/swirl-icon-more-horizontal.js +0 -1
  450. package/dist/components/swirl-icon-more-vertikal.js +0 -1
  451. package/dist/components/swirl-icon-news-filled.js +0 -1
  452. package/dist/components/swirl-icon-news-outlined.js +0 -1
  453. package/dist/components/swirl-icon-notifications-active.js +0 -1
  454. package/dist/components/swirl-icon-notifications-off.js +0 -1
  455. package/dist/components/swirl-icon-notifications.js +0 -1
  456. package/dist/components/swirl-icon-open-in-new.js +0 -1
  457. package/dist/components/swirl-icon-people-alt.js +0 -1
  458. package/dist/components/swirl-icon-person-off.js +0 -1
  459. package/dist/components/swirl-icon-person2.js +0 -1
  460. package/dist/components/swirl-icon-phone.js +0 -1
  461. package/dist/components/swirl-icon-poll.js +0 -1
  462. package/dist/components/swirl-icon-print.js +0 -1
  463. package/dist/components/swirl-icon-recieved.js +0 -1
  464. package/dist/components/swirl-icon-remove2.js +0 -1
  465. package/dist/components/swirl-icon-search-strong.js +0 -1
  466. package/dist/components/swirl-icon-search2.js +0 -1
  467. package/dist/components/swirl-icon-send.js +0 -1
  468. package/dist/components/swirl-icon-settings.js +0 -1
  469. package/dist/components/swirl-icon-sync.js +0 -1
  470. package/dist/components/swirl-icon-tasks-filled.js +0 -1
  471. package/dist/components/swirl-icon-tasks-outlined.js +0 -1
  472. package/dist/components/swirl-icon-time-filled.js +0 -1
  473. package/dist/components/swirl-icon-time-outlined.js +0 -1
  474. package/dist/components/swirl-icon-today2.js +0 -1
  475. package/dist/components/swirl-icon-user-assign.js +0 -1
  476. package/dist/components/swirl-icon-video-camera.js +0 -1
  477. package/dist/components/swirl-icon-visibility-off2.js +0 -1
  478. package/dist/components/swirl-icon-visibility2.js +0 -1
  479. package/dist/components/swirl-icon-warning.js +0 -1
  480. package/dist/components/swirl-inline-error2.js +2 -2
  481. package/dist/components/swirl-lightbox.js +8 -7
  482. package/dist/components/swirl-link.js +3 -1
  483. package/dist/components/swirl-list.js +0 -1
  484. package/dist/components/swirl-modal.js +8 -6
  485. package/dist/components/swirl-option-list-item2.js +39 -13
  486. package/dist/components/swirl-option-list-section.js +1 -1
  487. package/dist/components/swirl-option-list2.js +3184 -17
  488. package/dist/components/swirl-pagination.js +10 -8
  489. package/dist/components/swirl-pdf-reader.js +14 -11
  490. package/dist/components/swirl-popover2.js +11 -7
  491. package/dist/components/swirl-progress-indicator.js +1 -1
  492. package/dist/components/swirl-radio-group.js +2 -1
  493. package/dist/components/swirl-radio.js +8 -3
  494. package/dist/components/swirl-resource-list-file-item.js +7 -3
  495. package/dist/components/swirl-resource-list-item2.js +12 -3
  496. package/dist/components/swirl-resource-list2.js +1 -1
  497. package/dist/components/swirl-search.js +8 -3
  498. package/dist/components/swirl-select.js +28 -12
  499. package/dist/components/swirl-separator.js +0 -1
  500. package/dist/components/swirl-skeleton-box.d.ts +11 -0
  501. package/dist/components/swirl-skeleton-box.js +53 -0
  502. package/dist/components/swirl-skeleton-text.d.ts +11 -0
  503. package/dist/components/swirl-skeleton-text.js +43 -0
  504. package/dist/components/swirl-spinner2.js +1 -1
  505. package/dist/components/swirl-stack2.js +0 -1
  506. package/dist/components/swirl-switch.js +7 -4
  507. package/dist/components/swirl-tab.js +3 -1
  508. package/dist/components/swirl-table-cell.js +0 -1
  509. package/dist/components/swirl-table-column.js +5 -1
  510. package/dist/components/swirl-table-row-group.js +1 -1
  511. package/dist/components/swirl-table-row.js +2 -1
  512. package/dist/components/swirl-table.js +7 -2
  513. package/dist/components/swirl-tabs.js +3 -1
  514. package/dist/components/swirl-tag.js +4 -3
  515. package/dist/components/swirl-text-input2.js +33 -9
  516. package/dist/components/swirl-text2.js +21 -6
  517. package/dist/components/swirl-theme-provider.js +1 -1
  518. package/dist/components/swirl-thumbnail.js +2 -1
  519. package/dist/components/swirl-toast-provider.js +2 -2
  520. package/dist/components/swirl-toast2.js +7 -3
  521. package/dist/components/swirl-tooltip.js +5 -4
  522. package/dist/components/swirl-tree-navigation-item.js +3 -1
  523. package/dist/components/swirl-video-thumbnail.js +3 -1
  524. package/dist/components/swirl-visually-hidden2.js +0 -1
  525. package/dist/components/utils.js +18 -1
  526. package/dist/components/wc-datepicker.js +6 -0
  527. package/dist/components/wc-datepicker2.js +504 -0
  528. package/dist/{components/_commonjsHelpers.js → esm/_commonjsHelpers-10467d11.js} +1 -1
  529. package/dist/esm/balancetext-31f1ec68.js +761 -0
  530. package/dist/esm/file-manager.entry.js +3 -1
  531. package/dist/esm/{floating-ui.dom.esm-1a4e8b8a.js → floating-ui.dom.esm-b9f28f6d.js} +0 -0
  532. package/dist/esm/{index-5a3b2828.js → index-0ff2c8e0.js} +584 -275
  533. package/dist/esm/{index-c3028f7d.js → index-47862d62.js} +1 -1
  534. package/dist/esm/loader.js +4 -3
  535. package/dist/esm/polyfills/css-shim.js +1 -1
  536. package/dist/esm/swirl-action-list-item.entry.js +11 -6
  537. package/dist/esm/swirl-action-list-section.entry.js +2 -1
  538. package/dist/esm/swirl-action-list.entry.js +2 -2
  539. package/dist/esm/swirl-app-layout_5.entry.js +43 -11
  540. package/dist/esm/swirl-autocomplete.entry.js +24 -13
  541. package/dist/esm/swirl-avatar-group.entry.js +4 -3
  542. package/dist/esm/swirl-avatar.entry.js +15 -9
  543. package/dist/esm/swirl-badge.entry.js +5 -3
  544. package/dist/esm/swirl-banner.entry.js +11 -9
  545. package/dist/esm/swirl-button-group.entry.js +6 -3
  546. package/dist/esm/swirl-button.entry.js +22 -8
  547. package/dist/esm/swirl-card.entry.js +7 -3
  548. package/dist/esm/swirl-checkbox.entry.js +13 -5
  549. package/dist/esm/swirl-chip.entry.js +9 -6
  550. package/dist/esm/swirl-components.js +7 -3
  551. package/dist/esm/swirl-console-layout.entry.js +16 -10
  552. package/dist/esm/swirl-date-input.entry.js +24 -9
  553. package/dist/esm/swirl-date-picker_2.entry.js +20 -83
  554. package/dist/esm/swirl-description-list-item.entry.js +2 -1
  555. package/dist/esm/swirl-description-list.entry.js +1 -1
  556. package/dist/esm/swirl-dialog.entry.js +9 -5
  557. package/dist/esm/swirl-file-uploader.entry.js +14 -7
  558. package/dist/esm/swirl-file-viewer_7.entry.js +41 -17
  559. package/dist/esm/swirl-form-control.entry.js +26 -4
  560. package/dist/esm/swirl-form-group.entry.js +3 -3
  561. package/dist/esm/swirl-heading.entry.js +21 -4
  562. package/dist/esm/swirl-icon-add-photo.entry.js +3 -3
  563. package/dist/esm/swirl-icon-add_4.entry.js +3 -3
  564. package/dist/esm/swirl-icon-admin-panel-settings.entry.js +3 -3
  565. package/dist/esm/swirl-icon-arrow-back.entry.js +3 -3
  566. package/dist/esm/swirl-icon-arrow-downward_2.entry.js +3 -3
  567. package/dist/esm/swirl-icon-arrow-forward.entry.js +3 -3
  568. package/dist/esm/swirl-icon-arrow-left_3.entry.js +3 -3
  569. package/dist/esm/swirl-icon-arrow-right-small.entry.js +3 -3
  570. package/dist/esm/swirl-icon-attachment.entry.js +3 -3
  571. package/dist/esm/swirl-icon-block.entry.js +3 -3
  572. package/dist/esm/swirl-icon-cancel_4.entry.js +3 -3
  573. package/dist/esm/swirl-icon-chat-bubble.entry.js +3 -3
  574. package/dist/esm/swirl-icon-chats-filled.entry.js +3 -3
  575. package/dist/esm/swirl-icon-chats-outlined.entry.js +3 -3
  576. package/dist/esm/swirl-icon-check-circle.entry.js +3 -3
  577. package/dist/esm/swirl-icon-check-small_4.entry.js +3445 -0
  578. package/dist/esm/swirl-icon-check-strong.entry.js +3 -3
  579. package/dist/esm/swirl-icon-check.entry.js +3 -3
  580. package/dist/esm/swirl-icon-chevron-left.entry.js +3 -3
  581. package/dist/esm/swirl-icon-chevron-right.entry.js +3 -3
  582. package/dist/esm/swirl-icon-close-small.entry.js +3 -3
  583. package/dist/esm/swirl-icon-close.entry.js +3 -3
  584. package/dist/esm/swirl-icon-cloud-upload.entry.js +3 -3
  585. package/dist/esm/swirl-icon-column.entry.js +3 -3
  586. package/dist/esm/swirl-icon-comment.entry.js +3 -3
  587. package/dist/esm/swirl-icon-copy.entry.js +3 -3
  588. package/dist/esm/swirl-icon-date-range.entry.js +3 -3
  589. package/dist/esm/swirl-icon-delete.entry.js +3 -3
  590. package/dist/esm/swirl-icon-description.entry.js +3 -3
  591. package/dist/esm/swirl-icon-edit.entry.js +3 -3
  592. package/dist/esm/swirl-icon-emoji-mood.entry.js +3 -3
  593. package/dist/esm/swirl-icon-emoji-satisfied.entry.js +3 -3
  594. package/dist/esm/swirl-icon-error_3.entry.js +7 -5
  595. package/dist/esm/swirl-icon-expand-more.entry.js +3 -3
  596. package/dist/esm/swirl-icon-file.entry.js +3 -3
  597. package/dist/esm/swirl-icon-filter.entry.js +3 -3
  598. package/dist/esm/swirl-icon-folder-shared.entry.js +3 -3
  599. package/dist/esm/swirl-icon-group-assign.entry.js +3 -3
  600. package/dist/esm/swirl-icon-groups-custom.entry.js +3 -3
  601. package/dist/esm/swirl-icon-groups-filled.entry.js +3 -3
  602. package/dist/esm/swirl-icon-groups-outlined.entry.js +3 -3
  603. package/dist/esm/swirl-icon-groups.entry.js +3 -3
  604. package/dist/esm/swirl-icon-help.entry.js +3 -3
  605. package/dist/esm/swirl-icon-image.entry.js +3 -3
  606. package/dist/esm/swirl-icon-info.entry.js +3 -3
  607. package/dist/esm/swirl-icon-inventory.entry.js +3 -3
  608. package/dist/esm/swirl-icon-like.entry.js +3 -3
  609. package/dist/esm/swirl-icon-link.entry.js +3 -3
  610. package/dist/esm/swirl-icon-lock.entry.js +3 -3
  611. package/dist/esm/swirl-icon-logout.entry.js +3 -3
  612. package/dist/esm/swirl-icon-mail.entry.js +3 -3
  613. package/dist/esm/swirl-icon-manage-accounts.entry.js +3 -3
  614. package/dist/esm/swirl-icon-mention.entry.js +3 -3
  615. package/dist/esm/swirl-icon-menu-filled.entry.js +3 -3
  616. package/dist/esm/swirl-icon-menu-outlined.entry.js +3 -3
  617. package/dist/esm/swirl-icon-menu.entry.js +3 -3
  618. package/dist/esm/swirl-icon-message.entry.js +3 -3
  619. package/dist/esm/swirl-icon-more-horizontal.entry.js +3 -3
  620. package/dist/esm/swirl-icon-more-vertikal.entry.js +3 -3
  621. package/dist/esm/swirl-icon-news-filled.entry.js +3 -3
  622. package/dist/esm/swirl-icon-news-outlined.entry.js +3 -3
  623. package/dist/esm/swirl-icon-notifications-active.entry.js +3 -3
  624. package/dist/esm/swirl-icon-notifications-off.entry.js +3 -3
  625. package/dist/esm/swirl-icon-notifications.entry.js +3 -3
  626. package/dist/esm/swirl-icon-open-in-new.entry.js +3 -3
  627. package/dist/esm/swirl-icon-people-alt.entry.js +3 -3
  628. package/dist/esm/swirl-icon-person-off.entry.js +3 -3
  629. package/dist/esm/swirl-icon-person.entry.js +3 -3
  630. package/dist/esm/swirl-icon-phone.entry.js +3 -3
  631. package/dist/esm/swirl-icon-poll.entry.js +3 -3
  632. package/dist/esm/swirl-icon-print.entry.js +3 -3
  633. package/dist/esm/swirl-icon-recieved.entry.js +3 -3
  634. package/dist/esm/swirl-icon-search-strong.entry.js +3 -3
  635. package/dist/esm/swirl-icon-search.entry.js +3 -3
  636. package/dist/esm/swirl-icon-send.entry.js +3 -3
  637. package/dist/esm/swirl-icon-settings.entry.js +3 -3
  638. package/dist/esm/swirl-icon-sync.entry.js +3 -3
  639. package/dist/esm/swirl-icon-tasks-filled.entry.js +3 -3
  640. package/dist/esm/swirl-icon-tasks-outlined.entry.js +3 -3
  641. package/dist/esm/swirl-icon-time-filled.entry.js +3 -3
  642. package/dist/esm/swirl-icon-time-outlined.entry.js +3 -3
  643. package/dist/esm/swirl-icon-user-assign.entry.js +3 -3
  644. package/dist/esm/swirl-icon-video-camera.entry.js +3 -3
  645. package/dist/esm/swirl-icon-warning.entry.js +3 -3
  646. package/dist/esm/swirl-lightbox.entry.js +12 -10
  647. package/dist/esm/swirl-link.entry.js +4 -1
  648. package/dist/esm/swirl-list.entry.js +1 -1
  649. package/dist/esm/swirl-modal.entry.js +11 -8
  650. package/dist/esm/swirl-option-list-section.entry.js +2 -1
  651. package/dist/esm/swirl-pagination.entry.js +13 -10
  652. package/dist/esm/swirl-pdf-reader.entry.js +18 -14
  653. package/dist/esm/swirl-popover.entry.js +16 -11
  654. package/dist/esm/swirl-progress-indicator.entry.js +4 -3
  655. package/dist/esm/swirl-radio-group.entry.js +3 -1
  656. package/dist/esm/swirl-radio.entry.js +11 -5
  657. package/dist/esm/swirl-resource-list-file-item.entry.js +11 -6
  658. package/dist/esm/swirl-search.entry.js +12 -6
  659. package/dist/esm/swirl-select.entry.js +16 -6
  660. package/dist/esm/swirl-separator.entry.js +1 -1
  661. package/dist/esm/swirl-skeleton-box.entry.js +30 -0
  662. package/dist/esm/swirl-skeleton-text.entry.js +22 -0
  663. package/dist/esm/swirl-stack.entry.js +3 -3
  664. package/dist/esm/swirl-switch.entry.js +10 -6
  665. package/dist/esm/swirl-tab.entry.js +6 -3
  666. package/dist/esm/swirl-table-cell.entry.js +1 -1
  667. package/dist/esm/swirl-table-column.entry.js +6 -1
  668. package/dist/esm/swirl-table-row-group.entry.js +2 -1
  669. package/dist/esm/swirl-table-row.entry.js +5 -3
  670. package/dist/esm/swirl-table.entry.js +9 -3
  671. package/dist/esm/swirl-tabs.entry.js +6 -3
  672. package/dist/esm/swirl-tag.entry.js +7 -5
  673. package/dist/esm/swirl-text-input.entry.js +36 -12
  674. package/dist/esm/swirl-text.entry.js +21 -5
  675. package/dist/esm/swirl-theme-provider.entry.js +2 -1
  676. package/dist/esm/swirl-thumbnail.entry.js +5 -3
  677. package/dist/esm/swirl-toast-provider.entry.js +3 -2
  678. package/dist/esm/swirl-toast.entry.js +11 -6
  679. package/dist/esm/swirl-tooltip.entry.js +7 -5
  680. package/dist/esm/swirl-tree-navigation-item.entry.js +6 -3
  681. package/dist/esm/swirl-video-thumbnail.entry.js +4 -1
  682. package/dist/esm/swirl-visually-hidden.entry.js +1 -1
  683. package/dist/esm/{utils-7efaa1c6.js → utils-33d31b58.js} +18 -1
  684. package/dist/esm/wc-datepicker.entry.js +467 -0
  685. package/dist/swirl-components/{p-435c746a.entry.js → p-00978344.entry.js} +1 -1
  686. package/dist/swirl-components/{p-96ac53d5.entry.js → p-00ce0096.entry.js} +1 -1
  687. package/dist/swirl-components/{p-ffe7373d.entry.js → p-026a6c8f.entry.js} +1 -1
  688. package/dist/swirl-components/{p-6e4135eb.entry.js → p-027680e2.entry.js} +1 -1
  689. package/dist/swirl-components/{p-98827f45.entry.js → p-0319e9d6.entry.js} +1 -1
  690. package/dist/swirl-components/p-05c15d47.js +2 -0
  691. package/dist/swirl-components/{p-90559cbf.entry.js → p-090aa1c5.entry.js} +1 -1
  692. package/dist/swirl-components/p-0dcc2cbc.entry.js +1 -0
  693. package/dist/swirl-components/{p-cd8446b2.entry.js → p-0e59a667.entry.js} +1 -1
  694. package/dist/swirl-components/{p-4935dc49.entry.js → p-0f3b28e9.entry.js} +1 -1
  695. package/dist/swirl-components/p-107e3594.entry.js +1 -0
  696. package/dist/swirl-components/{p-0924336d.entry.js → p-121b8ab9.entry.js} +1 -1
  697. package/dist/swirl-components/{p-0dd24ec2.entry.js → p-12633c5e.entry.js} +1 -1
  698. package/dist/swirl-components/p-13376409.entry.js +1 -0
  699. package/dist/swirl-components/{p-e419a9cb.entry.js → p-142ceff7.entry.js} +1 -1
  700. package/dist/swirl-components/p-148b7b70.entry.js +1 -0
  701. package/dist/swirl-components/p-1614639e.entry.js +1 -0
  702. package/dist/swirl-components/{p-86bd3473.js → p-16e63a98.js} +1 -1
  703. package/dist/swirl-components/p-19caf328.entry.js +1 -0
  704. package/dist/swirl-components/p-1a6ca33d.entry.js +7 -0
  705. package/dist/swirl-components/p-1aa44f84.entry.js +1 -0
  706. package/dist/swirl-components/p-1b7876da.entry.js +1 -0
  707. package/dist/swirl-components/{p-c215db6a.entry.js → p-1c12a405.entry.js} +1 -1
  708. package/dist/swirl-components/p-1e7a0c4a.entry.js +1 -0
  709. package/dist/swirl-components/{p-692e4e5c.entry.js → p-2056c612.entry.js} +1 -1
  710. package/dist/swirl-components/p-2057f4dc.entry.js +1 -0
  711. package/dist/swirl-components/{p-a2a3e866.entry.js → p-217b2507.entry.js} +1 -1
  712. package/dist/swirl-components/p-21ff58e8.entry.js +1 -0
  713. package/dist/swirl-components/{p-b27dfc38.entry.js → p-27566da1.entry.js} +1 -1
  714. package/dist/swirl-components/{p-8cabe3e0.entry.js → p-2aede2ed.entry.js} +1 -1
  715. package/dist/swirl-components/{p-027eabd9.entry.js → p-2c78c2d5.entry.js} +1 -1
  716. package/dist/swirl-components/p-2c941975.entry.js +1 -0
  717. package/dist/swirl-components/p-2e733839.entry.js +1 -0
  718. package/dist/swirl-components/{p-5028921b.entry.js → p-2ea576e0.entry.js} +1 -1
  719. package/dist/swirl-components/{p-15b398b3.entry.js → p-2edc08f0.entry.js} +1 -1
  720. package/dist/swirl-components/p-33e4b66d.entry.js +8 -0
  721. package/dist/swirl-components/p-34e4e242.entry.js +1 -0
  722. package/dist/swirl-components/{p-f8b0f92a.entry.js → p-354e974d.entry.js} +1 -1
  723. package/dist/swirl-components/{p-ab7a08a6.entry.js → p-3a8af86e.entry.js} +1 -1
  724. package/dist/swirl-components/{p-9f45803b.entry.js → p-3e0f6d31.entry.js} +1 -1
  725. package/dist/swirl-components/{p-f09a3f4e.entry.js → p-429005ee.entry.js} +1 -1
  726. package/dist/swirl-components/p-4464e2c4.entry.js +1 -0
  727. package/dist/swirl-components/{p-e3293a79.entry.js → p-447ef6eb.entry.js} +1 -1
  728. package/dist/swirl-components/{p-409900a9.entry.js → p-44a74d62.entry.js} +1 -1
  729. package/dist/swirl-components/p-4a847ce0.entry.js +1 -0
  730. package/dist/swirl-components/p-4ef99de5.js +1 -0
  731. package/dist/swirl-components/p-50430bab.entry.js +1 -0
  732. package/dist/swirl-components/{p-70805149.entry.js → p-50ae0963.entry.js} +1 -1
  733. package/dist/swirl-components/{p-5d0acbf4.entry.js → p-5166e355.entry.js} +1 -1
  734. package/dist/swirl-components/{p-968adc69.entry.js → p-537b28c8.entry.js} +1 -1
  735. package/dist/swirl-components/{p-e8618da9.entry.js → p-541c943f.entry.js} +1 -1
  736. package/dist/swirl-components/{p-8f3d1f73.entry.js → p-5540b8cf.entry.js} +1 -1
  737. package/dist/swirl-components/p-56499a10.entry.js +1 -0
  738. package/dist/swirl-components/{p-4307ddfe.entry.js → p-58f83fcc.entry.js} +1 -1
  739. package/dist/swirl-components/p-619061ef.entry.js +1 -0
  740. package/dist/swirl-components/{p-294983c3.entry.js → p-61ad8c1a.entry.js} +1 -1
  741. package/dist/swirl-components/p-61b7f41b.entry.js +1 -0
  742. package/dist/swirl-components/{p-17e7ea80.entry.js → p-62f0b76b.entry.js} +1 -1
  743. package/dist/swirl-components/{p-5f461f84.entry.js → p-64cdef0c.entry.js} +1 -1
  744. package/dist/swirl-components/p-6526bf3e.js +1 -0
  745. package/dist/swirl-components/{p-6c620f94.entry.js → p-668539d3.entry.js} +1 -1
  746. package/dist/swirl-components/p-67e86a11.entry.js +1 -0
  747. package/dist/swirl-components/{p-e7c325b7.entry.js → p-730760c1.entry.js} +1 -1
  748. package/dist/swirl-components/{p-1bff5707.entry.js → p-79486690.entry.js} +1 -1
  749. package/dist/swirl-components/{p-474f4c76.entry.js → p-7a6f1bf2.entry.js} +1 -1
  750. package/dist/swirl-components/p-7b0adf16.js +7 -0
  751. package/dist/swirl-components/{p-582364ee.entry.js → p-7c32e01c.entry.js} +1 -1
  752. package/dist/swirl-components/{p-d69a0a99.entry.js → p-7cad01ab.entry.js} +1 -1
  753. package/dist/swirl-components/{p-8d998974.entry.js → p-7de7d7c4.entry.js} +1 -1
  754. package/dist/swirl-components/p-7f5648ca.entry.js +1 -0
  755. package/dist/swirl-components/{p-eac6d46d.entry.js → p-80c7ab11.entry.js} +1 -1
  756. package/dist/swirl-components/{p-2bcb979a.entry.js → p-81b80dd4.entry.js} +1 -1
  757. package/dist/swirl-components/p-8317b681.entry.js +1 -0
  758. package/dist/swirl-components/{p-c6b1fe02.entry.js → p-8342ee34.entry.js} +1 -1
  759. package/dist/swirl-components/{p-1391e221.entry.js → p-8667eb55.entry.js} +1 -1
  760. package/dist/swirl-components/p-87ce453b.entry.js +49 -0
  761. package/dist/swirl-components/{p-0a5d1a8f.entry.js → p-87d2ee0e.entry.js} +1 -1
  762. package/dist/swirl-components/p-8ea0a318.entry.js +1 -0
  763. package/dist/swirl-components/{p-3335383c.entry.js → p-8effa03e.entry.js} +1 -1
  764. package/dist/swirl-components/{p-d9760e10.entry.js → p-8f07da3d.entry.js} +1 -1
  765. package/dist/swirl-components/{p-2fa4c633.entry.js → p-8f52577a.entry.js} +1 -1
  766. package/dist/swirl-components/{p-170a2b48.entry.js → p-8fd083ba.entry.js} +1 -1
  767. package/dist/swirl-components/p-905e3f32.entry.js +1 -0
  768. package/dist/swirl-components/p-9142e03b.js +1 -0
  769. package/dist/swirl-components/p-92b0a462.entry.js +1 -0
  770. package/dist/swirl-components/p-94cefacc.entry.js +1 -0
  771. package/dist/swirl-components/{p-c9307120.entry.js → p-99ba3b0c.entry.js} +1 -1
  772. package/dist/swirl-components/{p-c63c0897.entry.js → p-9d8e7ff0.entry.js} +1 -1
  773. package/dist/swirl-components/{p-d2311589.entry.js → p-9d94f15b.entry.js} +1 -1
  774. package/dist/swirl-components/p-9dce0e50.entry.js +1 -0
  775. package/dist/swirl-components/p-9f24f03d.entry.js +1 -0
  776. package/dist/swirl-components/{p-67626481.entry.js → p-a0c73040.entry.js} +1 -1
  777. package/dist/swirl-components/p-a0e0322a.entry.js +1 -0
  778. package/dist/swirl-components/p-a6c15dd2.entry.js +1 -0
  779. package/dist/swirl-components/{p-99244721.entry.js → p-a8fde9b6.entry.js} +1 -1
  780. package/dist/swirl-components/{p-d730ab29.entry.js → p-aba143bd.entry.js} +1 -1
  781. package/dist/swirl-components/p-ada769a2.entry.js +1 -0
  782. package/dist/swirl-components/{p-3991c596.entry.js → p-aebd2770.entry.js} +1 -1
  783. package/dist/swirl-components/{p-8ee094ca.entry.js → p-b40d02ab.entry.js} +1 -1
  784. package/dist/swirl-components/{p-91039432.entry.js → p-b5886f1e.entry.js} +1 -1
  785. package/dist/swirl-components/{p-49abf88c.entry.js → p-b5bff846.entry.js} +1 -1
  786. package/dist/swirl-components/{p-4e08d391.entry.js → p-b73f46e9.entry.js} +1 -1
  787. package/dist/swirl-components/{p-898341d1.entry.js → p-bb664758.entry.js} +1 -1
  788. package/dist/swirl-components/{p-32c2d812.entry.js → p-bbc4dfae.entry.js} +1 -1
  789. package/dist/swirl-components/p-bc1985c0.entry.js +1 -0
  790. package/dist/swirl-components/p-c0036f1f.entry.js +1 -0
  791. package/dist/swirl-components/p-c00ec508.entry.js +1 -0
  792. package/dist/swirl-components/{p-297800ad.entry.js → p-c089a86f.entry.js} +1 -1
  793. package/dist/swirl-components/p-c1119f03.entry.js +1 -0
  794. package/dist/swirl-components/{p-38d22e69.entry.js → p-c1407ccd.entry.js} +1 -1
  795. package/dist/swirl-components/{p-d16f5f72.entry.js → p-c1afbdd8.entry.js} +1 -1
  796. package/dist/swirl-components/p-c1d740a2.entry.js +1 -0
  797. package/dist/swirl-components/p-c3a1b027.entry.js +1 -0
  798. package/dist/swirl-components/p-c3badef7.entry.js +1 -0
  799. package/dist/swirl-components/{p-d78eb6d8.entry.js → p-c4f0b6bd.entry.js} +1 -1
  800. package/dist/swirl-components/p-c6902302.entry.js +1 -0
  801. package/dist/swirl-components/p-c7326b88.entry.js +1 -0
  802. package/dist/swirl-components/p-c783221d.entry.js +1 -0
  803. package/dist/swirl-components/{p-5af19090.entry.js → p-c81bd519.entry.js} +1 -1
  804. package/dist/swirl-components/{p-33e363ed.entry.js → p-cb7bca01.entry.js} +1 -1
  805. package/dist/swirl-components/p-cddec2c8.entry.js +1 -0
  806. package/dist/swirl-components/p-cef24ae4.entry.js +1 -0
  807. package/dist/swirl-components/{p-7a1181b5.entry.js → p-d02acd75.entry.js} +1 -1
  808. package/dist/swirl-components/p-d20dbf47.entry.js +1 -0
  809. package/dist/swirl-components/{p-20ac0472.entry.js → p-d3243268.entry.js} +1 -1
  810. package/dist/swirl-components/p-d51a5f4f.entry.js +1 -0
  811. package/dist/swirl-components/{p-941e7960.entry.js → p-d5b02a31.entry.js} +1 -1
  812. package/dist/swirl-components/{p-3310a6e2.entry.js → p-d82fce3d.entry.js} +1 -1
  813. package/dist/swirl-components/{p-634e09ad.entry.js → p-d8c4dfb3.entry.js} +1 -1
  814. package/dist/swirl-components/{p-2aaeb1e6.entry.js → p-ddb3b371.entry.js} +1 -1
  815. package/dist/swirl-components/p-ddd49304.entry.js +1 -0
  816. package/dist/swirl-components/{p-043d093e.entry.js → p-e0193bd5.entry.js} +1 -1
  817. package/dist/swirl-components/p-e1abf6d5.entry.js +1 -0
  818. package/dist/swirl-components/{p-5e45f6dc.entry.js → p-e407f7c4.entry.js} +1 -1
  819. package/dist/swirl-components/{p-acd8fa1d.entry.js → p-e4177f2f.entry.js} +1 -1
  820. package/dist/swirl-components/p-e60c8c01.entry.js +1 -0
  821. package/dist/swirl-components/p-e89d3b8c.entry.js +1 -0
  822. package/dist/swirl-components/p-e8bebe03.entry.js +1 -0
  823. package/dist/swirl-components/p-e8f693b7.entry.js +1 -0
  824. package/dist/swirl-components/{p-ed56aa85.entry.js → p-ec21cd3f.entry.js} +1 -1
  825. package/dist/swirl-components/{p-1339648a.entry.js → p-ec750d72.entry.js} +1 -1
  826. package/dist/swirl-components/{p-4268041a.entry.js → p-ed5bdc5c.entry.js} +1 -1
  827. package/dist/swirl-components/{p-4d7dcfee.entry.js → p-eed748e6.entry.js} +1 -1
  828. package/dist/swirl-components/{p-0d66f638.entry.js → p-ef58fc1e.entry.js} +1 -1
  829. package/dist/swirl-components/{p-d15994cb.entry.js → p-f4b96d3b.entry.js} +1 -1
  830. package/dist/swirl-components/{p-92709d5b.entry.js → p-f573b3f3.entry.js} +1 -1
  831. package/dist/swirl-components/p-f5c1afb6.entry.js +1 -0
  832. package/dist/swirl-components/{p-38d67d0e.entry.js → p-f828f836.entry.js} +1 -1
  833. package/dist/swirl-components/{p-88abc2db.entry.js → p-fa67dbce.entry.js} +1 -1
  834. package/dist/swirl-components/p-fbd4380b.entry.js +1 -0
  835. package/dist/swirl-components/{p-dbd1b662.entry.js → p-fc65574b.entry.js} +1 -1
  836. package/dist/swirl-components/{p-6043df71.entry.js → p-fe82f579.entry.js} +1 -1
  837. package/dist/swirl-components/{p-ebc078da.entry.js → p-feda757e.entry.js} +1 -1
  838. package/dist/swirl-components/p-ff161795.entry.js +1 -0
  839. package/dist/swirl-components/swirl-components.css +11 -1
  840. package/dist/swirl-components/swirl-components.esm.js +1 -1
  841. package/dist/types/components/swirl-action-list-item/swirl-action-list-item.d.ts +2 -2
  842. package/dist/types/components/swirl-app-layout/swirl-app-layout.d.ts +2 -2
  843. package/dist/types/components/swirl-autocomplete/swirl-autocomplete.d.ts +3 -2
  844. package/dist/types/components/swirl-avatar/swirl-avatar.d.ts +4 -4
  845. package/dist/types/components/swirl-badge/swirl-badge.d.ts +3 -3
  846. package/dist/types/components/swirl-banner/swirl-banner.d.ts +2 -2
  847. package/dist/types/components/swirl-box/swirl-box.d.ts +2 -2
  848. package/dist/types/components/swirl-button/swirl-button.d.ts +5 -5
  849. package/dist/types/components/swirl-button-group/swirl-button-group.d.ts +1 -1
  850. package/dist/types/components/swirl-checkbox/swirl-checkbox.d.ts +1 -1
  851. package/dist/types/components/swirl-chip/swirl-chip.d.ts +1 -1
  852. package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +6 -3
  853. package/dist/types/components/swirl-date-picker/swirl-date-picker.d.ts +6 -10
  854. package/dist/types/components/swirl-date-picker/swirl-date-picker.stories.d.ts +0 -7
  855. package/dist/types/components/swirl-dialog/swirl-dialog.d.ts +1 -1
  856. package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.d.ts +1 -1
  857. package/dist/types/components/swirl-form-control/swirl-form-control.d.ts +2 -0
  858. package/dist/types/components/swirl-form-group/swirl-form-group.d.ts +1 -1
  859. package/dist/types/components/swirl-heading/swirl-heading.d.ts +8 -3
  860. package/dist/types/components/swirl-heading/swirl-heading.stories.d.ts +5 -0
  861. package/dist/types/components/swirl-icon/icons/swirl-icon-drag-handle.d.ts +5 -0
  862. package/dist/types/components/swirl-icon/swirl-icon.types.d.ts +1 -1
  863. package/dist/types/components/swirl-inline-error/swirl-inline-error.d.ts +1 -1
  864. package/dist/types/components/swirl-link/swirl-link.d.ts +1 -1
  865. package/dist/types/components/swirl-option-list/swirl-option-list.d.ts +21 -0
  866. package/dist/types/components/swirl-option-list-item/swirl-option-list-item.d.ts +9 -1
  867. package/dist/types/components/swirl-option-list-item/swirl-option-list-item.stories.d.ts +8 -0
  868. package/dist/types/components/swirl-pagination/swirl-pagination.d.ts +1 -1
  869. package/dist/types/components/swirl-popover/swirl-popover.d.ts +1 -1
  870. package/dist/types/components/swirl-progress-indicator/swirl-progress-indicator.d.ts +2 -2
  871. package/dist/types/components/swirl-radio/swirl-radio.d.ts +1 -1
  872. package/dist/types/components/swirl-select/swirl-select.d.ts +2 -1
  873. package/dist/types/components/swirl-skeleton-box/swirl-skeleton-box.d.ts +9 -0
  874. package/dist/types/components/swirl-skeleton-box/swirl-skeleton-box.stories.d.ts +13 -0
  875. package/dist/types/components/swirl-skeleton-text/swirl-skeleton-text.d.ts +7 -0
  876. package/dist/types/components/swirl-skeleton-text/swirl-skeleton-text.stories.d.ts +13 -0
  877. package/dist/types/components/swirl-spinner/swirl-spinner.d.ts +1 -1
  878. package/dist/types/components/swirl-stack/swirl-stack.d.ts +4 -4
  879. package/dist/types/components/swirl-switch/swirl-switch.d.ts +1 -1
  880. package/dist/types/components/swirl-table-column/swirl-table-column.d.ts +1 -1
  881. package/dist/types/components/swirl-tag/swirl-tag.d.ts +1 -1
  882. package/dist/types/components/swirl-text/swirl-text.d.ts +11 -5
  883. package/dist/types/components/swirl-text/swirl-text.stories.d.ts +5 -0
  884. package/dist/types/components/swirl-text-input/swirl-text-input.d.ts +3 -2
  885. package/dist/types/components/swirl-theme-provider/swirl-theme-provider.d.ts +5 -5
  886. package/dist/types/components/swirl-thumbnail/swirl-thumbnail.d.ts +2 -2
  887. package/dist/types/components/swirl-toast/swirl-toast.d.ts +1 -1
  888. package/dist/types/components/swirl-toast-provider/swirl-toast-provider.d.ts +2 -2
  889. package/dist/types/components/swirl-tooltip/swirl-tooltip.d.ts +1 -1
  890. package/dist/types/components.d.ts +151 -13
  891. package/dist/types/index.d.ts +2 -0
  892. package/dist/types/prototypes/file-manager/file-manager.d.ts +2 -2
  893. package/dist/types/stencil-public-runtime.d.ts +91 -19
  894. package/dist/types/utils.d.ts +1 -0
  895. package/dist/typings.d.ts +1 -0
  896. package/loader/index.d.ts +9 -0
  897. package/loader/package.json +1 -0
  898. package/package.json +27 -15
  899. package/vscode-data.json +166 -0
  900. package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +0 -261
  901. package/dist/esm/_commonjsHelpers-44457d8d.js +0 -36
  902. package/dist/esm/swirl-icon-check-small_3.entry.js +0 -255
  903. package/dist/swirl-components/p-0206d806.entry.js +0 -1
  904. package/dist/swirl-components/p-06e76536.entry.js +0 -1
  905. package/dist/swirl-components/p-0cb291d0.entry.js +0 -1
  906. package/dist/swirl-components/p-0dcba8b2.entry.js +0 -1
  907. package/dist/swirl-components/p-0ed40682.entry.js +0 -1
  908. package/dist/swirl-components/p-1133d7f4.entry.js +0 -1
  909. package/dist/swirl-components/p-1253d22b.entry.js +0 -1
  910. package/dist/swirl-components/p-13295f24.entry.js +0 -1
  911. package/dist/swirl-components/p-21267175.entry.js +0 -1
  912. package/dist/swirl-components/p-29e918f4.entry.js +0 -36
  913. package/dist/swirl-components/p-2a9cacb2.entry.js +0 -1
  914. package/dist/swirl-components/p-30740007.entry.js +0 -1
  915. package/dist/swirl-components/p-31943bc0.entry.js +0 -1
  916. package/dist/swirl-components/p-31f9bc42.entry.js +0 -1
  917. package/dist/swirl-components/p-36573727.entry.js +0 -1
  918. package/dist/swirl-components/p-4181aa7a.entry.js +0 -1
  919. package/dist/swirl-components/p-4a16e7e1.entry.js +0 -1
  920. package/dist/swirl-components/p-4af06a9d.entry.js +0 -1
  921. package/dist/swirl-components/p-4f04a176.entry.js +0 -1
  922. package/dist/swirl-components/p-51097641.entry.js +0 -1
  923. package/dist/swirl-components/p-5612f03c.entry.js +0 -1
  924. package/dist/swirl-components/p-59bfb6f7.entry.js +0 -1
  925. package/dist/swirl-components/p-6272f11a.entry.js +0 -1
  926. package/dist/swirl-components/p-659b4fcb.entry.js +0 -1
  927. package/dist/swirl-components/p-6baff764.entry.js +0 -1
  928. package/dist/swirl-components/p-6f039422.entry.js +0 -1
  929. package/dist/swirl-components/p-708ea5cf.entry.js +0 -1
  930. package/dist/swirl-components/p-733abfbd.entry.js +0 -1
  931. package/dist/swirl-components/p-745ae10f.entry.js +0 -1
  932. package/dist/swirl-components/p-7602ab40.entry.js +0 -1
  933. package/dist/swirl-components/p-76e4350f.entry.js +0 -1
  934. package/dist/swirl-components/p-7a00efe8.entry.js +0 -1
  935. package/dist/swirl-components/p-7c514ca1.entry.js +0 -1
  936. package/dist/swirl-components/p-7f642be8.entry.js +0 -1
  937. package/dist/swirl-components/p-8157c96f.entry.js +0 -1
  938. package/dist/swirl-components/p-96ee66e7.entry.js +0 -1
  939. package/dist/swirl-components/p-9a74850d.entry.js +0 -1
  940. package/dist/swirl-components/p-9fe00e8a.js +0 -2
  941. package/dist/swirl-components/p-a0a3e5d3.entry.js +0 -1
  942. package/dist/swirl-components/p-a333b07d.entry.js +0 -1
  943. package/dist/swirl-components/p-a5497705.entry.js +0 -1
  944. package/dist/swirl-components/p-a61783f1.entry.js +0 -1
  945. package/dist/swirl-components/p-a76e4ffc.entry.js +0 -1
  946. package/dist/swirl-components/p-bd4b3edf.entry.js +0 -1
  947. package/dist/swirl-components/p-c0402092.entry.js +0 -1
  948. package/dist/swirl-components/p-c45a50a2.entry.js +0 -1
  949. package/dist/swirl-components/p-cbd8f173.entry.js +0 -1
  950. package/dist/swirl-components/p-d09dc70d.entry.js +0 -7
  951. package/dist/swirl-components/p-d3d722dc.js +0 -7
  952. package/dist/swirl-components/p-d46f437e.entry.js +0 -1
  953. package/dist/swirl-components/p-d97d183f.js +0 -1
  954. package/dist/swirl-components/p-e0aca739.entry.js +0 -1
  955. package/dist/swirl-components/p-e8bb09e8.js +0 -1
  956. package/dist/swirl-components/p-ea5e12d7.entry.js +0 -1
  957. package/dist/swirl-components/p-f06a85d3.entry.js +0 -1
  958. package/dist/swirl-components/p-f17a9780.entry.js +0 -1
  959. package/dist/swirl-components/p-f2763bd6.entry.js +0 -1
  960. package/dist/swirl-components/p-fa9e7b73.entry.js +0 -1
  961. package/dist/swirl-components/p-fb50f7b6.entry.js +0 -1
@@ -1,5 +1,3026 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { q as querySelectorAllDeep } from './utils.js';
2
+ import { c as closestPassShadow, q as querySelectorAllDeep } from './utils.js';
3
+ import { d as defineCustomElement$1 } from './swirl-visually-hidden2.js';
4
+
5
+ /**!
6
+ * Sortable 1.15.0
7
+ * @author RubaXa <trash@rubaxa.org>
8
+ * @author owenm <owen23355@gmail.com>
9
+ * @license MIT
10
+ */
11
+ function ownKeys(object, enumerableOnly) {
12
+ var keys = Object.keys(object);
13
+
14
+ if (Object.getOwnPropertySymbols) {
15
+ var symbols = Object.getOwnPropertySymbols(object);
16
+
17
+ if (enumerableOnly) {
18
+ symbols = symbols.filter(function (sym) {
19
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
20
+ });
21
+ }
22
+
23
+ keys.push.apply(keys, symbols);
24
+ }
25
+
26
+ return keys;
27
+ }
28
+
29
+ function _objectSpread2(target) {
30
+ for (var i = 1; i < arguments.length; i++) {
31
+ var source = arguments[i] != null ? arguments[i] : {};
32
+
33
+ if (i % 2) {
34
+ ownKeys(Object(source), true).forEach(function (key) {
35
+ _defineProperty(target, key, source[key]);
36
+ });
37
+ } else if (Object.getOwnPropertyDescriptors) {
38
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
39
+ } else {
40
+ ownKeys(Object(source)).forEach(function (key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ }
44
+ }
45
+
46
+ return target;
47
+ }
48
+
49
+ function _typeof(obj) {
50
+ "@babel/helpers - typeof";
51
+
52
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
53
+ _typeof = function (obj) {
54
+ return typeof obj;
55
+ };
56
+ } else {
57
+ _typeof = function (obj) {
58
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
59
+ };
60
+ }
61
+
62
+ return _typeof(obj);
63
+ }
64
+
65
+ function _defineProperty(obj, key, value) {
66
+ if (key in obj) {
67
+ Object.defineProperty(obj, key, {
68
+ value: value,
69
+ enumerable: true,
70
+ configurable: true,
71
+ writable: true
72
+ });
73
+ } else {
74
+ obj[key] = value;
75
+ }
76
+
77
+ return obj;
78
+ }
79
+
80
+ function _extends() {
81
+ _extends = Object.assign || function (target) {
82
+ for (var i = 1; i < arguments.length; i++) {
83
+ var source = arguments[i];
84
+
85
+ for (var key in source) {
86
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
87
+ target[key] = source[key];
88
+ }
89
+ }
90
+ }
91
+
92
+ return target;
93
+ };
94
+
95
+ return _extends.apply(this, arguments);
96
+ }
97
+
98
+ function _objectWithoutPropertiesLoose(source, excluded) {
99
+ if (source == null) return {};
100
+ var target = {};
101
+ var sourceKeys = Object.keys(source);
102
+ var key, i;
103
+
104
+ for (i = 0; i < sourceKeys.length; i++) {
105
+ key = sourceKeys[i];
106
+ if (excluded.indexOf(key) >= 0) continue;
107
+ target[key] = source[key];
108
+ }
109
+
110
+ return target;
111
+ }
112
+
113
+ function _objectWithoutProperties(source, excluded) {
114
+ if (source == null) return {};
115
+
116
+ var target = _objectWithoutPropertiesLoose(source, excluded);
117
+
118
+ var key, i;
119
+
120
+ if (Object.getOwnPropertySymbols) {
121
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
122
+
123
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
124
+ key = sourceSymbolKeys[i];
125
+ if (excluded.indexOf(key) >= 0) continue;
126
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
127
+ target[key] = source[key];
128
+ }
129
+ }
130
+
131
+ return target;
132
+ }
133
+
134
+ var version = "1.15.0";
135
+
136
+ function userAgent(pattern) {
137
+ if (typeof window !== 'undefined' && window.navigator) {
138
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
139
+ }
140
+ }
141
+
142
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
143
+ var Edge = userAgent(/Edge/i);
144
+ var FireFox = userAgent(/firefox/i);
145
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
146
+ var IOS = userAgent(/iP(ad|od|hone)/i);
147
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
148
+
149
+ var captureMode = {
150
+ capture: false,
151
+ passive: false
152
+ };
153
+
154
+ function on(el, event, fn) {
155
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
156
+ }
157
+
158
+ function off(el, event, fn) {
159
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
160
+ }
161
+
162
+ function matches(
163
+ /**HTMLElement*/
164
+ el,
165
+ /**String*/
166
+ selector) {
167
+ if (!selector) return;
168
+ selector[0] === '>' && (selector = selector.substring(1));
169
+
170
+ if (el) {
171
+ try {
172
+ if (el.matches) {
173
+ return el.matches(selector);
174
+ } else if (el.msMatchesSelector) {
175
+ return el.msMatchesSelector(selector);
176
+ } else if (el.webkitMatchesSelector) {
177
+ return el.webkitMatchesSelector(selector);
178
+ }
179
+ } catch (_) {
180
+ return false;
181
+ }
182
+ }
183
+
184
+ return false;
185
+ }
186
+
187
+ function getParentOrHost(el) {
188
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
189
+ }
190
+
191
+ function closest(
192
+ /**HTMLElement*/
193
+ el,
194
+ /**String*/
195
+ selector,
196
+ /**HTMLElement*/
197
+ ctx, includeCTX) {
198
+ if (el) {
199
+ ctx = ctx || document;
200
+
201
+ do {
202
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
203
+ return el;
204
+ }
205
+
206
+ if (el === ctx) break;
207
+ /* jshint boss:true */
208
+ } while (el = getParentOrHost(el));
209
+ }
210
+
211
+ return null;
212
+ }
213
+
214
+ var R_SPACE = /\s+/g;
215
+
216
+ function toggleClass(el, name, state) {
217
+ if (el && name) {
218
+ if (el.classList) {
219
+ el.classList[state ? 'add' : 'remove'](name);
220
+ } else {
221
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
222
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
223
+ }
224
+ }
225
+ }
226
+
227
+ function css(el, prop, val) {
228
+ var style = el && el.style;
229
+
230
+ if (style) {
231
+ if (val === void 0) {
232
+ if (document.defaultView && document.defaultView.getComputedStyle) {
233
+ val = document.defaultView.getComputedStyle(el, '');
234
+ } else if (el.currentStyle) {
235
+ val = el.currentStyle;
236
+ }
237
+
238
+ return prop === void 0 ? val : val[prop];
239
+ } else {
240
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
241
+ prop = '-webkit-' + prop;
242
+ }
243
+
244
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
245
+ }
246
+ }
247
+ }
248
+
249
+ function matrix(el, selfOnly) {
250
+ var appliedTransforms = '';
251
+
252
+ if (typeof el === 'string') {
253
+ appliedTransforms = el;
254
+ } else {
255
+ do {
256
+ var transform = css(el, 'transform');
257
+
258
+ if (transform && transform !== 'none') {
259
+ appliedTransforms = transform + ' ' + appliedTransforms;
260
+ }
261
+ /* jshint boss:true */
262
+
263
+ } while (!selfOnly && (el = el.parentNode));
264
+ }
265
+
266
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
267
+ /*jshint -W056 */
268
+
269
+ return matrixFn && new matrixFn(appliedTransforms);
270
+ }
271
+
272
+ function find(ctx, tagName, iterator) {
273
+ if (ctx) {
274
+ var list = ctx.getElementsByTagName(tagName),
275
+ i = 0,
276
+ n = list.length;
277
+
278
+ if (iterator) {
279
+ for (; i < n; i++) {
280
+ iterator(list[i], i);
281
+ }
282
+ }
283
+
284
+ return list;
285
+ }
286
+
287
+ return [];
288
+ }
289
+
290
+ function getWindowScrollingElement() {
291
+ var scrollingElement = document.scrollingElement;
292
+
293
+ if (scrollingElement) {
294
+ return scrollingElement;
295
+ } else {
296
+ return document.documentElement;
297
+ }
298
+ }
299
+ /**
300
+ * Returns the "bounding client rect" of given element
301
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
302
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
303
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
304
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
305
+ * @param {[HTMLElement]} container The parent the element will be placed in
306
+ * @return {Object} The boundingClientRect of el, with specified adjustments
307
+ */
308
+
309
+
310
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
311
+ if (!el.getBoundingClientRect && el !== window) return;
312
+ var elRect, top, left, bottom, right, height, width;
313
+
314
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
315
+ elRect = el.getBoundingClientRect();
316
+ top = elRect.top;
317
+ left = elRect.left;
318
+ bottom = elRect.bottom;
319
+ right = elRect.right;
320
+ height = elRect.height;
321
+ width = elRect.width;
322
+ } else {
323
+ top = 0;
324
+ left = 0;
325
+ bottom = window.innerHeight;
326
+ right = window.innerWidth;
327
+ height = window.innerHeight;
328
+ width = window.innerWidth;
329
+ }
330
+
331
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
332
+ // Adjust for translate()
333
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
334
+ // Not needed on <= IE11
335
+
336
+ if (!IE11OrLess) {
337
+ do {
338
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
339
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
340
+
341
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
342
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
343
+ bottom = top + elRect.height;
344
+ right = left + elRect.width;
345
+ break;
346
+ }
347
+ /* jshint boss:true */
348
+
349
+ } while (container = container.parentNode);
350
+ }
351
+ }
352
+
353
+ if (undoScale && el !== window) {
354
+ // Adjust for scale()
355
+ var elMatrix = matrix(container || el),
356
+ scaleX = elMatrix && elMatrix.a,
357
+ scaleY = elMatrix && elMatrix.d;
358
+
359
+ if (elMatrix) {
360
+ top /= scaleY;
361
+ left /= scaleX;
362
+ width /= scaleX;
363
+ height /= scaleY;
364
+ bottom = top + height;
365
+ right = left + width;
366
+ }
367
+ }
368
+
369
+ return {
370
+ top: top,
371
+ left: left,
372
+ bottom: bottom,
373
+ right: right,
374
+ width: width,
375
+ height: height
376
+ };
377
+ }
378
+ /**
379
+ * Checks if a side of an element is scrolled past a side of its parents
380
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
381
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
382
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
383
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
384
+ */
385
+
386
+
387
+ function isScrolledPast(el, elSide, parentSide) {
388
+ var parent = getParentAutoScrollElement(el, true),
389
+ elSideVal = getRect(el)[elSide];
390
+ /* jshint boss:true */
391
+
392
+ while (parent) {
393
+ var parentSideVal = getRect(parent)[parentSide],
394
+ visible = void 0;
395
+
396
+ if (parentSide === 'top' || parentSide === 'left') {
397
+ visible = elSideVal >= parentSideVal;
398
+ } else {
399
+ visible = elSideVal <= parentSideVal;
400
+ }
401
+
402
+ if (!visible) return parent;
403
+ if (parent === getWindowScrollingElement()) break;
404
+ parent = getParentAutoScrollElement(parent, false);
405
+ }
406
+
407
+ return false;
408
+ }
409
+ /**
410
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
411
+ * and non-draggable elements
412
+ * @param {HTMLElement} el The parent element
413
+ * @param {Number} childNum The index of the child
414
+ * @param {Object} options Parent Sortable's options
415
+ * @return {HTMLElement} The child at index childNum, or null if not found
416
+ */
417
+
418
+
419
+ function getChild(el, childNum, options, includeDragEl) {
420
+ var currentChild = 0,
421
+ i = 0,
422
+ children = el.children;
423
+
424
+ while (i < children.length) {
425
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
426
+ if (currentChild === childNum) {
427
+ return children[i];
428
+ }
429
+
430
+ currentChild++;
431
+ }
432
+
433
+ i++;
434
+ }
435
+
436
+ return null;
437
+ }
438
+ /**
439
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
440
+ * @param {HTMLElement} el Parent element
441
+ * @param {selector} selector Any other elements that should be ignored
442
+ * @return {HTMLElement} The last child, ignoring ghostEl
443
+ */
444
+
445
+
446
+ function lastChild(el, selector) {
447
+ var last = el.lastElementChild;
448
+
449
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
450
+ last = last.previousElementSibling;
451
+ }
452
+
453
+ return last || null;
454
+ }
455
+ /**
456
+ * Returns the index of an element within its parent for a selected set of
457
+ * elements
458
+ * @param {HTMLElement} el
459
+ * @param {selector} selector
460
+ * @return {number}
461
+ */
462
+
463
+
464
+ function index(el, selector) {
465
+ var index = 0;
466
+
467
+ if (!el || !el.parentNode) {
468
+ return -1;
469
+ }
470
+ /* jshint boss:true */
471
+
472
+
473
+ while (el = el.previousElementSibling) {
474
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
475
+ index++;
476
+ }
477
+ }
478
+
479
+ return index;
480
+ }
481
+ /**
482
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
483
+ * The value is returned in real pixels.
484
+ * @param {HTMLElement} el
485
+ * @return {Array} Offsets in the format of [left, top]
486
+ */
487
+
488
+
489
+ function getRelativeScrollOffset(el) {
490
+ var offsetLeft = 0,
491
+ offsetTop = 0,
492
+ winScroller = getWindowScrollingElement();
493
+
494
+ if (el) {
495
+ do {
496
+ var elMatrix = matrix(el),
497
+ scaleX = elMatrix.a,
498
+ scaleY = elMatrix.d;
499
+ offsetLeft += el.scrollLeft * scaleX;
500
+ offsetTop += el.scrollTop * scaleY;
501
+ } while (el !== winScroller && (el = el.parentNode));
502
+ }
503
+
504
+ return [offsetLeft, offsetTop];
505
+ }
506
+ /**
507
+ * Returns the index of the object within the given array
508
+ * @param {Array} arr Array that may or may not hold the object
509
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
510
+ * @return {Number} The index of the object in the array, or -1
511
+ */
512
+
513
+
514
+ function indexOfObject(arr, obj) {
515
+ for (var i in arr) {
516
+ if (!arr.hasOwnProperty(i)) continue;
517
+
518
+ for (var key in obj) {
519
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
520
+ }
521
+ }
522
+
523
+ return -1;
524
+ }
525
+
526
+ function getParentAutoScrollElement(el, includeSelf) {
527
+ // skip to window
528
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
529
+ var elem = el;
530
+ var gotSelf = false;
531
+
532
+ do {
533
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
534
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
535
+ var elemCSS = css(elem);
536
+
537
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
538
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
539
+ if (gotSelf || includeSelf) return elem;
540
+ gotSelf = true;
541
+ }
542
+ }
543
+ /* jshint boss:true */
544
+
545
+ } while (elem = elem.parentNode);
546
+
547
+ return getWindowScrollingElement();
548
+ }
549
+
550
+ function extend(dst, src) {
551
+ if (dst && src) {
552
+ for (var key in src) {
553
+ if (src.hasOwnProperty(key)) {
554
+ dst[key] = src[key];
555
+ }
556
+ }
557
+ }
558
+
559
+ return dst;
560
+ }
561
+
562
+ function isRectEqual(rect1, rect2) {
563
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
564
+ }
565
+
566
+ var _throttleTimeout;
567
+
568
+ function throttle(callback, ms) {
569
+ return function () {
570
+ if (!_throttleTimeout) {
571
+ var args = arguments,
572
+ _this = this;
573
+
574
+ if (args.length === 1) {
575
+ callback.call(_this, args[0]);
576
+ } else {
577
+ callback.apply(_this, args);
578
+ }
579
+
580
+ _throttleTimeout = setTimeout(function () {
581
+ _throttleTimeout = void 0;
582
+ }, ms);
583
+ }
584
+ };
585
+ }
586
+
587
+ function cancelThrottle() {
588
+ clearTimeout(_throttleTimeout);
589
+ _throttleTimeout = void 0;
590
+ }
591
+
592
+ function scrollBy(el, x, y) {
593
+ el.scrollLeft += x;
594
+ el.scrollTop += y;
595
+ }
596
+
597
+ function clone(el) {
598
+ var Polymer = window.Polymer;
599
+ var $ = window.jQuery || window.Zepto;
600
+
601
+ if (Polymer && Polymer.dom) {
602
+ return Polymer.dom(el).cloneNode(true);
603
+ } else if ($) {
604
+ return $(el).clone(true)[0];
605
+ } else {
606
+ return el.cloneNode(true);
607
+ }
608
+ }
609
+
610
+ var expando = 'Sortable' + new Date().getTime();
611
+
612
+ function AnimationStateManager() {
613
+ var animationStates = [],
614
+ animationCallbackId;
615
+ return {
616
+ captureAnimationState: function captureAnimationState() {
617
+ animationStates = [];
618
+ if (!this.options.animation) return;
619
+ var children = [].slice.call(this.el.children);
620
+ children.forEach(function (child) {
621
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
622
+ animationStates.push({
623
+ target: child,
624
+ rect: getRect(child)
625
+ });
626
+
627
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
628
+
629
+
630
+ if (child.thisAnimationDuration) {
631
+ var childMatrix = matrix(child, true);
632
+
633
+ if (childMatrix) {
634
+ fromRect.top -= childMatrix.f;
635
+ fromRect.left -= childMatrix.e;
636
+ }
637
+ }
638
+
639
+ child.fromRect = fromRect;
640
+ });
641
+ },
642
+ addAnimationState: function addAnimationState(state) {
643
+ animationStates.push(state);
644
+ },
645
+ removeAnimationState: function removeAnimationState(target) {
646
+ animationStates.splice(indexOfObject(animationStates, {
647
+ target: target
648
+ }), 1);
649
+ },
650
+ animateAll: function animateAll(callback) {
651
+ var _this = this;
652
+
653
+ if (!this.options.animation) {
654
+ clearTimeout(animationCallbackId);
655
+ if (typeof callback === 'function') callback();
656
+ return;
657
+ }
658
+
659
+ var animating = false,
660
+ animationTime = 0;
661
+ animationStates.forEach(function (state) {
662
+ var time = 0,
663
+ target = state.target,
664
+ fromRect = target.fromRect,
665
+ toRect = getRect(target),
666
+ prevFromRect = target.prevFromRect,
667
+ prevToRect = target.prevToRect,
668
+ animatingRect = state.rect,
669
+ targetMatrix = matrix(target, true);
670
+
671
+ if (targetMatrix) {
672
+ // Compensate for current animation
673
+ toRect.top -= targetMatrix.f;
674
+ toRect.left -= targetMatrix.e;
675
+ }
676
+
677
+ target.toRect = toRect;
678
+
679
+ if (target.thisAnimationDuration) {
680
+ // Could also check if animatingRect is between fromRect and toRect
681
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
682
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
683
+ // If returning to same place as started from animation and on same axis
684
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
685
+ }
686
+ } // if fromRect != toRect: animate
687
+
688
+
689
+ if (!isRectEqual(toRect, fromRect)) {
690
+ target.prevFromRect = fromRect;
691
+ target.prevToRect = toRect;
692
+
693
+ if (!time) {
694
+ time = _this.options.animation;
695
+ }
696
+
697
+ _this.animate(target, animatingRect, toRect, time);
698
+ }
699
+
700
+ if (time) {
701
+ animating = true;
702
+ animationTime = Math.max(animationTime, time);
703
+ clearTimeout(target.animationResetTimer);
704
+ target.animationResetTimer = setTimeout(function () {
705
+ target.animationTime = 0;
706
+ target.prevFromRect = null;
707
+ target.fromRect = null;
708
+ target.prevToRect = null;
709
+ target.thisAnimationDuration = null;
710
+ }, time);
711
+ target.thisAnimationDuration = time;
712
+ }
713
+ });
714
+ clearTimeout(animationCallbackId);
715
+
716
+ if (!animating) {
717
+ if (typeof callback === 'function') callback();
718
+ } else {
719
+ animationCallbackId = setTimeout(function () {
720
+ if (typeof callback === 'function') callback();
721
+ }, animationTime);
722
+ }
723
+
724
+ animationStates = [];
725
+ },
726
+ animate: function animate(target, currentRect, toRect, duration) {
727
+ if (duration) {
728
+ css(target, 'transition', '');
729
+ css(target, 'transform', '');
730
+ var elMatrix = matrix(this.el),
731
+ scaleX = elMatrix && elMatrix.a,
732
+ scaleY = elMatrix && elMatrix.d,
733
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
734
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
735
+ target.animatingX = !!translateX;
736
+ target.animatingY = !!translateY;
737
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
738
+ this.forRepaintDummy = repaint(target); // repaint
739
+
740
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
741
+ css(target, 'transform', 'translate3d(0,0,0)');
742
+ typeof target.animated === 'number' && clearTimeout(target.animated);
743
+ target.animated = setTimeout(function () {
744
+ css(target, 'transition', '');
745
+ css(target, 'transform', '');
746
+ target.animated = false;
747
+ target.animatingX = false;
748
+ target.animatingY = false;
749
+ }, duration);
750
+ }
751
+ }
752
+ };
753
+ }
754
+
755
+ function repaint(target) {
756
+ return target.offsetWidth;
757
+ }
758
+
759
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
760
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
761
+ }
762
+
763
+ var plugins = [];
764
+ var defaults = {
765
+ initializeByDefault: true
766
+ };
767
+ var PluginManager = {
768
+ mount: function mount(plugin) {
769
+ // Set default static properties
770
+ for (var option in defaults) {
771
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
772
+ plugin[option] = defaults[option];
773
+ }
774
+ }
775
+
776
+ plugins.forEach(function (p) {
777
+ if (p.pluginName === plugin.pluginName) {
778
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
779
+ }
780
+ });
781
+ plugins.push(plugin);
782
+ },
783
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
784
+ var _this = this;
785
+
786
+ this.eventCanceled = false;
787
+
788
+ evt.cancel = function () {
789
+ _this.eventCanceled = true;
790
+ };
791
+
792
+ var eventNameGlobal = eventName + 'Global';
793
+ plugins.forEach(function (plugin) {
794
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
795
+
796
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
797
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
798
+ sortable: sortable
799
+ }, evt));
800
+ } // Only fire plugin event if plugin is enabled in this sortable,
801
+ // and plugin has event defined
802
+
803
+
804
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
805
+ sortable[plugin.pluginName][eventName](_objectSpread2({
806
+ sortable: sortable
807
+ }, evt));
808
+ }
809
+ });
810
+ },
811
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
812
+ plugins.forEach(function (plugin) {
813
+ var pluginName = plugin.pluginName;
814
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
815
+ var initialized = new plugin(sortable, el, sortable.options);
816
+ initialized.sortable = sortable;
817
+ initialized.options = sortable.options;
818
+ sortable[pluginName] = initialized; // Add default options from plugin
819
+
820
+ _extends(defaults, initialized.defaults);
821
+ });
822
+
823
+ for (var option in sortable.options) {
824
+ if (!sortable.options.hasOwnProperty(option)) continue;
825
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
826
+
827
+ if (typeof modified !== 'undefined') {
828
+ sortable.options[option] = modified;
829
+ }
830
+ }
831
+ },
832
+ getEventProperties: function getEventProperties(name, sortable) {
833
+ var eventProperties = {};
834
+ plugins.forEach(function (plugin) {
835
+ if (typeof plugin.eventProperties !== 'function') return;
836
+
837
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
838
+ });
839
+ return eventProperties;
840
+ },
841
+ modifyOption: function modifyOption(sortable, name, value) {
842
+ var modifiedValue;
843
+ plugins.forEach(function (plugin) {
844
+ // Plugin must exist on the Sortable
845
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
846
+
847
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
848
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
849
+ }
850
+ });
851
+ return modifiedValue;
852
+ }
853
+ };
854
+
855
+ function dispatchEvent(_ref) {
856
+ var sortable = _ref.sortable,
857
+ rootEl = _ref.rootEl,
858
+ name = _ref.name,
859
+ targetEl = _ref.targetEl,
860
+ cloneEl = _ref.cloneEl,
861
+ toEl = _ref.toEl,
862
+ fromEl = _ref.fromEl,
863
+ oldIndex = _ref.oldIndex,
864
+ newIndex = _ref.newIndex,
865
+ oldDraggableIndex = _ref.oldDraggableIndex,
866
+ newDraggableIndex = _ref.newDraggableIndex,
867
+ originalEvent = _ref.originalEvent,
868
+ putSortable = _ref.putSortable,
869
+ extraEventProperties = _ref.extraEventProperties;
870
+ sortable = sortable || rootEl && rootEl[expando];
871
+ if (!sortable) return;
872
+ var evt,
873
+ options = sortable.options,
874
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
875
+
876
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
877
+ evt = new CustomEvent(name, {
878
+ bubbles: true,
879
+ cancelable: true
880
+ });
881
+ } else {
882
+ evt = document.createEvent('Event');
883
+ evt.initEvent(name, true, true);
884
+ }
885
+
886
+ evt.to = toEl || rootEl;
887
+ evt.from = fromEl || rootEl;
888
+ evt.item = targetEl || rootEl;
889
+ evt.clone = cloneEl;
890
+ evt.oldIndex = oldIndex;
891
+ evt.newIndex = newIndex;
892
+ evt.oldDraggableIndex = oldDraggableIndex;
893
+ evt.newDraggableIndex = newDraggableIndex;
894
+ evt.originalEvent = originalEvent;
895
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
896
+
897
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
898
+
899
+ for (var option in allEventProperties) {
900
+ evt[option] = allEventProperties[option];
901
+ }
902
+
903
+ if (rootEl) {
904
+ rootEl.dispatchEvent(evt);
905
+ }
906
+
907
+ if (options[onName]) {
908
+ options[onName].call(sortable, evt);
909
+ }
910
+ }
911
+
912
+ var _excluded = ["evt"];
913
+
914
+ var pluginEvent = function pluginEvent(eventName, sortable) {
915
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
916
+ originalEvent = _ref.evt,
917
+ data = _objectWithoutProperties(_ref, _excluded);
918
+
919
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
920
+ dragEl: dragEl,
921
+ parentEl: parentEl,
922
+ ghostEl: ghostEl,
923
+ rootEl: rootEl,
924
+ nextEl: nextEl,
925
+ lastDownEl: lastDownEl,
926
+ cloneEl: cloneEl,
927
+ cloneHidden: cloneHidden,
928
+ dragStarted: moved,
929
+ putSortable: putSortable,
930
+ activeSortable: Sortable.active,
931
+ originalEvent: originalEvent,
932
+ oldIndex: oldIndex,
933
+ oldDraggableIndex: oldDraggableIndex,
934
+ newIndex: newIndex,
935
+ newDraggableIndex: newDraggableIndex,
936
+ hideGhostForTarget: _hideGhostForTarget,
937
+ unhideGhostForTarget: _unhideGhostForTarget,
938
+ cloneNowHidden: function cloneNowHidden() {
939
+ cloneHidden = true;
940
+ },
941
+ cloneNowShown: function cloneNowShown() {
942
+ cloneHidden = false;
943
+ },
944
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
945
+ _dispatchEvent({
946
+ sortable: sortable,
947
+ name: name,
948
+ originalEvent: originalEvent
949
+ });
950
+ }
951
+ }, data));
952
+ };
953
+
954
+ function _dispatchEvent(info) {
955
+ dispatchEvent(_objectSpread2({
956
+ putSortable: putSortable,
957
+ cloneEl: cloneEl,
958
+ targetEl: dragEl,
959
+ rootEl: rootEl,
960
+ oldIndex: oldIndex,
961
+ oldDraggableIndex: oldDraggableIndex,
962
+ newIndex: newIndex,
963
+ newDraggableIndex: newDraggableIndex
964
+ }, info));
965
+ }
966
+
967
+ var dragEl,
968
+ parentEl,
969
+ ghostEl,
970
+ rootEl,
971
+ nextEl,
972
+ lastDownEl,
973
+ cloneEl,
974
+ cloneHidden,
975
+ oldIndex,
976
+ newIndex,
977
+ oldDraggableIndex,
978
+ newDraggableIndex,
979
+ activeGroup,
980
+ putSortable,
981
+ awaitingDragStarted = false,
982
+ ignoreNextClick = false,
983
+ sortables = [],
984
+ tapEvt,
985
+ touchEvt,
986
+ lastDx,
987
+ lastDy,
988
+ tapDistanceLeft,
989
+ tapDistanceTop,
990
+ moved,
991
+ lastTarget,
992
+ lastDirection,
993
+ pastFirstInvertThresh = false,
994
+ isCircumstantialInvert = false,
995
+ targetMoveDistance,
996
+ // For positioning ghost absolutely
997
+ ghostRelativeParent,
998
+ ghostRelativeParentInitialScroll = [],
999
+ // (left, top)
1000
+ _silent = false,
1001
+ savedInputChecked = [];
1002
+ /** @const */
1003
+
1004
+ var documentExists = typeof document !== 'undefined',
1005
+ PositionGhostAbsolutely = IOS,
1006
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1007
+ // This will not pass for IE9, because IE9 DnD only works on anchors
1008
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1009
+ supportCssPointerEvents = function () {
1010
+ if (!documentExists) return; // false when <= IE11
1011
+
1012
+ if (IE11OrLess) {
1013
+ return false;
1014
+ }
1015
+
1016
+ var el = document.createElement('x');
1017
+ el.style.cssText = 'pointer-events:auto';
1018
+ return el.style.pointerEvents === 'auto';
1019
+ }(),
1020
+ _detectDirection = function _detectDirection(el, options) {
1021
+ var elCSS = css(el),
1022
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1023
+ child1 = getChild(el, 0, options),
1024
+ child2 = getChild(el, 1, options),
1025
+ firstChildCSS = child1 && css(child1),
1026
+ secondChildCSS = child2 && css(child2),
1027
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1028
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1029
+
1030
+ if (elCSS.display === 'flex') {
1031
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1032
+ }
1033
+
1034
+ if (elCSS.display === 'grid') {
1035
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1036
+ }
1037
+
1038
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1039
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1040
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1041
+ }
1042
+
1043
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
1044
+ },
1045
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1046
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1047
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1048
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
1049
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
1050
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1051
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
1052
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1053
+ },
1054
+
1055
+ /**
1056
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1057
+ * @param {Number} x X position
1058
+ * @param {Number} y Y position
1059
+ * @return {HTMLElement} Element of the first found nearest Sortable
1060
+ */
1061
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1062
+ var ret;
1063
+ sortables.some(function (sortable) {
1064
+ var threshold = sortable[expando].options.emptyInsertThreshold;
1065
+ if (!threshold || lastChild(sortable)) return;
1066
+ var rect = getRect(sortable),
1067
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1068
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1069
+
1070
+ if (insideHorizontally && insideVertically) {
1071
+ return ret = sortable;
1072
+ }
1073
+ });
1074
+ return ret;
1075
+ },
1076
+ _prepareGroup = function _prepareGroup(options) {
1077
+ function toFn(value, pull) {
1078
+ return function (to, from, dragEl, evt) {
1079
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1080
+
1081
+ if (value == null && (pull || sameGroup)) {
1082
+ // Default pull value
1083
+ // Default pull and put value if same group
1084
+ return true;
1085
+ } else if (value == null || value === false) {
1086
+ return false;
1087
+ } else if (pull && value === 'clone') {
1088
+ return value;
1089
+ } else if (typeof value === 'function') {
1090
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1091
+ } else {
1092
+ var otherGroup = (pull ? to : from).options.group.name;
1093
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1094
+ }
1095
+ };
1096
+ }
1097
+
1098
+ var group = {};
1099
+ var originalGroup = options.group;
1100
+
1101
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1102
+ originalGroup = {
1103
+ name: originalGroup
1104
+ };
1105
+ }
1106
+
1107
+ group.name = originalGroup.name;
1108
+ group.checkPull = toFn(originalGroup.pull, true);
1109
+ group.checkPut = toFn(originalGroup.put);
1110
+ group.revertClone = originalGroup.revertClone;
1111
+ options.group = group;
1112
+ },
1113
+ _hideGhostForTarget = function _hideGhostForTarget() {
1114
+ if (!supportCssPointerEvents && ghostEl) {
1115
+ css(ghostEl, 'display', 'none');
1116
+ }
1117
+ },
1118
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1119
+ if (!supportCssPointerEvents && ghostEl) {
1120
+ css(ghostEl, 'display', '');
1121
+ }
1122
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1123
+
1124
+
1125
+ if (documentExists && !ChromeForAndroid) {
1126
+ document.addEventListener('click', function (evt) {
1127
+ if (ignoreNextClick) {
1128
+ evt.preventDefault();
1129
+ evt.stopPropagation && evt.stopPropagation();
1130
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1131
+ ignoreNextClick = false;
1132
+ return false;
1133
+ }
1134
+ }, true);
1135
+ }
1136
+
1137
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1138
+ if (dragEl) {
1139
+ evt = evt.touches ? evt.touches[0] : evt;
1140
+
1141
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1142
+
1143
+ if (nearest) {
1144
+ // Create imitation event
1145
+ var event = {};
1146
+
1147
+ for (var i in evt) {
1148
+ if (evt.hasOwnProperty(i)) {
1149
+ event[i] = evt[i];
1150
+ }
1151
+ }
1152
+
1153
+ event.target = event.rootEl = nearest;
1154
+ event.preventDefault = void 0;
1155
+ event.stopPropagation = void 0;
1156
+
1157
+ nearest[expando]._onDragOver(event);
1158
+ }
1159
+ }
1160
+ };
1161
+
1162
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1163
+ if (dragEl) {
1164
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1165
+ }
1166
+ };
1167
+ /**
1168
+ * @class Sortable
1169
+ * @param {HTMLElement} el
1170
+ * @param {Object} [options]
1171
+ */
1172
+
1173
+
1174
+ function Sortable(el, options) {
1175
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1176
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1177
+ }
1178
+
1179
+ this.el = el; // root element
1180
+
1181
+ this.options = options = _extends({}, options); // Export instance
1182
+
1183
+ el[expando] = this;
1184
+ var defaults = {
1185
+ group: null,
1186
+ sort: true,
1187
+ disabled: false,
1188
+ store: null,
1189
+ handle: null,
1190
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1191
+ swapThreshold: 1,
1192
+ // percentage; 0 <= x <= 1
1193
+ invertSwap: false,
1194
+ // invert always
1195
+ invertedSwapThreshold: null,
1196
+ // will be set to same as swapThreshold if default
1197
+ removeCloneOnHide: true,
1198
+ direction: function direction() {
1199
+ return _detectDirection(el, this.options);
1200
+ },
1201
+ ghostClass: 'sortable-ghost',
1202
+ chosenClass: 'sortable-chosen',
1203
+ dragClass: 'sortable-drag',
1204
+ ignore: 'a, img',
1205
+ filter: null,
1206
+ preventOnFilter: true,
1207
+ animation: 0,
1208
+ easing: null,
1209
+ setData: function setData(dataTransfer, dragEl) {
1210
+ dataTransfer.setData('Text', dragEl.textContent);
1211
+ },
1212
+ dropBubble: false,
1213
+ dragoverBubble: false,
1214
+ dataIdAttr: 'data-id',
1215
+ delay: 0,
1216
+ delayOnTouchOnly: false,
1217
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1218
+ forceFallback: false,
1219
+ fallbackClass: 'sortable-fallback',
1220
+ fallbackOnBody: false,
1221
+ fallbackTolerance: 0,
1222
+ fallbackOffset: {
1223
+ x: 0,
1224
+ y: 0
1225
+ },
1226
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1227
+ emptyInsertThreshold: 5
1228
+ };
1229
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1230
+
1231
+ for (var name in defaults) {
1232
+ !(name in options) && (options[name] = defaults[name]);
1233
+ }
1234
+
1235
+ _prepareGroup(options); // Bind all private methods
1236
+
1237
+
1238
+ for (var fn in this) {
1239
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1240
+ this[fn] = this[fn].bind(this);
1241
+ }
1242
+ } // Setup drag mode
1243
+
1244
+
1245
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1246
+
1247
+ if (this.nativeDraggable) {
1248
+ // Touch start threshold cannot be greater than the native dragstart threshold
1249
+ this.options.touchStartThreshold = 1;
1250
+ } // Bind events
1251
+
1252
+
1253
+ if (options.supportPointer) {
1254
+ on(el, 'pointerdown', this._onTapStart);
1255
+ } else {
1256
+ on(el, 'mousedown', this._onTapStart);
1257
+ on(el, 'touchstart', this._onTapStart);
1258
+ }
1259
+
1260
+ if (this.nativeDraggable) {
1261
+ on(el, 'dragover', this);
1262
+ on(el, 'dragenter', this);
1263
+ }
1264
+
1265
+ sortables.push(this.el); // Restore sorting
1266
+
1267
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1268
+
1269
+ _extends(this, AnimationStateManager());
1270
+ }
1271
+
1272
+ Sortable.prototype =
1273
+ /** @lends Sortable.prototype */
1274
+ {
1275
+ constructor: Sortable,
1276
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1277
+ if (!this.el.contains(target) && target !== this.el) {
1278
+ lastTarget = null;
1279
+ }
1280
+ },
1281
+ _getDirection: function _getDirection(evt, target) {
1282
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1283
+ },
1284
+ _onTapStart: function _onTapStart(
1285
+ /** Event|TouchEvent */
1286
+ evt) {
1287
+ if (!evt.cancelable) return;
1288
+
1289
+ var _this = this,
1290
+ el = this.el,
1291
+ options = this.options,
1292
+ preventOnFilter = options.preventOnFilter,
1293
+ type = evt.type,
1294
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1295
+ target = (touch || evt).target,
1296
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1297
+ filter = options.filter;
1298
+
1299
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1300
+
1301
+
1302
+ if (dragEl) {
1303
+ return;
1304
+ }
1305
+
1306
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1307
+ return; // only left button and enabled
1308
+ } // cancel dnd if original target is content editable
1309
+
1310
+
1311
+ if (originalTarget.isContentEditable) {
1312
+ return;
1313
+ } // Safari ignores further event handling after mousedown
1314
+
1315
+
1316
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1317
+ return;
1318
+ }
1319
+
1320
+ target = closest(target, options.draggable, el, false);
1321
+
1322
+ if (target && target.animated) {
1323
+ return;
1324
+ }
1325
+
1326
+ if (lastDownEl === target) {
1327
+ // Ignoring duplicate `down`
1328
+ return;
1329
+ } // Get the index of the dragged element within its parent
1330
+
1331
+
1332
+ oldIndex = index(target);
1333
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1334
+
1335
+ if (typeof filter === 'function') {
1336
+ if (filter.call(this, evt, target, this)) {
1337
+ _dispatchEvent({
1338
+ sortable: _this,
1339
+ rootEl: originalTarget,
1340
+ name: 'filter',
1341
+ targetEl: target,
1342
+ toEl: el,
1343
+ fromEl: el
1344
+ });
1345
+
1346
+ pluginEvent('filter', _this, {
1347
+ evt: evt
1348
+ });
1349
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1350
+ return; // cancel dnd
1351
+ }
1352
+ } else if (filter) {
1353
+ filter = filter.split(',').some(function (criteria) {
1354
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1355
+
1356
+ if (criteria) {
1357
+ _dispatchEvent({
1358
+ sortable: _this,
1359
+ rootEl: criteria,
1360
+ name: 'filter',
1361
+ targetEl: target,
1362
+ fromEl: el,
1363
+ toEl: el
1364
+ });
1365
+
1366
+ pluginEvent('filter', _this, {
1367
+ evt: evt
1368
+ });
1369
+ return true;
1370
+ }
1371
+ });
1372
+
1373
+ if (filter) {
1374
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1375
+ return; // cancel dnd
1376
+ }
1377
+ }
1378
+
1379
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1380
+ return;
1381
+ } // Prepare `dragstart`
1382
+
1383
+
1384
+ this._prepareDragStart(evt, touch, target);
1385
+ },
1386
+ _prepareDragStart: function _prepareDragStart(
1387
+ /** Event */
1388
+ evt,
1389
+ /** Touch */
1390
+ touch,
1391
+ /** HTMLElement */
1392
+ target) {
1393
+ var _this = this,
1394
+ el = _this.el,
1395
+ options = _this.options,
1396
+ ownerDocument = el.ownerDocument,
1397
+ dragStartFn;
1398
+
1399
+ if (target && !dragEl && target.parentNode === el) {
1400
+ var dragRect = getRect(target);
1401
+ rootEl = el;
1402
+ dragEl = target;
1403
+ parentEl = dragEl.parentNode;
1404
+ nextEl = dragEl.nextSibling;
1405
+ lastDownEl = target;
1406
+ activeGroup = options.group;
1407
+ Sortable.dragged = dragEl;
1408
+ tapEvt = {
1409
+ target: dragEl,
1410
+ clientX: (touch || evt).clientX,
1411
+ clientY: (touch || evt).clientY
1412
+ };
1413
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1414
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1415
+ this._lastX = (touch || evt).clientX;
1416
+ this._lastY = (touch || evt).clientY;
1417
+ dragEl.style['will-change'] = 'all';
1418
+
1419
+ dragStartFn = function dragStartFn() {
1420
+ pluginEvent('delayEnded', _this, {
1421
+ evt: evt
1422
+ });
1423
+
1424
+ if (Sortable.eventCanceled) {
1425
+ _this._onDrop();
1426
+
1427
+ return;
1428
+ } // Delayed drag has been triggered
1429
+ // we can re-enable the events: touchmove/mousemove
1430
+
1431
+
1432
+ _this._disableDelayedDragEvents();
1433
+
1434
+ if (!FireFox && _this.nativeDraggable) {
1435
+ dragEl.draggable = true;
1436
+ } // Bind the events: dragstart/dragend
1437
+
1438
+
1439
+ _this._triggerDragStart(evt, touch); // Drag start event
1440
+
1441
+
1442
+ _dispatchEvent({
1443
+ sortable: _this,
1444
+ name: 'choose',
1445
+ originalEvent: evt
1446
+ }); // Chosen item
1447
+
1448
+
1449
+ toggleClass(dragEl, options.chosenClass, true);
1450
+ }; // Disable "draggable"
1451
+
1452
+
1453
+ options.ignore.split(',').forEach(function (criteria) {
1454
+ find(dragEl, criteria.trim(), _disableDraggable);
1455
+ });
1456
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1457
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1458
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1459
+ on(ownerDocument, 'mouseup', _this._onDrop);
1460
+ on(ownerDocument, 'touchend', _this._onDrop);
1461
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1462
+
1463
+ if (FireFox && this.nativeDraggable) {
1464
+ this.options.touchStartThreshold = 4;
1465
+ dragEl.draggable = true;
1466
+ }
1467
+
1468
+ pluginEvent('delayStart', this, {
1469
+ evt: evt
1470
+ }); // Delay is impossible for native DnD in Edge or IE
1471
+
1472
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1473
+ if (Sortable.eventCanceled) {
1474
+ this._onDrop();
1475
+
1476
+ return;
1477
+ } // If the user moves the pointer or let go the click or touch
1478
+ // before the delay has been reached:
1479
+ // disable the delayed drag
1480
+
1481
+
1482
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1483
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1484
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1485
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1486
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1487
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1488
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1489
+ } else {
1490
+ dragStartFn();
1491
+ }
1492
+ }
1493
+ },
1494
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1495
+ /** TouchEvent|PointerEvent **/
1496
+ e) {
1497
+ var touch = e.touches ? e.touches[0] : e;
1498
+
1499
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1500
+ this._disableDelayedDrag();
1501
+ }
1502
+ },
1503
+ _disableDelayedDrag: function _disableDelayedDrag() {
1504
+ dragEl && _disableDraggable(dragEl);
1505
+ clearTimeout(this._dragStartTimer);
1506
+
1507
+ this._disableDelayedDragEvents();
1508
+ },
1509
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1510
+ var ownerDocument = this.el.ownerDocument;
1511
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1512
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1513
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1514
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1515
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1516
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1517
+ },
1518
+ _triggerDragStart: function _triggerDragStart(
1519
+ /** Event */
1520
+ evt,
1521
+ /** Touch */
1522
+ touch) {
1523
+ touch = touch || evt.pointerType == 'touch' && evt;
1524
+
1525
+ if (!this.nativeDraggable || touch) {
1526
+ if (this.options.supportPointer) {
1527
+ on(document, 'pointermove', this._onTouchMove);
1528
+ } else if (touch) {
1529
+ on(document, 'touchmove', this._onTouchMove);
1530
+ } else {
1531
+ on(document, 'mousemove', this._onTouchMove);
1532
+ }
1533
+ } else {
1534
+ on(dragEl, 'dragend', this);
1535
+ on(rootEl, 'dragstart', this._onDragStart);
1536
+ }
1537
+
1538
+ try {
1539
+ if (document.selection) {
1540
+ // Timeout neccessary for IE9
1541
+ _nextTick(function () {
1542
+ document.selection.empty();
1543
+ });
1544
+ } else {
1545
+ window.getSelection().removeAllRanges();
1546
+ }
1547
+ } catch (err) {}
1548
+ },
1549
+ _dragStarted: function _dragStarted(fallback, evt) {
1550
+
1551
+ awaitingDragStarted = false;
1552
+
1553
+ if (rootEl && dragEl) {
1554
+ pluginEvent('dragStarted', this, {
1555
+ evt: evt
1556
+ });
1557
+
1558
+ if (this.nativeDraggable) {
1559
+ on(document, 'dragover', _checkOutsideTargetEl);
1560
+ }
1561
+
1562
+ var options = this.options; // Apply effect
1563
+
1564
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1565
+ toggleClass(dragEl, options.ghostClass, true);
1566
+ Sortable.active = this;
1567
+ fallback && this._appendGhost(); // Drag start event
1568
+
1569
+ _dispatchEvent({
1570
+ sortable: this,
1571
+ name: 'start',
1572
+ originalEvent: evt
1573
+ });
1574
+ } else {
1575
+ this._nulling();
1576
+ }
1577
+ },
1578
+ _emulateDragOver: function _emulateDragOver() {
1579
+ if (touchEvt) {
1580
+ this._lastX = touchEvt.clientX;
1581
+ this._lastY = touchEvt.clientY;
1582
+
1583
+ _hideGhostForTarget();
1584
+
1585
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1586
+ var parent = target;
1587
+
1588
+ while (target && target.shadowRoot) {
1589
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1590
+ if (target === parent) break;
1591
+ parent = target;
1592
+ }
1593
+
1594
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1595
+
1596
+ if (parent) {
1597
+ do {
1598
+ if (parent[expando]) {
1599
+ var inserted = void 0;
1600
+ inserted = parent[expando]._onDragOver({
1601
+ clientX: touchEvt.clientX,
1602
+ clientY: touchEvt.clientY,
1603
+ target: target,
1604
+ rootEl: parent
1605
+ });
1606
+
1607
+ if (inserted && !this.options.dragoverBubble) {
1608
+ break;
1609
+ }
1610
+ }
1611
+
1612
+ target = parent; // store last element
1613
+ }
1614
+ /* jshint boss:true */
1615
+ while (parent = parent.parentNode);
1616
+ }
1617
+
1618
+ _unhideGhostForTarget();
1619
+ }
1620
+ },
1621
+ _onTouchMove: function _onTouchMove(
1622
+ /**TouchEvent*/
1623
+ evt) {
1624
+ if (tapEvt) {
1625
+ var options = this.options,
1626
+ fallbackTolerance = options.fallbackTolerance,
1627
+ fallbackOffset = options.fallbackOffset,
1628
+ touch = evt.touches ? evt.touches[0] : evt,
1629
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1630
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1631
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1632
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1633
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1634
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
1635
+
1636
+ if (!Sortable.active && !awaitingDragStarted) {
1637
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1638
+ return;
1639
+ }
1640
+
1641
+ this._onDragStart(evt, true);
1642
+ }
1643
+
1644
+ if (ghostEl) {
1645
+ if (ghostMatrix) {
1646
+ ghostMatrix.e += dx - (lastDx || 0);
1647
+ ghostMatrix.f += dy - (lastDy || 0);
1648
+ } else {
1649
+ ghostMatrix = {
1650
+ a: 1,
1651
+ b: 0,
1652
+ c: 0,
1653
+ d: 1,
1654
+ e: dx,
1655
+ f: dy
1656
+ };
1657
+ }
1658
+
1659
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1660
+ css(ghostEl, 'webkitTransform', cssMatrix);
1661
+ css(ghostEl, 'mozTransform', cssMatrix);
1662
+ css(ghostEl, 'msTransform', cssMatrix);
1663
+ css(ghostEl, 'transform', cssMatrix);
1664
+ lastDx = dx;
1665
+ lastDy = dy;
1666
+ touchEvt = touch;
1667
+ }
1668
+
1669
+ evt.cancelable && evt.preventDefault();
1670
+ }
1671
+ },
1672
+ _appendGhost: function _appendGhost() {
1673
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1674
+ // Not being adjusted for
1675
+ if (!ghostEl) {
1676
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1677
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1678
+ options = this.options; // Position absolutely
1679
+
1680
+ if (PositionGhostAbsolutely) {
1681
+ // Get relatively positioned parent
1682
+ ghostRelativeParent = container;
1683
+
1684
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1685
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1686
+ }
1687
+
1688
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1689
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1690
+ rect.top += ghostRelativeParent.scrollTop;
1691
+ rect.left += ghostRelativeParent.scrollLeft;
1692
+ } else {
1693
+ ghostRelativeParent = getWindowScrollingElement();
1694
+ }
1695
+
1696
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1697
+ }
1698
+
1699
+ ghostEl = dragEl.cloneNode(true);
1700
+ toggleClass(ghostEl, options.ghostClass, false);
1701
+ toggleClass(ghostEl, options.fallbackClass, true);
1702
+ toggleClass(ghostEl, options.dragClass, true);
1703
+ css(ghostEl, 'transition', '');
1704
+ css(ghostEl, 'transform', '');
1705
+ css(ghostEl, 'box-sizing', 'border-box');
1706
+ css(ghostEl, 'margin', 0);
1707
+ css(ghostEl, 'top', rect.top);
1708
+ css(ghostEl, 'left', rect.left);
1709
+ css(ghostEl, 'width', rect.width);
1710
+ css(ghostEl, 'height', rect.height);
1711
+ css(ghostEl, 'opacity', '0.8');
1712
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1713
+ css(ghostEl, 'zIndex', '100000');
1714
+ css(ghostEl, 'pointerEvents', 'none');
1715
+ Sortable.ghost = ghostEl;
1716
+ container.appendChild(ghostEl); // Set transform-origin
1717
+
1718
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1719
+ }
1720
+ },
1721
+ _onDragStart: function _onDragStart(
1722
+ /**Event*/
1723
+ evt,
1724
+ /**boolean*/
1725
+ fallback) {
1726
+ var _this = this;
1727
+
1728
+ var dataTransfer = evt.dataTransfer;
1729
+ var options = _this.options;
1730
+ pluginEvent('dragStart', this, {
1731
+ evt: evt
1732
+ });
1733
+
1734
+ if (Sortable.eventCanceled) {
1735
+ this._onDrop();
1736
+
1737
+ return;
1738
+ }
1739
+
1740
+ pluginEvent('setupClone', this);
1741
+
1742
+ if (!Sortable.eventCanceled) {
1743
+ cloneEl = clone(dragEl);
1744
+ cloneEl.removeAttribute("id");
1745
+ cloneEl.draggable = false;
1746
+ cloneEl.style['will-change'] = '';
1747
+
1748
+ this._hideClone();
1749
+
1750
+ toggleClass(cloneEl, this.options.chosenClass, false);
1751
+ Sortable.clone = cloneEl;
1752
+ } // #1143: IFrame support workaround
1753
+
1754
+
1755
+ _this.cloneId = _nextTick(function () {
1756
+ pluginEvent('clone', _this);
1757
+ if (Sortable.eventCanceled) return;
1758
+
1759
+ if (!_this.options.removeCloneOnHide) {
1760
+ rootEl.insertBefore(cloneEl, dragEl);
1761
+ }
1762
+
1763
+ _this._hideClone();
1764
+
1765
+ _dispatchEvent({
1766
+ sortable: _this,
1767
+ name: 'clone'
1768
+ });
1769
+ });
1770
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1771
+
1772
+ if (fallback) {
1773
+ ignoreNextClick = true;
1774
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1775
+ } else {
1776
+ // Undo what was set in _prepareDragStart before drag started
1777
+ off(document, 'mouseup', _this._onDrop);
1778
+ off(document, 'touchend', _this._onDrop);
1779
+ off(document, 'touchcancel', _this._onDrop);
1780
+
1781
+ if (dataTransfer) {
1782
+ dataTransfer.effectAllowed = 'move';
1783
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1784
+ }
1785
+
1786
+ on(document, 'drop', _this); // #1276 fix:
1787
+
1788
+ css(dragEl, 'transform', 'translateZ(0)');
1789
+ }
1790
+
1791
+ awaitingDragStarted = true;
1792
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1793
+ on(document, 'selectstart', _this);
1794
+ moved = true;
1795
+
1796
+ if (Safari) {
1797
+ css(document.body, 'user-select', 'none');
1798
+ }
1799
+ },
1800
+ // Returns true - if no further action is needed (either inserted or another condition)
1801
+ _onDragOver: function _onDragOver(
1802
+ /**Event*/
1803
+ evt) {
1804
+ var el = this.el,
1805
+ target = evt.target,
1806
+ dragRect,
1807
+ targetRect,
1808
+ revert,
1809
+ options = this.options,
1810
+ group = options.group,
1811
+ activeSortable = Sortable.active,
1812
+ isOwner = activeGroup === group,
1813
+ canSort = options.sort,
1814
+ fromSortable = putSortable || activeSortable,
1815
+ vertical,
1816
+ _this = this,
1817
+ completedFired = false;
1818
+
1819
+ if (_silent) return;
1820
+
1821
+ function dragOverEvent(name, extra) {
1822
+ pluginEvent(name, _this, _objectSpread2({
1823
+ evt: evt,
1824
+ isOwner: isOwner,
1825
+ axis: vertical ? 'vertical' : 'horizontal',
1826
+ revert: revert,
1827
+ dragRect: dragRect,
1828
+ targetRect: targetRect,
1829
+ canSort: canSort,
1830
+ fromSortable: fromSortable,
1831
+ target: target,
1832
+ completed: completed,
1833
+ onMove: function onMove(target, after) {
1834
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1835
+ },
1836
+ changed: changed
1837
+ }, extra));
1838
+ } // Capture animation state
1839
+
1840
+
1841
+ function capture() {
1842
+ dragOverEvent('dragOverAnimationCapture');
1843
+
1844
+ _this.captureAnimationState();
1845
+
1846
+ if (_this !== fromSortable) {
1847
+ fromSortable.captureAnimationState();
1848
+ }
1849
+ } // Return invocation when dragEl is inserted (or completed)
1850
+
1851
+
1852
+ function completed(insertion) {
1853
+ dragOverEvent('dragOverCompleted', {
1854
+ insertion: insertion
1855
+ });
1856
+
1857
+ if (insertion) {
1858
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1859
+ if (isOwner) {
1860
+ activeSortable._hideClone();
1861
+ } else {
1862
+ activeSortable._showClone(_this);
1863
+ }
1864
+
1865
+ if (_this !== fromSortable) {
1866
+ // Set ghost class to new sortable's ghost class
1867
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1868
+ toggleClass(dragEl, options.ghostClass, true);
1869
+ }
1870
+
1871
+ if (putSortable !== _this && _this !== Sortable.active) {
1872
+ putSortable = _this;
1873
+ } else if (_this === Sortable.active && putSortable) {
1874
+ putSortable = null;
1875
+ } // Animation
1876
+
1877
+
1878
+ if (fromSortable === _this) {
1879
+ _this._ignoreWhileAnimating = target;
1880
+ }
1881
+
1882
+ _this.animateAll(function () {
1883
+ dragOverEvent('dragOverAnimationComplete');
1884
+ _this._ignoreWhileAnimating = null;
1885
+ });
1886
+
1887
+ if (_this !== fromSortable) {
1888
+ fromSortable.animateAll();
1889
+ fromSortable._ignoreWhileAnimating = null;
1890
+ }
1891
+ } // Null lastTarget if it is not inside a previously swapped element
1892
+
1893
+
1894
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1895
+ lastTarget = null;
1896
+ } // no bubbling and not fallback
1897
+
1898
+
1899
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1900
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1901
+
1902
+
1903
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1904
+ }
1905
+
1906
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1907
+ return completedFired = true;
1908
+ } // Call when dragEl has been inserted
1909
+
1910
+
1911
+ function changed() {
1912
+ newIndex = index(dragEl);
1913
+ newDraggableIndex = index(dragEl, options.draggable);
1914
+
1915
+ _dispatchEvent({
1916
+ sortable: _this,
1917
+ name: 'change',
1918
+ toEl: el,
1919
+ newIndex: newIndex,
1920
+ newDraggableIndex: newDraggableIndex,
1921
+ originalEvent: evt
1922
+ });
1923
+ }
1924
+
1925
+ if (evt.preventDefault !== void 0) {
1926
+ evt.cancelable && evt.preventDefault();
1927
+ }
1928
+
1929
+ target = closest(target, options.draggable, el, true);
1930
+ dragOverEvent('dragOver');
1931
+ if (Sortable.eventCanceled) return completedFired;
1932
+
1933
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1934
+ return completed(false);
1935
+ }
1936
+
1937
+ ignoreNextClick = false;
1938
+
1939
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1940
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1941
+ vertical = this._getDirection(evt, target) === 'vertical';
1942
+ dragRect = getRect(dragEl);
1943
+ dragOverEvent('dragOverValid');
1944
+ if (Sortable.eventCanceled) return completedFired;
1945
+
1946
+ if (revert) {
1947
+ parentEl = rootEl; // actualization
1948
+
1949
+ capture();
1950
+
1951
+ this._hideClone();
1952
+
1953
+ dragOverEvent('revert');
1954
+
1955
+ if (!Sortable.eventCanceled) {
1956
+ if (nextEl) {
1957
+ rootEl.insertBefore(dragEl, nextEl);
1958
+ } else {
1959
+ rootEl.appendChild(dragEl);
1960
+ }
1961
+ }
1962
+
1963
+ return completed(true);
1964
+ }
1965
+
1966
+ var elLastChild = lastChild(el, options.draggable);
1967
+
1968
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1969
+ // Insert to end of list
1970
+ // If already at end of list: Do not insert
1971
+ if (elLastChild === dragEl) {
1972
+ return completed(false);
1973
+ } // if there is a last element, it is the target
1974
+
1975
+
1976
+ if (elLastChild && el === evt.target) {
1977
+ target = elLastChild;
1978
+ }
1979
+
1980
+ if (target) {
1981
+ targetRect = getRect(target);
1982
+ }
1983
+
1984
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1985
+ capture();
1986
+
1987
+ if (elLastChild && elLastChild.nextSibling) {
1988
+ // the last draggable element is not the last node
1989
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1990
+ } else {
1991
+ el.appendChild(dragEl);
1992
+ }
1993
+
1994
+ parentEl = el; // actualization
1995
+
1996
+ changed();
1997
+ return completed(true);
1998
+ }
1999
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
2000
+ // Insert to start of list
2001
+ var firstChild = getChild(el, 0, options, true);
2002
+
2003
+ if (firstChild === dragEl) {
2004
+ return completed(false);
2005
+ }
2006
+
2007
+ target = firstChild;
2008
+ targetRect = getRect(target);
2009
+
2010
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
2011
+ capture();
2012
+ el.insertBefore(dragEl, firstChild);
2013
+ parentEl = el; // actualization
2014
+
2015
+ changed();
2016
+ return completed(true);
2017
+ }
2018
+ } else if (target.parentNode === el) {
2019
+ targetRect = getRect(target);
2020
+ var direction = 0,
2021
+ targetBeforeFirstSwap,
2022
+ differentLevel = dragEl.parentNode !== el,
2023
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2024
+ side1 = vertical ? 'top' : 'left',
2025
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2026
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2027
+
2028
+ if (lastTarget !== target) {
2029
+ targetBeforeFirstSwap = targetRect[side1];
2030
+ pastFirstInvertThresh = false;
2031
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2032
+ }
2033
+
2034
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2035
+ var sibling;
2036
+
2037
+ if (direction !== 0) {
2038
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2039
+ var dragIndex = index(dragEl);
2040
+
2041
+ do {
2042
+ dragIndex -= direction;
2043
+ sibling = parentEl.children[dragIndex];
2044
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2045
+ } // If dragEl is already beside target: Do not insert
2046
+
2047
+
2048
+ if (direction === 0 || sibling === target) {
2049
+ return completed(false);
2050
+ }
2051
+
2052
+ lastTarget = target;
2053
+ lastDirection = direction;
2054
+ var nextSibling = target.nextElementSibling,
2055
+ after = false;
2056
+ after = direction === 1;
2057
+
2058
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2059
+
2060
+ if (moveVector !== false) {
2061
+ if (moveVector === 1 || moveVector === -1) {
2062
+ after = moveVector === 1;
2063
+ }
2064
+
2065
+ _silent = true;
2066
+ setTimeout(_unsilent, 30);
2067
+ capture();
2068
+
2069
+ if (after && !nextSibling) {
2070
+ el.appendChild(dragEl);
2071
+ } else {
2072
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2073
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
2074
+
2075
+
2076
+ if (scrolledPastTop) {
2077
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2078
+ }
2079
+
2080
+ parentEl = dragEl.parentNode; // actualization
2081
+ // must be done before animation
2082
+
2083
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2084
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2085
+ }
2086
+
2087
+ changed();
2088
+ return completed(true);
2089
+ }
2090
+ }
2091
+
2092
+ if (el.contains(dragEl)) {
2093
+ return completed(false);
2094
+ }
2095
+ }
2096
+
2097
+ return false;
2098
+ },
2099
+ _ignoreWhileAnimating: null,
2100
+ _offMoveEvents: function _offMoveEvents() {
2101
+ off(document, 'mousemove', this._onTouchMove);
2102
+ off(document, 'touchmove', this._onTouchMove);
2103
+ off(document, 'pointermove', this._onTouchMove);
2104
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
2105
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2106
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2107
+ },
2108
+ _offUpEvents: function _offUpEvents() {
2109
+ var ownerDocument = this.el.ownerDocument;
2110
+ off(ownerDocument, 'mouseup', this._onDrop);
2111
+ off(ownerDocument, 'touchend', this._onDrop);
2112
+ off(ownerDocument, 'pointerup', this._onDrop);
2113
+ off(ownerDocument, 'touchcancel', this._onDrop);
2114
+ off(document, 'selectstart', this);
2115
+ },
2116
+ _onDrop: function _onDrop(
2117
+ /**Event*/
2118
+ evt) {
2119
+ var el = this.el,
2120
+ options = this.options; // Get the index of the dragged element within its parent
2121
+
2122
+ newIndex = index(dragEl);
2123
+ newDraggableIndex = index(dragEl, options.draggable);
2124
+ pluginEvent('drop', this, {
2125
+ evt: evt
2126
+ });
2127
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2128
+
2129
+ newIndex = index(dragEl);
2130
+ newDraggableIndex = index(dragEl, options.draggable);
2131
+
2132
+ if (Sortable.eventCanceled) {
2133
+ this._nulling();
2134
+
2135
+ return;
2136
+ }
2137
+
2138
+ awaitingDragStarted = false;
2139
+ isCircumstantialInvert = false;
2140
+ pastFirstInvertThresh = false;
2141
+ clearInterval(this._loopId);
2142
+ clearTimeout(this._dragStartTimer);
2143
+
2144
+ _cancelNextTick(this.cloneId);
2145
+
2146
+ _cancelNextTick(this._dragStartId); // Unbind events
2147
+
2148
+
2149
+ if (this.nativeDraggable) {
2150
+ off(document, 'drop', this);
2151
+ off(el, 'dragstart', this._onDragStart);
2152
+ }
2153
+
2154
+ this._offMoveEvents();
2155
+
2156
+ this._offUpEvents();
2157
+
2158
+ if (Safari) {
2159
+ css(document.body, 'user-select', '');
2160
+ }
2161
+
2162
+ css(dragEl, 'transform', '');
2163
+
2164
+ if (evt) {
2165
+ if (moved) {
2166
+ evt.cancelable && evt.preventDefault();
2167
+ !options.dropBubble && evt.stopPropagation();
2168
+ }
2169
+
2170
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2171
+
2172
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2173
+ // Remove clone(s)
2174
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2175
+ }
2176
+
2177
+ if (dragEl) {
2178
+ if (this.nativeDraggable) {
2179
+ off(dragEl, 'dragend', this);
2180
+ }
2181
+
2182
+ _disableDraggable(dragEl);
2183
+
2184
+ dragEl.style['will-change'] = ''; // Remove classes
2185
+ // ghostClass is added in dragStarted
2186
+
2187
+ if (moved && !awaitingDragStarted) {
2188
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2189
+ }
2190
+
2191
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2192
+
2193
+ _dispatchEvent({
2194
+ sortable: this,
2195
+ name: 'unchoose',
2196
+ toEl: parentEl,
2197
+ newIndex: null,
2198
+ newDraggableIndex: null,
2199
+ originalEvent: evt
2200
+ });
2201
+
2202
+ if (rootEl !== parentEl) {
2203
+ if (newIndex >= 0) {
2204
+ // Add event
2205
+ _dispatchEvent({
2206
+ rootEl: parentEl,
2207
+ name: 'add',
2208
+ toEl: parentEl,
2209
+ fromEl: rootEl,
2210
+ originalEvent: evt
2211
+ }); // Remove event
2212
+
2213
+
2214
+ _dispatchEvent({
2215
+ sortable: this,
2216
+ name: 'remove',
2217
+ toEl: parentEl,
2218
+ originalEvent: evt
2219
+ }); // drag from one list and drop into another
2220
+
2221
+
2222
+ _dispatchEvent({
2223
+ rootEl: parentEl,
2224
+ name: 'sort',
2225
+ toEl: parentEl,
2226
+ fromEl: rootEl,
2227
+ originalEvent: evt
2228
+ });
2229
+
2230
+ _dispatchEvent({
2231
+ sortable: this,
2232
+ name: 'sort',
2233
+ toEl: parentEl,
2234
+ originalEvent: evt
2235
+ });
2236
+ }
2237
+
2238
+ putSortable && putSortable.save();
2239
+ } else {
2240
+ if (newIndex !== oldIndex) {
2241
+ if (newIndex >= 0) {
2242
+ // drag & drop within the same list
2243
+ _dispatchEvent({
2244
+ sortable: this,
2245
+ name: 'update',
2246
+ toEl: parentEl,
2247
+ originalEvent: evt
2248
+ });
2249
+
2250
+ _dispatchEvent({
2251
+ sortable: this,
2252
+ name: 'sort',
2253
+ toEl: parentEl,
2254
+ originalEvent: evt
2255
+ });
2256
+ }
2257
+ }
2258
+ }
2259
+
2260
+ if (Sortable.active) {
2261
+ /* jshint eqnull:true */
2262
+ if (newIndex == null || newIndex === -1) {
2263
+ newIndex = oldIndex;
2264
+ newDraggableIndex = oldDraggableIndex;
2265
+ }
2266
+
2267
+ _dispatchEvent({
2268
+ sortable: this,
2269
+ name: 'end',
2270
+ toEl: parentEl,
2271
+ originalEvent: evt
2272
+ }); // Save sorting
2273
+
2274
+
2275
+ this.save();
2276
+ }
2277
+ }
2278
+ }
2279
+
2280
+ this._nulling();
2281
+ },
2282
+ _nulling: function _nulling() {
2283
+ pluginEvent('nulling', this);
2284
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2285
+ savedInputChecked.forEach(function (el) {
2286
+ el.checked = true;
2287
+ });
2288
+ savedInputChecked.length = lastDx = lastDy = 0;
2289
+ },
2290
+ handleEvent: function handleEvent(
2291
+ /**Event*/
2292
+ evt) {
2293
+ switch (evt.type) {
2294
+ case 'drop':
2295
+ case 'dragend':
2296
+ this._onDrop(evt);
2297
+
2298
+ break;
2299
+
2300
+ case 'dragenter':
2301
+ case 'dragover':
2302
+ if (dragEl) {
2303
+ this._onDragOver(evt);
2304
+
2305
+ _globalDragOver(evt);
2306
+ }
2307
+
2308
+ break;
2309
+
2310
+ case 'selectstart':
2311
+ evt.preventDefault();
2312
+ break;
2313
+ }
2314
+ },
2315
+
2316
+ /**
2317
+ * Serializes the item into an array of string.
2318
+ * @returns {String[]}
2319
+ */
2320
+ toArray: function toArray() {
2321
+ var order = [],
2322
+ el,
2323
+ children = this.el.children,
2324
+ i = 0,
2325
+ n = children.length,
2326
+ options = this.options;
2327
+
2328
+ for (; i < n; i++) {
2329
+ el = children[i];
2330
+
2331
+ if (closest(el, options.draggable, this.el, false)) {
2332
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2333
+ }
2334
+ }
2335
+
2336
+ return order;
2337
+ },
2338
+
2339
+ /**
2340
+ * Sorts the elements according to the array.
2341
+ * @param {String[]} order order of the items
2342
+ */
2343
+ sort: function sort(order, useAnimation) {
2344
+ var items = {},
2345
+ rootEl = this.el;
2346
+ this.toArray().forEach(function (id, i) {
2347
+ var el = rootEl.children[i];
2348
+
2349
+ if (closest(el, this.options.draggable, rootEl, false)) {
2350
+ items[id] = el;
2351
+ }
2352
+ }, this);
2353
+ useAnimation && this.captureAnimationState();
2354
+ order.forEach(function (id) {
2355
+ if (items[id]) {
2356
+ rootEl.removeChild(items[id]);
2357
+ rootEl.appendChild(items[id]);
2358
+ }
2359
+ });
2360
+ useAnimation && this.animateAll();
2361
+ },
2362
+
2363
+ /**
2364
+ * Save the current sorting
2365
+ */
2366
+ save: function save() {
2367
+ var store = this.options.store;
2368
+ store && store.set && store.set(this);
2369
+ },
2370
+
2371
+ /**
2372
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2373
+ * @param {HTMLElement} el
2374
+ * @param {String} [selector] default: `options.draggable`
2375
+ * @returns {HTMLElement|null}
2376
+ */
2377
+ closest: function closest$1(el, selector) {
2378
+ return closest(el, selector || this.options.draggable, this.el, false);
2379
+ },
2380
+
2381
+ /**
2382
+ * Set/get option
2383
+ * @param {string} name
2384
+ * @param {*} [value]
2385
+ * @returns {*}
2386
+ */
2387
+ option: function option(name, value) {
2388
+ var options = this.options;
2389
+
2390
+ if (value === void 0) {
2391
+ return options[name];
2392
+ } else {
2393
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2394
+
2395
+ if (typeof modifiedValue !== 'undefined') {
2396
+ options[name] = modifiedValue;
2397
+ } else {
2398
+ options[name] = value;
2399
+ }
2400
+
2401
+ if (name === 'group') {
2402
+ _prepareGroup(options);
2403
+ }
2404
+ }
2405
+ },
2406
+
2407
+ /**
2408
+ * Destroy
2409
+ */
2410
+ destroy: function destroy() {
2411
+ pluginEvent('destroy', this);
2412
+ var el = this.el;
2413
+ el[expando] = null;
2414
+ off(el, 'mousedown', this._onTapStart);
2415
+ off(el, 'touchstart', this._onTapStart);
2416
+ off(el, 'pointerdown', this._onTapStart);
2417
+
2418
+ if (this.nativeDraggable) {
2419
+ off(el, 'dragover', this);
2420
+ off(el, 'dragenter', this);
2421
+ } // Remove draggable attributes
2422
+
2423
+
2424
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2425
+ el.removeAttribute('draggable');
2426
+ });
2427
+
2428
+ this._onDrop();
2429
+
2430
+ this._disableDelayedDragEvents();
2431
+
2432
+ sortables.splice(sortables.indexOf(this.el), 1);
2433
+ this.el = el = null;
2434
+ },
2435
+ _hideClone: function _hideClone() {
2436
+ if (!cloneHidden) {
2437
+ pluginEvent('hideClone', this);
2438
+ if (Sortable.eventCanceled) return;
2439
+ css(cloneEl, 'display', 'none');
2440
+
2441
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2442
+ cloneEl.parentNode.removeChild(cloneEl);
2443
+ }
2444
+
2445
+ cloneHidden = true;
2446
+ }
2447
+ },
2448
+ _showClone: function _showClone(putSortable) {
2449
+ if (putSortable.lastPutMode !== 'clone') {
2450
+ this._hideClone();
2451
+
2452
+ return;
2453
+ }
2454
+
2455
+ if (cloneHidden) {
2456
+ pluginEvent('showClone', this);
2457
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2458
+
2459
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2460
+ rootEl.insertBefore(cloneEl, dragEl);
2461
+ } else if (nextEl) {
2462
+ rootEl.insertBefore(cloneEl, nextEl);
2463
+ } else {
2464
+ rootEl.appendChild(cloneEl);
2465
+ }
2466
+
2467
+ if (this.options.group.revertClone) {
2468
+ this.animate(dragEl, cloneEl);
2469
+ }
2470
+
2471
+ css(cloneEl, 'display', '');
2472
+ cloneHidden = false;
2473
+ }
2474
+ }
2475
+ };
2476
+
2477
+ function _globalDragOver(
2478
+ /**Event*/
2479
+ evt) {
2480
+ if (evt.dataTransfer) {
2481
+ evt.dataTransfer.dropEffect = 'move';
2482
+ }
2483
+
2484
+ evt.cancelable && evt.preventDefault();
2485
+ }
2486
+
2487
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2488
+ var evt,
2489
+ sortable = fromEl[expando],
2490
+ onMoveFn = sortable.options.onMove,
2491
+ retVal; // Support for new CustomEvent feature
2492
+
2493
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2494
+ evt = new CustomEvent('move', {
2495
+ bubbles: true,
2496
+ cancelable: true
2497
+ });
2498
+ } else {
2499
+ evt = document.createEvent('Event');
2500
+ evt.initEvent('move', true, true);
2501
+ }
2502
+
2503
+ evt.to = toEl;
2504
+ evt.from = fromEl;
2505
+ evt.dragged = dragEl;
2506
+ evt.draggedRect = dragRect;
2507
+ evt.related = targetEl || toEl;
2508
+ evt.relatedRect = targetRect || getRect(toEl);
2509
+ evt.willInsertAfter = willInsertAfter;
2510
+ evt.originalEvent = originalEvent;
2511
+ fromEl.dispatchEvent(evt);
2512
+
2513
+ if (onMoveFn) {
2514
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2515
+ }
2516
+
2517
+ return retVal;
2518
+ }
2519
+
2520
+ function _disableDraggable(el) {
2521
+ el.draggable = false;
2522
+ }
2523
+
2524
+ function _unsilent() {
2525
+ _silent = false;
2526
+ }
2527
+
2528
+ function _ghostIsFirst(evt, vertical, sortable) {
2529
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2530
+ var spacer = 10;
2531
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
2532
+ }
2533
+
2534
+ function _ghostIsLast(evt, vertical, sortable) {
2535
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2536
+ var spacer = 10;
2537
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2538
+ }
2539
+
2540
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2541
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2542
+ targetLength = vertical ? targetRect.height : targetRect.width,
2543
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2544
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2545
+ invert = false;
2546
+
2547
+ if (!invertSwap) {
2548
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2549
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2550
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2551
+ // check if past first invert threshold on side opposite of lastDirection
2552
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2553
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2554
+ pastFirstInvertThresh = true;
2555
+ }
2556
+
2557
+ if (!pastFirstInvertThresh) {
2558
+ // dragEl shadow (target move distance shadow)
2559
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2560
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2561
+ return -lastDirection;
2562
+ }
2563
+ } else {
2564
+ invert = true;
2565
+ }
2566
+ } else {
2567
+ // Regular
2568
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2569
+ return _getInsertDirection(target);
2570
+ }
2571
+ }
2572
+ }
2573
+
2574
+ invert = invert || invertSwap;
2575
+
2576
+ if (invert) {
2577
+ // Invert of regular
2578
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2579
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2580
+ }
2581
+ }
2582
+
2583
+ return 0;
2584
+ }
2585
+ /**
2586
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2587
+ * seem that dragEl has been "inserted" into that element's position
2588
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2589
+ * @return {Number} Direction dragEl must be swapped
2590
+ */
2591
+
2592
+
2593
+ function _getInsertDirection(target) {
2594
+ if (index(dragEl) < index(target)) {
2595
+ return 1;
2596
+ } else {
2597
+ return -1;
2598
+ }
2599
+ }
2600
+ /**
2601
+ * Generate id
2602
+ * @param {HTMLElement} el
2603
+ * @returns {String}
2604
+ * @private
2605
+ */
2606
+
2607
+
2608
+ function _generateId(el) {
2609
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2610
+ i = str.length,
2611
+ sum = 0;
2612
+
2613
+ while (i--) {
2614
+ sum += str.charCodeAt(i);
2615
+ }
2616
+
2617
+ return sum.toString(36);
2618
+ }
2619
+
2620
+ function _saveInputCheckedState(root) {
2621
+ savedInputChecked.length = 0;
2622
+ var inputs = root.getElementsByTagName('input');
2623
+ var idx = inputs.length;
2624
+
2625
+ while (idx--) {
2626
+ var el = inputs[idx];
2627
+ el.checked && savedInputChecked.push(el);
2628
+ }
2629
+ }
2630
+
2631
+ function _nextTick(fn) {
2632
+ return setTimeout(fn, 0);
2633
+ }
2634
+
2635
+ function _cancelNextTick(id) {
2636
+ return clearTimeout(id);
2637
+ } // Fixed #973:
2638
+
2639
+
2640
+ if (documentExists) {
2641
+ on(document, 'touchmove', function (evt) {
2642
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2643
+ evt.preventDefault();
2644
+ }
2645
+ });
2646
+ } // Export utils
2647
+
2648
+
2649
+ Sortable.utils = {
2650
+ on: on,
2651
+ off: off,
2652
+ css: css,
2653
+ find: find,
2654
+ is: function is(el, selector) {
2655
+ return !!closest(el, selector, el, false);
2656
+ },
2657
+ extend: extend,
2658
+ throttle: throttle,
2659
+ closest: closest,
2660
+ toggleClass: toggleClass,
2661
+ clone: clone,
2662
+ index: index,
2663
+ nextTick: _nextTick,
2664
+ cancelNextTick: _cancelNextTick,
2665
+ detectDirection: _detectDirection,
2666
+ getChild: getChild
2667
+ };
2668
+ /**
2669
+ * Get the Sortable instance of an element
2670
+ * @param {HTMLElement} element The element
2671
+ * @return {Sortable|undefined} The instance of Sortable
2672
+ */
2673
+
2674
+ Sortable.get = function (element) {
2675
+ return element[expando];
2676
+ };
2677
+ /**
2678
+ * Mount a plugin to Sortable
2679
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2680
+ */
2681
+
2682
+
2683
+ Sortable.mount = function () {
2684
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2685
+ plugins[_key] = arguments[_key];
2686
+ }
2687
+
2688
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2689
+ plugins.forEach(function (plugin) {
2690
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2691
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2692
+ }
2693
+
2694
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2695
+ PluginManager.mount(plugin);
2696
+ });
2697
+ };
2698
+ /**
2699
+ * Create sortable instance
2700
+ * @param {HTMLElement} el
2701
+ * @param {Object} [options]
2702
+ */
2703
+
2704
+
2705
+ Sortable.create = function (el, options) {
2706
+ return new Sortable(el, options);
2707
+ }; // Export
2708
+
2709
+
2710
+ Sortable.version = version;
2711
+
2712
+ var autoScrolls = [],
2713
+ scrollEl,
2714
+ scrollRootEl,
2715
+ scrolling = false,
2716
+ lastAutoScrollX,
2717
+ lastAutoScrollY,
2718
+ touchEvt$1,
2719
+ pointerElemChangedInterval;
2720
+
2721
+ function AutoScrollPlugin() {
2722
+ function AutoScroll() {
2723
+ this.defaults = {
2724
+ scroll: true,
2725
+ forceAutoScrollFallback: false,
2726
+ scrollSensitivity: 30,
2727
+ scrollSpeed: 10,
2728
+ bubbleScroll: true
2729
+ }; // Bind all private methods
2730
+
2731
+ for (var fn in this) {
2732
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2733
+ this[fn] = this[fn].bind(this);
2734
+ }
2735
+ }
2736
+ }
2737
+
2738
+ AutoScroll.prototype = {
2739
+ dragStarted: function dragStarted(_ref) {
2740
+ var originalEvent = _ref.originalEvent;
2741
+
2742
+ if (this.sortable.nativeDraggable) {
2743
+ on(document, 'dragover', this._handleAutoScroll);
2744
+ } else {
2745
+ if (this.options.supportPointer) {
2746
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2747
+ } else if (originalEvent.touches) {
2748
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2749
+ } else {
2750
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2751
+ }
2752
+ }
2753
+ },
2754
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2755
+ var originalEvent = _ref2.originalEvent;
2756
+
2757
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2758
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2759
+ this._handleAutoScroll(originalEvent);
2760
+ }
2761
+ },
2762
+ drop: function drop() {
2763
+ if (this.sortable.nativeDraggable) {
2764
+ off(document, 'dragover', this._handleAutoScroll);
2765
+ } else {
2766
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2767
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2768
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2769
+ }
2770
+
2771
+ clearPointerElemChangedInterval();
2772
+ clearAutoScrolls();
2773
+ cancelThrottle();
2774
+ },
2775
+ nulling: function nulling() {
2776
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2777
+ autoScrolls.length = 0;
2778
+ },
2779
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2780
+ this._handleAutoScroll(evt, true);
2781
+ },
2782
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2783
+ var _this = this;
2784
+
2785
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2786
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2787
+ elem = document.elementFromPoint(x, y);
2788
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2789
+ // Edge's autoscroll seems too conditional,
2790
+ // MACOS Safari does not have autoscroll,
2791
+ // Firefox and Chrome are good
2792
+
2793
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2794
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2795
+
2796
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2797
+
2798
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2799
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2800
+
2801
+ pointerElemChangedInterval = setInterval(function () {
2802
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2803
+
2804
+ if (newElem !== ogElemScroller) {
2805
+ ogElemScroller = newElem;
2806
+ clearAutoScrolls();
2807
+ }
2808
+
2809
+ autoScroll(evt, _this.options, newElem, fallback);
2810
+ }, 10);
2811
+ lastAutoScrollX = x;
2812
+ lastAutoScrollY = y;
2813
+ }
2814
+ } else {
2815
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2816
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2817
+ clearAutoScrolls();
2818
+ return;
2819
+ }
2820
+
2821
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2822
+ }
2823
+ }
2824
+ };
2825
+ return _extends(AutoScroll, {
2826
+ pluginName: 'scroll',
2827
+ initializeByDefault: true
2828
+ });
2829
+ }
2830
+
2831
+ function clearAutoScrolls() {
2832
+ autoScrolls.forEach(function (autoScroll) {
2833
+ clearInterval(autoScroll.pid);
2834
+ });
2835
+ autoScrolls = [];
2836
+ }
2837
+
2838
+ function clearPointerElemChangedInterval() {
2839
+ clearInterval(pointerElemChangedInterval);
2840
+ }
2841
+
2842
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2843
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2844
+ if (!options.scroll) return;
2845
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2846
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2847
+ sens = options.scrollSensitivity,
2848
+ speed = options.scrollSpeed,
2849
+ winScroller = getWindowScrollingElement();
2850
+ var scrollThisInstance = false,
2851
+ scrollCustomFn; // New scroll root, set scrollEl
2852
+
2853
+ if (scrollRootEl !== rootEl) {
2854
+ scrollRootEl = rootEl;
2855
+ clearAutoScrolls();
2856
+ scrollEl = options.scroll;
2857
+ scrollCustomFn = options.scrollFn;
2858
+
2859
+ if (scrollEl === true) {
2860
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2861
+ }
2862
+ }
2863
+
2864
+ var layersOut = 0;
2865
+ var currentParent = scrollEl;
2866
+
2867
+ do {
2868
+ var el = currentParent,
2869
+ rect = getRect(el),
2870
+ top = rect.top,
2871
+ bottom = rect.bottom,
2872
+ left = rect.left,
2873
+ right = rect.right,
2874
+ width = rect.width,
2875
+ height = rect.height,
2876
+ canScrollX = void 0,
2877
+ canScrollY = void 0,
2878
+ scrollWidth = el.scrollWidth,
2879
+ scrollHeight = el.scrollHeight,
2880
+ elCSS = css(el),
2881
+ scrollPosX = el.scrollLeft,
2882
+ scrollPosY = el.scrollTop;
2883
+
2884
+ if (el === winScroller) {
2885
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2886
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2887
+ } else {
2888
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2889
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2890
+ }
2891
+
2892
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2893
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2894
+
2895
+ if (!autoScrolls[layersOut]) {
2896
+ for (var i = 0; i <= layersOut; i++) {
2897
+ if (!autoScrolls[i]) {
2898
+ autoScrolls[i] = {};
2899
+ }
2900
+ }
2901
+ }
2902
+
2903
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2904
+ autoScrolls[layersOut].el = el;
2905
+ autoScrolls[layersOut].vx = vx;
2906
+ autoScrolls[layersOut].vy = vy;
2907
+ clearInterval(autoScrolls[layersOut].pid);
2908
+
2909
+ if (vx != 0 || vy != 0) {
2910
+ scrollThisInstance = true;
2911
+ /* jshint loopfunc:true */
2912
+
2913
+ autoScrolls[layersOut].pid = setInterval(function () {
2914
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2915
+ if (isFallback && this.layer === 0) {
2916
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2917
+
2918
+ }
2919
+
2920
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2921
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2922
+
2923
+ if (typeof scrollCustomFn === 'function') {
2924
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2925
+ return;
2926
+ }
2927
+ }
2928
+
2929
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2930
+ }.bind({
2931
+ layer: layersOut
2932
+ }), 24);
2933
+ }
2934
+ }
2935
+
2936
+ layersOut++;
2937
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2938
+
2939
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2940
+ }, 30);
2941
+
2942
+ var drop = function drop(_ref) {
2943
+ var originalEvent = _ref.originalEvent,
2944
+ putSortable = _ref.putSortable,
2945
+ dragEl = _ref.dragEl,
2946
+ activeSortable = _ref.activeSortable,
2947
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2948
+ hideGhostForTarget = _ref.hideGhostForTarget,
2949
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2950
+ if (!originalEvent) return;
2951
+ var toSortable = putSortable || activeSortable;
2952
+ hideGhostForTarget();
2953
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2954
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2955
+ unhideGhostForTarget();
2956
+
2957
+ if (toSortable && !toSortable.el.contains(target)) {
2958
+ dispatchSortableEvent('spill');
2959
+ this.onSpill({
2960
+ dragEl: dragEl,
2961
+ putSortable: putSortable
2962
+ });
2963
+ }
2964
+ };
2965
+
2966
+ function Revert() {}
2967
+
2968
+ Revert.prototype = {
2969
+ startIndex: null,
2970
+ dragStart: function dragStart(_ref2) {
2971
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2972
+ this.startIndex = oldDraggableIndex;
2973
+ },
2974
+ onSpill: function onSpill(_ref3) {
2975
+ var dragEl = _ref3.dragEl,
2976
+ putSortable = _ref3.putSortable;
2977
+ this.sortable.captureAnimationState();
2978
+
2979
+ if (putSortable) {
2980
+ putSortable.captureAnimationState();
2981
+ }
2982
+
2983
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2984
+
2985
+ if (nextSibling) {
2986
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2987
+ } else {
2988
+ this.sortable.el.appendChild(dragEl);
2989
+ }
2990
+
2991
+ this.sortable.animateAll();
2992
+
2993
+ if (putSortable) {
2994
+ putSortable.animateAll();
2995
+ }
2996
+ },
2997
+ drop: drop
2998
+ };
2999
+
3000
+ _extends(Revert, {
3001
+ pluginName: 'revertOnSpill'
3002
+ });
3003
+
3004
+ function Remove() {}
3005
+
3006
+ Remove.prototype = {
3007
+ onSpill: function onSpill(_ref4) {
3008
+ var dragEl = _ref4.dragEl,
3009
+ putSortable = _ref4.putSortable;
3010
+ var parentSortable = putSortable || this.sortable;
3011
+ parentSortable.captureAnimationState();
3012
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3013
+ parentSortable.animateAll();
3014
+ },
3015
+ drop: drop
3016
+ };
3017
+
3018
+ _extends(Remove, {
3019
+ pluginName: 'removeOnSpill'
3020
+ });
3021
+
3022
+ Sortable.mount(new AutoScrollPlugin());
3023
+ Sortable.mount(Remove, Revert);
3
3024
 
4
3025
  const swirlOptionListCss = ".sc-swirl-option-list-h{display:block}.sc-swirl-option-list-h *.sc-swirl-option-list{box-sizing:border-box}";
5
3026
 
@@ -7,9 +3028,11 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
7
3028
  constructor() {
8
3029
  super();
9
3030
  this.__registerHost();
3031
+ this.itemDrop = createEvent(this, "itemDrop", 7);
10
3032
  this.valueChange = createEvent(this, "valueChange", 7);
11
- this.value = [];
12
- this.onFocus = () => {
3033
+ this.onFocus = async () => {
3034
+ // prevent focus from canceling the drag event in Safari
3035
+ await new Promise((resolve) => setTimeout(resolve));
13
3036
  if (Boolean(this.focusedItem)) {
14
3037
  this.focusItem(this.getActiveItemIndex());
15
3038
  }
@@ -21,7 +3044,10 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
21
3044
  event.preventDefault();
22
3045
  const target = event.target;
23
3046
  const item = target === null || target === void 0 ? void 0 : target.closest("swirl-option-list-item");
24
- if (!Boolean(item)) {
3047
+ const composedTarget = event.composedPath()[0];
3048
+ const clickedOption = Boolean(closestPassShadow(composedTarget, '[role="option"]'));
3049
+ if (!Boolean(item) || !clickedOption) {
3050
+ event.preventDefault();
25
3051
  return;
26
3052
  }
27
3053
  this.selectItem(this.items.findIndex((i) => i.value === item.value));
@@ -29,15 +3055,35 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
29
3055
  this.onKeyDown = (event) => {
30
3056
  if (event.code === "ArrowDown") {
31
3057
  event.preventDefault();
32
- this.focusNextItem();
3058
+ if (!Boolean(this.dragging)) {
3059
+ this.focusNextItem();
3060
+ }
3061
+ else {
3062
+ this.moveDraggedItemDown();
3063
+ }
33
3064
  }
34
3065
  else if (event.code === "ArrowUp") {
35
3066
  event.preventDefault();
36
- this.focusPreviousItem();
3067
+ if (!Boolean(this.dragging)) {
3068
+ this.focusPreviousItem();
3069
+ }
3070
+ else {
3071
+ this.moveDraggedItemUp();
3072
+ }
37
3073
  }
38
3074
  else if (event.code === "Space" || event.code === "Enter") {
3075
+ const target = event.composedPath()[0];
3076
+ const optionFocused = Boolean(closestPassShadow(target, '[role="option"]'));
3077
+ if (!optionFocused) {
3078
+ return;
3079
+ }
39
3080
  event.preventDefault();
40
- this.selectFocusedItem();
3081
+ if (Boolean(this.dragging)) {
3082
+ this.stopDrag(this.dragging);
3083
+ }
3084
+ else {
3085
+ this.selectFocusedItem();
3086
+ }
41
3087
  }
42
3088
  else if (event.code === "Home") {
43
3089
  event.preventDefault();
@@ -53,18 +3099,65 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
53
3099
  event.preventDefault();
54
3100
  this.selectAllItems();
55
3101
  }
3102
+ else if (event.code === "Tab") {
3103
+ if (Boolean(this.dragging)) {
3104
+ event.preventDefault();
3105
+ }
3106
+ }
3107
+ };
3108
+ this.toggleDrag = (event) => {
3109
+ const item = event.detail;
3110
+ if (Boolean(this.dragging)) {
3111
+ this.stopDrag(item);
3112
+ }
3113
+ else {
3114
+ this.startDrag(item);
3115
+ }
3116
+ };
3117
+ this.startDrag = (item) => {
3118
+ this.dragging = item;
3119
+ this.draggingStartIndex = this.getItemIndex(this.dragging);
3120
+ item.setAttribute("dragging", "true");
3121
+ const index = this.getItemIndex(this.dragging);
3122
+ this.focusItem(index);
3123
+ this.assistiveText = this.assistiveTextItemGrabbed;
56
3124
  };
3125
+ this.stopDrag = (item) => {
3126
+ this.dragging = undefined;
3127
+ item.removeAttribute("dragging");
3128
+ const newIndex = this.getActiveItemIndex();
3129
+ this.assistiveText = `${this.assistiveTextItemMoved} ${newIndex + 1}`;
3130
+ this.itemDrop.emit({ oldIndex: this.draggingStartIndex, newIndex });
3131
+ this.draggingStartIndex = undefined;
3132
+ };
3133
+ this.allowDrag = undefined;
3134
+ this.assistiveTextItemGrabbed = "Item grabbed. Use arrow keys to move item up or down. Use spacebar to save position.";
3135
+ this.assistiveTextItemMoving = "Current position:";
3136
+ this.assistiveTextItemMoved = "Item moved. New position:";
3137
+ this.disabled = undefined;
3138
+ this.label = undefined;
3139
+ this.optionListId = undefined;
3140
+ this.multiSelect = undefined;
3141
+ this.value = [];
3142
+ this.assistiveText = undefined;
57
3143
  }
58
3144
  componentDidLoad() {
59
3145
  this.updateItems();
60
3146
  this.observeSlotChanges();
3147
+ this.setItemAllowDragState();
61
3148
  this.setItemDisabledState();
62
3149
  this.setItemContext();
63
3150
  this.syncItemsWithValue();
3151
+ this.setupDragDrop();
64
3152
  }
65
3153
  disconnectedCallback() {
66
- var _a;
3154
+ var _a, _b;
67
3155
  (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
3156
+ (_b = this.sortable) === null || _b === void 0 ? void 0 : _b.destroy();
3157
+ }
3158
+ watchAllowDrag() {
3159
+ this.setItemAllowDragState();
3160
+ this.setupDragDrop();
68
3161
  }
69
3162
  watchDisabled() {
70
3163
  this.setItemDisabledState();
@@ -98,6 +3191,48 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
98
3191
  }
99
3192
  }
100
3193
  }
3194
+ setupDragDrop() {
3195
+ if (Boolean(this.sortable)) {
3196
+ this.sortable.destroy();
3197
+ }
3198
+ if (!this.allowDrag) {
3199
+ return;
3200
+ }
3201
+ this.sortable = Sortable.create(this.listboxEl, {
3202
+ animation: 150,
3203
+ draggable: "swirl-option-list-item",
3204
+ handle: ".option-list-item__drag-handle",
3205
+ onEnd: (event) => {
3206
+ this.itemDrop.emit({
3207
+ oldIndex: event.oldIndex,
3208
+ newIndex: event.newIndex,
3209
+ });
3210
+ },
3211
+ });
3212
+ }
3213
+ setItemAllowDragState() {
3214
+ if (this.allowDrag && !this.multiSelect) {
3215
+ console.error("[SwirlOptionList] Drag can only be allowed for multi select lists.");
3216
+ return;
3217
+ }
3218
+ const sections = querySelectorAllDeep(this.el, "swirl-option-list-section");
3219
+ if (this.allowDrag && sections.length > 0) {
3220
+ console.error("[SwirlOptionList] Drag can only be allowed for lists without sections.");
3221
+ return;
3222
+ }
3223
+ if (this.allowDrag) {
3224
+ this.items.forEach((item) => {
3225
+ item.setAttribute("allow-drag", "true");
3226
+ item.addEventListener("toggleDrag", this.toggleDrag);
3227
+ });
3228
+ }
3229
+ else {
3230
+ this.items.forEach((item) => {
3231
+ item.removeAttribute("allow-drag");
3232
+ item.removeEventListener("toggleDrag", this.toggleDrag);
3233
+ });
3234
+ }
3235
+ }
101
3236
  selectItem(index) {
102
3237
  if (this.disabled) {
103
3238
  return;
@@ -143,13 +3278,12 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
143
3278
  this.items.forEach((item) => (item.selected = this.value.includes(item.value)));
144
3279
  }
145
3280
  focusItem(index) {
3281
+ var _a;
146
3282
  if (this.disabled) {
147
3283
  return;
148
3284
  }
149
- this.items.forEach((item) => item.shadowRoot
150
- .querySelector('[role="option"]')
151
- .removeAttribute("tabIndex"));
152
- const item = this.items[index].shadowRoot.querySelector('[role="option"]');
3285
+ this.items.forEach((item) => item.querySelector('[role="option"]').removeAttribute("tabIndex"));
3286
+ const item = (_a = this.items[index]) === null || _a === void 0 ? void 0 : _a.querySelector('[role="option"]');
153
3287
  if (!Boolean(item)) {
154
3288
  return;
155
3289
  }
@@ -172,41 +3306,74 @@ const SwirlOptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
172
3306
  }
173
3307
  getActiveItemIndex() {
174
3308
  return this.items
175
- .map((item) => item.shadowRoot.querySelector('[role="option"]'))
3309
+ .map((item) => item.querySelector('[role="option"]'))
176
3310
  .findIndex((item) => item === this.focusedItem);
177
3311
  }
3312
+ getItemIndex(item) {
3313
+ return this.items.map((i) => i).findIndex((i) => i === item);
3314
+ }
3315
+ moveDraggedItemDown() {
3316
+ const nextSibling = this.dragging.nextElementSibling;
3317
+ if (!Boolean(nextSibling)) {
3318
+ return;
3319
+ }
3320
+ nextSibling.after(this.dragging);
3321
+ this.updateItems();
3322
+ this.listboxEl.focus();
3323
+ this.assistiveText = `${this.assistiveTextItemMoving} ${this.getActiveItemIndex() + 1}`;
3324
+ }
3325
+ moveDraggedItemUp() {
3326
+ const prevSibling = this.dragging.previousElementSibling;
3327
+ if (!Boolean(prevSibling)) {
3328
+ return;
3329
+ }
3330
+ prevSibling.before(this.dragging);
3331
+ this.updateItems();
3332
+ this.listboxEl.focus();
3333
+ this.assistiveText = `${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging) + 1}`;
3334
+ }
178
3335
  render() {
179
3336
  const ariaMultiselectable = this.multiSelect ? "true" : undefined;
180
3337
  const tabIndex = this.disabled ? -1 : 0;
181
- return (h(Host, null, h("div", { "aria-label": this.label, "aria-multiselectable": ariaMultiselectable, class: "option-list", id: this.optionListId, onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, ref: (el) => (this.listboxEl = el), role: "listbox", tabIndex: tabIndex }, h("slot", null))));
3338
+ return (h(Host, null, h("swirl-visually-hidden", { role: "alert" }, this.assistiveText), h("div", { "aria-label": this.label, "aria-multiselectable": ariaMultiselectable, class: "option-list", id: this.optionListId, onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, ref: (el) => (this.listboxEl = el), role: "listbox", tabIndex: tabIndex }, h("slot", null))));
182
3339
  }
183
3340
  get el() { return this; }
184
3341
  static get watchers() { return {
3342
+ "allowDrag": ["watchAllowDrag"],
185
3343
  "disabled": ["watchDisabled"],
186
3344
  "multiSelect": ["watchMultiSelect"],
187
3345
  "value": ["watchValue"]
188
3346
  }; }
189
3347
  static get style() { return swirlOptionListCss; }
190
3348
  }, [6, "swirl-option-list", {
3349
+ "allowDrag": [4, "allow-drag"],
3350
+ "assistiveTextItemGrabbed": [1, "assistive-text-item-grabbed"],
3351
+ "assistiveTextItemMoving": [1, "assistive-text-item-moving"],
3352
+ "assistiveTextItemMoved": [1, "assistive-text-item-moved"],
191
3353
  "disabled": [4],
192
3354
  "label": [1],
193
3355
  "optionListId": [1, "option-list-id"],
194
3356
  "multiSelect": [4, "multi-select"],
195
- "value": [1040]
3357
+ "value": [1040],
3358
+ "assistiveText": [32]
196
3359
  }]);
197
3360
  function defineCustomElement() {
198
3361
  if (typeof customElements === "undefined") {
199
3362
  return;
200
3363
  }
201
- const components = ["swirl-option-list"];
3364
+ const components = ["swirl-option-list", "swirl-visually-hidden"];
202
3365
  components.forEach(tagName => { switch (tagName) {
203
3366
  case "swirl-option-list":
204
3367
  if (!customElements.get(tagName)) {
205
3368
  customElements.define(tagName, SwirlOptionList);
206
3369
  }
207
3370
  break;
3371
+ case "swirl-visually-hidden":
3372
+ if (!customElements.get(tagName)) {
3373
+ defineCustomElement$1();
3374
+ }
3375
+ break;
208
3376
  } });
209
3377
  }
210
- defineCustomElement();
211
3378
 
212
3379
  export { SwirlOptionList as S, defineCustomElement as d };