@onereach/ui-components 2.63.0-beta.1907.0 → 2.63.1-beta.1936.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 (300) hide show
  1. package/dist/v2/OrCardCollection-5d5046f1.js +227 -0
  2. package/dist/v2/{OrConfirm-8d149ece.js → OrConfirm-edc537b3.js} +1 -1
  3. package/dist/v2/{OrIconButton-5883eba0.js → OrIconButton-2088a37f.js} +1 -1
  4. package/dist/v2/{OrInlineInput-16a343c1.js → OrInlineInput-da65c72a.js} +9 -8
  5. package/dist/v2/{OrInlineTextarea-f154bdf5.js → OrInlineTextarea-da66759a.js} +9 -8
  6. package/dist/v2/{OrInput-4a50fe57.js → OrInput-655bed71.js} +9 -7
  7. package/dist/v2/{OrModal-64c5ae2e.js → OrModal-a1452b11.js} +1 -1
  8. package/dist/v2/{OrNotification-9c164908.js → OrNotification-ac420f39.js} +1 -1
  9. package/dist/v2/{OrSearch-a247f072.js → OrSearch-287a08a9.js} +1 -1
  10. package/dist/v2/OrSegmentedControl-17df63b8.js +236 -0
  11. package/dist/v2/{OrSelect-f416b7aa.js → OrSelect-1a353817.js} +4 -4
  12. package/dist/v2/OrSortHeader-a6004b24.js +133 -0
  13. package/dist/v2/{OrTabs-b4a9740b.js → OrTabs-f2a60b41.js} +1 -1
  14. package/dist/v2/{OrTag-ab03c4f7.js → OrTag-1ced4e58.js} +1 -1
  15. package/dist/v2/{OrTextarea-8773d494.js → OrTextarea-cc70afc9.js} +5 -5
  16. package/dist/v2/{OrTooltip-caeac590.js → OrTooltip-afe7030b.js} +33 -3
  17. package/dist/v2/components/index.d.ts +3 -0
  18. package/dist/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +17 -0
  19. package/dist/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +98 -0
  20. package/dist/v2/components/or-card-collection-v3/index.d.ts +3 -0
  21. package/dist/v2/components/or-card-collection-v3/props.d.ts +4 -0
  22. package/dist/v2/components/or-card-collection-v3/styles.d.ts +6 -0
  23. package/dist/v2/components/or-card-collection-v3/types.d.ts +7 -0
  24. package/dist/v2/components/{or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts → or-segmented-control-v3/OrSegmentedControl.stories3.d.ts} +1 -1
  25. package/dist/v2/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +77 -0
  26. package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +47 -0
  27. package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +3 -0
  28. package/dist/v2/components/or-segmented-control-v3/index.d.ts +3 -0
  29. package/dist/v2/components/or-segmented-control-v3/props.d.ts +4 -0
  30. package/dist/v2/components/or-segmented-control-v3/styles.d.ts +3 -0
  31. package/dist/v2/components/or-segmented-control-v3/types.d.ts +4 -0
  32. package/dist/{v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts → v2/components/or-sort-header-v3/OrSortHeader.stories3.d.ts} +1 -1
  33. package/dist/v2/components/or-sort-header-v3/OrSortHeader.vue.d.ts +57 -0
  34. package/dist/v2/components/or-sort-header-v3/index.d.ts +2 -0
  35. package/dist/v2/components/or-sort-header-v3/styles.d.ts +1 -0
  36. package/dist/v2/components/or-sort-header-v3/types.d.ts +4 -0
  37. package/dist/v2/components/or-tooltip-v3/styles.d.ts +2 -0
  38. package/dist/v2/index.js +17 -14
  39. package/dist/v2/index11.js +20 -1
  40. package/dist/v2/index12.js +3 -12
  41. package/dist/v2/index13.js +3 -2
  42. package/dist/v2/index14.js +11 -5
  43. package/dist/v2/index15.js +5 -14
  44. package/dist/v2/index16.js +4 -19
  45. package/dist/v2/index17.js +28 -4
  46. package/dist/v2/index18.js +3 -7
  47. package/dist/v2/index19.js +5 -23
  48. package/dist/v2/index2.js +17 -14
  49. package/dist/v2/index20.js +25 -21
  50. package/dist/v2/index21.js +21 -18
  51. package/dist/v2/index22.js +20 -2
  52. package/dist/v2/index23.js +2 -4
  53. package/dist/v2/index24.js +2 -1
  54. package/dist/v2/index25.js +1 -2
  55. package/dist/v2/index26.js +2 -2
  56. package/dist/v2/index27.js +4 -7
  57. package/dist/v2/index28.js +6 -2
  58. package/dist/v2/index29.js +3 -3
  59. package/dist/v2/index30.js +3 -10
  60. package/dist/v2/index31.js +9 -12
  61. package/dist/v2/index32.js +11 -1
  62. package/dist/v2/index33.js +1 -1
  63. package/dist/v2/index34.js +1 -16
  64. package/dist/v2/index35.js +17 -17
  65. package/dist/v2/index36.js +17 -17
  66. package/dist/v2/index37.js +16 -1
  67. package/dist/v2/index38.js +1 -17
  68. package/dist/v2/index39.js +18 -22
  69. package/dist/v2/index40.js +22 -2
  70. package/dist/v2/index41.js +3 -3
  71. package/dist/v2/index42.js +1 -1
  72. package/dist/v2/index43.js +3 -20
  73. package/dist/v2/index44.js +1 -7
  74. package/dist/v2/index45.js +24 -1
  75. package/dist/v2/index46.js +3 -3
  76. package/dist/v2/index47.js +1 -2
  77. package/dist/v2/index48.js +2 -9
  78. package/dist/v2/index49.js +10 -17
  79. package/dist/v2/index50.js +17 -13
  80. package/dist/v2/index51.js +13 -14
  81. package/dist/v2/index52.js +14 -13
  82. package/dist/v2/index53.js +12 -15
  83. package/dist/v2/index54.js +16 -1
  84. package/dist/v2/index55.js +2 -6
  85. package/dist/v2/index56.js +1 -5
  86. package/dist/v2/index57.js +10 -3
  87. package/dist/v2/index58.js +2 -4
  88. package/dist/v2/index59.js +5 -3
  89. package/dist/v2/index60.js +2 -1
  90. package/dist/v2/index61.js +2 -5
  91. package/dist/v2/index62.js +6 -334
  92. package/dist/v2/index63.js +4 -4
  93. package/dist/v2/index64.js +2 -16
  94. package/dist/v2/index65.js +15 -24
  95. package/dist/v2/index66.js +26 -4
  96. package/dist/v2/index67.js +2 -1
  97. package/dist/v2/index68.js +3 -4
  98. package/dist/v2/index69.js +3 -4
  99. package/dist/v2/index70.js +3 -10
  100. package/dist/v2/index71.js +3 -6
  101. package/dist/v2/index72.js +4 -4
  102. package/dist/v2/index73.js +15 -6
  103. package/dist/v2/index74.js +2 -2
  104. package/dist/v2/index75.js +6 -3
  105. package/dist/v2/index76.js +4 -3
  106. package/dist/v2/index77.js +1 -2
  107. package/dist/v2/index78.js +2 -14
  108. package/dist/v2/index79.js +2 -10
  109. package/dist/v2/index80.js +5 -4
  110. package/dist/v2/index81.js +12 -2
  111. package/dist/v2/index82.js +14 -2
  112. package/dist/v2/index83.js +2 -3
  113. package/dist/v2/index84.js +2 -8
  114. package/dist/v2/index85.js +2 -20
  115. package/dist/v2/index86.js +8 -18
  116. package/dist/v2/index87.js +21 -1
  117. package/dist/v2/index88.js +17 -16
  118. package/dist/v2/index89.js +1 -1
  119. package/dist/v2/index90.js +17 -9
  120. package/dist/v2/index91.js +2 -12
  121. package/dist/v2/index92.js +10 -1
  122. package/dist/v2/index93.js +12 -6
  123. package/dist/v2/index94.js +1 -2
  124. package/dist/v2/index95.js +7 -0
  125. package/dist/v2/index96.js +3 -0
  126. package/dist/v2/{types-fb93ea4e.js → types-89aad7fb.js} +1 -1
  127. package/dist/v3/OrCardCollection-c6f3ac23.js +198 -0
  128. package/dist/v3/{OrConfirm-456ddee1.js → OrConfirm-0bafcc7b.js} +1 -1
  129. package/dist/v3/{OrIconButton-b8066b5d.js → OrIconButton-5fb3a9aa.js} +1 -1
  130. package/dist/v3/{OrInlineInput-280768ba.js → OrInlineInput-d9bbc08c.js} +9 -6
  131. package/dist/v3/{OrInlineTextarea-0f63f344.js → OrInlineTextarea-d5a97ed9.js} +9 -6
  132. package/dist/v3/{OrInput-3eef7945.js → OrInput-db4813b4.js} +11 -6
  133. package/dist/v3/{OrModal-f67d37d3.js → OrModal-3a43b7e7.js} +1 -1
  134. package/dist/v3/{OrNotification-fefa1cb4.js → OrNotification-433d16f7.js} +1 -1
  135. package/dist/v3/{OrSearch-15a70678.js → OrSearch-0c29f499.js} +1 -1
  136. package/dist/v3/OrSegmentedControl-2bbc0f22.js +184 -0
  137. package/dist/v3/{OrSelect-9d300f55.js → OrSelect-323a87b4.js} +7 -5
  138. package/dist/v3/OrSortHeader-5eba50cd.js +104 -0
  139. package/dist/v3/{OrTabs-194ca950.js → OrTabs-ac0be933.js} +1 -1
  140. package/dist/v3/{OrTag-144b4ab8.js → OrTag-deaff080.js} +1 -1
  141. package/dist/v3/{OrTextarea-09aa33dc.js → OrTextarea-98895b2a.js} +6 -4
  142. package/dist/v3/{OrTooltip-30e05f9e.js → OrTooltip-36c6728c.js} +33 -3
  143. package/dist/v3/components/index.d.ts +3 -0
  144. package/dist/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +17 -0
  145. package/dist/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +98 -0
  146. package/dist/v3/components/or-card-collection-v3/index.d.ts +3 -0
  147. package/dist/v3/components/or-card-collection-v3/props.d.ts +4 -0
  148. package/dist/v3/components/or-card-collection-v3/styles.d.ts +6 -0
  149. package/dist/v3/components/or-card-collection-v3/types.d.ts +7 -0
  150. package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +12 -0
  151. package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +77 -0
  152. package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +47 -0
  153. package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +3 -0
  154. package/dist/v3/components/or-segmented-control-v3/index.d.ts +3 -0
  155. package/dist/v3/components/or-segmented-control-v3/props.d.ts +4 -0
  156. package/dist/v3/components/or-segmented-control-v3/styles.d.ts +3 -0
  157. package/dist/v3/components/or-segmented-control-v3/types.d.ts +4 -0
  158. package/dist/v3/components/or-sort-header-v3/OrSortHeader.stories3.d.ts +12 -0
  159. package/dist/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +57 -0
  160. package/dist/v3/components/or-sort-header-v3/index.d.ts +2 -0
  161. package/dist/v3/components/or-sort-header-v3/styles.d.ts +1 -0
  162. package/dist/v3/components/or-sort-header-v3/types.d.ts +4 -0
  163. package/dist/v3/components/or-tooltip-v3/styles.d.ts +2 -0
  164. package/dist/v3/index.js +17 -14
  165. package/dist/v3/index11.js +19 -1
  166. package/dist/v3/index12.js +3 -11
  167. package/dist/v3/index13.js +3 -2
  168. package/dist/v3/index14.js +9 -4
  169. package/dist/v3/index15.js +4 -11
  170. package/dist/v3/index16.js +3 -17
  171. package/dist/v3/index17.js +25 -4
  172. package/dist/v3/index18.js +3 -6
  173. package/dist/v3/index19.js +5 -20
  174. package/dist/v3/index2.js +17 -14
  175. package/dist/v3/index20.js +21 -20
  176. package/dist/v3/index21.js +20 -15
  177. package/dist/v3/index22.js +16 -1
  178. package/dist/v3/index23.js +2 -4
  179. package/dist/v3/index24.js +2 -1
  180. package/dist/v3/index25.js +1 -2
  181. package/dist/v3/index26.js +2 -2
  182. package/dist/v3/index27.js +4 -6
  183. package/dist/v3/index28.js +5 -2
  184. package/dist/v3/index29.js +3 -3
  185. package/dist/v3/index30.js +3 -9
  186. package/dist/v3/index31.js +8 -11
  187. package/dist/v3/index32.js +10 -1
  188. package/dist/v3/index33.js +1 -1
  189. package/dist/v3/index34.js +1 -15
  190. package/dist/v3/index35.js +16 -14
  191. package/dist/v3/index36.js +14 -16
  192. package/dist/v3/index37.js +16 -2
  193. package/dist/v3/index38.js +2 -17
  194. package/dist/v3/index39.js +17 -17
  195. package/dist/v3/index40.js +16 -1
  196. package/dist/v3/index41.js +3 -3
  197. package/dist/v3/index42.js +1 -1
  198. package/dist/v3/index43.js +3 -16
  199. package/dist/v3/index44.js +1 -7
  200. package/dist/v3/index45.js +20 -1
  201. package/dist/v3/index46.js +3 -3
  202. package/dist/v3/index47.js +1 -2
  203. package/dist/v3/index48.js +2 -8
  204. package/dist/v3/index49.js +9 -14
  205. package/dist/v3/index50.js +14 -12
  206. package/dist/v3/index51.js +12 -11
  207. package/dist/v3/index52.js +11 -12
  208. package/dist/v3/index53.js +11 -11
  209. package/dist/v3/index54.js +12 -1
  210. package/dist/v3/index55.js +2 -5
  211. package/dist/v3/index56.js +1 -5
  212. package/dist/v3/index57.js +9 -3
  213. package/dist/v3/index58.js +2 -4
  214. package/dist/v3/index59.js +5 -3
  215. package/dist/v3/index60.js +2 -1
  216. package/dist/v3/index61.js +1 -4
  217. package/dist/v3/index62.js +6 -307
  218. package/dist/v3/index63.js +4 -4
  219. package/dist/v3/index64.js +2 -15
  220. package/dist/v3/index65.js +13 -22
  221. package/dist/v3/index66.js +24 -3
  222. package/dist/v3/index67.js +2 -1
  223. package/dist/v3/index68.js +3 -4
  224. package/dist/v3/index69.js +3 -4
  225. package/dist/v3/index70.js +3 -9
  226. package/dist/v3/index71.js +3 -4
  227. package/dist/v3/index72.js +4 -4
  228. package/dist/v3/index73.js +11 -5
  229. package/dist/v3/index74.js +2 -2
  230. package/dist/v3/index75.js +5 -2
  231. package/dist/v3/index76.js +4 -3
  232. package/dist/v3/index77.js +1 -2
  233. package/dist/v3/index78.js +2 -13
  234. package/dist/v3/index79.js +2 -9
  235. package/dist/v3/index80.js +5 -4
  236. package/dist/v3/index81.js +11 -1
  237. package/dist/v3/index82.js +13 -1
  238. package/dist/v3/index83.js +1 -3
  239. package/dist/v3/index84.js +1 -8
  240. package/dist/v3/index85.js +2 -17
  241. package/dist/v3/index86.js +7 -14
  242. package/dist/v3/index87.js +18 -1
  243. package/dist/v3/index88.js +14 -15
  244. package/dist/v3/index89.js +1 -1
  245. package/dist/v3/index90.js +15 -6
  246. package/dist/v3/index91.js +2 -11
  247. package/dist/v3/index92.js +8 -1
  248. package/dist/v3/index93.js +11 -6
  249. package/dist/v3/index94.js +1 -2
  250. package/dist/v3/index95.js +7 -0
  251. package/dist/v3/index96.js +3 -0
  252. package/dist/v3/{types-a2a8f948.js → types-d5d4ab32.js} +1 -1
  253. package/package.json +2 -8
  254. package/src/components/index.ts +3 -0
  255. package/src/components/or-card-collection-v3/OrCardCollection.docs.mdx +3 -0
  256. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +162 -0
  257. package/src/components/or-card-collection-v3/OrCardCollection.vue +210 -0
  258. package/src/components/or-card-collection-v3/index.ts +3 -0
  259. package/src/components/or-card-collection-v3/props.ts +4 -0
  260. package/src/components/or-card-collection-v3/styles.ts +53 -0
  261. package/src/components/or-card-collection-v3/types.ts +8 -0
  262. package/src/components/or-checkbox-v3/OrCheckbox.stories3.ts +1 -1
  263. package/src/components/or-inline-input-v3/OrInlineInput.vue +14 -12
  264. package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +14 -12
  265. package/src/components/or-input-v3/OrInput.vue +33 -29
  266. package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
  267. package/src/components/or-segmented-control-v3/OrSegmentedControl.docs.mdx +7 -0
  268. package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +106 -0
  269. package/src/components/or-segmented-control-v3/OrSegmentedControl.vue +107 -0
  270. package/src/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue +64 -0
  271. package/src/components/or-segmented-control-v3/components/or-segmented-control-item/styles.ts +50 -0
  272. package/src/components/or-segmented-control-v3/index.ts +3 -0
  273. package/src/components/or-segmented-control-v3/props.ts +4 -0
  274. package/src/components/or-segmented-control-v3/styles.ts +24 -0
  275. package/src/components/or-segmented-control-v3/types.ts +4 -0
  276. package/src/components/or-select-v3/OrSelect.vue +5 -3
  277. package/src/components/or-sort-header-v3/OrSortHeader.docs.mdx +3 -0
  278. package/src/components/or-sort-header-v3/OrSortHeader.stories3.ts +132 -0
  279. package/src/components/or-sort-header-v3/OrSortHeader.vue +111 -0
  280. package/src/components/or-sort-header-v3/index.ts +2 -0
  281. package/src/components/or-sort-header-v3/styles.ts +23 -0
  282. package/src/components/or-sort-header-v3/types.ts +4 -0
  283. package/src/components/or-switch-v3/OrSwitch.stories3.ts +1 -1
  284. package/src/components/or-tabs-v3/OrTabs.stories3.ts +9 -4
  285. package/src/components/or-tabs-v3/OrTabs.vue +1 -1
  286. package/src/components/or-textarea-v3/OrTextarea.vue +12 -10
  287. package/src/components/or-tooltip-v3/OrTooltip.vue +3 -2
  288. package/src/components/or-tooltip-v3/styles.ts +55 -0
  289. package/src/hooks/useClassAttribute.ts +1 -1
  290. package/dist/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -111
  291. package/dist/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
  292. package/dist/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -7
  293. package/dist/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -111
  294. package/dist/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
  295. package/dist/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -7
  296. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +0 -16
  297. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +0 -57
  298. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -322
  299. package/src/components/or-rich-text-editor-v3/index.ts +0 -1
  300. package/src/components/or-rich-text-editor-v3/styles.ts +0 -71
