@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,455 +0,0 @@
1
- import { useDraggable, useElementBounding } from '@vueuse/core';
2
- import _ from 'lodash';
3
- import './index-fa6eb4ca.js';
4
- import { O as OrIconButton } from './OrIconButton-a2ba92df.js';
5
- import { defineComponent, ref, computed, useSlots, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
6
- import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
7
-
8
- var OrSidebarPlacement;
9
- (function (OrSidebarPlacement) {
10
- OrSidebarPlacement["left"] = "left";
11
- OrSidebarPlacement["right"] = "right";
12
- })(OrSidebarPlacement || (OrSidebarPlacement = {}));
13
-
14
- const SidebarRoot = [
15
- // Position
16
- 'relative',
17
- // Layout
18
- 'flex', 'flex-row', 'shrink-0',
19
- // Box
20
- 'min-w-0', 'h-auto', 'p-0',
21
- // Theme
22
- 'bg-background', 'dark:bg-background-dark'];
23
- const SidebarBar = [
24
- // Position
25
- 'relative',
26
- // Layout
27
- 'flex', 'flex-col', 'shrink-0', 'grow',
28
- // Box
29
- 'min-h-0', 'p-0',
30
- // Theme
31
- 'text-on-background', 'dark:text-on-background-dark',
32
- // Transition
33
- 'transition-[width]'];
34
- const SidebarToolbar = [
35
- // Position
36
- 'relative',
37
- // Layout
38
- 'flex', 'flex-col', 'shrink-0', 'grow', 'overflow-auto', 'items-center',
39
- // Sizing
40
- 'gap-md',
41
- // Box
42
- 'min-h-0', 'min-w-xl', 'p-[6px]', 'pt-[56px]', 'pb-md+',
43
- // Theme
44
- 'text-outline', 'dark:text-outline-dark'];
45
- const SidebarSides = {
46
- [OrSidebarPlacement.left]: [
47
- // Borders
48
- 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
49
- [OrSidebarPlacement.right]: [
50
- // Borders
51
- 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
52
- };
53
- const SidebarToolbarSides = {
54
- [OrSidebarPlacement.left]: [
55
- // Borders
56
- 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
57
- [OrSidebarPlacement.right]: [
58
- // Borders
59
- 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
60
- };
61
- const SidebarResize = [
62
- // Position
63
- 'absolute', 'inset-y-none', 'z-[1]',
64
- // Box
65
- 'w-sm+', 'h-[100%]',
66
- // Cursor
67
- 'cursor-ew-resize'];
68
- const SidebarResizeSides = {
69
- [OrSidebarPlacement.left]: [
70
- // Position
71
- '-right-[1px]',
72
- // Borders
73
- 'hover:border-r-2', 'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
74
- // Transition
75
- 'transition-[border-right]'],
76
- [OrSidebarPlacement.right]: [
77
- // Position
78
- '-left-[1px]',
79
- // Borders
80
- 'hover:border-l-2', 'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
81
- // Transition
82
- 'transition-[border-left]']
83
- };
84
- const SidebarCollapseButton = [
85
- // Position
86
- 'absolute', 'top-md', 'inset-y-none', 'z-[1]',
87
- // Cursor
88
- 'cursor-ew-resize'];
89
- const SidebarCollapseButtonSides = {
90
- [OrSidebarPlacement.left]: [
91
- // Position
92
- '-right-[12px]'],
93
- [OrSidebarPlacement.right]: [
94
- // Position
95
- '-left-[12px]']
96
- };
97
- const SidebarResizingSides = {
98
- [OrSidebarPlacement.left]: [
99
- // Borders
100
- 'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
101
- [OrSidebarPlacement.right]: [
102
- // Borders
103
- 'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
104
- };
105
- const SidebarMain = [
106
- // Layout
107
- 'flex', 'flex-col', 'grow', 'overflow-x-hidden',
108
- // Box
109
- 'min-h-0'];
110
- const SidebarHeader = [
111
- // Layout
112
- 'shrink-0', 'overflow-hidden',
113
- // Sizing
114
- 'p-md',
115
- // Typography
116
- 'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
117
- const SidebarContent = [
118
- // Layout
119
- 'grow', 'overflow-auto',
120
- // Sizing
121
- 'p-md'];
122
- const SidebarFooter = [
123
- // Layout
124
- 'shrink-0', 'overflow-x-hidden',
125
- // Sizing
126
- 'p-md',
127
- // Borders
128
- 'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
129
- const CollapseButton = [
130
- // Box
131
- 'w-[24px]', 'h-[24px]',
132
- // Typography
133
- '!text-[16px]',
134
- // Borders
135
- '!border-[1px]', '!border-solid',
136
- // Theme
137
- '!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
138
- // Theme (hover)
139
- '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',
140
- // Theme (active)
141
- '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',
142
- // Theme (focus)
143
- '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',
144
- // Theme (disabled)
145
- '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'];
146
-
147
- var script$1 = defineComponent({
148
- name: 'OrSidebarCollapseButton',
149
- components: {
150
- OrIconButton
151
- },
152
- props: {
153
- /**
154
- * Must be `true` if sidebar is collapsed.
155
- */
156
- modelValue: {
157
- type: Boolean,
158
- default: false
159
- },
160
- side: {
161
- type: String,
162
- default: OrSidebarPlacement.right,
163
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
164
- }
165
- },
166
- emits: ['update:modelValue'],
167
- expose: ['root'],
168
- setup(props) {
169
- // Refs
170
- const root = ref();
171
- const rootStyles = computed(() => [...CollapseButton]);
172
- const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
173
- return {
174
- root,
175
- rootStyles,
176
- icon
177
- };
178
- }
179
- });
180
-
181
- /* script */
182
- const __vue_script__$1 = script$1;
183
-
184
- /* template */
185
- var __vue_render__$1 = function () {
186
- var _vm = this;
187
- var _h = _vm.$createElement;
188
- var _c = _vm._self._c || _h;
189
- return _c('or-icon-button', {
190
- ref: "root",
191
- class: _vm.rootStyles,
192
- attrs: {
193
- "icon": {
194
- icon: _vm.icon,
195
- size: 'inherit'
196
- },
197
- "color": "inherit"
198
- },
199
- on: {
200
- "click": function ($event) {
201
- return _vm.$emit('update:modelValue', !_vm.modelValue);
202
- }
203
- }
204
- });
205
- };
206
- var __vue_staticRenderFns__$1 = [];
207
-
208
- /* style */
209
- const __vue_inject_styles__$1 = undefined;
210
- /* scoped */
211
- const __vue_scope_id__$1 = undefined;
212
- /* module identifier */
213
- const __vue_module_identifier__$1 = undefined;
214
- /* functional template */
215
- const __vue_is_functional_template__$1 = false;
216
- /* style inject */
217
-
218
- /* style inject SSR */
219
-
220
- /* style inject shadow dom */
221
-
222
- const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
223
- render: __vue_render__$1,
224
- staticRenderFns: __vue_staticRenderFns__$1
225
- }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
226
- var OrSidebarCollapseButton = __vue_component__$2;
227
-
228
- var script = defineComponent({
229
- name: 'OrSidebar',
230
- components: {
231
- OrSidebarCollapseButton
232
- },
233
- props: {
234
- width: {
235
- type: Number,
236
- default: 320,
237
- validator: value => _.isNumber(value) && value >= 0
238
- },
239
- minimumWidth: {
240
- type: Number,
241
- default: 256,
242
- validator: value => _.isNumber(value) && value >= 0
243
- },
244
- maximumWidth: {
245
- type: Number,
246
- default: 384,
247
- validator: value => _.isNumber(value) && value >= 0
248
- },
249
- /**
250
- * User may put the component on the right or the left side of a container.
251
- * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
252
- *
253
- * Note: the property doesn't reposition the component in the parent container.
254
- * @values left, right
255
- */
256
- side: {
257
- type: String,
258
- default: OrSidebarPlacement.right,
259
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
260
- },
261
- draggable: {
262
- type: Boolean,
263
- default: true
264
- },
265
- collapsible: {
266
- type: Boolean,
267
- default: false
268
- }
269
- },
270
- emits: ['change:width'],
271
- expose: ['root', 'open', 'close'],
272
- setup(props, {
273
- emit
274
- }) {
275
- // Refs
276
- const root = ref();
277
- const resizeBar = ref(null);
278
- const parentContainer = computed(() => {
279
- var _a;
280
- return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
281
- });
282
- // Slots
283
- const {
284
- toolbar: toolbarSlot
285
- } = useSlots();
286
- // State
287
- const startPositionX = ref(0);
288
- const isResizing = ref(false);
289
- const isCollapsed = ref(false);
290
- const maximumWidth = ref(props.maximumWidth || 384);
291
- const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
292
- const isShowingToolbar = computed(() => !!toolbarSlot);
293
- // Styles
294
- const sidebarStyle = computed(() => ({
295
- width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
296
- }));
297
- const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
298
- const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
299
- const toolbarStyles = computed(() => [...SidebarToolbar, ...SidebarToolbarSides[props.side]]);
300
- const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
301
- const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
302
- const mainStyles = computed(() => [...SidebarMain]);
303
- const headerStyles = computed(() => [...SidebarHeader]);
304
- const contentStyles = computed(() => [...SidebarContent]);
305
- const footerStyles = computed(() => [...SidebarFooter]);
306
- // Effects
307
- useDraggable(resizeBar, {
308
- preventDefault: true,
309
- onStart: (position, event) => {
310
- document.body.style.cursor = 'ew-resize';
311
- document.body.style.userSelect = 'none';
312
- startPositionX.value = event.x;
313
- isResizing.value = true;
314
- },
315
- onMove: position => {
316
- const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
317
- const newWidth = localWidth.value - delta;
318
- localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
319
- startPositionX.value = position.x;
320
- },
321
- onEnd: () => {
322
- document.body.style.cursor = '';
323
- document.body.style.userSelect = '';
324
- isResizing.value = false;
325
- }
326
- });
327
- // Methods
328
- function open() {
329
- isCollapsed.value = false;
330
- }
331
- function close() {
332
- isCollapsed.value = true;
333
- }
334
- const {
335
- width: containerWidth
336
- } = useElementBounding(parentContainer);
337
- watch(() => props.width, newValue => {
338
- if (newValue !== localWidth.value) {
339
- localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
340
- }
341
- });
342
- watch(() => props.minimumWidth, newMinimum => {
343
- if (newMinimum > localWidth.value) localWidth.value = newMinimum;
344
- });
345
- watch(() => props.maximumWidth, newMaximum => {
346
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
347
- });
348
- watch(containerWidth, newMaximum => {
349
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
350
- });
351
- watch(maximumWidth, newMaximum => {
352
- if (newMaximum < localWidth.value) localWidth.value = newMaximum;
353
- });
354
- watch(localWidth, val => emit('change:width', val));
355
- return {
356
- root,
357
- resizeBar,
358
- isResizing,
359
- isCollapsed,
360
- localWidth,
361
- isShowingToolbar,
362
- sidebarStyle,
363
- rootStyles,
364
- sidebarStyles,
365
- toolbarStyles,
366
- resizeStyles,
367
- collapsibleButtonStyles,
368
- mainStyles,
369
- headerStyles,
370
- contentStyles,
371
- footerStyles,
372
- open,
373
- close
374
- };
375
- }
376
- });
377
-
378
- /* script */
379
- const __vue_script__ = script;
380
-
381
- /* template */
382
- var __vue_render__ = function () {
383
- var _vm = this;
384
- var _h = _vm.$createElement;
385
- var _c = _vm._self._c || _h;
386
- return _c('aside', {
387
- ref: "root",
388
- class: _vm.rootStyles
389
- }, [_vm.side === 'right' && _vm.isShowingToolbar ? _c('div', {
390
- class: _vm.toolbarStyles
391
- }, [_vm._t("toolbar")], 2) : _vm._e(), _vm._v(" "), _c('div', {
392
- class: _vm.sidebarStyles,
393
- style: _vm.sidebarStyle
394
- }, [_vm.draggable && !_vm.isCollapsed ? _c('div', {
395
- ref: "resizeBar",
396
- class: _vm.resizeStyles
397
- }) : _vm._e(), _vm._v(" "), _vm.collapsible ? _c('or-sidebar-collapse-button', {
398
- class: _vm.collapsibleButtonStyles,
399
- attrs: {
400
- "side": _vm.side
401
- },
402
- model: {
403
- value: _vm.isCollapsed,
404
- callback: function ($$v) {
405
- _vm.isCollapsed = $$v;
406
- },
407
- expression: "isCollapsed"
408
- }
409
- }) : _vm._e(), _vm._v(" "), _c('div', {
410
- directives: [{
411
- name: "show",
412
- rawName: "v-show",
413
- value: !_vm.isCollapsed,
414
- expression: "!isCollapsed"
415
- }],
416
- class: _vm.mainStyles
417
- }, [_vm.$slots.header ? _c('div', {
418
- class: _vm.headerStyles
419
- }, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _c('div', {
420
- class: _vm.contentStyles
421
- }, [_vm._t("default")], 2)]), _vm._v(" "), _vm.$slots.footer ? _c('div', {
422
- directives: [{
423
- name: "show",
424
- rawName: "v-show",
425
- value: !_vm.isCollapsed,
426
- expression: "!isCollapsed"
427
- }],
428
- class: _vm.footerStyles
429
- }, [_vm._t("footer")], 2) : _vm._e()], 1), _vm._v(" "), _vm.side === 'left' && _vm.isShowingToolbar ? _c('div', {
430
- class: _vm.toolbarStyles
431
- }, [_vm._t("toolbar")], 2) : _vm._e()]);
432
- };
433
- var __vue_staticRenderFns__ = [];
434
-
435
- /* style */
436
- const __vue_inject_styles__ = undefined;
437
- /* scoped */
438
- const __vue_scope_id__ = undefined;
439
- /* module identifier */
440
- const __vue_module_identifier__ = undefined;
441
- /* functional template */
442
- const __vue_is_functional_template__ = false;
443
- /* style inject */
444
-
445
- /* style inject SSR */
446
-
447
- /* style inject shadow dom */
448
-
449
- const __vue_component__ = /*#__PURE__*/normalizeComponent({
450
- render: __vue_render__,
451
- staticRenderFns: __vue_staticRenderFns__
452
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
453
- var __vue_component__$1 = __vue_component__;
454
-
455
- export { OrSidebarPlacement as O, __vue_component__$1 as _ };
@@ -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;