@onereach/ui-components 2.71.1-beta.2220.0 → 2.71.1-beta.2222.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 (184) hide show
  1. package/dist/bundled/v2/{OrCardCollection-0141a358.js → OrCardCollection-d71d2dcf.js} +1 -1
  2. package/dist/bundled/v2/{OrCheckbox-dbef9f9a.js → OrCheckbox-4f665252.js} +3 -3
  3. package/dist/bundled/v2/{OrConfirm-057e997e.js → OrConfirm-2702f4e3.js} +1 -1
  4. package/dist/bundled/v2/{OrInlineInput-87589946.js → OrInlineInput-eaacc682.js} +2 -2
  5. package/dist/bundled/v2/{OrInlineTextarea-21b0e6fc.js → OrInlineTextarea-9f292005.js} +2 -2
  6. package/dist/bundled/v2/{OrInput-82ccfe00.js → OrInput-a7573d82.js} +20 -13
  7. package/dist/bundled/v2/{OrInputBox-79ec54ad.js → OrInputBox-da25bec2.js} +3 -13
  8. package/dist/bundled/v2/{OrRadio-cd39b20b.js → OrRadio-a60fc5c0.js} +3 -3
  9. package/dist/bundled/v2/{OrSearch-53470b0e.js → OrSearch-4395247a.js} +2 -2
  10. package/dist/bundled/v2/{OrSelect-02fb39f0.js → OrSelect-d7e1dd43.js} +7 -4
  11. package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
  12. package/dist/bundled/v2/{OrSwitch-237a2081.js → OrSwitch-fe9b7de7.js} +3 -3
  13. package/dist/bundled/v2/{OrTextarea-5593fbe9.js → OrTextarea-76a2963b.js} +14 -11
  14. package/dist/bundled/v2/components/index.js +14 -13
  15. package/dist/bundled/v2/components/or-card-collection-v3/index.js +5 -4
  16. package/dist/bundled/v2/components/or-checkbox-v3/index.js +1 -1
  17. package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
  18. package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
  19. package/dist/bundled/v2/components/or-combined-input-v3/index.d.ts +2 -0
  20. package/dist/bundled/v2/components/or-combined-input-v3/index.js +149 -0
  21. package/dist/bundled/v2/components/or-combined-input-v3/props.d.ts +1 -0
  22. package/dist/bundled/v2/components/or-combined-input-v3/styles.d.ts +2 -0
  23. package/dist/bundled/v2/components/or-confirm-v3/index.js +4 -3
  24. package/dist/bundled/v2/components/or-inline-input-v3/index.js +1 -1
  25. package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +1 -1
  26. package/dist/bundled/v2/components/or-input-box-v3/index.js +2 -1
  27. package/dist/bundled/v2/components/or-input-v3/index.js +3 -2
  28. package/dist/bundled/v2/components/or-radio-v3/index.js +1 -1
  29. package/dist/bundled/v2/components/or-search-v3/index.js +4 -3
  30. package/dist/bundled/v2/components/or-select-v3/index.js +5 -4
  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 -9
  35. package/dist/bundled/v2/components/or-switch-v3/index.js +1 -1
  36. package/dist/bundled/v2/components/or-textarea-v3/index.js +3 -2
  37. package/dist/bundled/v2/index.js +15 -14
  38. package/dist/bundled/v2/props-78496a2d.js +12 -0
  39. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-2d78a51a.js → OrCardCollection.vue_vue_type_script_lang-cf3f00f6.js} +1 -1
  40. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9d9a3917.js → OrConfirm.vue_vue_type_script_lang-86fcd480.js} +2 -2
  41. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-67218502.js → OrInlineInput.vue_vue_type_script_lang-0b47a43c.js} +2 -2
  42. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-a1831ab8.js → OrInlineTextarea.vue_vue_type_script_lang-71784de5.js} +2 -2
  43. package/dist/bundled/v3/{OrInput-a4f220ed.js → OrInput-9474b1c1.js} +17 -14
  44. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-607d79d4.js → OrInput.vue_vue_type_script_lang-e7edc5e5.js} +5 -4
  45. package/dist/bundled/v3/{OrInputBox-eb54d73d.js → OrInputBox-a11eb96c.js} +1 -1
  46. package/dist/{esm/v2/OrInputBox-4d5a318d.js → bundled/v3/OrInputBox.vue_vue_type_script_lang-c8184afc.js} +5 -56
  47. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-06f318ca.js → OrSearch.vue_vue_type_script_lang-1b5462df.js} +3 -3
  48. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-83f15704.js → OrSelect.vue_vue_type_script_lang-0416ad89.js} +11 -7
  49. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
  50. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-8e3531cd.js → OrTextarea.vue_vue_type_script_lang-e1a44c0a.js} +5 -4
  51. package/dist/bundled/v3/components/index.js +13 -12
  52. package/dist/bundled/v3/components/or-card-collection-v3/index.js +7 -6
  53. package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
  54. package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
  55. package/dist/bundled/v3/components/or-combined-input-v3/index.d.ts +2 -0
  56. package/dist/bundled/v3/components/or-combined-input-v3/index.js +132 -0
  57. package/dist/bundled/v3/components/or-combined-input-v3/props.d.ts +1 -0
  58. package/dist/bundled/v3/components/or-combined-input-v3/styles.d.ts +2 -0
  59. package/dist/bundled/v3/components/or-confirm-v3/index.js +6 -5
  60. package/dist/bundled/v3/components/or-inline-input-v3/index.js +1 -1
  61. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +1 -1
  62. package/dist/bundled/v3/components/or-input-box-v3/index.js +2 -1
  63. package/dist/bundled/v3/components/or-input-v3/index.js +4 -3
  64. package/dist/bundled/v3/components/or-search-v3/index.js +6 -5
  65. package/dist/bundled/v3/components/or-select-v3/index.js +6 -5
  66. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  67. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  68. package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
  69. package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -9
  70. package/dist/bundled/v3/components/or-textarea-v3/index.js +4 -3
  71. package/dist/bundled/v3/index.js +46 -58
  72. package/dist/bundled/v3/props-78496a2d.js +12 -0
  73. package/dist/esm/v2/{OrCardCollection-3c38fc85.js → OrCardCollection-e282dda1.js} +2 -2
  74. package/dist/esm/v2/{OrCheckbox-567e387c.js → OrCheckbox-ea48d156.js} +3 -3
  75. package/dist/esm/v2/{OrConfirm-047d4086.js → OrConfirm-826ae4ac.js} +1 -1
  76. package/dist/esm/v2/{OrInlineInput-10205811.js → OrInlineInput-43e2ef67.js} +2 -2
  77. package/dist/esm/v2/{OrInlineTextarea-7658611e.js → OrInlineTextarea-80ecac50.js} +2 -2
  78. package/dist/esm/v2/{OrInput-ada3a970.js → OrInput-dd6591ac.js} +20 -13
  79. package/dist/esm/v2/OrInputBox-20d65881.js +43 -0
  80. package/dist/{bundled/v3/OrInputBox.vue_vue_type_script_lang-5ee4ee45.js → esm/v2/OrInputBox.vue_rollup-plugin-vue_script-5253ba98.js} +4 -3
  81. package/dist/esm/v2/{OrRadio-848ce55d.js → OrRadio-6e10f071.js} +3 -3
  82. package/dist/esm/v2/{OrSearch-0f08f2f5.js → OrSearch-5de8264e.js} +2 -2
  83. package/dist/esm/v2/{OrSelect-f8837f5d.js → OrSelect-c58ce21d.js} +7 -4
  84. package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
  85. package/dist/esm/v2/{OrSwitch-13b6a7ee.js → OrSwitch-c628d2c5.js} +3 -3
  86. package/dist/esm/v2/{OrTextarea-6712a150.js → OrTextarea-b4660f09.js} +14 -11
  87. package/dist/esm/v2/components/index.js +14 -13
  88. package/dist/esm/v2/components/or-card-collection-v3/index.js +5 -4
  89. package/dist/esm/v2/components/or-checkbox-v3/index.js +1 -1
  90. package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
  91. package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
  92. package/dist/esm/v2/components/or-combined-input-v3/index.d.ts +2 -0
  93. package/dist/esm/v2/components/or-combined-input-v3/index.js +147 -0
  94. package/dist/esm/v2/components/or-combined-input-v3/props.d.ts +1 -0
  95. package/dist/esm/v2/components/or-combined-input-v3/styles.d.ts +2 -0
  96. package/dist/esm/v2/components/or-confirm-v3/index.js +4 -3
  97. package/dist/esm/v2/components/or-inline-input-v3/index.js +1 -1
  98. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +1 -1
  99. package/dist/esm/v2/components/or-input-box-v3/index.js +3 -2
  100. package/dist/esm/v2/components/or-input-v3/index.js +3 -2
  101. package/dist/esm/v2/components/or-radio-v3/index.js +1 -1
  102. package/dist/esm/v2/components/or-search-v3/index.js +4 -3
  103. package/dist/esm/v2/components/or-select-v3/index.js +5 -4
  104. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  105. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  106. package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
  107. package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -9
  108. package/dist/esm/v2/components/or-switch-v3/index.js +1 -1
  109. package/dist/esm/v2/components/or-textarea-v3/index.js +3 -2
  110. package/dist/esm/v2/index.js +14 -13
  111. package/dist/esm/v3/{OrCardCollection-dbb3e839.js → OrCardCollection-09d4c13a.js} +2 -2
  112. package/dist/esm/v3/{OrCheckbox-3e139eac.js → OrCheckbox-d1b516c8.js} +3 -2
  113. package/dist/esm/v3/{OrConfirm-fee3c859.js → OrConfirm-da1f065b.js} +1 -1
  114. package/dist/esm/v3/{OrInlineInput-507fc99c.js → OrInlineInput-a3404468.js} +2 -2
  115. package/dist/esm/v3/{OrInlineTextarea-53a9e027.js → OrInlineTextarea-12a7707a.js} +2 -2
  116. package/dist/esm/v3/{OrInput-9c0426b9.js → OrInput-9143fd14.js} +19 -16
  117. package/dist/esm/v3/{OrInputBox-6d1b6059.js → OrInputBox-0ebab1b8.js} +1 -1
  118. package/dist/esm/v3/{OrRadio-54b6d0de.js → OrRadio-ef9d4c6e.js} +3 -2
  119. package/dist/esm/v3/{OrSearch-9885d178.js → OrSearch-c2fb5abb.js} +2 -2
  120. package/dist/esm/v3/{OrSelect-8fbd88bc.js → OrSelect-c1bcdd4c.js} +6 -4
  121. package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
  122. package/dist/esm/v3/{OrSwitch-cca30aa0.js → OrSwitch-cc797a48.js} +3 -3
  123. package/dist/esm/v3/{OrTextarea-bb9ef3f2.js → OrTextarea-26c50ec0.js} +17 -15
  124. package/dist/esm/v3/components/index.js +13 -13
  125. package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
  126. package/dist/esm/v3/components/or-checkbox-v3/index.js +1 -1
  127. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
  128. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
  129. package/dist/esm/v3/components/or-combined-input-v3/index.d.ts +2 -0
  130. package/dist/esm/v3/components/or-combined-input-v3/index.js +132 -0
  131. package/dist/esm/v3/components/or-combined-input-v3/props.d.ts +1 -0
  132. package/dist/esm/v3/components/or-combined-input-v3/styles.d.ts +2 -0
  133. package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
  134. package/dist/esm/v3/components/or-inline-input-v3/index.js +1 -1
  135. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +1 -1
  136. package/dist/esm/v3/components/or-input-box-v3/index.js +1 -1
  137. package/dist/esm/v3/components/or-input-v3/index.js +2 -2
  138. package/dist/esm/v3/components/or-radio-v3/index.js +1 -1
  139. package/dist/esm/v3/components/or-search-v3/index.js +3 -3
  140. package/dist/esm/v3/components/or-select-v3/index.js +4 -4
  141. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  142. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  143. package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
  144. package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -9
  145. package/dist/esm/v3/components/or-switch-v3/index.js +1 -1
  146. package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
  147. package/dist/esm/v3/index.js +13 -13
  148. package/package.json +2 -2
  149. package/src/components/or-checkbox-v3/OrCheckbox.vue +1 -1
  150. package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +7 -0
  151. package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +202 -0
  152. package/src/components/or-combined-input-v3/OrCombinedInput.vue +134 -0
  153. package/src/components/or-combined-input-v3/index.ts +2 -0
  154. package/src/components/or-combined-input-v3/props.ts +1 -0
  155. package/src/components/or-combined-input-v3/styles.ts +25 -0
  156. package/src/components/or-inline-input-v3/styles.ts +2 -2
  157. package/src/components/or-inline-textarea-v3/styles.ts +2 -2
  158. package/src/components/or-input-box-v3/styles.ts +1 -1
  159. package/src/components/or-input-v3/OrInput.vue +28 -22
  160. package/src/components/or-input-v3/styles.ts +2 -2
  161. package/src/components/or-radio-v3/OrRadio.vue +1 -1
  162. package/src/components/or-select-v3/OrSelect.stories3.ts +4 -0
  163. package/src/components/or-select-v3/styles.ts +4 -1
  164. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
  165. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +10 -230
  166. package/src/components/or-sidebar-v3/OrSidebar.vue +22 -123
  167. package/src/components/or-sidebar-v3/styles.ts +9 -164
  168. package/src/components/or-switch-v3/OrSwitch.vue +1 -1
  169. package/src/components/or-textarea-v3/OrTextarea.vue +5 -1
  170. package/src/components/or-textarea-v3/styles.ts +2 -2
  171. package/dist/bundled/v2/OrSidebar-d445ecdd.js +0 -463
  172. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  173. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  174. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-80e5dc4b.js +0 -355
  175. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  176. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  177. package/dist/esm/v2/OrSidebar-097a4b55.js +0 -460
  178. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  179. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  180. package/dist/esm/v3/OrSidebar-f6b2050b.js +0 -395
  181. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  182. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  183. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
  184. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -74