@@ -1,6 +1,6 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref } from 'vue-demi';
3
+ import { ref, watch } from 'vue-demi';
4
4
  import OrTabsDocs from './OrTabs.docs.mdx';
5
5
  import OrTabs from './OrTabs.vue';
6
6
  import { TabsVariant } from './props';
@@ -63,11 +63,16 @@ const Template: StoryFn<typeof OrTabs> = (args) => ({
63
63
 
64
64
  setup() {
65
65
  // State
66
- const value = ref<string>();
66
+ const model = ref<string>();
67
+
68
+ // Effects
69
+ watch(model, (value) => {
70
+ console.debug(value);
71
+ });
67
72
 
68
73
  return {
69
74
  args,
70
- value,
75
+ model,
71
76
  onUpdateModelValue: action('update:modelValue'),
72
77
  onInput: action('input'),
73
78
  };
@@ -75,7 +80,7 @@ const Template: StoryFn<typeof OrTabs> = (args) => ({
75
80
 
76
81
  template: `
77
82
  <OrTabs
78
- v-model="value"
83
+ v-model="model"
79
84
  v-bind="args"
80
85
  @update:modelValue="onUpdateModelValue"
81
86
  @input="onInput"
@@ -8,7 +8,7 @@
8
8
  <OrTab
9
9
  v-for="tab in tabs.normal"
10
10
  :key="tab.value"
11
- :selected="proxyModelValue === tab.value"
11
+ :selected="tab.value === proxyModelValue"
12
12
  @click.stop="proxyModelValue = tab.value"
13
13
  >
14
14
  {{ tab.label }}
@@ -40,16 +40,18 @@
40
40
  </OrInputBox>
41
41
 
42
42
  <template v-if="!invalid">
43
- <OrHint :disabled="disabled">
44
- {{ hint }}
45
-
46
- <template
47
- v-if="maxLength"
48
- v-slot:addon
49
- >
50
- {{ currentLength }} / {{ maxLength }}
51
- </template>
52
- </OrHint>
43
+ <template v-if="hint || maxLength">
44
+ <OrHint :disabled="disabled">
45
+ {{ hint }}
46
+
47
+ <template
48
+ v-if="maxLength"
49
+ v-slot:addon
50
+ >
51
+ {{ currentLength }} / {{ maxLength }}
52
+ </template>
53
+ </OrHint>
54
+ </template>
53
55
  </template>
54
56
 
55
57
  <template v-else>
@@ -30,7 +30,7 @@ import { computed, defineComponent, PropType, ref, watch } from 'vue-demi';
30
30
  import { useClassAttribute } from '../../hooks';
31
31
  import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
32
32
  import { TooltipPlacement } from './props';
33
- import { TooltipBody, TooltipRoot } from './styles';
33
+ import { TooltipBody, TooltipBodyPlacements, TooltipRoot } from './styles';
34
34
 
35
35
  export default defineComponent({
36
36
  name: 'OrTooltip',
@@ -63,7 +63,7 @@ export default defineComponent({
63
63
  'close',
64
64
  ],
65
65
 
66
- setup() {
66
+ setup(props) {
67
67
  // Refs
68
68
  const root = ref<HTMLElement>();
69
69
 
@@ -81,6 +81,7 @@ export default defineComponent({
81
81
 
82
82
  const bodyStyles = computed(() => [
83
83
  ...TooltipBody,
84
+ ...TooltipBodyPlacements[props.placement],
84
85
  ]);
85
86
 
86
87
  // Methods
@@ -1,3 +1,5 @@
1
+ import { TooltipPlacement } from './props';
2
+
1
3
  export const TooltipRoot: string[] = [
2
4
  // Layout
3
5
  'inline-block',
@@ -9,6 +11,9 @@ export const TooltipBody: string[] = [
9
11
  'rounded-sm',
10
12
 
11
13
  // Sizing
14
+ 'mx-sm',
15
+ 'my-sm',
16
+
12
17
  'px-sm',
13
18
  'py-xs',
14
19
 
@@ -22,3 +27,53 @@ export const TooltipBody: string[] = [
22
27
  'text-inverse-on-surface',
23
28
  'dark:text-inverse-on-surface-dark',
24
29
  ];
30
+
31
+ export const TooltipBodyPlacements: Record<TooltipPlacement, string[]> = {
32
+ 'top': [],
33
+
34
+ 'top-start': [
35
+ // Sizing
36
+ 'ml-none',
37
+ ],
38
+
39
+ 'top-end': [
40
+ // Sizing
41
+ 'mr-none',
42
+ ],
43
+
44
+ 'bottom': [],
45
+
46
+ 'bottom-start': [
47
+ // Sizing
48
+ 'ml-none',
49
+ ],
50
+
51
+ 'bottom-end': [
52
+ // Sizing
53
+ 'mr-none',
54
+ ],
55
+
56
+ 'left': [],
57
+
58
+ 'left-start': [
59
+ // Sizing
60
+ 'mt-none',
61
+ ],
62
+
63
+ 'left-end': [
64
+ // Sizing
65
+ 'mb-none',
66
+ ],
67
+
68
+ 'right': [],
69
+
70
+ 'right-start': [
71
+ // Sizing
72
+ 'mt-none',
73
+ ],
74
+
75
+ 'right-end': [
76
+ // Sizing
77
+ 'mb-none',
78
+ ],
79
+ };
@@ -8,7 +8,7 @@ export function useClassAttribute(): UseClassAttributeReturn {
8
8
 
9
9
  // Functions
10
10
  function composeClass(): UnwrapRef<UseClassAttributeReturn> {
11
- const { staticClass = '', class: classProperty } = (currentInstance?.vnode as VNode).data ?? {};
11
+ const { staticClass = '', class: classProperty } = (currentInstance?.vnode as unknown as VNode).data ?? {};
12
12
 
13
13
  if (!classProperty) {
14
14
  return staticClass || undefined;
@@ -1,111 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
3
- editor: Editor | null;
4
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
5
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
6
- iconsEnum: import("@vue/composition-api").Ref<{
7
- [x: string]: string;
8
- }>;
9
- handleToolbarClick: (item: string) => void;
10
- handleEditorClick: () => void;
11
- isActive: import("@vue/composition-api").Ref<{
12
- [x: string]: boolean;
13
- }>;
14
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
15
- [x: string]: string;
16
- }>;
17
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
18
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
19
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
20
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
21
- toolbarButtonStyles: (item: string) => string[];
22
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
23
- }> & import("@vue/composition-api").Data, {}, {}, {
24
- modelValue: {
25
- type: StringConstructor;
26
- default: string;
27
- required: false;
28
- };
29
- toolbar: {
30
- type: ArrayConstructor;
31
- default: () => string[][];
32
- };
33
- description: {
34
- type: StringConstructor;
35
- default: string;
36
- };
37
- placeholder: {
38
- type: StringConstructor;
39
- default: string;
40
- };
41
- autofocus: {
42
- type: BooleanConstructor;
43
- default: boolean;
44
- };
45
- }, import("@vue/composition-api").ExtractPropTypes<{
46
- modelValue: {
47
- type: StringConstructor;
48
- default: string;
49
- required: false;
50
- };
51
- toolbar: {
52
- type: ArrayConstructor;
53
- default: () => string[][];
54
- };
55
- description: {
56
- type: StringConstructor;
57
- default: string;
58
- };
59
- placeholder: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- autofocus: {
64
- type: BooleanConstructor;
65
- default: boolean;
66
- };
67
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
68
- modelValue: string;
69
- toolbar: unknown[];
70
- description: string;
71
- placeholder: string;
72
- autofocus: boolean;
73
- } & {} & {
74
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
75
- }, import("@vue/composition-api").ShallowUnwrapRef<{
76
- editor: Editor | null;
77
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
78
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
79
- iconsEnum: import("@vue/composition-api").Ref<{
80
- [x: string]: string;
81
- }>;
82
- handleToolbarClick: (item: string) => void;
83
- handleEditorClick: () => void;
84
- isActive: import("@vue/composition-api").Ref<{
85
- [x: string]: boolean;
86
- }>;
87
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
88
- [x: string]: string;
89
- }>;
90
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
91
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
92
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
93
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
94
- toolbarButtonStyles: (item: string) => string[];
95
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
96
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
97
- modelValue: string;
98
- toolbar: unknown[];
99
- description: string;
100
- placeholder: string;
101
- autofocus: boolean;
102
- } & {} & {
103
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
104
- }, {
105
- modelValue: string;
106
- toolbar: unknown[];
107
- description: string;
108
- placeholder: string;
109
- autofocus: boolean;
110
- }, true>);
111
- export default _default;
@@ -1 +0,0 @@
1
- export { default as OrRichTextEditor } from './OrRichTextEditor.vue';
@@ -1,7 +0,0 @@
1
- export declare const EditorContainer: string[];
2
- export declare const EditorContainerFilled: string[];
3
- export declare const ToolbarContainer: string[];
4
- export declare const Toolbar: string[];
5
- export declare const ToolbarButton: string[];
6
- export declare const ToolbarButtonActive: string[];
7
- export declare const EditorInput: string[];
@@ -1,111 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
3
- editor: Editor | null;
4
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
5
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
6
- iconsEnum: import("@vue/composition-api").Ref<{
7
- [x: string]: string;
8
- }>;
9
- handleToolbarClick: (item: string) => void;
10
- handleEditorClick: () => void;
11
- isActive: import("@vue/composition-api").Ref<{
12
- [x: string]: boolean;
13
- }>;
14
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
15
- [x: string]: string;
16
- }>;
17
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
18
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
19
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
20
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
21
- toolbarButtonStyles: (item: string) => string[];
22
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
23
- }> & import("@vue/composition-api").Data, {}, {}, {
24
- modelValue: {
25
- type: StringConstructor;
26
- default: string;
27
- required: false;
28
- };
29
- toolbar: {
30
- type: ArrayConstructor;
31
- default: () => string[][];
32
- };
33
- description: {
34
- type: StringConstructor;
35
- default: string;
36
- };
37
- placeholder: {
38
- type: StringConstructor;
39
- default: string;
40
- };
41
- autofocus: {
42
- type: BooleanConstructor;
43
- default: boolean;
44
- };
45
- }, import("@vue/composition-api").ExtractPropTypes<{
46
- modelValue: {
47
- type: StringConstructor;
48
- default: string;
49
- required: false;
50
- };
51
- toolbar: {
52
- type: ArrayConstructor;
53
- default: () => string[][];
54
- };
55
- description: {
56
- type: StringConstructor;
57
- default: string;
58
- };
59
- placeholder: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- autofocus: {
64
- type: BooleanConstructor;
65
- default: boolean;
66
- };
67
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
68
- modelValue: string;
69
- toolbar: unknown[];
70
- description: string;
71
- placeholder: string;
72
- autofocus: boolean;
73
- } & {} & {
74
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
75
- }, import("@vue/composition-api").ShallowUnwrapRef<{
76
- editor: Editor | null;
77
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
78
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
79
- iconsEnum: import("@vue/composition-api").Ref<{
80
- [x: string]: string;
81
- }>;
82
- handleToolbarClick: (item: string) => void;
83
- handleEditorClick: () => void;
84
- isActive: import("@vue/composition-api").Ref<{
85
- [x: string]: boolean;
86
- }>;
87
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
88
- [x: string]: string;
89
- }>;
90
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
91
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
92
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
93
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
94
- toolbarButtonStyles: (item: string) => string[];
95
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
96
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
97
- modelValue: string;
98
- toolbar: unknown[];
99
- description: string;
100
- placeholder: string;
101
- autofocus: boolean;
102
- } & {} & {
103
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
104
- }, {
105
- modelValue: string;
106
- toolbar: unknown[];
107
- description: string;
108
- placeholder: string;
109
- autofocus: boolean;
110
- }, true>);
111
- export default _default;
@@ -1 +0,0 @@
1
- export { default as OrRichTextEditor } from './OrRichTextEditor.vue';
@@ -1,7 +0,0 @@
1
- export declare const EditorContainer: string[];
2
- export declare const EditorContainerFilled: string[];
3
- export declare const ToolbarContainer: string[];
4
- export declare const Toolbar: string[];
5
- export declare const ToolbarButton: string[];
6
- export declare const ToolbarButtonActive: string[];
7
- export declare const EditorInput: string[];
@@ -1,16 +0,0 @@
1
- import {
2
- Title,
3
- Subtitle,
4
- Description,
5
- Primary,
6
- ArgsTable,
7
- Stories,
8
- PRIMARY_STORY
9
- } from '@storybook/addon-docs';
10
-
11
- <Title />
12
- <Subtitle />
13
- <Description />
14
- <Primary />
15
- <ArgsTable story={PRIMARY_STORY} />
16
- <Stories />
@@ -1,57 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- import { ref } from 'vue-demi';
3
- import OrRichTextEditorDocs from './OrRichTextEditor.docs.mdx';
4
- import OrRichTextEditor from './OrRichTextEditor.vue';
5
-
6
- export default {
7
- title: 'Demo/OrRichTextEditor',
8
- component: OrRichTextEditor,
9
-
10
- argTypes: {
11
- // Props
12
- description: {
13
- control: { type: 'text' },
14
- },
15
- placeholder: {
16
- control: { type: 'text' },
17
- },
18
- modelValue: {
19
- control: { type: 'text' },
20
- },
21
- },
22
-
23
- parameters: {
24
- docs: {
25
- page: OrRichTextEditorDocs,
26
- },
27
-
28
- design: {
29
- type: 'figma',
30
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=608%3A2926',
31
- },
32
- },
33
- } as Meta<typeof OrRichTextEditor>;
34
-
35
- const Template: StoryFn<typeof OrRichTextEditor> = (args) => ({
36
- components: {
37
- OrRichTextEditor,
38
- },
39
-
40
- setup() {
41
- // Refs
42
- const text = ref('');
43
- return {
44
- args,
45
- text,
46
- };
47
- },
48
-
49
- template: `
50
- <OrRichTextEditor
51
- v-bind="args"
52
- v-model="text"
53
- />
54
- `,
55
- });
56
-
57
- export const RichTextEditor = Template.bind({});