@onereach/ui-components 4.4.0-beta.2691.0 → 4.4.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 (513) hide show
  1. package/dist/bundled/v2/components/OrCode/OrCode.js +3792 -6
  2. package/dist/bundled/v2/components/OrCode/index.js +2 -6
  3. package/dist/bundled/v2/components/OrCode/lang.js +3 -3941
  4. package/dist/bundled/v2/components/OrCode/theme.js +1 -2
  5. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +3 -4
  6. package/dist/bundled/v2/components/OrConfirm/index.js +1 -2
  7. package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +1 -1
  8. package/dist/bundled/v2/components/OrConfirmV3/index.js +1 -1
  9. package/dist/bundled/v2/components/OrExpansionPanelV3/styles.js +3 -1
  10. package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
  11. package/dist/bundled/v2/components/OrModal/OrModal.js +1346 -3
  12. package/dist/bundled/v2/components/OrModal/index.js +0 -1
  13. package/dist/bundled/v2/components/OrSidebarV3/styles.js +1 -1
  14. package/dist/bundled/v2/components/OrTagV3/OrTag.vue.d.ts +5 -5
  15. package/dist/bundled/v2/components/OrTagsV3/OrTags.js +163 -0
  16. package/dist/bundled/v2/components/OrTagsV3/OrTags.vue.d.ts +80 -0
  17. package/dist/bundled/v2/components/OrTagsV3/index.d.ts +1 -0
  18. package/dist/bundled/v2/components/OrTagsV3/index.js +37 -0
  19. package/dist/bundled/v2/components/OrTagsV3/styles.d.ts +4 -0
  20. package/dist/bundled/v2/components/OrTagsV3/styles.js +26 -0
  21. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
  22. package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
  23. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  24. package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
  25. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
  26. package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
  27. package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
  28. package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
  29. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
  30. package/dist/bundled/v2/components/index.d.ts +4 -1
  31. package/dist/bundled/v2/components/index.js +13 -17
  32. package/dist/bundled/v2/{index-0d224ae5.js → index-cf2c3c27.js} +115 -3
  33. package/dist/bundled/v2/index.js +16 -21
  34. package/dist/bundled/{v3/index-e9f6b2d8.js → v2/lang-0fb8f78b.js} +4009 -73
  35. package/dist/bundled/v3/OrCheckboxGroup.vue_vue_type_script_lang-1e71771d.js +60 -0
  36. package/dist/bundled/v3/{index-d92d0b48.js → OrCode.vue_vue_type_script_lang-74060519.js} +235 -14
  37. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-dca252a7.js → OrConfirm.vue_vue_type_script_lang-23e4ce08.js} +1 -1
  38. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-4eaa8470.js → OrConfirm.vue_vue_type_script_lang-e5a8f92a.js} +2 -2
  39. package/dist/bundled/{v2/useFocusTrap-48767a70.js → v3/OrModal.vue_vue_type_script_lang-ae842e5b.js} +106 -3
  40. package/dist/bundled/v3/OrRadioGroup.vue_vue_type_script_lang-dfffdd80.js +59 -0
  41. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-264914d3.js → OrSelect.vue_vue_type_script_lang-2c4c9f9d.js} +2 -2
  42. package/dist/bundled/v3/OrTags.vue_vue_type_script_lang-e75444b5.js +70 -0
  43. package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +11 -26
  44. package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +8 -24
  45. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +20 -33
  46. package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +16 -51
  47. package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +20 -57
  48. package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +15 -35
  49. package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +7 -15
  50. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +21 -47
  51. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +22 -70
  52. package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +4 -7
  53. package/dist/bundled/v3/components/OrCarousel/OrCarousel.vue.d.ts +126 -676
  54. package/dist/bundled/v3/components/OrCarouselItem/OrCarouselItem.vue.d.ts +1 -1
  55. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +15 -35
  56. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +9 -60
  57. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +6 -24
  58. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +2 -2
  59. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
  60. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +17 -43
  61. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
  62. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +23 -53
  63. package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +9 -25
  64. package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +24 -51
  65. package/dist/bundled/v3/components/OrCode/OrCode.js +6 -10
  66. package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +24 -69
  67. package/dist/bundled/v3/components/OrCode/index.js +4 -8
  68. package/dist/bundled/v3/components/OrCode/lang.js +3 -3941
  69. package/dist/bundled/v3/components/OrCode/theme.js +1 -2
  70. package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +17 -39
  71. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +13 -31
  72. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +8 -30
  73. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +5 -6
  74. package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +23 -84
  75. package/dist/bundled/v3/components/OrConfirm/index.js +3 -4
  76. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +3 -3
  77. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +29 -91
  78. package/dist/bundled/v3/components/OrConfirmV3/index.js +2 -2
  79. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +25 -81
  80. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +68 -177
  81. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +31 -105
  82. package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +11 -28
  83. package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +4 -8
  84. package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +4 -7
  85. package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +9 -18
  86. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +2 -2
  87. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +14 -35
  88. package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
  89. package/dist/bundled/v3/components/OrExpansionPanelV3/styles.js +3 -1
  90. package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +8 -20
  91. package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +15 -46
  92. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +10 -30
  93. package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +4 -8
  94. package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +9 -18
  95. package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +16 -44
  96. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +13 -43
  97. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +16 -52
  98. package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +7 -18
  99. package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +7 -16
  100. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +39 -83
  101. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +1 -1
  102. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +43 -95
  103. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +39 -79
  104. package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +36 -87
  105. package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +7 -22
  106. package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +34 -85
  107. package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +9 -20
  108. package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +9 -24
  109. package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +7 -24
  110. package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +21 -47
  111. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +11 -27
  112. package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +10 -26
  113. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +13 -34
  114. package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +13 -34
  115. package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +16 -43
  116. package/dist/bundled/v3/components/OrModal/OrModal.js +2 -3
  117. package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +14 -38
  118. package/dist/bundled/v3/components/OrModal/index.js +1 -2
  119. package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +15 -31
  120. package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +9 -27
  121. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +9 -20
  122. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +24 -70
  123. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +13 -31
  124. package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +6 -16
  125. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +7 -14
  126. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +27 -75
  127. package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +22 -63
  128. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +27 -74
  129. package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +20 -56
  130. package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +25 -62
  131. package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +13 -35
  132. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +9 -26
  133. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +9 -60
  134. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +6 -32
  135. package/dist/bundled/v3/components/OrRadioGroupV3/index.js +1 -1
  136. package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +21 -49
  137. package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +23 -65
  138. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +17 -41
  139. package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +9 -25
  140. package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +28 -77
  141. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +3 -3
  142. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +37 -115
  143. package/dist/bundled/v3/components/OrSelectV3/index.js +2 -2
  144. package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +14 -33
  145. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
  146. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +28 -63
  147. package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
  148. package/dist/bundled/v3/components/OrSidebarV3/styles.js +1 -1
  149. package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +9 -20
  150. package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +13 -28
  151. package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +9 -22
  152. package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +11 -26
  153. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +10 -26
  154. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +16 -40
  155. package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +35 -91
  156. package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +13 -25
  157. package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +16 -43
  158. package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +12 -33
  159. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +22 -53
  160. package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +9 -22
  161. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +13 -29
  162. package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +10 -17
  163. package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +4 -17
  164. package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +24 -69
  165. package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +10 -27
  166. package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +15 -26
  167. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +101 -0
  168. package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +36 -0
  169. package/dist/bundled/v3/components/OrTagsV3/index.d.ts +1 -0
  170. package/dist/bundled/v3/components/OrTagsV3/index.js +46 -0
  171. package/dist/bundled/v3/components/OrTagsV3/styles.d.ts +4 -0
  172. package/dist/bundled/v3/components/OrTagsV3/styles.js +26 -0
  173. package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +4 -10
  174. package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +4 -10
  175. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +11 -24
  176. package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +37 -85
  177. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +32 -73
  178. package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +55 -137
  179. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +25 -79
  180. package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +11 -31
  181. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +25 -55
  182. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +24 -54
  183. package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +16 -38
  184. package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +14 -33
  185. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +4 -10
  186. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +13 -37
  187. package/dist/bundled/v3/components/index.d.ts +4 -1
  188. package/dist/bundled/v3/components/index.js +24 -26
  189. package/dist/bundled/v3/directives/dropdown-close.d.ts +3 -1
  190. package/dist/bundled/v3/directives/dropdown-open.d.ts +3 -1
  191. package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  192. package/dist/bundled/v3/{index-0d224ae5.js → index-cf2c3c27.js} +115 -3
  193. package/dist/bundled/v3/index.js +33 -33
  194. package/dist/bundled/{v2/index-e9f6b2d8.js → v3/lang-0fb8f78b.js} +4009 -73
  195. package/dist/esm/v2/OrCheckboxGroup-f470f938.js +121 -0
  196. package/dist/esm/v2/{OrCheckboxTree-df80d4ab.js → OrCheckboxTree-1304ae59.js} +6 -2
  197. package/dist/esm/v2/{OrConfirm-b62d9ce4.js → OrConfirm-d0d9d56c.js} +2 -2
  198. package/dist/esm/v2/{OrExpansionPanel-7c359bb0.js → OrExpansionPanel-d3a2218d.js} +3 -1
  199. package/dist/esm/v2/OrInlineTextEdit-601163c3.js +400 -0
  200. package/dist/esm/v2/OrRadioGroup-0de37d76.js +120 -0
  201. package/dist/esm/v2/{OrSelect-9d6b3363.js → OrSelect-a4c34099.js} +1 -1
  202. package/dist/esm/v2/{OrSidebar-b8387abe.js → OrSidebar-de938772.js} +1 -1
  203. package/dist/esm/v2/OrTags-4ffaa13b.js +159 -0
  204. package/dist/esm/v2/components/index.d.ts +4 -1
  205. package/dist/esm/v2/components/index.js +10 -29
  206. package/dist/esm/v2/components/or-checkbox-group-v3/index.js +6 -122
  207. package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +1 -2
  208. package/dist/esm/v2/components/or-confirm/index.js +1 -1
  209. package/dist/esm/v2/components/or-expansion-panel-v3/index.js +1 -1
  210. package/dist/esm/v2/components/or-inline-text-edit/index.js +1 -1
  211. package/dist/esm/v2/components/or-radio-group-v3/index.js +6 -120
  212. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  213. package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -1
  214. package/dist/esm/v2/components/or-tag-v3/OrTag.vue.d.ts +5 -5
  215. package/dist/esm/v2/components/or-tags-v3/OrTags.vue.d.ts +80 -0
  216. package/dist/esm/v2/components/or-tags-v3/index.d.ts +1 -0
  217. package/dist/esm/v2/components/or-tags-v3/index.js +19 -0
  218. package/dist/esm/v2/components/or-tags-v3/styles.d.ts +4 -0
  219. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
  220. package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
  221. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
  222. package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
  223. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
  224. package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
  225. package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
  226. package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
  227. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
  228. package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
  229. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
  230. package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
  231. package/dist/esm/v2/index.js +10 -30
  232. package/dist/esm/v3/OrCheckboxGroup-c41a99ba.js +88 -0
  233. package/dist/esm/v3/{OrCheckboxTree-4a85b9b3.js → OrCheckboxTree-fa6288af.js} +6 -2
  234. package/dist/esm/v3/{OrConfirm-1a94bdea.js → OrConfirm-410da5b4.js} +1 -1
  235. package/dist/esm/v3/{OrExpansionPanel-99ca7ed7.js → OrExpansionPanel-c016d8fa.js} +3 -1
  236. package/dist/esm/v3/OrInlineTextEdit-42d59fb9.js +356 -0
  237. package/dist/esm/v3/OrRadioGroup-5d1fe6fd.js +87 -0
  238. package/dist/esm/v3/{OrSelect-3dbddc6b.js → OrSelect-046e8e36.js} +1 -1
  239. package/dist/esm/v3/{OrSidebar-bfd19c4c.js → OrSidebar-3f2502fb.js} +1 -1
  240. package/dist/esm/v3/OrTags-a082de82.js +147 -0
  241. package/dist/esm/v3/components/index.d.ts +4 -1
  242. package/dist/esm/v3/components/index.js +10 -29
  243. package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +11 -26
  244. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +8 -24
  245. package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +20 -33
  246. package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +16 -51
  247. package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +20 -57
  248. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +15 -35
  249. package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +7 -15
  250. package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +21 -47
  251. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -70
  252. package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +6 -14
  253. package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +4 -7
  254. package/dist/esm/v3/components/or-carousel/OrCarousel.vue.d.ts +126 -676
  255. package/dist/esm/v3/components/or-carousel/or-carousel-item/OrCarouselItem.vue.d.ts +1 -1
  256. package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +15 -35
  257. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +6 -24
  258. package/dist/esm/v3/components/or-checkbox-group-v3/index.js +6 -89
  259. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +17 -43
  260. package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +1 -2
  261. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +23 -53
  262. package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +24 -51
  263. package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +9 -25
  264. package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +17 -37
  265. package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +24 -69
  266. package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +17 -39
  267. package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +13 -31
  268. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +8 -30
  269. package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +23 -84
  270. package/dist/esm/v3/components/or-confirm/index.js +1 -1
  271. package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +29 -91
  272. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +25 -81
  273. package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +68 -177
  274. package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +12 -33
  275. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +31 -105
  276. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +11 -28
  277. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +17 -39
  278. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +7 -15
  279. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +23 -85
  280. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +7 -11
  281. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +4 -7
  282. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +11 -28
  283. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +15 -37
  284. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +11 -28
  285. package/dist/esm/v3/components/or-error/OrError.vue.d.ts +4 -8
  286. package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +4 -7
  287. package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +9 -18
  288. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +14 -35
  289. package/dist/esm/v3/components/or-expansion-panel-v3/index.js +1 -1
  290. package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +8 -20
  291. package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +15 -46
  292. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +10 -30
  293. package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +4 -8
  294. package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +9 -18
  295. package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +16 -44
  296. package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +13 -43
  297. package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +8 -10
  298. package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +16 -52
  299. package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +7 -18
  300. package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +7 -16
  301. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +39 -83
  302. package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +43 -95
  303. package/dist/esm/v3/components/or-inline-text-edit/index.js +1 -1
  304. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +39 -79
  305. package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +36 -87
  306. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +7 -22
  307. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +34 -85
  308. package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +9 -20
  309. package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +9 -24
  310. package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +7 -24
  311. package/dist/esm/v3/components/or-list/OrList.vue.d.ts +21 -47
  312. package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +11 -27
  313. package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +10 -26
  314. package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +13 -34
  315. package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +13 -34
  316. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +16 -43
  317. package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +14 -38
  318. package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +15 -31
  319. package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +9 -27
  320. package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +9 -20
  321. package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +24 -70
  322. package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +13 -31
  323. package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +7 -23
  324. package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +6 -16
  325. package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +7 -14
  326. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +27 -75
  327. package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +22 -63
  328. package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +27 -74
  329. package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +20 -56
  330. package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +25 -62
  331. package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +13 -35
  332. package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +9 -26
  333. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +6 -32
  334. package/dist/esm/v3/components/or-radio-group-v3/index.js +6 -87
  335. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +21 -49
  336. package/dist/esm/v3/components/or-search/OrSearch.vue.d.ts +23 -65
  337. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +17 -41
  338. package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +9 -25
  339. package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +8 -20
  340. package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +28 -77
  341. package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +18 -49
  342. package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +4 -16
  343. package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +13 -67
  344. package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +16 -41
  345. package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +16 -35
  346. package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +24 -71
  347. package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +7 -19
  348. package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +11 -24
  349. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +37 -115
  350. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  351. package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +14 -33
  352. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +28 -63
  353. package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -1
  354. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +10 -23
  355. package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +9 -20
  356. package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +9 -22
  357. package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +10 -26
  358. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +13 -28
  359. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +11 -26
  360. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +16 -40
  361. package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +35 -91
  362. package/dist/esm/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +13 -25
  363. package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +16 -43
  364. package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +4 -20
  365. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +4 -26
  366. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +4 -26
  367. package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +6 -22
  368. package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +6 -12
  369. package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +12 -33
  370. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +22 -53
  371. package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +9 -22
  372. package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +13 -29
  373. package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +10 -17
  374. package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +4 -17
  375. package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +24 -69
  376. package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +10 -27
  377. package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +15 -26
  378. package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +36 -0
  379. package/dist/esm/v3/components/or-tags-v3/index.d.ts +1 -0
  380. package/dist/esm/v3/components/or-tags-v3/index.js +18 -0
  381. package/dist/esm/v3/components/or-tags-v3/styles.d.ts +4 -0
  382. package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +4 -10
  383. package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +4 -10
  384. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +11 -24
  385. package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +37 -85
  386. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +32 -73
  387. package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +55 -137
  388. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +25 -79
  389. package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +11 -31
  390. package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +25 -55
  391. package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +16 -38
  392. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +24 -54
  393. package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +14 -33
  394. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +4 -10
  395. package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +13 -37
  396. package/dist/esm/v3/directives/dropdown-close.d.ts +3 -1
  397. package/dist/esm/v3/directives/dropdown-open.d.ts +3 -1
  398. package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  399. package/dist/esm/v3/index.js +10 -30
  400. package/package.json +5 -25
  401. package/src/components/index.ts +4 -1
  402. package/src/components/or-confirm/OrConfirm.vue +1 -1
  403. package/src/components/or-expansion-panel-v3/styles.ts +4 -1
  404. package/src/components/or-inline-text-edit/OrInlineTextEdit.vue +6 -6
  405. package/src/components/or-sidebar-v3/styles.ts +1 -1
  406. package/src/components/or-tag-v3/OrTag.vue +3 -2
  407. package/src/components/or-tags-v3/OrTags.docs.mdx +7 -0
  408. package/src/components/or-tags-v3/OrTags.stories3.ts +101 -0
  409. package/src/components/or-tags-v3/OrTags.vue +129 -0
  410. package/src/components/or-tags-v3/index.ts +1 -0
  411. package/src/components/or-tags-v3/styles.ts +41 -0
  412. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -2178
  413. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -220
  414. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +0 -1
  415. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +0 -70
  416. package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +0 -4
  417. package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +0 -7
  418. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -6
  419. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -38
  420. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  421. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -46
  422. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  423. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  424. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  425. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  426. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  427. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  428. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  429. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  430. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  431. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  432. package/dist/bundled/v2/index-1182caa8.js +0 -9633
  433. package/dist/bundled/v2/index-85c2efe8.js +0 -7122
  434. package/dist/bundled/v2/index-d92d0b48.js +0 -3805
  435. package/dist/bundled/v2/index.es-3f39f316.js +0 -115
  436. package/dist/bundled/v2/markdown-d43767b0.js +0 -17980
  437. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-7e29b3d0.js +0 -237
  438. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-2c009ee0.js +0 -108
  439. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-8bc72542.js +0 -1869
  440. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -283
  441. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -220
  442. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +0 -1
  443. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +0 -86
  444. package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +0 -4
  445. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +0 -7
  446. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -6
  447. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -38
  448. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  449. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -46
  450. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  451. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  452. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  453. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  454. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  455. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  456. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  457. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  458. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  459. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  460. package/dist/bundled/v3/index-1182caa8.js +0 -9633
  461. package/dist/bundled/v3/index-85c2efe8.js +0 -7122
  462. package/dist/bundled/v3/index.es-3f39f316.js +0 -115
  463. package/dist/bundled/v3/markdown-d43767b0.js +0 -17980
  464. package/dist/bundled/v3/useFocusTrap-48767a70.js +0 -1348
  465. package/dist/esm/v2/OrInlineTextEdit-a129aaf1.js +0 -400
  466. package/dist/esm/v2/OrRichTextEditor-95d1070d.js +0 -901
  467. package/dist/esm/v2/codemirrorView-be2c7423.js +0 -353
  468. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -220
  469. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
  470. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -59
  471. package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +0 -4
  472. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  473. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  474. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  475. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  476. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  477. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  478. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  479. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  480. package/dist/esm/v2/flattenDeep-fe0af413.js +0 -6
  481. package/dist/esm/v3/OrInlineTextEdit-4f4ecba4.js +0 -356
  482. package/dist/esm/v3/OrRichTextEditor-bdee1f41.js +0 -834
  483. package/dist/esm/v3/codemirrorView-be2c7423.js +0 -353
  484. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -220
  485. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
  486. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -57
  487. package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +0 -4
  488. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  489. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  490. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  491. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  492. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  493. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  494. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  495. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  496. package/dist/esm/v3/flattenDeep-fe0af413.js +0 -6
  497. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +0 -7
  498. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +0 -142
  499. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -749
  500. package/src/components/or-rich-text-editor-v3/index.ts +0 -1
  501. package/src/components/or-rich-text-editor-v3/props.ts +0 -4
  502. package/src/components/or-rich-text-editor-v3/styles.ts +0 -56
  503. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +0 -40
  504. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +0 -254
  505. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +0 -1
  506. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +0 -213
  507. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +0 -22
  508. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +0 -120
  509. package/dist/bundled/v2/{index-f6664cb1.js → index-968c331a.js} +0 -0
  510. package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-528dd4d5.js → OrCheckboxTree.vue_vue_type_script_lang-46436cf3.js} +1 -1
  511. /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-f1b6ff7d.js → OrExpansionPanel.vue_vue_type_script_lang-d4ed6199.js} +0 -0
  512. /package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-d7f700de.js → OrSidebar.vue_vue_type_script_lang-5723e223.js} +0 -0
  513. /package/dist/bundled/v3/{index-f6664cb1.js → index-968c331a.js} +0 -0
