@onereach/ui-components 4.6.0-beta.2751.0 → 4.6.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 (428) 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 +1 -2
  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/OrModal/OrModal.js +1346 -3
  10. package/dist/bundled/v2/components/OrModal/index.js +0 -1
  11. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
  12. package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
  13. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  14. package/dist/bundled/v2/components/OrTextareaV3/styles.js +2 -0
  15. package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
  16. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
  17. package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
  18. package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
  19. package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
  20. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
  21. package/dist/bundled/v2/components/index.d.ts +0 -1
  22. package/dist/bundled/v2/components/index.js +3 -17
  23. package/dist/bundled/v2/{index-0d224ae5.js → index-cf2c3c27.js} +115 -3
  24. package/dist/bundled/v2/index.js +6 -20
  25. package/dist/bundled/{v3/index-e9f6b2d8.js → v2/lang-0fb8f78b.js} +4009 -73
  26. package/dist/bundled/v3/{index-d92d0b48.js → OrCode.vue_vue_type_script_lang-74060519.js} +235 -14
  27. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-13397889.js → OrConfirm.vue_vue_type_script_lang-e1390930.js} +1 -1
  28. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-4eaa8470.js → OrConfirm.vue_vue_type_script_lang-e5a8f92a.js} +2 -2
  29. package/dist/bundled/{v2/useFocusTrap-48767a70.js → v3/OrModal.vue_vue_type_script_lang-ae842e5b.js} +106 -3
  30. package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +11 -26
  31. package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +8 -24
  32. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +20 -33
  33. package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +16 -51
  34. package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +20 -57
  35. package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +15 -35
  36. package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +7 -15
  37. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +21 -47
  38. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +22 -70
  39. package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +4 -7
  40. package/dist/bundled/v3/components/OrCarousel/OrCarousel.vue.d.ts +126 -676
  41. package/dist/bundled/v3/components/OrCarouselItem/OrCarouselItem.vue.d.ts +1 -1
  42. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +15 -35
  43. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +6 -24
  44. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +17 -43
  45. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +23 -53
  46. package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +9 -25
  47. package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +24 -51
  48. package/dist/bundled/v3/components/OrCode/OrCode.js +6 -10
  49. package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +24 -69
  50. package/dist/bundled/v3/components/OrCode/index.js +4 -8
  51. package/dist/bundled/v3/components/OrCode/lang.js +3 -3941
  52. package/dist/bundled/v3/components/OrCode/theme.js +1 -2
  53. package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +17 -39
  54. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +13 -31
  55. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +8 -30
  56. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +4 -5
  57. package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +23 -84
  58. package/dist/bundled/v3/components/OrConfirm/index.js +3 -4
  59. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +3 -3
  60. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +29 -91
  61. package/dist/bundled/v3/components/OrConfirmV3/index.js +2 -2
  62. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +25 -81
  63. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +68 -177
  64. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +31 -105
  65. package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +11 -28
  66. package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +4 -8
  67. package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +4 -7
  68. package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +9 -18
  69. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +14 -35
  70. package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +8 -20
  71. package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +15 -46
  72. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +10 -30
  73. package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +4 -8
  74. package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +9 -18
  75. package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +16 -44
  76. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +13 -43
  77. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +16 -52
  78. package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +7 -18
  79. package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +7 -16
  80. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +39 -83
  81. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +43 -95
  82. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +39 -79
  83. package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +36 -87
  84. package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +7 -22
  85. package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +34 -85
  86. package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +9 -20
  87. package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +9 -24
  88. package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +7 -24
  89. package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +21 -47
  90. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +11 -27
  91. package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +10 -26
  92. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +13 -34
  93. package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +13 -34
  94. package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +16 -43
  95. package/dist/bundled/v3/components/OrModal/OrModal.js +2 -3
  96. package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +14 -38
  97. package/dist/bundled/v3/components/OrModal/index.js +1 -2
  98. package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +15 -31
  99. package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +9 -27
  100. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +9 -20
  101. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +24 -70
  102. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +13 -31
  103. package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +6 -16
  104. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +7 -14
  105. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +27 -75
  106. package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +22 -63
  107. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +28 -76
  108. package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +20 -56
  109. package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +25 -62
  110. package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +13 -35
  111. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +9 -26
  112. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +6 -32
  113. package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +21 -49
  114. package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +23 -65
  115. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +17 -41
  116. package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +9 -25
  117. package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +28 -77
  118. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +37 -115
  119. package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +14 -33
  120. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +28 -63
  121. package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +9 -20
  122. package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +13 -28
  123. package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +9 -22
  124. package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +11 -26
  125. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +10 -26
  126. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +16 -40
  127. package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +35 -91
  128. package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +13 -25
  129. package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +16 -43
  130. package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +12 -33
  131. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +22 -53
  132. package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +9 -22
  133. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +13 -29
  134. package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +10 -17
  135. package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +4 -17
  136. package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +25 -71
  137. package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +10 -27
  138. package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +12 -23
  139. package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +19 -63
  140. package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +4 -10
  141. package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +4 -10
  142. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +11 -24
  143. package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +37 -85
  144. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.js +2 -2
  145. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +32 -73
  146. package/dist/bundled/v3/components/OrTextareaV3/index.js +1 -1
  147. package/dist/bundled/v3/components/OrTextareaV3/styles.js +2 -0
  148. package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +55 -137
  149. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +25 -79
  150. package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +11 -31
  151. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +25 -55
  152. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +24 -54
  153. package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +16 -38
  154. package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +14 -33
  155. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +4 -10
  156. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +13 -37
  157. package/dist/bundled/v3/components/index.d.ts +0 -1
  158. package/dist/bundled/v3/components/index.js +8 -23
  159. package/dist/bundled/v3/directives/dropdown-close.d.ts +3 -1
  160. package/dist/bundled/v3/directives/dropdown-open.d.ts +3 -1
  161. package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  162. package/dist/bundled/v3/{index-0d224ae5.js → index-cf2c3c27.js} +115 -3
  163. package/dist/bundled/v3/index.js +12 -27
  164. package/dist/bundled/{v2/index-e9f6b2d8.js → v3/lang-0fb8f78b.js} +4009 -73
  165. package/dist/esm/v2/{OrTextarea-800f63d4.js → OrTextarea-eaadb85f.js} +2 -0
  166. package/dist/esm/v2/components/index.d.ts +0 -1
  167. package/dist/esm/v2/components/index.js +1 -25
  168. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
  169. package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
  170. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
  171. package/dist/esm/v2/components/or-textarea-v3/index.js +1 -1
  172. package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
  173. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
  174. package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
  175. package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
  176. package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
  177. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
  178. package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
  179. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
  180. package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
  181. package/dist/esm/v2/index.js +1 -25
  182. package/dist/esm/v3/{OrTextarea-fa1454e3.js → OrTextarea-d9d355ce.js} +2 -0
  183. package/dist/esm/v3/components/index.d.ts +0 -1
  184. package/dist/esm/v3/components/index.js +1 -25
  185. package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +11 -26
  186. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +8 -24
  187. package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +20 -33
  188. package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +16 -51
  189. package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +20 -57
  190. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +15 -35
  191. package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +7 -15
  192. package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +21 -47
  193. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -70
  194. package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +6 -14
  195. package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +4 -7
  196. package/dist/esm/v3/components/or-carousel/OrCarousel.vue.d.ts +126 -676
  197. package/dist/esm/v3/components/or-carousel/or-carousel-item/OrCarouselItem.vue.d.ts +1 -1
  198. package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +15 -35
  199. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +6 -24
  200. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +17 -43
  201. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +23 -53
  202. package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +24 -51
  203. package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +9 -25
  204. package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +17 -37
  205. package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +24 -69
  206. package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +17 -39
  207. package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +13 -31
  208. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +8 -30
  209. package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +23 -84
  210. package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +29 -91
  211. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +25 -81
  212. package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +68 -177
  213. package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +12 -33
  214. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +31 -105
  215. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +11 -28
  216. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +17 -39
  217. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +7 -15
  218. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +23 -85
  219. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +7 -11
  220. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +4 -7
  221. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +11 -28
  222. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +15 -37
  223. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +11 -28
  224. package/dist/esm/v3/components/or-error/OrError.vue.d.ts +4 -8
  225. package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +4 -7
  226. package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +9 -18
  227. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +14 -35
  228. package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +8 -20
  229. package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +15 -46
  230. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +10 -30
  231. package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +4 -8
  232. package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +9 -18
  233. package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +16 -44
  234. package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +13 -43
  235. package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +8 -10
  236. package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +16 -52
  237. package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +7 -18
  238. package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +7 -16
  239. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +39 -83
  240. package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +43 -95
  241. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +39 -79
  242. package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +36 -87
  243. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +7 -22
  244. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +34 -85
  245. package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +9 -20
  246. package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +9 -24
  247. package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +7 -24
  248. package/dist/esm/v3/components/or-list/OrList.vue.d.ts +21 -47
  249. package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +11 -27
  250. package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +10 -26
  251. package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +13 -34
  252. package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +13 -34
  253. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +16 -43
  254. package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +14 -38
  255. package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +15 -31
  256. package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +9 -27
  257. package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +9 -20
  258. package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +24 -70
  259. package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +13 -31
  260. package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +7 -23
  261. package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +6 -16
  262. package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +7 -14
  263. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +27 -75
  264. package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +22 -63
  265. package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +28 -76
  266. package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +20 -56
  267. package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +25 -62
  268. package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +13 -35
  269. package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +9 -26
  270. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +6 -32
  271. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +21 -49
  272. package/dist/esm/v3/components/or-search/OrSearch.vue.d.ts +23 -65
  273. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +17 -41
  274. package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +9 -25
  275. package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +8 -20
  276. package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +28 -77
  277. package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +18 -49
  278. package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +4 -16
  279. package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +13 -67
  280. package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +16 -41
  281. package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +16 -35
  282. package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +24 -71
  283. package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +7 -19
  284. package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +11 -24
  285. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +37 -115
  286. package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +14 -33
  287. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +28 -63
  288. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +10 -23
  289. package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +9 -20
  290. package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +9 -22
  291. package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +10 -26
  292. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +13 -28
  293. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +11 -26
  294. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +16 -40
  295. package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +35 -91
  296. package/dist/esm/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +13 -25
  297. package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +16 -43
  298. package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +4 -20
  299. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +4 -26
  300. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +4 -26
  301. package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +6 -22
  302. package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +6 -12
  303. package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +12 -33
  304. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +22 -53
  305. package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +9 -22
  306. package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +13 -29
  307. package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +10 -17
  308. package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +4 -17
  309. package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +25 -71
  310. package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +10 -27
  311. package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +12 -23
  312. package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +19 -63
  313. package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +4 -10
  314. package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +4 -10
  315. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +11 -24
  316. package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +37 -85
  317. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +32 -73
  318. package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
  319. package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +55 -137
  320. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +25 -79
  321. package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +11 -31
  322. package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +25 -55
  323. package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +16 -38
  324. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +24 -54
  325. package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +14 -33
  326. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +4 -10
  327. package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +13 -37
  328. package/dist/esm/v3/directives/dropdown-close.d.ts +3 -1
  329. package/dist/esm/v3/directives/dropdown-open.d.ts +3 -1
  330. package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  331. package/dist/esm/v3/index.js +1 -25
  332. package/package.json +5 -25
  333. package/src/components/index.ts +0 -1
  334. package/src/components/or-textarea-v3/styles.ts +6 -0
  335. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -2196
  336. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -220
  337. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +0 -2
  338. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +0 -70
  339. package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +0 -4
  340. package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +0 -7
  341. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -6
  342. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -38
  343. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  344. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -46
  345. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  346. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  347. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  348. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  349. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  350. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  351. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  352. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  353. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  354. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  355. package/dist/bundled/v2/index-418d5c0d.js +0 -9633
  356. package/dist/bundled/v2/index-85c2efe8.js +0 -7122
  357. package/dist/bundled/v2/index-d92d0b48.js +0 -3805
  358. package/dist/bundled/v2/index.es-3f39f316.js +0 -115
  359. package/dist/bundled/v2/markdown-7c7c4ca6.js +0 -17980
  360. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-7e29b3d0.js +0 -237
  361. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-2c009ee0.js +0 -108
  362. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-da618771.js +0 -1887
  363. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -283
  364. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -220
  365. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +0 -2
  366. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +0 -86
  367. package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +0 -4
  368. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +0 -7
  369. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -6
  370. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -38
  371. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  372. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -46
  373. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  374. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  375. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  376. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  377. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  378. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  379. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  380. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  381. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  382. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  383. package/dist/bundled/v3/index-418d5c0d.js +0 -9633
  384. package/dist/bundled/v3/index-85c2efe8.js +0 -7122
  385. package/dist/bundled/v3/index.es-3f39f316.js +0 -115
  386. package/dist/bundled/v3/markdown-7c7c4ca6.js +0 -17980
  387. package/dist/bundled/v3/useFocusTrap-48767a70.js +0 -1348
  388. package/dist/esm/v2/OrRichTextEditor-f95ca8c6.js +0 -919
  389. package/dist/esm/v2/codemirrorView-be2c7423.js +0 -353
  390. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -220
  391. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -2
  392. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -59
  393. package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +0 -4
  394. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  395. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  396. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  397. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  398. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  399. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  400. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  401. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  402. package/dist/esm/v3/OrRichTextEditor-065797b2.js +0 -852
  403. package/dist/esm/v3/codemirrorView-be2c7423.js +0 -353
  404. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -220
  405. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -2
  406. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -57
  407. package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +0 -4
  408. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  409. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  410. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  411. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  412. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  413. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  414. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  415. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  416. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -761
  417. package/src/components/or-rich-text-editor-v3/index.ts +0 -2
  418. package/src/components/or-rich-text-editor-v3/props.ts +0 -4
  419. package/src/components/or-rich-text-editor-v3/styles.ts +0 -53
  420. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +0 -40
  421. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +0 -254
  422. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +0 -1
  423. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +0 -213
  424. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +0 -22
  425. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +0 -120
  426. /package/dist/bundled/v2/{index-f6664cb1.js → index-968c331a.js} +0 -0
  427. /package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-f287189f.js → OrTextarea.vue_vue_type_script_lang-7b74a80e.js} +0 -0
  428. /package/dist/bundled/v3/{index-f6664cb1.js → index-968c331a.js} +0 -0
