@onereach/ui-components 2.70.2-beta.2198.0 → 2.70.2-beta.2199.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 (223) hide show
  1. package/dist/bundled/v2/{OrCardCollection-0141a358.js → OrCardCollection-1bb83cfb.js} +1 -1
  2. package/dist/bundled/v2/{OrCheckbox-dbef9f9a.js → OrCheckbox-251ecafc.js} +32 -17
  3. package/dist/bundled/v2/{OrConfirm-23c3ce56.js → OrConfirm-4cae7867.js} +1 -1
  4. package/dist/bundled/v2/{OrInlineInput-87589946.js → OrInlineInput-2133e469.js} +38 -22
  5. package/dist/bundled/v2/{OrInlineTextarea-21b0e6fc.js → OrInlineTextarea-d61ca596.js} +34 -18
  6. package/dist/bundled/v2/{OrInput-82ccfe00.js → OrInput-770f1bed.js} +38 -30
  7. package/dist/bundled/v2/{OrPagination-379c10b8.js → OrPagination-468d0964.js} +1 -1
  8. package/dist/bundled/v2/{OrRadio-cd39b20b.js → OrRadio-ae89bc9b.js} +30 -15
  9. package/dist/bundled/v2/{OrSearch-53470b0e.js → OrSearch-2e5f9e24.js} +1 -1
  10. package/dist/bundled/v2/{OrSelect-c49e1bcf.js → OrSelect-039c0711.js} +2 -2
  11. package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
  12. package/dist/bundled/v2/{OrSwitch-237a2081.js → OrSwitch-20640a05.js} +30 -15
  13. package/dist/bundled/v2/{OrTabs-42f7c52c.js → OrTabs-85aefcba.js} +1 -1
  14. package/dist/bundled/v2/{OrTextarea-5593fbe9.js → OrTextarea-0ff8063b.js} +39 -20
  15. package/dist/bundled/v2/components/index.js +16 -14
  16. package/dist/bundled/v2/components/or-card-collection-v3/index.js +5 -3
  17. package/dist/bundled/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
  18. package/dist/bundled/v2/components/or-checkbox-v3/index.js +2 -1
  19. package/dist/bundled/v2/components/or-confirm-v3/index.js +4 -2
  20. package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
  21. package/dist/bundled/v2/components/or-inline-input-v3/index.js +3 -1
  22. package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
  23. package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +3 -1
  24. package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +43 -8
  25. package/dist/bundled/v2/components/or-input-v3/index.js +3 -1
  26. package/dist/bundled/v2/components/or-pagination-v3/index.js +1 -1
  27. package/dist/bundled/v2/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
  28. package/dist/bundled/v2/components/or-radio-v3/index.js +2 -1
  29. package/dist/bundled/v2/components/or-search-v3/index.js +4 -2
  30. package/dist/bundled/v2/components/or-select-v3/index.js +5 -3
  31. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  32. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  33. package/dist/bundled/v2/components/or-sidebar-v3/index.js +1 -13
  34. package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +1 -7
  35. package/dist/bundled/v2/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
  36. package/dist/bundled/v2/components/or-switch-v3/index.js +2 -1
  37. package/dist/bundled/v2/components/or-tabs-v3/index.js +1 -1
  38. package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
  39. package/dist/bundled/v2/components/or-textarea-v3/index.js +3 -1
  40. package/dist/bundled/v2/hooks/index.d.ts +3 -0
  41. package/dist/bundled/v2/hooks/index.js +2 -0
  42. package/dist/bundled/v2/hooks/useControlAttributes.d.ts +8 -0
  43. package/dist/bundled/v2/hooks/useIdAttribute.d.ts +2 -0
  44. package/dist/bundled/v2/hooks/useValidationAttributes.d.ts +12 -0
  45. package/dist/bundled/v2/index.js +17 -15
  46. package/dist/bundled/v2/useIdAttribute-cf61643f.js +22 -0
  47. package/dist/bundled/v2/useValidationAttributes-6df7bcf9.js +17 -0
  48. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-2d78a51a.js → OrCardCollection.vue_vue_type_script_lang-a0f29a55.js} +1 -1
  49. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-8b36e06c.js → OrCheckbox.vue_vue_type_script_lang-2024ec32.js} +22 -7
  50. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-05b21989.js → OrConfirm.vue_vue_type_script_lang-7d9d3810.js} +2 -2
  51. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-67218502.js → OrInlineInput.vue_vue_type_script_lang-40f0073f.js} +27 -11
  52. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-a1831ab8.js → OrInlineTextarea.vue_vue_type_script_lang-2817edd5.js} +27 -11
  53. package/dist/bundled/v3/{OrInput-a4f220ed.js → OrInput-e325a104.js} +12 -12
  54. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-607d79d4.js → OrInput.vue_vue_type_script_lang-fd850b82.js} +26 -15
  55. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-c96d7cd7.js → OrPagination.vue_vue_type_script_lang-0d9daaa7.js} +1 -1
  56. package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-2e666a56.js → OrRadio.vue_vue_type_script_lang-29e8b856.js} +22 -7
  57. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-06f318ca.js → OrSearch.vue_vue_type_script_lang-480f4b1c.js} +2 -2
  58. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-58e5a52b.js → OrSelect.vue_vue_type_script_lang-7aa8956a.js} +17 -15
  59. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
  60. package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-04829f64.js → OrSwitch.vue_vue_type_script_lang-02b4913a.js} +22 -7
  61. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-01188224.js} +1 -1
  62. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-8e3531cd.js → OrTextarea.vue_vue_type_script_lang-2fdac7b2.js} +31 -12
  63. package/dist/bundled/v3/components/index.js +17 -15
  64. package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -4
  65. package/dist/bundled/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
  66. package/dist/bundled/v3/components/or-checkbox-v3/index.js +2 -1
  67. package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -3
  68. package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
  69. package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -1
  70. package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
  71. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -1
  72. package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +43 -8
  73. package/dist/bundled/v3/components/or-input-v3/index.js +3 -1
  74. package/dist/bundled/v3/components/or-pagination-v3/index.js +1 -1
  75. package/dist/bundled/v3/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
  76. package/dist/bundled/v3/components/or-radio-v3/index.js +2 -1
  77. package/dist/bundled/v3/components/or-search-v3/index.js +5 -3
  78. package/dist/bundled/v3/components/or-select-v3/index.js +6 -4
  79. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  80. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  81. package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
  82. package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -7
  83. package/dist/bundled/v3/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
  84. package/dist/bundled/v3/components/or-switch-v3/index.js +2 -1
  85. package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -1
  86. package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
  87. package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -1
  88. package/dist/bundled/v3/hooks/index.d.ts +3 -0
  89. package/dist/bundled/v3/hooks/index.js +2 -0
  90. package/dist/bundled/v3/hooks/useControlAttributes.d.ts +8 -0
  91. package/dist/bundled/v3/hooks/useIdAttribute.d.ts +2 -0
  92. package/dist/bundled/v3/hooks/useValidationAttributes.d.ts +12 -0
  93. package/dist/bundled/v3/index.js +85 -93
  94. package/dist/bundled/v3/useIdAttribute-b2e42f31.js +21 -0
  95. package/dist/bundled/v3/useValidationAttributes-5428d8fa.js +16 -0
  96. package/dist/esm/v2/{OrCardCollection-3c38fc85.js → OrCardCollection-784318ac.js} +1 -1
  97. package/dist/esm/v2/{OrCheckbox-567e387c.js → OrCheckbox-7317fe1a.js} +32 -17
  98. package/dist/esm/v2/{OrConfirm-e2ab9b4c.js → OrConfirm-3d064f6c.js} +1 -1
  99. package/dist/esm/v2/{OrInlineInput-10205811.js → OrInlineInput-7c4f1f92.js} +38 -22
  100. package/dist/esm/v2/{OrInlineTextarea-7658611e.js → OrInlineTextarea-3381e2a9.js} +34 -18
  101. package/dist/esm/v2/{OrInput-ada3a970.js → OrInput-e10cc643.js} +38 -30
  102. package/dist/esm/v2/{OrPagination-c0dbec6a.js → OrPagination-291bd1b9.js} +1 -1
  103. package/dist/esm/v2/{OrRadio-848ce55d.js → OrRadio-b0a560d2.js} +30 -15
  104. package/dist/esm/v2/{OrSearch-0f08f2f5.js → OrSearch-1490c00b.js} +1 -1
  105. package/dist/esm/v2/{OrSelect-1d705445.js → OrSelect-1fbeed4f.js} +2 -2
  106. package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
  107. package/dist/esm/v2/{OrSwitch-13b6a7ee.js → OrSwitch-133052ca.js} +30 -15
  108. package/dist/esm/v2/{OrTabs-71bd3fd2.js → OrTabs-e5b81f4b.js} +1 -1
  109. package/dist/esm/v2/{OrTextarea-6712a150.js → OrTextarea-a7c846da.js} +39 -20
  110. package/dist/esm/v2/components/index.js +16 -14
  111. package/dist/esm/v2/components/or-card-collection-v3/index.js +5 -3
  112. package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
  113. package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -1
  114. package/dist/esm/v2/components/or-confirm-v3/index.js +4 -2
  115. package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
  116. package/dist/esm/v2/components/or-inline-input-v3/index.js +3 -1
  117. package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
  118. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +3 -1
  119. package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +43 -8
  120. package/dist/esm/v2/components/or-input-v3/index.js +3 -1
  121. package/dist/esm/v2/components/or-pagination-v3/index.js +1 -1
  122. package/dist/esm/v2/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
  123. package/dist/esm/v2/components/or-radio-v3/index.js +2 -1
  124. package/dist/esm/v2/components/or-search-v3/index.js +4 -2
  125. package/dist/esm/v2/components/or-select-v3/index.js +5 -3
  126. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  127. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  128. package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
  129. package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -7
  130. package/dist/esm/v2/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
  131. package/dist/esm/v2/components/or-switch-v3/index.js +2 -1
  132. package/dist/esm/v2/components/or-tabs-v3/index.js +1 -1
  133. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
  134. package/dist/esm/v2/components/or-textarea-v3/index.js +3 -1
  135. package/dist/esm/v2/hooks/index.d.ts +3 -0
  136. package/dist/esm/v2/hooks/index.js +2 -0
  137. package/dist/esm/v2/hooks/useControlAttributes.d.ts +8 -0
  138. package/dist/esm/v2/hooks/useIdAttribute.d.ts +2 -0
  139. package/dist/esm/v2/hooks/useValidationAttributes.d.ts +12 -0
  140. package/dist/esm/v2/index.js +16 -14
  141. package/dist/esm/v2/useIdAttribute-859439f0.js +21 -0
  142. package/dist/esm/v2/useValidationAttributes-d1abbe34.js +16 -0
  143. package/dist/esm/v3/{OrCardCollection-dbb3e839.js → OrCardCollection-110b3a0b.js} +1 -1
  144. package/dist/esm/v3/{OrCheckbox-3e139eac.js → OrCheckbox-7144da06.js} +36 -19
  145. package/dist/esm/v3/{OrConfirm-1bcd39b1.js → OrConfirm-1a38ed1b.js} +1 -1
  146. package/dist/esm/v3/{OrInlineInput-507fc99c.js → OrInlineInput-a6b19dbe.js} +37 -20
  147. package/dist/esm/v3/{OrInlineTextarea-53a9e027.js → OrInlineTextarea-9eb60363.js} +37 -20
  148. package/dist/esm/v3/{OrInput-9c0426b9.js → OrInput-e07ec00c.js} +37 -26
  149. package/dist/esm/v3/{OrPagination-a703307d.js → OrPagination-5e01a0a5.js} +1 -1
  150. package/dist/esm/v3/{OrRadio-54b6d0de.js → OrRadio-39d1905d.js} +34 -17
  151. package/dist/esm/v3/{OrSearch-9885d178.js → OrSearch-a60f67f0.js} +1 -1
  152. package/dist/esm/v3/{OrSelect-dfa4885f.js → OrSelect-2c70e384.js} +2 -2
  153. package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
  154. package/dist/esm/v3/{OrSwitch-cca30aa0.js → OrSwitch-3e9a699d.js} +34 -18
  155. package/dist/esm/v3/{OrTabs-d0ee6cef.js → OrTabs-91618aab.js} +1 -1
  156. package/dist/esm/v3/{OrTextarea-bb9ef3f2.js → OrTextarea-fd6b9f31.js} +42 -22
  157. package/dist/esm/v3/components/index.js +16 -14
  158. package/dist/esm/v3/components/or-card-collection-v3/index.js +5 -3
  159. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
  160. package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -1
  161. package/dist/esm/v3/components/or-confirm-v3/index.js +4 -2
  162. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
  163. package/dist/esm/v3/components/or-inline-input-v3/index.js +3 -1
  164. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
  165. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +3 -1
  166. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +43 -8
  167. package/dist/esm/v3/components/or-input-v3/index.js +3 -1
  168. package/dist/esm/v3/components/or-pagination-v3/index.js +1 -1
  169. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
  170. package/dist/esm/v3/components/or-radio-v3/index.js +2 -1
  171. package/dist/esm/v3/components/or-search-v3/index.js +4 -2
  172. package/dist/esm/v3/components/or-select-v3/index.js +5 -3
  173. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  174. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  175. package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
  176. package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -7
  177. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
  178. package/dist/esm/v3/components/or-switch-v3/index.js +2 -1
  179. package/dist/esm/v3/components/or-tabs-v3/index.js +1 -1
  180. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
  181. package/dist/esm/v3/components/or-textarea-v3/index.js +3 -1
  182. package/dist/esm/v3/hooks/index.d.ts +3 -0
  183. package/dist/esm/v3/hooks/index.js +2 -0
  184. package/dist/esm/v3/hooks/useControlAttributes.d.ts +8 -0
  185. package/dist/esm/v3/hooks/useIdAttribute.d.ts +2 -0
  186. package/dist/esm/v3/hooks/useValidationAttributes.d.ts +12 -0
  187. package/dist/esm/v3/index.js +16 -14
  188. package/dist/esm/v3/useIdAttribute-859439f0.js +21 -0
  189. package/dist/esm/v3/useValidationAttributes-d1abbe34.js +16 -0
  190. package/package.json +1 -1
  191. package/src/components/or-checkbox-v3/OrCheckbox.vue +28 -10
  192. package/src/components/or-inline-input-v3/OrInlineInput.vue +32 -13
  193. package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +32 -13
  194. package/src/components/or-input-v3/OrInput.stories3.ts +4 -4
  195. package/src/components/or-input-v3/OrInput.vue +31 -19
  196. package/src/components/or-pagination-v3/OrPagination.vue +1 -1
  197. package/src/components/or-radio-v3/OrRadio.vue +27 -9
  198. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
  199. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +6 -219
  200. package/src/components/or-sidebar-v3/OrSidebar.vue +22 -121
  201. package/src/components/or-sidebar-v3/styles.ts +9 -153
  202. package/src/components/or-switch-v3/OrSwitch.vue +27 -9
  203. package/src/components/or-tabs-v3/OrTabs.vue +1 -1
  204. package/src/components/or-textarea-v3/OrTextarea.stories3.ts +4 -4
  205. package/src/components/or-textarea-v3/OrTextarea.vue +36 -14
  206. package/src/hooks/index.ts +3 -0
  207. package/src/hooks/useControlAttributes.ts +19 -0
  208. package/src/hooks/useIdAttribute.ts +9 -0
  209. package/src/hooks/useValidationAttributes.ts +25 -0
  210. package/dist/bundled/v2/OrSidebar-2a7d62a8.js +0 -455
  211. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  212. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
  213. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-b4fa1550.js +0 -347
  214. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  215. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
  216. package/dist/esm/v2/OrSidebar-1e02702f.js +0 -452
  217. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  218. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
  219. package/dist/esm/v3/OrSidebar-749bbcba.js +0 -387
  220. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  221. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
  222. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
  223. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -64
