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