@@ -1,355 +0,0 @@
1
- import { useDraggable, useElementBounding } from '@vueuse/core';
2
- import _ from 'lodash';
3
- import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, 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]', 'py-md+',
42
- // Theme
43
- 'text-outline', 'dark:text-outline-dark'];
44
- const CollapsibleSidebarToolbar = ['pt-[56px]'];
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
- const SidebarCollapseButtonSides = {
88
- [OrSidebarPlacement.left]: [
89
- // Position
90
- '-right-[12px]'],
91
- [OrSidebarPlacement.right]: [
92
- // Position
93
- '-left-[12px]']
94
- };
95
- const SidebarResizingSides = {
96
- [OrSidebarPlacement.left]: [
97
- // Borders
98
- 'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
99
- [OrSidebarPlacement.right]: [
100
- // Borders
101
- 'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
102
- };
103
- const SidebarMain = [
104
- // Layout
105
- 'flex', 'flex-col', 'grow', 'overflow-x-hidden',
106
- // Box
107
- 'min-h-0'];
108
- const SidebarHeader = [
109
- // Layout
110
- 'shrink-0', 'overflow-hidden',
111
- // Sizing
112
- 'p-md',
113
- // Typography
114
- 'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
115
- const SidebarContent = [
116
- // Layout
117
- 'grow', 'overflow-auto',
118
- // Sizing
119
- 'p-md'];
120
- const SidebarFooter = [
121
- // Layout
122
- 'shrink-0', 'overflow-x-hidden',
123
- // Sizing
124
- 'p-md',
125
- // Borders
126
- 'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
127
- const CollapseButtonContainer = [
128
- // Box
129
- 'w-[24px]', 'h-[24px]', 'rounded-full',
130
- // Theme
131
- 'text-primary dark:text-primary-dark', 'bg-background dark:bg-background-dark'];
132
- const CollapseButton = [
133
- // Box
134
- 'w-[24px]', 'h-[24px]',
135
- // Typography
136
- '!text-[16px]',
137
- // Borders
138
- '!border-[1px]', '!border-solid',
139
- // Theme
140
- '!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
141
- // Theme (hover)
142
- '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',
143
- // Theme (active)
144
- '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',
145
- // Theme (focus)
146
- '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',
147
- // Theme (disabled)
148
- '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'];
149
-
150
- var script$1 = defineComponent({
151
- name: 'OrSidebarCollapseButton',
152
- components: {
153
- OrIconButton: script$2
154
- },
155
- props: {
156
- /**
157
- * Must be `true` if sidebar is collapsed.
158
- */
159
- modelValue: {
160
- type: Boolean,
161
- default: false
162
- },
163
- side: {
164
- type: String,
165
- default: OrSidebarPlacement.right,
166
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
167
- }
168
- },
169
- emits: ['update:modelValue'],
170
- expose: ['root'],
171
- setup(props) {
172
- // Refs
173
- const root = ref();
174
- const rootStyles = computed(() => ['or-sidebar-collapse-button', ...CollapseButtonContainer]);
175
- const buttonStyles = computed(() => [...CollapseButton]);
176
- const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
177
- return {
178
- root,
179
- rootStyles,
180
- buttonStyles,
181
- icon
182
- };
183
- }
184
- });
185
-
186
- function render(_ctx, _cache, $props, $setup, $data, $options) {
187
- const _component_or_icon_button = resolveComponent("or-icon-button");
188
- return openBlock(), createElementBlock("div", {
189
- ref: "root",
190
- class: normalizeClass(_ctx.rootStyles)
191
- }, [createVNode(_component_or_icon_button, {
192
- class: normalizeClass(_ctx.buttonStyles),
193
- icon: {
194
- icon: _ctx.icon,
195
- size: 'inherit'
196
- },
197
- color: "inherit",
198
- onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('update:modelValue', !_ctx.modelValue))
199
- }, null, 8 /* PROPS */, ["class", "icon"])], 2 /* CLASS */);
200
- }
201
-
202
- script$1.render = render;
203
- script$1.__file = "src/components/or-sidebar-v3/OrSidebarCollapseButton.vue";
204
-
205
- var script = defineComponent({
206
- name: 'OrSidebar',
207
- components: {
208
- OrSidebarCollapseButton: script$1
209
- },
210
- props: {
211
- width: {
212
- type: Number,
213
- default: 320,
214
- validator: value => _.isNumber(value) && value >= 0
215
- },
216
- minimumWidth: {
217
- type: Number,
218
- default: 256,
219
- validator: value => _.isNumber(value) && value >= 0
220
- },
221
- maximumWidth: {
222
- type: Number,
223
- default: 384,
224
- validator: value => _.isNumber(value) && value >= 0
225
- },
226
- /**
227
- * User may put the component on the right or the left side of a container.
228
- * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
229
- *
230
- * Note: the property doesn't reposition the component in the parent container.
231
- * @values left, right
232
- */
233
- side: {
234
- type: String,
235
- default: OrSidebarPlacement.right,
236
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
237
- },
238
- draggable: {
239
- type: Boolean,
240
- default: true
241
- },
242
- collapsible: {
243
- type: Boolean,
244
- default: false
245
- }
246
- },
247
- emits: ['change:width'],
248
- expose: ['root', 'open', 'close'],
249
- setup(props, {
250
- emit
251
- }) {
252
- // Refs
253
- const root = ref();
254
- const resizeBar = ref(null);
255
- const parentContainer = computed(() => {
256
- var _a;
257
- return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
258
- });
259
- // Slots
260
- const {
261
- toolbar: toolbarSlot
262
- } = useSlots();
263
- // State
264
- const startPositionX = ref(0);
265
- const isResizing = ref(false);
266
- const isCollapsed = ref(false);
267
- const maximumWidth = ref(props.maximumWidth || 384);
268
- const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
269
- const isShowingToolbar = computed(() => !!toolbarSlot);
270
- // Styles
271
- const sidebarStyle = computed(() => ({
272
- width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
273
- }));
274
- const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
275
- const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
276
- const toolbarStyles = computed(() => [...SidebarToolbar, ...(props.collapsible ? CollapsibleSidebarToolbar : []), ...SidebarToolbarSides[props.side]]);
277
- const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
278
- const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
279
- const mainStyles = computed(() => [...SidebarMain]);
280
- const headerStyles = computed(() => [...SidebarHeader]);
281
- const contentStyles = computed(() => [...SidebarContent]);
282
- const footerStyles = computed(() => [...SidebarFooter]);
283
- // Effects
284
- useDraggable(resizeBar, {
285
- preventDefault: true,
286
- onStart: (position, event) => {
287
- document.body.style.cursor = 'ew-resize';
288
- document.body.style.userSelect = 'none';
289
- startPositionX.value = event.x;
290
- isResizing.value = true;
291
- },
292
- onMove: position => {
293
- const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
294
- const newWidth = localWidth.value - delta;
295
- localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
296
- startPositionX.value = position.x;
297
- },
298
- onEnd: () => {
299
- document.body.style.cursor = '';
300
- document.body.style.userSelect = '';
301
- isResizing.value = false;
302
- }
303
- });
304
- // Methods
305
- function open() {
306
- isCollapsed.value = false;
307
- }
308
- function close() {
309
- isCollapsed.value = true;
310
- }
311
- const {
312
- width: containerWidth
313
- } = useElementBounding(parentContainer);
314
- watch(() => props.width, newValue => {
315
- if (newValue !== localWidth.value) {
316
- localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
317
- }
318
- });
319
- watch(() => props.minimumWidth, newMinimum => {
320
- if (newMinimum > localWidth.value) localWidth.value = newMinimum;
321
- });
322
- watch(() => props.maximumWidth, newMaximum => {
323
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
324
- });
325
- watch(containerWidth, newMaximum => {
326
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
327
- });
328
- watch(maximumWidth, newMaximum => {
329
- if (newMaximum < localWidth.value) localWidth.value = newMaximum;
330
- });
331
- watch(localWidth, val => emit('change:width', val));
332
- return {
333
- root,
334
- resizeBar,
335
- isResizing,
336
- isCollapsed,
337
- localWidth,
338
- isShowingToolbar,
339
- sidebarStyle,
340
- rootStyles,
341
- sidebarStyles,
342
- toolbarStyles,
343
- resizeStyles,
344
- collapsibleButtonStyles,
345
- mainStyles,
346
- headerStyles,
347
- contentStyles,
348
- footerStyles,
349
- open,
350
- close
351
- };
352
- }
353
- });
354
-
355
- 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,53 +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<HTMLDivElement | undefined>;
5
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
6
- buttonStyles: import("@vue/composition-api").ComputedRef<string[]>;
7
- icon: import("@vue/composition-api").ComputedRef<"keyboard_arrow_left" | "keyboard_arrow_right">;
8
- }> & import("@vue/composition-api").Data, {}, {}, {
9
- /**
10
- * Must be `true` if sidebar is collapsed.
11
- */
12
- modelValue: {
13
- type: BooleanConstructor;
14
- default: boolean;
15
- };
16
- side: {
17
- type: PropType<OrSidebarPlacement>;
18
- default: OrSidebarPlacement;
19
- validator: (value?: any) => boolean;
20
- };
21
- }, import("@vue/composition-api").ExtractPropTypes<{
22
- /**
23
- * Must be `true` if sidebar is collapsed.
24
- */
25
- modelValue: {
26
- type: BooleanConstructor;
27
- default: boolean;
28
- };
29
- side: {
30
- type: PropType<OrSidebarPlacement>;
31
- default: OrSidebarPlacement;
32
- validator: (value?: any) => boolean;
33
- };
34
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
35
- modelValue: boolean;
36
- side: OrSidebarPlacement;
37
- } & {} & {
38
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
39
- }, import("@vue/composition-api").ShallowUnwrapRef<{
40
- root: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
41
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
42
- buttonStyles: import("@vue/composition-api").ComputedRef<string[]>;
43
- icon: import("@vue/composition-api").ComputedRef<"keyboard_arrow_left" | "keyboard_arrow_right">;
44
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
45
- modelValue: boolean;
46
- side: OrSidebarPlacement;
47
- } & {} & {
48
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
49
- }, {
50
- modelValue: boolean;
51
- side: OrSidebarPlacement;
52
- }, true>);
53
- export default _default;