@@ -1,347 +0,0 @@
1
- import { useDraggable, useElementBounding } from '@vueuse/core';
2
- import _ from 'lodash';
3
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, useSlots, watch } from 'vue';
4
- import './OrIconButton-cd62526d.js';
5
- import { s as script$2 } from './OrIconButton.vue_vue_type_script_lang-aefcf30d.js';
6
-
7
- var OrSidebarPlacement;
8
- (function (OrSidebarPlacement) {
9
- OrSidebarPlacement["left"] = "left";
10
- OrSidebarPlacement["right"] = "right";
11
- })(OrSidebarPlacement || (OrSidebarPlacement = {}));
12
-
13
- const SidebarRoot = [
14
- // Position
15
- 'relative',
16
- // Layout
17
- 'flex', 'flex-row', 'shrink-0',
18
- // Box
19
- 'min-w-0', 'h-auto', 'p-0',
20
- // Theme
21
- 'bg-background', 'dark:bg-background-dark'];
22
- const SidebarBar = [
23
- // Position
24
- 'relative',
25
- // Layout
26
- 'flex', 'flex-col', 'shrink-0', 'grow',
27
- // Box
28
- 'min-h-0', 'p-0',
29
- // Theme
30
- 'text-on-background', 'dark:text-on-background-dark',
31
- // Transition
32
- 'transition-[width]'];
33
- const SidebarToolbar = [
34
- // Position
35
- 'relative',
36
- // Layout
37
- 'flex', 'flex-col', 'shrink-0', 'grow', 'overflow-auto', 'items-center',
38
- // Sizing
39
- 'gap-md',
40
- // Box
41
- 'min-h-0', 'min-w-xl', 'p-[6px]', 'pt-[56px]', 'pb-md+',
42
- // Theme
43
- 'text-outline', 'dark:text-outline-dark'];
44
- const SidebarSides = {
45
- [OrSidebarPlacement.left]: [
46
- // Borders
47
- 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
48
- [OrSidebarPlacement.right]: [
49
- // Borders
50
- 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
51
- };
52
- const SidebarToolbarSides = {
53
- [OrSidebarPlacement.left]: [
54
- // Borders
55
- 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
56
- [OrSidebarPlacement.right]: [
57
- // Borders
58
- 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
59
- };
60
- const SidebarResize = [
61
- // Position
62
- 'absolute', 'inset-y-none', 'z-[1]',
63
- // Box
64
- 'w-sm+', 'h-[100%]',
65
- // Cursor
66
- 'cursor-ew-resize'];
67
- const SidebarResizeSides = {
68
- [OrSidebarPlacement.left]: [
69
- // Position
70
- '-right-[1px]',
71
- // Borders
72
- 'hover:border-r-2', 'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
73
- // Transition
74
- 'transition-[border-right]'],
75
- [OrSidebarPlacement.right]: [
76
- // Position
77
- '-left-[1px]',
78
- // Borders
79
- 'hover:border-l-2', 'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
80
- // Transition
81
- 'transition-[border-left]']
82
- };
83
- const SidebarCollapseButton = [
84
- // Position
85
- 'absolute', 'top-md', 'inset-y-none', 'z-[1]',
86
- // Cursor
87
- 'cursor-ew-resize'];
88
- const SidebarCollapseButtonSides = {
89
- [OrSidebarPlacement.left]: [
90
- // Position
91
- '-right-[12px]'],
92
- [OrSidebarPlacement.right]: [
93
- // Position
94
- '-left-[12px]']
95
- };
96
- const SidebarResizingSides = {
97
- [OrSidebarPlacement.left]: [
98
- // Borders
99
- 'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
100
- [OrSidebarPlacement.right]: [
101
- // Borders
102
- 'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
103
- };
104
- const SidebarMain = [
105
- // Layout
106
- 'flex', 'flex-col', 'grow', 'overflow-x-hidden',
107
- // Box
108
- 'min-h-0'];
109
- const SidebarHeader = [
110
- // Layout
111
- 'shrink-0', 'overflow-hidden',
112
- // Sizing
113
- 'p-md',
114
- // Typography
115
- 'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
116
- const SidebarContent = [
117
- // Layout
118
- 'grow', 'overflow-auto',
119
- // Sizing
120
- 'p-md'];
121
- const SidebarFooter = [
122
- // Layout
123
- 'shrink-0', 'overflow-x-hidden',
124
- // Sizing
125
- 'p-md',
126
- // Borders
127
- 'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
128
- const CollapseButton = [
129
- // Box
130
- 'w-[24px]', 'h-[24px]',
131
- // Typography
132
- '!text-[16px]',
133
- // Borders
134
- '!border-[1px]', '!border-solid',
135
- // Theme
136
- '!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
137
- // Theme (hover)
138
- 'hover:!text-primary hover:dark:!text-primary-dark', 'hover:!bg-primary-opacity-0-08 dark:hover:!bg-primary-opacity-0-08-dark', 'hover:!border-outline dark:hover:!border-outline-dark',
139
- // Theme (active)
140
- 'active:!text-primary active:dark:!text-primary-dark', 'active:!bg-primary-opacity-0-12 dark:active:!bg-primary-opacity-0-12-dark', 'active:!border-primary dark:active:!border-primary-dark',
141
- // Theme (focus)
142
- 'focus:!text-primary focus:dark:!text-primary-dark', 'focus:!bg-primary-opacity-0-12 dark:focus:!bg-primary-opacity-0-12-dark', 'focus:!border-outline dark:focus:!border-outline-dark',
143
- // Theme (disabled)
144
- 'disabled:!text-on-disabled disabled:dark:!text-on-disabled-dark', 'disabled:!bg-background disabled:dark:!bg-background-dark', 'disabled:!border-outline-variant disabled:dark:!border-outline-variant-dark'];
145
-
146
- var script$1 = defineComponent({
147
- name: 'OrSidebarCollapseButton',
148
- components: {
149
- OrIconButton: script$2
150
- },
151
- props: {
152
- /**
153
- * Must be `true` if sidebar is collapsed.
154
- */
155
- modelValue: {
156
- type: Boolean,
157
- default: false
158
- },
159
- side: {
160
- type: String,
161
- default: OrSidebarPlacement.right,
162
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
163
- }
164
- },
165
- emits: ['update:modelValue'],
166
- expose: ['root'],
167
- setup(props) {
168
- // Refs
169
- const root = ref();
170
- const rootStyles = computed(() => [...CollapseButton]);
171
- const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
172
- return {
173
- root,
174
- rootStyles,
175
- icon
176
- };
177
- }
178
- });
179
-
180
- function render(_ctx, _cache, $props, $setup, $data, $options) {
181
- const _component_or_icon_button = resolveComponent("or-icon-button");
182
- return openBlock(), createBlock(_component_or_icon_button, {
183
- ref: "root",
184
- class: normalizeClass(_ctx.rootStyles),
185
- icon: {
186
- icon: _ctx.icon,
187
- size: 'inherit'
188
- },
189
- color: "inherit",
190
- onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('update:modelValue', !_ctx.modelValue))
191
- }, null, 8 /* PROPS */, ["class", "icon"]);
192
- }
193
-
194
- script$1.render = render;
195
- script$1.__file = "src/components/or-sidebar-v3/OrSidebarCollapseButton.vue";
196
-
197
- var script = defineComponent({
198
- name: 'OrSidebar',
199
- components: {
200
- OrSidebarCollapseButton: script$1
201
- },
202
- props: {
203
- width: {
204
- type: Number,
205
- default: 320,
206
- validator: value => _.isNumber(value) && value >= 0
207
- },
208
- minimumWidth: {
209
- type: Number,
210
- default: 256,
211
- validator: value => _.isNumber(value) && value >= 0
212
- },
213
- maximumWidth: {
214
- type: Number,
215
- default: 384,
216
- validator: value => _.isNumber(value) && value >= 0
217
- },
218
- /**
219
- * User may put the component on the right or the left side of a container.
220
- * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
221
- *
222
- * Note: the property doesn't reposition the component in the parent container.
223
- * @values left, right
224
- */
225
- side: {
226
- type: String,
227
- default: OrSidebarPlacement.right,
228
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
229
- },
230
- draggable: {
231
- type: Boolean,
232
- default: true
233
- },
234
- collapsible: {
235
- type: Boolean,
236
- default: false
237
- }
238
- },
239
- emits: ['change:width'],
240
- expose: ['root', 'open', 'close'],
241
- setup(props, {
242
- emit
243
- }) {
244
- // Refs
245
- const root = ref();
246
- const resizeBar = ref(null);
247
- const parentContainer = computed(() => {
248
- var _a;
249
- return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
250
- });
251
- // Slots
252
- const {
253
- toolbar: toolbarSlot
254
- } = useSlots();
255
- // State
256
- const startPositionX = ref(0);
257
- const isResizing = ref(false);
258
- const isCollapsed = ref(false);
259
- const maximumWidth = ref(props.maximumWidth || 384);
260
- const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
261
- const isShowingToolbar = computed(() => !!toolbarSlot);
262
- // Styles
263
- const sidebarStyle = computed(() => ({
264
- width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
265
- }));
266
- const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
267
- const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
268
- const toolbarStyles = computed(() => [...SidebarToolbar, ...SidebarToolbarSides[props.side]]);
269
- const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
270
- const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
271
- const mainStyles = computed(() => [...SidebarMain]);
272
- const headerStyles = computed(() => [...SidebarHeader]);
273
- const contentStyles = computed(() => [...SidebarContent]);
274
- const footerStyles = computed(() => [...SidebarFooter]);
275
- // Effects
276
- useDraggable(resizeBar, {
277
- preventDefault: true,
278
- onStart: (position, event) => {
279
- document.body.style.cursor = 'ew-resize';
280
- document.body.style.userSelect = 'none';
281
- startPositionX.value = event.x;
282
- isResizing.value = true;
283
- },
284
- onMove: position => {
285
- const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
286
- const newWidth = localWidth.value - delta;
287
- localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
288
- startPositionX.value = position.x;
289
- },
290
- onEnd: () => {
291
- document.body.style.cursor = '';
292
- document.body.style.userSelect = '';
293
- isResizing.value = false;
294
- }
295
- });
296
- // Methods
297
- function open() {
298
- isCollapsed.value = false;
299
- }
300
- function close() {
301
- isCollapsed.value = true;
302
- }
303
- const {
304
- width: containerWidth
305
- } = useElementBounding(parentContainer);
306
- watch(() => props.width, newValue => {
307
- if (newValue !== localWidth.value) {
308
- localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
309
- }
310
- });
311
- watch(() => props.minimumWidth, newMinimum => {
312
- if (newMinimum > localWidth.value) localWidth.value = newMinimum;
313
- });
314
- watch(() => props.maximumWidth, newMaximum => {
315
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
316
- });
317
- watch(containerWidth, newMaximum => {
318
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
319
- });
320
- watch(maximumWidth, newMaximum => {
321
- if (newMaximum < localWidth.value) localWidth.value = newMaximum;
322
- });
323
- watch(localWidth, val => emit('change:width', val));
324
- return {
325
- root,
326
- resizeBar,
327
- isResizing,
328
- isCollapsed,
329
- localWidth,
330
- isShowingToolbar,
331
- sidebarStyle,
332
- rootStyles,
333
- sidebarStyles,
334
- toolbarStyles,
335
- resizeStyles,
336
- collapsibleButtonStyles,
337
- mainStyles,
338
- headerStyles,
339
- contentStyles,
340
- footerStyles,
341
- open,
342
- close
343
- };
344
- }
345
- });
346
-
347
- export { OrSidebarPlacement as O, script as s };
@@ -1,12 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
3
- [x: string]: ((...args: any[]) => any) | null;
4
- } | string[], {} & {}, {
5
- [x: number]: string;
6
- } | {}, true>)>;
7
- export default _default;
8
- export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
9
- [x: string]: ((...args: any[]) => any) | null;
10
- } | string[], {} & {}, {
11
- [x: number]: string;
12
- } | {}, true>)>;
@@ -1,59 +0,0 @@
1
- import { PropType } from 'vue-demi';
2
- import { OrSidebarPlacement } from './props';
3
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
- root: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
5
- [x: string]: ((...args: any[]) => any) | null;
6
- } | string[], {} & {}, {
7
- [x: number]: string;
8
- } | {}, true> | undefined>;
9
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
10
- icon: import("@vue/composition-api").ComputedRef<"keyboard_arrow_left" | "keyboard_arrow_right">;
11
- }> & import("@vue/composition-api").Data, {}, {}, {
12
- /**
13
- * Must be `true` if sidebar is collapsed.
14
- */
15
- modelValue: {
16
- type: BooleanConstructor;
17
- default: boolean;
18
- };
19
- side: {
20
- type: PropType<OrSidebarPlacement>;
21
- default: OrSidebarPlacement;
22
- validator: (value?: any) => boolean;
23
- };
24
- }, import("@vue/composition-api").ExtractPropTypes<{
25
- /**
26
- * Must be `true` if sidebar is collapsed.
27
- */
28
- modelValue: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- side: {
33
- type: PropType<OrSidebarPlacement>;
34
- default: OrSidebarPlacement;
35
- validator: (value?: any) => boolean;
36
- };
37
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
38
- modelValue: boolean;
39
- side: OrSidebarPlacement;
40
- } & {} & {
41
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
42
- }, import("@vue/composition-api").ShallowUnwrapRef<{
43
- root: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
44
- [x: string]: ((...args: any[]) => any) | null;
45
- } | string[], {} & {}, {
46
- [x: number]: string;
47
- } | {}, true> | undefined>;
48
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
49
- icon: import("@vue/composition-api").ComputedRef<"keyboard_arrow_left" | "keyboard_arrow_right">;
50
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
51
- modelValue: boolean;
52
- side: OrSidebarPlacement;
53
- } & {} & {
54
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
55
- }, {
56
- modelValue: boolean;
57
- side: OrSidebarPlacement;
58
- }, true>);
59
- export default _default;