@@ -1,1348 +0,0 @@
1
- import { unrefElement, tryOnScopeDispose } from '@vueuse/core';
2
- import { ref, watch } from 'vue-demi';
3
-
4
- /*!
5
- * tabbable 6.1.1
6
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
7
- */
8
- // NOTE: separate `:not()` selectors has broader browser support than the newer
9
- // `:not([inert], [inert] *)` (Feb 2023)
10
- // CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
11
- // the entire query to fail, resulting in no nodes found, which will break a lot
12
- // of things... so we have to rely on JS to identify nodes inside an inert container
13
- var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
14
- var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
15
- var NoElement = typeof Element === 'undefined';
16
- var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
17
- var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
18
- var _element$getRootNode;
19
- return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
20
- } : function (element) {
21
- return element === null || element === void 0 ? void 0 : element.ownerDocument;
22
- };
23
-
24
- /**
25
- * Determines if a node is inert or in an inert ancestor.
26
- * @param {Element} [node]
27
- * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
28
- * see if any of them are inert. If false, only `node` itself is considered.
29
- * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
30
- * False if `node` is falsy.
31
- */
32
- var isInert = function isInert(node, lookUp) {
33
- var _node$getAttribute;
34
- if (lookUp === void 0) {
35
- lookUp = true;
36
- }
37
- // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
38
- // JS API property; we have to check the attribute, which can either be empty or 'true';
39
- // if it's `null` (not specified) or 'false', it's an active element
40
- var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
41
- var inert = inertAtt === '' || inertAtt === 'true';
42
-
43
- // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
44
- // if it weren't for `matches()` not being a function on shadow roots; the following
45
- // code works for any kind of node
46
- // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
47
- // so it likely would not support `:is([inert] *)` either...
48
- var result = inert || lookUp && node && isInert(node.parentNode); // recursive
49
-
50
- return result;
51
- };
52
-
53
- /**
54
- * Determines if a node's content is editable.
55
- * @param {Element} [node]
56
- * @returns True if it's content-editable; false if it's not or `node` is falsy.
57
- */
58
- var isContentEditable = function isContentEditable(node) {
59
- var _node$getAttribute2;
60
- // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
61
- // to use the attribute directly to check for this, which can either be empty or 'true';
62
- // if it's `null` (not specified) or 'false', it's a non-editable element
63
- var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
64
- return attValue === '' || attValue === 'true';
65
- };
66
-
67
- /**
68
- * @param {Element} el container to check in
69
- * @param {boolean} includeContainer add container to check
70
- * @param {(node: Element) => boolean} filter filter candidates
71
- * @returns {Element[]}
72
- */
73
- var getCandidates = function getCandidates(el, includeContainer, filter) {
74
- // even if `includeContainer=false`, we still have to check it for inertness because
75
- // if it's inert, all its children are inert
76
- if (isInert(el)) {
77
- return [];
78
- }
79
- var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
80
- if (includeContainer && matches.call(el, candidateSelector)) {
81
- candidates.unshift(el);
82
- }
83
- candidates = candidates.filter(filter);
84
- return candidates;
85
- };
86
-
87
- /**
88
- * @callback GetShadowRoot
89
- * @param {Element} element to check for shadow root
90
- * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
91
- */
92
-
93
- /**
94
- * @callback ShadowRootFilter
95
- * @param {Element} shadowHostNode the element which contains shadow content
96
- * @returns {boolean} true if a shadow root could potentially contain valid candidates.
97
- */
98
-
99
- /**
100
- * @typedef {Object} CandidateScope
101
- * @property {Element} scopeParent contains inner candidates
102
- * @property {Element[]} candidates list of candidates found in the scope parent
103
- */
104
-
105
- /**
106
- * @typedef {Object} IterativeOptions
107
- * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
108
- * if a function, implies shadow support is enabled and either returns the shadow root of an element
109
- * or a boolean stating if it has an undisclosed shadow root
110
- * @property {(node: Element) => boolean} filter filter candidates
111
- * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
112
- * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
113
- */
114
-
115
- /**
116
- * @param {Element[]} elements list of element containers to match candidates from
117
- * @param {boolean} includeContainer add container list to check
118
- * @param {IterativeOptions} options
119
- * @returns {Array.<Element|CandidateScope>}
120
- */
121
- var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
122
- var candidates = [];
123
- var elementsToCheck = Array.from(elements);
124
- while (elementsToCheck.length) {
125
- var element = elementsToCheck.shift();
126
- if (isInert(element, false)) {
127
- // no need to look up since we're drilling down
128
- // anything inside this container will also be inert
129
- continue;
130
- }
131
- if (element.tagName === 'SLOT') {
132
- // add shadow dom slot scope (slot itself cannot be focusable)
133
- var assigned = element.assignedElements();
134
- var content = assigned.length ? assigned : element.children;
135
- var nestedCandidates = getCandidatesIteratively(content, true, options);
136
- if (options.flatten) {
137
- candidates.push.apply(candidates, nestedCandidates);
138
- } else {
139
- candidates.push({
140
- scopeParent: element,
141
- candidates: nestedCandidates
142
- });
143
- }
144
- } else {
145
- // check candidate element
146
- var validCandidate = matches.call(element, candidateSelector);
147
- if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
148
- candidates.push(element);
149
- }
150
-
151
- // iterate over shadow content if possible
152
- var shadowRoot = element.shadowRoot ||
153
- // check for an undisclosed shadow
154
- typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
155
-
156
- // no inert look up because we're already drilling down and checking for inertness
157
- // on the way down, so all containers to this root node should have already been
158
- // vetted as non-inert
159
- var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
160
- if (shadowRoot && validShadowRoot) {
161
- // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
162
- // shadow exists, so look at light dom children as fallback BUT create a scope for any
163
- // child candidates found because they're likely slotted elements (elements that are
164
- // children of the web component element (which has the shadow), in the light dom, but
165
- // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
166
- // _after_ we return from this recursive call
167
- var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
168
- if (options.flatten) {
169
- candidates.push.apply(candidates, _nestedCandidates);
170
- } else {
171
- candidates.push({
172
- scopeParent: element,
173
- candidates: _nestedCandidates
174
- });
175
- }
176
- } else {
177
- // there's not shadow so just dig into the element's (light dom) children
178
- // __without__ giving the element special scope treatment
179
- elementsToCheck.unshift.apply(elementsToCheck, element.children);
180
- }
181
- }
182
- }
183
- return candidates;
184
- };
185
- var getTabindex = function getTabindex(node, isScope) {
186
- if (node.tabIndex < 0) {
187
- // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
188
- // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
189
- // yet they are still part of the regular tab order; in FF, they get a default
190
- // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
191
- // order, consider their tab index to be 0.
192
- // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
193
- // so if they don't have a tabindex attribute specifically set, assume it's 0.
194
- //
195
- // isScope is positive for custom element with shadow root or slot that by default
196
- // have tabIndex -1, but need to be sorted by document order in order for their
197
- // content to be inserted in the correct position
198
- if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
199
- return 0;
200
- }
201
- }
202
- return node.tabIndex;
203
- };
204
- var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
205
- return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
206
- };
207
- var isInput = function isInput(node) {
208
- return node.tagName === 'INPUT';
209
- };
210
- var isHiddenInput = function isHiddenInput(node) {
211
- return isInput(node) && node.type === 'hidden';
212
- };
213
- var isDetailsWithSummary = function isDetailsWithSummary(node) {
214
- var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
215
- return child.tagName === 'SUMMARY';
216
- });
217
- return r;
218
- };
219
- var getCheckedRadio = function getCheckedRadio(nodes, form) {
220
- for (var i = 0; i < nodes.length; i++) {
221
- if (nodes[i].checked && nodes[i].form === form) {
222
- return nodes[i];
223
- }
224
- }
225
- };
226
- var isTabbableRadio = function isTabbableRadio(node) {
227
- if (!node.name) {
228
- return true;
229
- }
230
- var radioScope = node.form || getRootNode(node);
231
- var queryRadios = function queryRadios(name) {
232
- return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
233
- };
234
- var radioSet;
235
- if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
236
- radioSet = queryRadios(window.CSS.escape(node.name));
237
- } else {
238
- try {
239
- radioSet = queryRadios(node.name);
240
- } catch (err) {
241
- // eslint-disable-next-line no-console
242
- console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
243
- return false;
244
- }
245
- }
246
- var checked = getCheckedRadio(radioSet, node.form);
247
- return !checked || checked === node;
248
- };
249
- var isRadio = function isRadio(node) {
250
- return isInput(node) && node.type === 'radio';
251
- };
252
- var isNonTabbableRadio = function isNonTabbableRadio(node) {
253
- return isRadio(node) && !isTabbableRadio(node);
254
- };
255
-
256
- // determines if a node is ultimately attached to the window's document
257
- var isNodeAttached = function isNodeAttached(node) {
258
- var _nodeRoot;
259
- // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
260
- // (but NOT _the_ document; see second 'If' comment below for more).
261
- // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
262
- // is attached, and the one we need to check if it's in the document or not (because the
263
- // shadow, and all nodes it contains, is never considered in the document since shadows
264
- // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
265
- // is hidden, or is not in the document itself but is detached, it will affect the shadow's
266
- // visibility, including all the nodes it contains). The host could be any normal node,
267
- // or a custom element (i.e. web component). Either way, that's the one that is considered
268
- // part of the document, not the shadow root, nor any of its children (i.e. the node being
269
- // tested).
270
- // To further complicate things, we have to look all the way up until we find a shadow HOST
271
- // that is attached (or find none) because the node might be in nested shadows...
272
- // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
273
- // document (per the docs) and while it's a Document-type object, that document does not
274
- // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
275
- // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
276
- // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
277
- // node is actually detached.
278
- // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
279
- // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
280
- // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
281
- // `ownerDocument` will be `null`, hence the optional chaining on it.
282
- var nodeRoot = node && getRootNode(node);
283
- var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
284
-
285
- // in some cases, a detached node will return itself as the root instead of a document or
286
- // shadow root object, in which case, we shouldn't try to look further up the host chain
287
- var attached = false;
288
- if (nodeRoot && nodeRoot !== node) {
289
- var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
290
- attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
291
- while (!attached && nodeRootHost) {
292
- var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
293
- // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
294
- // which means we need to get the host's host and check if that parent host is contained
295
- // in (i.e. attached to) the document
296
- nodeRoot = getRootNode(nodeRootHost);
297
- nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
298
- attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
299
- }
300
- }
301
- return attached;
302
- };
303
- var isZeroArea = function isZeroArea(node) {
304
- var _node$getBoundingClie = node.getBoundingClientRect(),
305
- width = _node$getBoundingClie.width,
306
- height = _node$getBoundingClie.height;
307
- return width === 0 && height === 0;
308
- };
309
- var isHidden = function isHidden(node, _ref) {
310
- var displayCheck = _ref.displayCheck,
311
- getShadowRoot = _ref.getShadowRoot;
312
- // NOTE: visibility will be `undefined` if node is detached from the document
313
- // (see notes about this further down), which means we will consider it visible
314
- // (this is legacy behavior from a very long way back)
315
- // NOTE: we check this regardless of `displayCheck="none"` because this is a
316
- // _visibility_ check, not a _display_ check
317
- if (getComputedStyle(node).visibility === 'hidden') {
318
- return true;
319
- }
320
- var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
321
- var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
322
- if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
323
- return true;
324
- }
325
- if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
326
- if (typeof getShadowRoot === 'function') {
327
- // figure out if we should consider the node to be in an undisclosed shadow and use the
328
- // 'non-zero-area' fallback
329
- var originalNode = node;
330
- while (node) {
331
- var parentElement = node.parentElement;
332
- var rootNode = getRootNode(node);
333
- if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
334
- ) {
335
- // node has an undisclosed shadow which means we can only treat it as a black box, so we
336
- // fall back to a non-zero-area test
337
- return isZeroArea(node);
338
- } else if (node.assignedSlot) {
339
- // iterate up slot
340
- node = node.assignedSlot;
341
- } else if (!parentElement && rootNode !== node.ownerDocument) {
342
- // cross shadow boundary
343
- node = rootNode.host;
344
- } else {
345
- // iterate up normal dom
346
- node = parentElement;
347
- }
348
- }
349
- node = originalNode;
350
- }
351
- // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
352
- // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
353
- // it might be a falsy value, which means shadow DOM support is disabled
354
-
355
- // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
356
- // now we can just test to see if it would normally be visible or not, provided it's
357
- // attached to the main document.
358
- // NOTE: We must consider case where node is inside a shadow DOM and given directly to
359
- // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
360
-
361
- if (isNodeAttached(node)) {
362
- // this works wherever the node is: if there's at least one client rect, it's
363
- // somehow displayed; it also covers the CSS 'display: contents' case where the
364
- // node itself is hidden in place of its contents; and there's no need to search
365
- // up the hierarchy either
366
- return !node.getClientRects().length;
367
- }
368
-
369
- // Else, the node isn't attached to the document, which means the `getClientRects()`
370
- // API will __always__ return zero rects (this can happen, for example, if React
371
- // is used to render nodes onto a detached tree, as confirmed in this thread:
372
- // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
373
- //
374
- // It also means that even window.getComputedStyle(node).display will return `undefined`
375
- // because styles are only computed for nodes that are in the document.
376
- //
377
- // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
378
- // somehow. Though it was never stated officially, anyone who has ever used tabbable
379
- // APIs on nodes in detached containers has actually implicitly used tabbable in what
380
- // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
381
- // considering __everything__ to be visible because of the innability to determine styles.
382
- //
383
- // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
384
- // nodes as visible with the 'none' fallback.__
385
- if (displayCheck !== 'legacy-full') {
386
- return true; // hidden
387
- }
388
- // else, fallback to 'none' mode and consider the node visible
389
- } else if (displayCheck === 'non-zero-area') {
390
- // NOTE: Even though this tests that the node's client rect is non-zero to determine
391
- // whether it's displayed, and that a detached node will __always__ have a zero-area
392
- // client rect, we don't special-case for whether the node is attached or not. In
393
- // this mode, we do want to consider nodes that have a zero area to be hidden at all
394
- // times, and that includes attached or not.
395
- return isZeroArea(node);
396
- }
397
-
398
- // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
399
- // it's visible
400
- return false;
401
- };
402
-
403
- // form fields (nested) inside a disabled fieldset are not focusable/tabbable
404
- // unless they are in the _first_ <legend> element of the top-most disabled
405
- // fieldset
406
- var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
407
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
408
- var parentNode = node.parentElement;
409
- // check if `node` is contained in a disabled <fieldset>
410
- while (parentNode) {
411
- if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
412
- // look for the first <legend> among the children of the disabled <fieldset>
413
- for (var i = 0; i < parentNode.children.length; i++) {
414
- var child = parentNode.children.item(i);
415
- // when the first <legend> (in document order) is found
416
- if (child.tagName === 'LEGEND') {
417
- // if its parent <fieldset> is not nested in another disabled <fieldset>,
418
- // return whether `node` is a descendant of its first <legend>
419
- return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
420
- }
421
- }
422
- // the disabled <fieldset> containing `node` has no <legend>
423
- return true;
424
- }
425
- parentNode = parentNode.parentElement;
426
- }
427
- }
428
-
429
- // else, node's tabbable/focusable state should not be affected by a fieldset's
430
- // enabled/disabled state
431
- return false;
432
- };
433
- var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
434
- if (node.disabled ||
435
- // we must do an inert look up to filter out any elements inside an inert ancestor
436
- // because we're limited in the type of selectors we can use in JSDom (see related
437
- // note related to `candidateSelectors`)
438
- isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
439
- // For a details element with a summary, the summary element gets the focus
440
- isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
441
- return false;
442
- }
443
- return true;
444
- };
445
- var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
446
- if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
447
- return false;
448
- }
449
- return true;
450
- };
451
- var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
452
- var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
453
- if (isNaN(tabIndex) || tabIndex >= 0) {
454
- return true;
455
- }
456
- // If a custom element has an explicit negative tabindex,
457
- // browsers will not allow tab targeting said element's children.
458
- return false;
459
- };
460
-
461
- /**
462
- * @param {Array.<Element|CandidateScope>} candidates
463
- * @returns Element[]
464
- */
465
- var sortByOrder = function sortByOrder(candidates) {
466
- var regularTabbables = [];
467
- var orderedTabbables = [];
468
- candidates.forEach(function (item, i) {
469
- var isScope = !!item.scopeParent;
470
- var element = isScope ? item.scopeParent : item;
471
- var candidateTabindex = getTabindex(element, isScope);
472
- var elements = isScope ? sortByOrder(item.candidates) : element;
473
- if (candidateTabindex === 0) {
474
- isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
475
- } else {
476
- orderedTabbables.push({
477
- documentOrder: i,
478
- tabIndex: candidateTabindex,
479
- item: item,
480
- isScope: isScope,
481
- content: elements
482
- });
483
- }
484
- });
485
- return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
486
- sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
487
- return acc;
488
- }, []).concat(regularTabbables);
489
- };
490
- var tabbable = function tabbable(el, options) {
491
- options = options || {};
492
- var candidates;
493
- if (options.getShadowRoot) {
494
- candidates = getCandidatesIteratively([el], options.includeContainer, {
495
- filter: isNodeMatchingSelectorTabbable.bind(null, options),
496
- flatten: false,
497
- getShadowRoot: options.getShadowRoot,
498
- shadowRootFilter: isValidShadowRootTabbable
499
- });
500
- } else {
501
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
502
- }
503
- return sortByOrder(candidates);
504
- };
505
- var focusable = function focusable(el, options) {
506
- options = options || {};
507
- var candidates;
508
- if (options.getShadowRoot) {
509
- candidates = getCandidatesIteratively([el], options.includeContainer, {
510
- filter: isNodeMatchingSelectorFocusable.bind(null, options),
511
- flatten: true,
512
- getShadowRoot: options.getShadowRoot
513
- });
514
- } else {
515
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
516
- }
517
- return candidates;
518
- };
519
- var isTabbable = function isTabbable(node, options) {
520
- options = options || {};
521
- if (!node) {
522
- throw new Error('No node provided');
523
- }
524
- if (matches.call(node, candidateSelector) === false) {
525
- return false;
526
- }
527
- return isNodeMatchingSelectorTabbable(options, node);
528
- };
529
- var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
530
- var isFocusable = function isFocusable(node, options) {
531
- options = options || {};
532
- if (!node) {
533
- throw new Error('No node provided');
534
- }
535
- if (matches.call(node, focusableCandidateSelector) === false) {
536
- return false;
537
- }
538
- return isNodeMatchingSelectorFocusable(options, node);
539
- };
540
-
541
- /*!
542
- * focus-trap 7.2.0
543
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
544
- */
545
- function ownKeys(object, enumerableOnly) {
546
- var keys = Object.keys(object);
547
- if (Object.getOwnPropertySymbols) {
548
- var symbols = Object.getOwnPropertySymbols(object);
549
- enumerableOnly && (symbols = symbols.filter(function (sym) {
550
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
551
- })), keys.push.apply(keys, symbols);
552
- }
553
- return keys;
554
- }
555
- function _objectSpread2(target) {
556
- for (var i = 1; i < arguments.length; i++) {
557
- var source = null != arguments[i] ? arguments[i] : {};
558
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
559
- _defineProperty(target, key, source[key]);
560
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
561
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
562
- });
563
- }
564
- return target;
565
- }
566
- function _defineProperty(obj, key, value) {
567
- key = _toPropertyKey(key);
568
- if (key in obj) {
569
- Object.defineProperty(obj, key, {
570
- value: value,
571
- enumerable: true,
572
- configurable: true,
573
- writable: true
574
- });
575
- } else {
576
- obj[key] = value;
577
- }
578
- return obj;
579
- }
580
- function _toPrimitive(input, hint) {
581
- if (typeof input !== "object" || input === null) return input;
582
- var prim = input[Symbol.toPrimitive];
583
- if (prim !== undefined) {
584
- var res = prim.call(input, hint || "default");
585
- if (typeof res !== "object") return res;
586
- throw new TypeError("@@toPrimitive must return a primitive value.");
587
- }
588
- return (hint === "string" ? String : Number)(input);
589
- }
590
- function _toPropertyKey(arg) {
591
- var key = _toPrimitive(arg, "string");
592
- return typeof key === "symbol" ? key : String(key);
593
- }
594
- var activeFocusTraps = {
595
- activateTrap: function activateTrap(trapStack, trap) {
596
- if (trapStack.length > 0) {
597
- var activeTrap = trapStack[trapStack.length - 1];
598
- if (activeTrap !== trap) {
599
- activeTrap.pause();
600
- }
601
- }
602
- var trapIndex = trapStack.indexOf(trap);
603
- if (trapIndex === -1) {
604
- trapStack.push(trap);
605
- } else {
606
- // move this existing trap to the front of the queue
607
- trapStack.splice(trapIndex, 1);
608
- trapStack.push(trap);
609
- }
610
- },
611
- deactivateTrap: function deactivateTrap(trapStack, trap) {
612
- var trapIndex = trapStack.indexOf(trap);
613
- if (trapIndex !== -1) {
614
- trapStack.splice(trapIndex, 1);
615
- }
616
- if (trapStack.length > 0) {
617
- trapStack[trapStack.length - 1].unpause();
618
- }
619
- }
620
- };
621
- var isSelectableInput = function isSelectableInput(node) {
622
- return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
623
- };
624
- var isEscapeEvent = function isEscapeEvent(e) {
625
- return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
626
- };
627
- var isTabEvent = function isTabEvent(e) {
628
- return e.key === 'Tab' || e.keyCode === 9;
629
- };
630
-
631
- // checks for TAB by default
632
- var isKeyForward = function isKeyForward(e) {
633
- return isTabEvent(e) && !e.shiftKey;
634
- };
635
-
636
- // checks for SHIFT+TAB by default
637
- var isKeyBackward = function isKeyBackward(e) {
638
- return isTabEvent(e) && e.shiftKey;
639
- };
640
- var delay = function delay(fn) {
641
- return setTimeout(fn, 0);
642
- };
643
-
644
- // Array.find/findIndex() are not supported on IE; this replicates enough
645
- // of Array.findIndex() for our needs
646
- var findIndex = function findIndex(arr, fn) {
647
- var idx = -1;
648
- arr.every(function (value, i) {
649
- if (fn(value)) {
650
- idx = i;
651
- return false; // break
652
- }
653
-
654
- return true; // next
655
- });
656
-
657
- return idx;
658
- };
659
-
660
- /**
661
- * Get an option's value when it could be a plain value, or a handler that provides
662
- * the value.
663
- * @param {*} value Option's value to check.
664
- * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
665
- * @returns {*} The `value`, or the handler's returned value.
666
- */
667
- var valueOrHandler = function valueOrHandler(value) {
668
- for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
669
- params[_key - 1] = arguments[_key];
670
- }
671
- return typeof value === 'function' ? value.apply(void 0, params) : value;
672
- };
673
- var getActualTarget = function getActualTarget(event) {
674
- // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
675
- // shadow host. However, event.target.composedPath() will be an array of
676
- // nodes "clicked" from inner-most (the actual element inside the shadow) to
677
- // outer-most (the host HTML document). If we have access to composedPath(),
678
- // then use its first element; otherwise, fall back to event.target (and
679
- // this only works for an _open_ shadow DOM; otherwise,
680
- // composedPath()[0] === event.target always).
681
- return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
682
- };
683
-
684
- // NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this
685
- // current instance use the same stack if `userOptions.trapStack` isn't specified
686
- var internalTrapStack = [];
687
- var createFocusTrap = function createFocusTrap(elements, userOptions) {
688
- // SSR: a live trap shouldn't be created in this type of environment so this
689
- // should be safe code to execute if the `document` option isn't specified
690
- var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
691
- var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;
692
- var config = _objectSpread2({
693
- returnFocusOnDeactivate: true,
694
- escapeDeactivates: true,
695
- delayInitialFocus: true,
696
- isKeyForward: isKeyForward,
697
- isKeyBackward: isKeyBackward
698
- }, userOptions);
699
- var state = {
700
- // containers given to createFocusTrap()
701
- // @type {Array<HTMLElement>}
702
- containers: [],
703
- // list of objects identifying tabbable nodes in `containers` in the trap
704
- // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
705
- // is active, but the trap should never get to a state where there isn't at least one group
706
- // with at least one tabbable node in it (that would lead to an error condition that would
707
- // result in an error being thrown)
708
- // @type {Array<{
709
- // container: HTMLElement,
710
- // tabbableNodes: Array<HTMLElement>, // empty if none
711
- // focusableNodes: Array<HTMLElement>, // empty if none
712
- // firstTabbableNode: HTMLElement|null,
713
- // lastTabbableNode: HTMLElement|null,
714
- // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
715
- // }>}
716
- containerGroups: [],
717
- // same order/length as `containers` list
718
-
719
- // references to objects in `containerGroups`, but only those that actually have
720
- // tabbable nodes in them
721
- // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
722
- // the same length
723
- tabbableGroups: [],
724
- nodeFocusedBeforeActivation: null,
725
- mostRecentlyFocusedNode: null,
726
- active: false,
727
- paused: false,
728
- // timer ID for when delayInitialFocus is true and initial focus in this trap
729
- // has been delayed during activation
730
- delayInitialFocusTimer: undefined
731
- };
732
- var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
733
-
734
- /**
735
- * Gets a configuration option value.
736
- * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
737
- * value will be taken from this object. Otherwise, value will be taken from base configuration.
738
- * @param {string} optionName Name of the option whose value is sought.
739
- * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
740
- * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
741
- */
742
- var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
743
- return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
744
- };
745
-
746
- /**
747
- * Finds the index of the container that contains the element.
748
- * @param {HTMLElement} element
749
- * @returns {number} Index of the container in either `state.containers` or
750
- * `state.containerGroups` (the order/length of these lists are the same); -1
751
- * if the element isn't found.
752
- */
753
- var findContainerIndex = function findContainerIndex(element) {
754
- // NOTE: search `containerGroups` because it's possible a group contains no tabbable
755
- // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
756
- // and we still need to find the element in there
757
- return state.containerGroups.findIndex(function (_ref) {
758
- var container = _ref.container,
759
- tabbableNodes = _ref.tabbableNodes;
760
- return container.contains(element) ||
761
- // fall back to explicit tabbable search which will take into consideration any
762
- // web components if the `tabbableOptions.getShadowRoot` option was used for
763
- // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
764
- // look inside web components even if open)
765
- tabbableNodes.find(function (node) {
766
- return node === element;
767
- });
768
- });
769
- };
770
-
771
- /**
772
- * Gets the node for the given option, which is expected to be an option that
773
- * can be either a DOM node, a string that is a selector to get a node, `false`
774
- * (if a node is explicitly NOT given), or a function that returns any of these
775
- * values.
776
- * @param {string} optionName
777
- * @returns {undefined | false | HTMLElement | SVGElement} Returns
778
- * `undefined` if the option is not specified; `false` if the option
779
- * resolved to `false` (node explicitly not given); otherwise, the resolved
780
- * DOM node.
781
- * @throws {Error} If the option is set, not `false`, and is not, or does not
782
- * resolve to a node.
783
- */
784
- var getNodeForOption = function getNodeForOption(optionName) {
785
- var optionValue = config[optionName];
786
- if (typeof optionValue === 'function') {
787
- for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
788
- params[_key2 - 1] = arguments[_key2];
789
- }
790
- optionValue = optionValue.apply(void 0, params);
791
- }
792
- if (optionValue === true) {
793
- optionValue = undefined; // use default value
794
- }
795
-
796
- if (!optionValue) {
797
- if (optionValue === undefined || optionValue === false) {
798
- return optionValue;
799
- }
800
- // else, empty string (invalid), null (invalid), 0 (invalid)
801
-
802
- throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
803
- }
804
- var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
805
-
806
- if (typeof optionValue === 'string') {
807
- node = doc.querySelector(optionValue); // resolve to node, or null if fails
808
- if (!node) {
809
- throw new Error("`".concat(optionName, "` as selector refers to no known node"));
810
- }
811
- }
812
- return node;
813
- };
814
- var getInitialFocusNode = function getInitialFocusNode() {
815
- var node = getNodeForOption('initialFocus');
816
-
817
- // false explicitly indicates we want no initialFocus at all
818
- if (node === false) {
819
- return false;
820
- }
821
- if (node === undefined) {
822
- // option not specified: use fallback options
823
- if (findContainerIndex(doc.activeElement) >= 0) {
824
- node = doc.activeElement;
825
- } else {
826
- var firstTabbableGroup = state.tabbableGroups[0];
827
- var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
828
-
829
- // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
830
- node = firstTabbableNode || getNodeForOption('fallbackFocus');
831
- }
832
- }
833
- if (!node) {
834
- throw new Error('Your focus-trap needs to have at least one focusable element');
835
- }
836
- return node;
837
- };
838
- var updateTabbableNodes = function updateTabbableNodes() {
839
- state.containerGroups = state.containers.map(function (container) {
840
- var tabbableNodes = tabbable(container, config.tabbableOptions);
841
-
842
- // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
843
- // are a superset of tabbable nodes
844
- var focusableNodes = focusable(container, config.tabbableOptions);
845
- return {
846
- container: container,
847
- tabbableNodes: tabbableNodes,
848
- focusableNodes: focusableNodes,
849
- firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
850
- lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
851
- /**
852
- * Finds the __tabbable__ node that follows the given node in the specified direction,
853
- * in this container, if any.
854
- * @param {HTMLElement} node
855
- * @param {boolean} [forward] True if going in forward tab order; false if going
856
- * in reverse.
857
- * @returns {HTMLElement|undefined} The next tabbable node, if any.
858
- */
859
- nextTabbableNode: function nextTabbableNode(node) {
860
- var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
861
- // NOTE: If tabindex is positive (in order to manipulate the tab order separate
862
- // from the DOM order), this __will not work__ because the list of focusableNodes,
863
- // while it contains tabbable nodes, does not sort its nodes in any order other
864
- // than DOM order, because it can't: Where would you place focusable (but not
865
- // tabbable) nodes in that order? They have no order, because they aren't tabbale...
866
- // Support for positive tabindex is already broken and hard to manage (possibly
867
- // not supportable, TBD), so this isn't going to make things worse than they
868
- // already are, and at least makes things better for the majority of cases where
869
- // tabindex is either 0/unset or negative.
870
- // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
871
- var nodeIdx = focusableNodes.findIndex(function (n) {
872
- return n === node;
873
- });
874
- if (nodeIdx < 0) {
875
- return undefined;
876
- }
877
- if (forward) {
878
- return focusableNodes.slice(nodeIdx + 1).find(function (n) {
879
- return isTabbable(n, config.tabbableOptions);
880
- });
881
- }
882
- return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
883
- return isTabbable(n, config.tabbableOptions);
884
- });
885
- }
886
- };
887
- });
888
- state.tabbableGroups = state.containerGroups.filter(function (group) {
889
- return group.tabbableNodes.length > 0;
890
- });
891
-
892
- // throw if no groups have tabbable nodes and we don't have a fallback focus node either
893
- if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
894
- ) {
895
- throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
896
- }
897
- };
898
- var tryFocus = function tryFocus(node) {
899
- if (node === false) {
900
- return;
901
- }
902
- if (node === doc.activeElement) {
903
- return;
904
- }
905
- if (!node || !node.focus) {
906
- tryFocus(getInitialFocusNode());
907
- return;
908
- }
909
- node.focus({
910
- preventScroll: !!config.preventScroll
911
- });
912
- state.mostRecentlyFocusedNode = node;
913
- if (isSelectableInput(node)) {
914
- node.select();
915
- }
916
- };
917
- var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
918
- var node = getNodeForOption('setReturnFocus', previousActiveElement);
919
- return node ? node : node === false ? false : previousActiveElement;
920
- };
921
-
922
- // This needs to be done on mousedown and touchstart instead of click
923
- // so that it precedes the focus event.
924
- var checkPointerDown = function checkPointerDown(e) {
925
- var target = getActualTarget(e);
926
- if (findContainerIndex(target) >= 0) {
927
- // allow the click since it ocurred inside the trap
928
- return;
929
- }
930
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
931
- // immediately deactivate the trap
932
- trap.deactivate({
933
- // if, on deactivation, we should return focus to the node originally-focused
934
- // when the trap was activated (or the configured `setReturnFocus` node),
935
- // then assume it's also OK to return focus to the outside node that was
936
- // just clicked, causing deactivation, as long as that node is focusable;
937
- // if it isn't focusable, then return focus to the original node focused
938
- // on activation (or the configured `setReturnFocus` node)
939
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
940
- // which will result in the outside click setting focus to the node
941
- // that was clicked, whether it's focusable or not; by setting
942
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
943
- // on activation (or the configured `setReturnFocus` node)
944
- returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
945
- });
946
- return;
947
- }
948
-
949
- // This is needed for mobile devices.
950
- // (If we'll only let `click` events through,
951
- // then on mobile they will be blocked anyways if `touchstart` is blocked.)
952
- if (valueOrHandler(config.allowOutsideClick, e)) {
953
- // allow the click outside the trap to take place
954
- return;
955
- }
956
-
957
- // otherwise, prevent the click
958
- e.preventDefault();
959
- };
960
-
961
- // In case focus escapes the trap for some strange reason, pull it back in.
962
- var checkFocusIn = function checkFocusIn(e) {
963
- var target = getActualTarget(e);
964
- var targetContained = findContainerIndex(target) >= 0;
965
-
966
- // In Firefox when you Tab out of an iframe the Document is briefly focused.
967
- if (targetContained || target instanceof Document) {
968
- if (targetContained) {
969
- state.mostRecentlyFocusedNode = target;
970
- }
971
- } else {
972
- // escaped! pull it back in to where it just left
973
- e.stopImmediatePropagation();
974
- tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
975
- }
976
- };
977
-
978
- // Hijack key nav events on the first and last focusable nodes of the trap,
979
- // in order to prevent focus from escaping. If it escapes for even a
980
- // moment it can end up scrolling the page and causing confusion so we
981
- // kind of need to capture the action at the keydown phase.
982
- var checkKeyNav = function checkKeyNav(event) {
983
- var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
984
- var target = getActualTarget(event);
985
- updateTabbableNodes();
986
- var destinationNode = null;
987
- if (state.tabbableGroups.length > 0) {
988
- // make sure the target is actually contained in a group
989
- // NOTE: the target may also be the container itself if it's focusable
990
- // with tabIndex='-1' and was given initial focus
991
- var containerIndex = findContainerIndex(target);
992
- var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
993
- if (containerIndex < 0) {
994
- // target not found in any group: quite possible focus has escaped the trap,
995
- // so bring it back into...
996
- if (isBackward) {
997
- // ...the last node in the last group
998
- destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
999
- } else {
1000
- // ...the first node in the first group
1001
- destinationNode = state.tabbableGroups[0].firstTabbableNode;
1002
- }
1003
- } else if (isBackward) {
1004
- // REVERSE
1005
-
1006
- // is the target the first tabbable node in a group?
1007
- var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
1008
- var firstTabbableNode = _ref2.firstTabbableNode;
1009
- return target === firstTabbableNode;
1010
- });
1011
- if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
1012
- // an exception case where the target is either the container itself, or
1013
- // a non-tabbable node that was given focus (i.e. tabindex is negative
1014
- // and user clicked on it or node was programmatically given focus)
1015
- // and is not followed by any other tabbable node, in which
1016
- // case, we should handle shift+tab as if focus were on the container's
1017
- // first tabbable node, and go to the last tabbable node of the LAST group
1018
- startOfGroupIndex = containerIndex;
1019
- }
1020
- if (startOfGroupIndex >= 0) {
1021
- // YES: then shift+tab should go to the last tabbable node in the
1022
- // previous group (and wrap around to the last tabbable node of
1023
- // the LAST group if it's the first tabbable node of the FIRST group)
1024
- var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
1025
- var destinationGroup = state.tabbableGroups[destinationGroupIndex];
1026
- destinationNode = destinationGroup.lastTabbableNode;
1027
- } else if (!isTabEvent(event)) {
1028
- // user must have customized the nav keys so we have to move focus manually _within_
1029
- // the active group: do this based on the order determined by tabbable()
1030
- destinationNode = containerGroup.nextTabbableNode(target, false);
1031
- }
1032
- } else {
1033
- // FORWARD
1034
-
1035
- // is the target the last tabbable node in a group?
1036
- var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
1037
- var lastTabbableNode = _ref3.lastTabbableNode;
1038
- return target === lastTabbableNode;
1039
- });
1040
- if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
1041
- // an exception case where the target is the container itself, or
1042
- // a non-tabbable node that was given focus (i.e. tabindex is negative
1043
- // and user clicked on it or node was programmatically given focus)
1044
- // and is not followed by any other tabbable node, in which
1045
- // case, we should handle tab as if focus were on the container's
1046
- // last tabbable node, and go to the first tabbable node of the FIRST group
1047
- lastOfGroupIndex = containerIndex;
1048
- }
1049
- if (lastOfGroupIndex >= 0) {
1050
- // YES: then tab should go to the first tabbable node in the next
1051
- // group (and wrap around to the first tabbable node of the FIRST
1052
- // group if it's the last tabbable node of the LAST group)
1053
- var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
1054
- var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
1055
- destinationNode = _destinationGroup.firstTabbableNode;
1056
- } else if (!isTabEvent(event)) {
1057
- // user must have customized the nav keys so we have to move focus manually _within_
1058
- // the active group: do this based on the order determined by tabbable()
1059
- destinationNode = containerGroup.nextTabbableNode(target);
1060
- }
1061
- }
1062
- } else {
1063
- // no groups available
1064
- // NOTE: the fallbackFocus option does not support returning false to opt-out
1065
- destinationNode = getNodeForOption('fallbackFocus');
1066
- }
1067
- if (destinationNode) {
1068
- if (isTabEvent(event)) {
1069
- // since tab natively moves focus, we wouldn't have a destination node unless we
1070
- // were on the edge of a container and had to move to the next/previous edge, in
1071
- // which case we want to prevent default to keep the browser from moving focus
1072
- // to where it normally would
1073
- event.preventDefault();
1074
- }
1075
- tryFocus(destinationNode);
1076
- }
1077
- // else, let the browser take care of [shift+]tab and move the focus
1078
- };
1079
-
1080
- var checkKey = function checkKey(event) {
1081
- if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
1082
- event.preventDefault();
1083
- trap.deactivate();
1084
- return;
1085
- }
1086
- if (config.isKeyForward(event) || config.isKeyBackward(event)) {
1087
- checkKeyNav(event, config.isKeyBackward(event));
1088
- }
1089
- };
1090
- var checkClick = function checkClick(e) {
1091
- var target = getActualTarget(e);
1092
- if (findContainerIndex(target) >= 0) {
1093
- return;
1094
- }
1095
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
1096
- return;
1097
- }
1098
- if (valueOrHandler(config.allowOutsideClick, e)) {
1099
- return;
1100
- }
1101
- e.preventDefault();
1102
- e.stopImmediatePropagation();
1103
- };
1104
-
1105
- //
1106
- // EVENT LISTENERS
1107
- //
1108
-
1109
- var addListeners = function addListeners() {
1110
- if (!state.active) {
1111
- return;
1112
- }
1113
-
1114
- // There can be only one listening focus trap at a time
1115
- activeFocusTraps.activateTrap(trapStack, trap);
1116
-
1117
- // Delay ensures that the focused element doesn't capture the event
1118
- // that caused the focus trap activation.
1119
- state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
1120
- tryFocus(getInitialFocusNode());
1121
- }) : tryFocus(getInitialFocusNode());
1122
- doc.addEventListener('focusin', checkFocusIn, true);
1123
- doc.addEventListener('mousedown', checkPointerDown, {
1124
- capture: true,
1125
- passive: false
1126
- });
1127
- doc.addEventListener('touchstart', checkPointerDown, {
1128
- capture: true,
1129
- passive: false
1130
- });
1131
- doc.addEventListener('click', checkClick, {
1132
- capture: true,
1133
- passive: false
1134
- });
1135
- doc.addEventListener('keydown', checkKey, {
1136
- capture: true,
1137
- passive: false
1138
- });
1139
- return trap;
1140
- };
1141
- var removeListeners = function removeListeners() {
1142
- if (!state.active) {
1143
- return;
1144
- }
1145
- doc.removeEventListener('focusin', checkFocusIn, true);
1146
- doc.removeEventListener('mousedown', checkPointerDown, true);
1147
- doc.removeEventListener('touchstart', checkPointerDown, true);
1148
- doc.removeEventListener('click', checkClick, true);
1149
- doc.removeEventListener('keydown', checkKey, true);
1150
- return trap;
1151
- };
1152
-
1153
- //
1154
- // TRAP DEFINITION
1155
- //
1156
-
1157
- trap = {
1158
- get active() {
1159
- return state.active;
1160
- },
1161
- get paused() {
1162
- return state.paused;
1163
- },
1164
- activate: function activate(activateOptions) {
1165
- if (state.active) {
1166
- return this;
1167
- }
1168
- var onActivate = getOption(activateOptions, 'onActivate');
1169
- var onPostActivate = getOption(activateOptions, 'onPostActivate');
1170
- var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
1171
- if (!checkCanFocusTrap) {
1172
- updateTabbableNodes();
1173
- }
1174
- state.active = true;
1175
- state.paused = false;
1176
- state.nodeFocusedBeforeActivation = doc.activeElement;
1177
- if (onActivate) {
1178
- onActivate();
1179
- }
1180
- var finishActivation = function finishActivation() {
1181
- if (checkCanFocusTrap) {
1182
- updateTabbableNodes();
1183
- }
1184
- addListeners();
1185
- if (onPostActivate) {
1186
- onPostActivate();
1187
- }
1188
- };
1189
- if (checkCanFocusTrap) {
1190
- checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
1191
- return this;
1192
- }
1193
- finishActivation();
1194
- return this;
1195
- },
1196
- deactivate: function deactivate(deactivateOptions) {
1197
- if (!state.active) {
1198
- return this;
1199
- }
1200
- var options = _objectSpread2({
1201
- onDeactivate: config.onDeactivate,
1202
- onPostDeactivate: config.onPostDeactivate,
1203
- checkCanReturnFocus: config.checkCanReturnFocus
1204
- }, deactivateOptions);
1205
- clearTimeout(state.delayInitialFocusTimer); // noop if undefined
1206
- state.delayInitialFocusTimer = undefined;
1207
- removeListeners();
1208
- state.active = false;
1209
- state.paused = false;
1210
- activeFocusTraps.deactivateTrap(trapStack, trap);
1211
- var onDeactivate = getOption(options, 'onDeactivate');
1212
- var onPostDeactivate = getOption(options, 'onPostDeactivate');
1213
- var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
1214
- var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
1215
- if (onDeactivate) {
1216
- onDeactivate();
1217
- }
1218
- var finishDeactivation = function finishDeactivation() {
1219
- delay(function () {
1220
- if (returnFocus) {
1221
- tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
1222
- }
1223
- if (onPostDeactivate) {
1224
- onPostDeactivate();
1225
- }
1226
- });
1227
- };
1228
- if (returnFocus && checkCanReturnFocus) {
1229
- checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
1230
- return this;
1231
- }
1232
- finishDeactivation();
1233
- return this;
1234
- },
1235
- pause: function pause() {
1236
- if (state.paused || !state.active) {
1237
- return this;
1238
- }
1239
- state.paused = true;
1240
- removeListeners();
1241
- return this;
1242
- },
1243
- unpause: function unpause() {
1244
- if (!state.paused || !state.active) {
1245
- return this;
1246
- }
1247
- state.paused = false;
1248
- updateTabbableNodes();
1249
- addListeners();
1250
- return this;
1251
- },
1252
- updateContainerElements: function updateContainerElements(containerElements) {
1253
- var elementsAsArray = [].concat(containerElements).filter(Boolean);
1254
- state.containers = elementsAsArray.map(function (element) {
1255
- return typeof element === 'string' ? doc.querySelector(element) : element;
1256
- });
1257
- if (state.active) {
1258
- updateTabbableNodes();
1259
- }
1260
- return this;
1261
- }
1262
- };
1263
-
1264
- // initialize container elements
1265
- trap.updateContainerElements(elements);
1266
- return trap;
1267
- };
1268
-
1269
- var __defProp = Object.defineProperty;
1270
- var __defProps = Object.defineProperties;
1271
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1272
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1273
- var __hasOwnProp = Object.prototype.hasOwnProperty;
1274
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
1275
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1276
- var __spreadValues = (a, b) => {
1277
- for (var prop in b || (b = {}))
1278
- if (__hasOwnProp.call(b, prop))
1279
- __defNormalProp(a, prop, b[prop]);
1280
- if (__getOwnPropSymbols)
1281
- for (var prop of __getOwnPropSymbols(b)) {
1282
- if (__propIsEnum.call(b, prop))
1283
- __defNormalProp(a, prop, b[prop]);
1284
- }
1285
- return a;
1286
- };
1287
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1288
- var __objRest = (source, exclude) => {
1289
- var target = {};
1290
- for (var prop in source)
1291
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
1292
- target[prop] = source[prop];
1293
- if (source != null && __getOwnPropSymbols)
1294
- for (var prop of __getOwnPropSymbols(source)) {
1295
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
1296
- target[prop] = source[prop];
1297
- }
1298
- return target;
1299
- };
1300
- function useFocusTrap(target, options = {}) {
1301
- let trap;
1302
- const _a = options, { immediate } = _a, focusTrapOptions = __objRest(_a, ["immediate"]);
1303
- const hasFocus = ref(false);
1304
- const isPaused = ref(false);
1305
- const activate = (opts) => trap && trap.activate(opts);
1306
- const deactivate = (opts) => trap && trap.deactivate(opts);
1307
- const pause = () => {
1308
- if (trap) {
1309
- trap.pause();
1310
- isPaused.value = true;
1311
- }
1312
- };
1313
- const unpause = () => {
1314
- if (trap) {
1315
- trap.unpause();
1316
- isPaused.value = false;
1317
- }
1318
- };
1319
- watch(() => unrefElement(target), (el) => {
1320
- if (!el)
1321
- return;
1322
- trap = createFocusTrap(el, __spreadProps(__spreadValues({}, focusTrapOptions), {
1323
- onActivate() {
1324
- hasFocus.value = true;
1325
- if (options.onActivate)
1326
- options.onActivate();
1327
- },
1328
- onDeactivate() {
1329
- hasFocus.value = false;
1330
- if (options.onDeactivate)
1331
- options.onDeactivate();
1332
- }
1333
- }));
1334
- if (immediate)
1335
- activate();
1336
- }, { flush: "post" });
1337
- tryOnScopeDispose(() => deactivate());
1338
- return {
1339
- hasFocus,
1340
- isPaused,
1341
- activate,
1342
- deactivate,
1343
- pause,
1344
- unpause
1345
- };
1346
- }
1347
-
1348
- export { useFocusTrap as u };