@@ -1,761 +0,0 @@
1
- <template>
2
- <div
3
- ref="root"
4
- :class="rootStyles"
5
- >
6
- <or-label>
7
- {{ description }}
8
- </or-label>
9
- <div
10
- ref="containerRef"
11
- :class="containerStyles"
12
- @click="handleEditorClick()"
13
- >
14
- <div
15
- ref="toolbarRef"
16
- :class="toolbarContainerStyles"
17
- >
18
- <div
19
- v-for="(tools, index) in toolbar"
20
- :key="index"
21
- :class="[...toolbarStyles, { 'hidden': isVisible(tools)}]"
22
- >
23
- <div
24
- v-for="item in tools"
25
- :key="item"
26
- :class="['flex gap-md', { 'hidden': !isVisible(item)}]"
27
- >
28
- <or-icon-button
29
- v-if="item==='heading'"
30
- ref="toolbarButtonRef"
31
- :selected="isActive[item]"
32
- :disabled="!isFocused"
33
- :tooltip="{text: item, placement: 'top'}"
34
- :icon="{icon: headingIcon, variant: 'inherit', size: 'm'}"
35
- @click="menuRef.open()"
36
- />
37
- <or-icon-button
38
- v-else-if="isVisible(item)"
39
- :tooltip="{text: iconTooltipsEnum[item], placement: 'top'}"
40
- :selected="isActive[item]"
41
- :disabled="!isFocused"
42
- :icon="{icon: iconsEnum[item], variant: 'inherit', size: 'm'}"
43
- @click="handleToolbarClick(item)"
44
- />
45
- </div>
46
- </div>
47
- <or-icon-button
48
- v-if="countOfNotVisibleTools > 0"
49
- ref="moreButtonRef"
50
- :disabled="!isFocused"
51
- :icon="{icon: 'more_horiz', variant: 'inherit', size: 'm'}"
52
- class="px-sm"
53
- @click="moreRef.open()"
54
- />
55
- </div>
56
- <div :class="['p-sm', { 'h-[calc(100%-32px)] md:h-[calc(100%-36px)]': fullHeight }]">
57
- <textarea
58
- v-show="disableMarkdown"
59
- ref="textareaRef"
60
- v-model="sourceValue"
61
- auto-focus
62
- :activated="disableMarkdown"
63
- class="w-full h-full resize-none border-none outline-none bg-transparent typography-body-2-regular"
64
- @input="handleInput"
65
- />
66
- <div
67
- v-show="!disableMarkdown"
68
- ref="editorRef"
69
- :class="editorInputStyles"
70
- />
71
- <slot name="files" />
72
- </div>
73
- </div>
74
- <or-menu
75
- v-if="moreButtonRef"
76
- ref="moreRef"
77
- :trigger="moreButtonRef.root"
78
- >
79
- <or-menu-item
80
- v-for="item in notVisibleTools"
81
- :key="item"
82
- @click="handleToolbarClick(item)"
83
- >
84
- <or-icon-button
85
- :tooltip="{text: iconTooltipsEnum[item], placement: 'top'}"
86
- :selected="isActive[item]"
87
- :icon="{icon: iconsEnum[item], variant: 'inherit', size: 'm'}"
88
- />
89
- </or-menu-item>
90
- </or-menu>
91
- <or-menu
92
- v-if="toolbarButtonRef"
93
- ref="menuRef"
94
- :trigger="toolbarButtonRef[getIndexOfHeading].root"
95
- placement="bottom-start"
96
- >
97
- <or-menu-item
98
- v-for="heading in headingLevels"
99
- :key="heading"
100
- @click="handleToolbarClick('heading', heading)"
101
- >
102
- Heading {{ heading }}
103
- </or-menu-item>
104
- <or-menu-item
105
- @click="handleToolbarClick('heading')"
106
- >
107
- None
108
- </or-menu-item>
109
- </or-menu>
110
- <or-modal
111
- :is-open="isOpenLinkModal"
112
- size="s"
113
- >
114
- <template v-slot:header>
115
- <p class="text-headline-2">
116
- Add Link
117
- </p>
118
- </template>
119
- <div>
120
- <or-label>
121
- Text
122
- </or-label>
123
- <or-input
124
- v-model="text"
125
- placeholder="Placeholder"
126
- class="pb-md"
127
- />
128
- <or-label>
129
- Link
130
- </or-label>
131
- <or-input
132
- v-model="link"
133
- placeholder="Placeholder"
134
- />
135
- </div>
136
- <template v-slot:footer>
137
- <div class="flex ml-auto gap-md">
138
- <or-button
139
- variant="outlined"
140
- @click="discardLink"
141
- >
142
- <p>Cancel</p>
143
- </or-button>
144
- <or-button
145
- @click="attachLink"
146
- >
147
- <p>Save</p>
148
- </or-button>
149
- </div>
150
- </template>
151
- </or-modal>
152
- </div>
153
- </template>
154
-
155
- <script lang="ts">
156
- import { defineComponent, ref, computed, onBeforeUnmount, onMounted, watch, ComponentPublicInstance, PropType, nextTick } from 'vue-demi';
157
- import { useFocusTrap, UseFocusTrapReturn } from '@vueuse/integrations/useFocusTrap';
158
- import { onClickOutside, useResizeObserver } from '@vueuse/core';
159
- import { serialize, deserialize } from './utils/markdown';
160
-
161
- import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
162
- import { OrLabelV3 as OrLabel } from '../or-label-v3';
163
- import { OrMenuV3 as OrMenu } from '../or-menu-v3';
164
- import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
165
- import { OrModalV3 as OrModal } from '../or-modal-v3';
166
- import { OrInputV3 as OrInput } from '../or-input-v3';
167
- import { OrButtonV3 as OrButton } from '../or-button-v3';
168
-
169
- import {
170
- EditorContainer,
171
- ToolbarContainer,
172
- Toolbar,
173
- ToolbarButtonFocused,
174
- ToolbarButton,
175
- EditorInput,
176
- } from './styles';
177
-
178
- import { Formats } from './props';
179
-
180
- import { Editor, mergeAttributes } from '@tiptap/core';
181
- import StarterKit from '@tiptap/starter-kit';
182
- import Underline from '@tiptap/extension-underline';
183
- import Link from '@tiptap/extension-link';
184
- import Highlight from '@tiptap/extension-highlight';
185
- import Heading, { Level } from '@tiptap/extension-heading';
186
- import Placeholder from '@tiptap/extension-placeholder';
187
-
188
- import codemirrorNode from './utils/codemirror/codemirrorNode';
189
-
190
- export default defineComponent({
191
- name: 'OrRichTextEditor',
192
-
193
- components: {
194
- OrIconButton,
195
- OrLabel,
196
- OrMenuItem,
197
- OrMenu,
198
- OrModal,
199
- OrInput,
200
- OrButton,
201
- },
202
-
203
- inheritAttrs: false,
204
-
205
- model: {
206
- prop: 'modelValue',
207
- event: 'update:modelValue',
208
- },
209
-
210
- props: {
211
- modelValue: {
212
- type: String,
213
- default: undefined,
214
- },
215
- toolbar: {
216
- type: Array <string[]>,
217
- default: () => [],
218
- },
219
- description: {
220
- type: String,
221
- default: '',
222
- },
223
- placeholder: {
224
- type: String,
225
- default: '',
226
- },
227
- autofocus: {
228
- type: Boolean,
229
- default: false,
230
- },
231
- format: {
232
- type: String as PropType<Formats>,
233
- default: Formats.Markup,
234
- },
235
- fullHeight: {
236
- type: Boolean,
237
- default: false,
238
- },
239
- },
240
-
241
- emits: [
242
- 'update:modelValue',
243
-
244
- 'input',
245
- 'file-upload',
246
- ],
247
-
248
- expose: [
249
- 'root',
250
- ],
251
-
252
- setup(props, context) {
253
- // Refs
254
- const root = ref<HTMLElement>();
255
- let editor = null as Editor | null;
256
- const editorRef = ref<HTMLDivElement>();
257
- const textareaRef = ref<HTMLTextAreaElement>();
258
- const containerRef = ref<ComponentPublicInstance<HTMLInputElement>>();
259
- const toolbarRef = ref<ComponentPublicInstance<HTMLInputElement>>();
260
- const moreButtonRef = ref<HTMLDivElement>();
261
- const moreRef = ref<HTMLDivElement>();
262
- const toolbarButtonRef = ref<InstanceType<typeof OrIconButton>>();
263
- const menuRef = ref<InstanceType<typeof OrMenu>>();
264
- // isActive should be set with default values for all toolbar buttons, otherwise it will not work in vue2
265
- const isActive = ref<{[key: string]: boolean;}>({
266
- bold: false,
267
- italic: false,
268
- underline: false,
269
- strike: false,
270
- bulletList: false,
271
- orderedList: false,
272
- link: false,
273
- highlight: false,
274
- redo: false,
275
- undo: false,
276
- codeBlock: false,
277
- blockquote: false,
278
- file: false,
279
- source: false,
280
- });
281
- const isFocused = ref<boolean>(props.autofocus);
282
- const headingLevels = [1, 2, 3, 4] as Level[];
283
- const activeHeadingLevel = ref<number>(0);
284
- const markdownOutput = ref<string>('');
285
- const isOpenLinkModal = ref<boolean>(false);
286
- const disableMarkdown = ref<boolean>(false);
287
- const text = ref<string>('');
288
- const link = ref<string>('');
289
- const countOfNotVisibleTools = ref<number>(0);
290
- const sourceValue = ref<string>('');
291
-
292
- let trap: UseFocusTrapReturn = useFocusTrap(editorRef, {
293
- immediate: true,
294
- fallbackFocus: '.container',
295
- allowOutsideClick: true,
296
- });
297
-
298
- const iconsEnum = ref<{[key: string]: string;}>({
299
- bold: 'format_bold',
300
- italic: 'format_italic',
301
- underline: 'format_underlined',
302
- strike: 'format_strikethrough',
303
- bulletList: 'format_list_bulleted',
304
- orderedList: 'format_list_numbered',
305
- link: 'link',
306
- highlight: 'highlight',
307
- redo: 'redo',
308
- undo: 'undo',
309
- codeBlock: 'code_blocks',
310
- blockquote: 'format_quote',
311
- file: 'attach_file',
312
- source: 'source_notes',
313
- });
314
- const iconTooltipsEnum = ref<{[key: string]: string;}>({
315
- bold: 'Bold',
316
- italic: 'Italic',
317
- underline: 'Underline',
318
- strike: 'Strike',
319
- bulletList: 'Bulleted List',
320
- orderedList: 'Numbered List',
321
- link: 'Link',
322
- highlight: 'Highlight',
323
- redo: 'Redo',
324
- undo: 'Undo',
325
- codeBlock: 'Code Block',
326
- blockquote: 'Quote',
327
- file: 'File',
328
- source: 'Source',
329
- });
330
-
331
- useResizeObserver(root, (entries) => {
332
- const entry = entries[0];
333
- const { width } = entry.contentRect;
334
- if (containerRef.value && toolbarRef.value && toolbarLength.value) {
335
- let lengthOfItem = 0;
336
- lengthOfItem = (toolbarRef.value.firstElementChild?.firstElementChild as HTMLDivElement)?.offsetWidth + 16;
337
-
338
- const count = (width / lengthOfItem) - 2;
339
- countOfNotVisibleTools.value = Math.round(toolbarLength.value - count);
340
- }
341
- });
342
-
343
- onMounted(() => {
344
- editor = new Editor({
345
- onUpdate: ({ editor }) => {
346
- isFocused.value = true;
347
- setActiveFormats();
348
- const html = editor.getHTML();
349
- const text = editor.getText();
350
- if (props.format === 'markdown') {
351
- markdownOutput.value = serialize(editor.schema, editor.getJSON());
352
- proxyModelValue.value = markdownOutput.value;
353
- } else {
354
- proxyModelValue.value = text === '' ? text : html;
355
- }
356
- },
357
- onCreate: ({ editor }) => {
358
- if (props.format === 'markdown') {
359
- const deserialized = deserialize(editor.schema, proxyModelValue.value);
360
- editor.commands.setContent(deserialized);
361
- } else {
362
- editor.commands.setContent(proxyModelValue.value as string);
363
- }
364
- },
365
- element: editorRef.value,
366
- autofocus: props.autofocus,
367
- enableInputRules: true,
368
- enablePasteRules: true,
369
- extensions: [
370
- codemirrorNode,
371
- StarterKit.configure({
372
- heading: false,
373
- codeBlock: false,
374
- }),
375
- Heading.configure({ levels: headingLevels }).extend({
376
- levels: headingLevels,
377
- renderHTML({ node, HTMLAttributes }) {
378
- return [
379
- 'h' + node.attrs.level,
380
- mergeAttributes(HTMLAttributes, {
381
- class: `typography-headline-${node.attrs.level}`,
382
- }),
383
- 0,
384
- ];
385
- },
386
- }),
387
- Underline,
388
- Link.configure({
389
- openOnClick: true,
390
- linkOnPaste: true,
391
- autolink: false,
392
- protocols: ['ftp', 'mailto', 'http', 'https'],
393
- validate: href => /^https?:\/\//.test(href),
394
- HTMLAttributes: {
395
- class: 'text-primary cursor-pointer',
396
- },
397
- }),
398
- Highlight,
399
- Placeholder
400
- .configure({
401
- placeholder: props.placeholder,
402
- emptyEditorClass: 'is-editor-empty text-outline',
403
- }),
404
- ],
405
- editorProps: {
406
- attributes: {
407
- class: 'flex flex-col focus:outline-none gap-xs',
408
- },
409
- },
410
- parseOptions: {
411
- preserveWhitespace: true,
412
- },
413
- });
414
- setActiveFormats();
415
- trap.activate();
416
- });
417
-
418
- onBeforeUnmount(() => {
419
- editor?.destroy();
420
- });
421
-
422
- onClickOutside(root, () => {
423
- isFocused.value = false;
424
- trap.deactivate();
425
- });
426
-
427
- // Computed
428
- const proxyModelValue = computed({
429
- get: () => {
430
- return props.modelValue;
431
- },
432
-
433
- set: (value) => {
434
- context.emit('input', value);
435
- context.emit('update:modelValue', value);
436
- },
437
- });
438
-
439
- const getIndexOfHeading = computed(() => {
440
- return props.toolbar.flat().indexOf('heading');
441
- });
442
-
443
- const headingIcon = computed(() => {
444
- if (activeHeadingLevel.value && isActive.value.heading) {
445
- return `format_h${activeHeadingLevel.value}`;
446
- }
447
- return 'format_paragraph';
448
- });
449
-
450
- const toolbarLength = computed(() => {
451
- return props.toolbar.flat().length;
452
- });
453
-
454
- const notVisibleTools = computed((): Set<string> => {
455
- const count = countOfNotVisibleTools.value;
456
- const toolbar = props.toolbar.flat();
457
- let notVisible = new Set(toolbar.slice(toolbar.length - count, toolbar.length));
458
- props.toolbar.forEach(tools => {
459
- if (tools.some(item => notVisible.has(item))) {
460
- tools.forEach(item => notVisible.add(item));
461
- }
462
- });
463
- return notVisible;
464
- });
465
-
466
- //Methods
467
- const handleEditorClick = () => {
468
- setActiveFormats();
469
- isFocused.value = true;
470
- editor?.commands.focus();
471
- activeHeadingLevel.value = editor?.getAttributes('heading')?.level || 0;
472
- };
473
-
474
- const isVisible = (value: string | Array<string>) => {
475
- if (Array.isArray(value)) {
476
- const isHaveNotVisibleTools = value.some(item => notVisibleTools.value.has(item));
477
- return isHaveNotVisibleTools;
478
- }
479
- return !notVisibleTools.value.has(value);
480
- };
481
-
482
- const handleInput = (event: InputEvent) => {
483
- const target = event.target as HTMLTextAreaElement;
484
- const value = target.value;
485
- editor?.commands.setContent(deserialize(editor?.schema, value));
486
- markdownOutput.value = serialize(editor?.schema, editor?.getJSON());
487
- proxyModelValue.value = markdownOutput.value;
488
- };
489
-
490
- const handleToolbarClick = (item: string, level?: number) => {
491
- switch (item) {
492
- case 'source':
493
- disableMarkdown.value = !disableMarkdown.value;
494
- sourceValue.value = serialize(editor?.schema, editor?.getJSON());
495
-
496
- nextTick(() => textareaRef.value?.focus());
497
- break;
498
- case 'bulletList':
499
- case 'orderedList':
500
- item === 'bulletList' ? editor?.commands.toggleBulletList() : editor?.commands.toggleOrderedList();
501
- break;
502
- case 'link':
503
- if (editor) {
504
- const cursorPosition = editor?.state.selection.$anchor.pos || 0;
505
- const { from, to, empty } = editor.state.selection;
506
- const isLink = editor.view.state.doc.nodeAt(cursorPosition)?.marks.filter((mark) => mark.type.name === 'link');
507
- const existedText = isLink?.length ? editor.view.state.doc.nodeAt(cursorPosition)?.text || '' : '';
508
-
509
- text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
510
- link.value = editor.getAttributes('link').href || '';
511
- }
512
- isOpenLinkModal.value = !isOpenLinkModal.value;
513
- break;
514
- case 'blockquote':
515
- editor?.chain().focus().toggleBlockquote().run();
516
- break;
517
- case 'codeBlock':
518
- if (!isActive.value['codeBlock']) {
519
- editor?.commands.setNode(item, { language: 'javascript' });
520
- } else {
521
- editor?.commands.setNode('paragraph');
522
- }
523
- break;
524
- case 'heading':
525
- if (!level) {
526
- editor?.commands.toggleHeading({ level: 0 as Level });
527
- activeHeadingLevel.value = 0;
528
- } else {
529
- activeHeadingLevel.value = level;
530
- editor?.commands.toggleHeading({ level: level as Level });
531
- }
532
- editor?.commands.focus();
533
- break;
534
- case 'undo':
535
- case 'redo':
536
- item === 'undo' ? editor?.commands.undo() : editor?.commands.redo();
537
- break;
538
- case 'file':
539
- context.emit('file-upload');
540
- break;
541
- default:
542
- editor?.chain().focus().toggleMark(item).run();
543
- break;
544
- }
545
- };
546
-
547
- const attachLink = async () => {
548
- // empty
549
- if (link.value === '') {
550
- editor?.chain().focus().extendMarkRange('link').unsetLink().run();
551
- }
552
-
553
- const isEmptySelection = editor?.state.selection.empty;
554
- const cursorPosition = editor?.state.selection.$anchor.pos || 0;
555
- const isLink = editor?.view.state.doc.nodeAt(cursorPosition)?.marks.filter((mark) => mark.type.name === 'link');
556
- const existedText = isLink?.length ? editor?.view.state.doc.nodeAt(cursorPosition)?.text : '';
557
-
558
- if (link.value && isEmptySelection && !existedText) {
559
- editor?.chain()
560
- .focus()
561
- .setMark('link', {
562
- href: link.value,
563
- target: '__blank',
564
- })
565
- .command(({ tr }) => {
566
- const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
567
- tr.insertText(preparedValue);
568
- return true;
569
- })
570
- .run();
571
- }
572
-
573
- if (link.value && existedText === text.value && isEmptySelection) {
574
- editor?.chain()
575
- .extendMarkRange('link')
576
- .updateAttributes('link', {
577
- href: link.value,
578
- })
579
- .run();
580
- }
581
-
582
- if (link.value && !isEmptySelection) {
583
- editor?.chain()
584
- .focus()
585
- .setMark('link', {
586
- href: link.value,
587
- target: '__blank',
588
- })
589
- .run();
590
- }
591
-
592
- text.value = '';
593
- link.value = '';
594
-
595
- isOpenLinkModal.value = false;
596
- };
597
-
598
- const discardLink = () => {
599
- isOpenLinkModal.value = false;
600
- };
601
-
602
- const setActiveFormats = () => {
603
- const toolbarList = props.toolbar.flat() as string[];
604
- toolbarList.forEach((item) => {
605
- if (item === 'source') {
606
- isActive.value[item] = disableMarkdown.value;
607
- } else {
608
- isActive.value[item] = editor?.isActive(item) || false;
609
- }
610
- });
611
- };
612
-
613
- // Styles
614
- const rootStyles = computed(() => {
615
- return [
616
- 'or-rich-text-editor',
617
- ...props.fullHeight ? ['h-full'] : [],
618
- ];
619
- });
620
-
621
- const containerStyles = computed(() => {
622
- return [
623
- ...EditorContainer,
624
- ...props.fullHeight ? ['h-full'] : [],
625
- ];
626
- });
627
-
628
- const toolbarContainerStyles = computed(() => {
629
- return [
630
- ...ToolbarContainer,
631
- ];
632
- });
633
-
634
- const toolbarStyles = computed(() => {
635
- return [
636
- ...Toolbar,
637
- // 'overflow-x-hidden',
638
- ...isFocused.value ? ToolbarButtonFocused : ToolbarButton,
639
- ];
640
- });
641
-
642
- const editorInputStyles = computed(() => {
643
- return [
644
- 'tiptap-editor-v3',
645
- ...props.fullHeight ? ['h-full overflow-y-auto'] : [],
646
- ...EditorInput,
647
- ];
648
- });
649
-
650
- //Effects
651
- watch(proxyModelValue, (value) => {
652
- if (value !== editor?.getHTML() && props.format !== 'markdown') {
653
- editor?.commands.setContent(value as string);
654
- }
655
- if (props.format === 'markdown' && value !== markdownOutput.value) {
656
- // const deserialized = deserialize(editor?.schema, value);
657
- editor?.commands.setContent(value as string);
658
- }
659
- });
660
-
661
- return {
662
- editor,
663
- editorRef,
664
- toolbarRef,
665
- containerRef,
666
- toolbarButtonRef,
667
- moreButtonRef,
668
- textareaRef,
669
- moreRef,
670
- menuRef,
671
- iconsEnum,
672
- handleToolbarClick,
673
- handleEditorClick,
674
- isActive,
675
- iconTooltipsEnum,
676
- containerStyles,
677
- toolbarContainerStyles,
678
- toolbarStyles,
679
- rootStyles,
680
- root,
681
- editorInputStyles,
682
- getIndexOfHeading,
683
- headingLevels,
684
- headingIcon,
685
- attachLink,
686
- discardLink,
687
- isOpenLinkModal,
688
- text,
689
- link,
690
- isFocused,
691
- isVisible,
692
- countOfNotVisibleTools,
693
- notVisibleTools,
694
- handleInput,
695
- proxyModelValue,
696
- disableMarkdown,
697
- sourceValue,
698
- };
699
- },
700
- });
701
- </script>
702
-
703
- <style lang="scss">
704
- .tiptap-editor-v3 {
705
- ol { //see if editor can not inherit it
706
- @apply mx-lg;
707
- list-style: decimal;
708
- }
709
-
710
- .ProseMirror {
711
- h1, h2, h3, h4, h5, h6, p {
712
- @apply m-xs;
713
- }
714
- }
715
-
716
- ul {
717
- @apply mx-lg;
718
- list-style: initial;
719
- }
720
-
721
- blockquote {
722
- @apply mx-lg;
723
- @apply my-sm;
724
- @apply px-lg;
725
- border-left: 4px solid theme('borderColor.primary-opacity-0-16');
726
- }
727
-
728
- .is-editor-empty::before {
729
- content: attr(data-placeholder);
730
- height: 0;
731
- pointer-events: none;
732
- float: left;
733
- }
734
-
735
- .cm-editor {
736
- border: none;
737
- @apply rounded-md;
738
-
739
- .cm-scroller {
740
- @apply rounded-md;
741
- }
742
-
743
- &.cm-focused {
744
- outline: none;
745
- }
746
-
747
- .cm-gutters {
748
- background-color: theme('backgroundColor.primary-opacity-0-12');
749
- border: none;
750
-
751
- .cm-gutterElement {
752
- @apply px-sm+*;
753
-
754
- &.cm-activeLineGutter {
755
- background-color: theme('backgroundColor.primary-opacity-0-16');
756
- }
757
- }
758
- }
759
- }
760
- }
761
- </style>