@onereach/ui-components 2.70.3-beta.2213.0 → 2.70.3-beta.2224.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 (186) hide show
  1. package/dist/bundled/v2/{OrCardCollection-89428bbf.js → OrCardCollection-166cfcc6.js} +5 -5
  2. package/dist/bundled/v2/{OrConfirm-56d01cff.js → OrConfirm-55b89b17.js} +4 -4
  3. package/dist/bundled/v2/{OrListOfInputs-8f076650.js → OrListOfInputs-ab7f9d97.js} +4 -4
  4. package/dist/bundled/v2/OrNumberInput-face8ccc.js +227 -0
  5. package/dist/bundled/v2/OrPassword-a818e7b5.js +227 -0
  6. package/dist/bundled/v2/{OrSearch-f7cfa52f.js → OrSearch-832d7978.js} +4 -4
  7. package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
  8. package/dist/bundled/v2/{OrPassword-7da938aa.js → OrTextarea-71ff236d.js} +7 -449
  9. package/dist/bundled/v2/components/index.d.ts +5 -1
  10. package/dist/bundled/v2/components/index.js +10 -8
  11. package/dist/bundled/v2/components/or-card-collection/index.js +4 -4
  12. package/dist/bundled/v2/components/or-confirm/index.js +2 -2
  13. package/dist/bundled/v2/components/or-input/index.d.ts +1 -0
  14. package/dist/bundled/v2/components/or-input/index.js +13 -0
  15. package/dist/bundled/v2/components/or-list-of-inputs/index.js +2 -2
  16. package/dist/bundled/v2/components/or-number-input/index.d.ts +1 -0
  17. package/dist/bundled/v2/components/or-number-input/index.js +14 -0
  18. package/dist/bundled/v2/components/or-password/index.d.ts +1 -0
  19. package/dist/bundled/v2/components/{or-inputs → or-password}/index.js +3 -4
  20. package/dist/bundled/v2/components/or-search/index.d.ts +1 -0
  21. package/dist/bundled/v2/components/or-search/index.js +25 -0
  22. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  23. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  24. package/dist/bundled/v2/components/or-sidebar-v3/index.js +1 -13
  25. package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +1 -8
  26. package/dist/bundled/v2/components/or-textarea/index.d.ts +1 -0
  27. package/dist/bundled/v2/components/or-textarea/index.js +13 -0
  28. package/dist/bundled/v2/index.js +10 -8
  29. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-d8124dda.js → OrCardCollection.vue_vue_type_script_lang-cd84f344.js} +4 -4
  30. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-0f16fc67.js → OrConfirm.vue_vue_type_script_lang-41b4d791.js} +2 -1
  31. package/dist/bundled/v3/{OrInput-7d4b571a.js → OrInput-704e72ba.js} +5 -193
  32. package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-409235cc.js +190 -0
  33. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-62dbf1e7.js → OrListOfInputs.vue_vue_type_script_lang-6c5cf7a5.js} +2 -1
  34. package/dist/bundled/v3/OrNumberInput.vue_vue_type_script_lang-f061d829.js +113 -0
  35. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-b75f6543.js +99 -0
  36. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-16fbccc0.js → OrSearch.vue_vue_type_script_lang-5356fa79.js} +2 -1
  37. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
  38. package/dist/bundled/v3/OrTextarea.vue_vue_type_script_lang-69ea22e9.js +187 -0
  39. package/dist/bundled/v3/components/index.d.ts +5 -1
  40. package/dist/bundled/v3/components/index.js +11 -8
  41. package/dist/bundled/v3/components/or-card-collection/index.js +5 -4
  42. package/dist/bundled/v3/components/or-confirm/index.js +3 -2
  43. package/dist/bundled/v3/components/or-input/index.d.ts +1 -0
  44. package/dist/bundled/v3/components/or-input/index.js +14 -0
  45. package/dist/bundled/v3/components/or-list-of-inputs/index.js +3 -2
  46. package/dist/bundled/v3/components/or-number-input/index.d.ts +1 -0
  47. package/dist/bundled/v3/components/or-number-input/index.js +16 -0
  48. package/dist/bundled/v3/components/or-password/index.d.ts +1 -0
  49. package/dist/bundled/v3/components/or-password/index.js +31 -0
  50. package/dist/bundled/v3/components/or-search/index.d.ts +1 -0
  51. package/dist/bundled/v3/components/{or-inputs → or-search}/index.js +4 -5
  52. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  53. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  54. package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
  55. package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -8
  56. package/dist/bundled/v3/components/or-textarea/index.d.ts +1 -0
  57. package/dist/bundled/v3/components/or-textarea/index.js +14 -0
  58. package/dist/bundled/v3/index.js +666 -677
  59. package/dist/esm/v2/{OrCardCollection-f6b07557.js → OrCardCollection-19582949.js} +6 -7
  60. package/dist/esm/v2/{OrConfirm-d7112dd3.js → OrConfirm-ede619eb.js} +4 -4
  61. package/dist/esm/v2/{OrSearch.vue_rollup-plugin-vue_script-197d77fc.js → OrInput-6e6cfd11.js} +4 -492
  62. package/dist/esm/v2/{OrListOfInputs-50aa1ef1.js → OrListOfInputs-4298fa2c.js} +5 -5
  63. package/dist/esm/v2/OrNumberInput-b20d75d2.js +225 -0
  64. package/dist/esm/v2/OrPassword-e6d5e968.js +225 -0
  65. package/dist/esm/v2/{OrSearch-0589d17d.js → OrSearch-b4f4d59b.js} +122 -5
  66. package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
  67. package/dist/esm/v2/{OrPassword-1fa97156.js → OrTextarea-91a95068.js} +187 -245
  68. package/dist/esm/v2/components/index.d.ts +5 -1
  69. package/dist/esm/v2/components/index.js +10 -8
  70. package/dist/esm/v2/components/or-card-collection/index.js +3 -4
  71. package/dist/esm/v2/components/or-confirm/index.js +2 -3
  72. package/dist/esm/v2/components/or-input/index.d.ts +1 -0
  73. package/dist/esm/v2/components/or-input/index.js +11 -0
  74. package/dist/esm/v2/components/or-list-of-inputs/index.js +2 -4
  75. package/dist/esm/v2/components/or-number-input/index.d.ts +1 -0
  76. package/dist/esm/v2/components/or-number-input/index.js +12 -0
  77. package/dist/esm/v2/components/or-password/index.d.ts +1 -0
  78. package/dist/esm/v2/components/{or-inputs → or-password}/index.js +5 -6
  79. package/dist/esm/v2/components/or-search/index.d.ts +1 -0
  80. package/dist/esm/v2/components/or-search/index.js +23 -0
  81. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  82. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  83. package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
  84. package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -8
  85. package/dist/esm/v2/components/or-textarea/index.d.ts +1 -0
  86. package/dist/esm/v2/components/or-textarea/index.js +11 -0
  87. package/dist/esm/v2/index.js +9 -7
  88. package/dist/esm/v3/{OrCardCollection-a5e326ef.js → OrCardCollection-1e44c758.js} +2 -2
  89. package/dist/esm/v3/{OrConfirm-f39bd784.js → OrConfirm-c11ee2ec.js} +1 -1
  90. package/dist/esm/v3/OrInput-81125804.js +295 -0
  91. package/dist/esm/v3/{OrListOfInputs-7a67440f.js → OrListOfInputs-508e056f.js} +1 -1
  92. package/dist/esm/v3/OrNumberInput-b32b5ce3.js +170 -0
  93. package/dist/esm/v3/OrPassword-b0cbb578.js +162 -0
  94. package/dist/esm/v3/OrSearch-11fdf667.js +188 -0
  95. package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
  96. package/dist/esm/v3/OrTextarea-1f5c3be1.js +290 -0
  97. package/dist/esm/v3/components/index.d.ts +5 -1
  98. package/dist/esm/v3/components/index.js +10 -6
  99. package/dist/esm/v3/components/or-card-collection/index.js +3 -3
  100. package/dist/esm/v3/components/or-confirm/index.js +2 -3
  101. package/dist/esm/v3/components/or-input/index.d.ts +1 -0
  102. package/dist/esm/v3/components/or-input/index.js +11 -0
  103. package/dist/esm/v3/components/or-list-of-inputs/index.js +2 -4
  104. package/dist/esm/v3/components/or-number-input/index.d.ts +1 -0
  105. package/dist/esm/v3/components/or-number-input/index.js +12 -0
  106. package/dist/esm/v3/components/or-password/index.d.ts +1 -0
  107. package/dist/esm/v3/components/{or-inputs → or-password}/index.js +3 -2
  108. package/dist/esm/v3/components/or-search/index.d.ts +1 -0
  109. package/dist/esm/v3/components/or-search/index.js +20 -0
  110. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  111. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  112. package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
  113. package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -8
  114. package/dist/esm/v3/components/or-textarea/index.d.ts +1 -0
  115. package/dist/esm/v3/components/or-textarea/index.js +11 -0
  116. package/dist/esm/v3/index.js +9 -5
  117. package/package.json +1 -1
  118. package/src/components/index.ts +5 -1
  119. package/src/components/or-card-collection/OrCardCollection.vue +8 -8
  120. package/src/components/or-confirm/OrConfirm.vue +1 -1
  121. package/src/components/or-input/index.ts +1 -0
  122. package/src/components/or-list/OrList.stories.ts +1 -1
  123. package/src/components/or-list-of-inputs/OrListOfInputs.vue +1 -1
  124. package/src/components/or-modal/OrModal.stories.ts +1 -1
  125. package/src/components/{or-inputs → or-number-input}/OrNumberInput.vue +1 -1
  126. package/src/components/or-number-input/index.ts +1 -0
  127. package/src/components/{or-inputs → or-password}/OrPassword.vue +1 -1
  128. package/src/components/or-password/index.ts +1 -0
  129. package/src/components/{or-inputs → or-search}/OrSearch.vue +1 -1
  130. package/src/components/or-search/index.ts +1 -0
  131. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
  132. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +10 -230
  133. package/src/components/or-sidebar-v3/OrSidebar.vue +22 -121
  134. package/src/components/or-sidebar-v3/styles.ts +9 -161
  135. package/src/components/{or-inputs → or-textarea}/OrTextarea.vue +225 -6
  136. package/src/components/or-textarea/index.ts +1 -0
  137. package/dist/bundled/v2/OrSidebar-774b382d.js +0 -462
  138. package/dist/bundled/v2/components/or-inputs/index.d.ts +0 -5
  139. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  140. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  141. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-13bc5b00.js +0 -390
  142. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-8305a28b.js +0 -354
  143. package/dist/bundled/v3/components/or-inputs/index.d.ts +0 -5
  144. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  145. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  146. package/dist/esm/v2/OrSidebar-a6ee22d1.js +0 -459
  147. package/dist/esm/v2/components/or-inputs/index.d.ts +0 -5
  148. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  149. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  150. package/dist/esm/v3/OrSearch-7cb2c91c.js +0 -1075
  151. package/dist/esm/v3/OrSidebar-f2150587.js +0 -394
  152. package/dist/esm/v3/components/or-inputs/index.d.ts +0 -5
  153. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  154. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  155. package/src/components/or-inputs/index.ts +0 -5
  156. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
  157. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -74
  158. /package/dist/bundled/v2/{OrInput-08f2f666.js → OrInput-df1a14fa.js} +0 -0
  159. /package/dist/bundled/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  160. /package/dist/bundled/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  161. /package/dist/bundled/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  162. /package/dist/bundled/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  163. /package/dist/bundled/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  164. /package/dist/bundled/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  165. /package/dist/bundled/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  166. /package/dist/bundled/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  167. /package/dist/bundled/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  168. /package/dist/bundled/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  169. /package/dist/esm/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  170. /package/dist/esm/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  171. /package/dist/esm/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  172. /package/dist/esm/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  173. /package/dist/esm/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  174. /package/dist/esm/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  175. /package/dist/esm/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  176. /package/dist/esm/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  177. /package/dist/esm/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  178. /package/dist/esm/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  179. /package/src/components/{or-inputs → or-input}/OrInput.stories.ts +0 -0
  180. /package/src/components/{or-inputs → or-input}/OrInput.vue +0 -0
  181. /package/src/components/{or-inputs → or-input}/or-textbox-migration.stories.mdx +0 -0
  182. /package/src/components/{or-inputs → or-input}/styles.scss +0 -0
  183. /package/src/components/{or-inputs → or-number-input}/OrNumberInput.stories.ts +0 -0
  184. /package/src/components/{or-inputs → or-password}/OrPassword.stories.ts +0 -0
  185. /package/src/components/{or-inputs → or-search}/OrSearch.stories.ts +0 -0
  186. /package/src/components/{or-inputs → or-textarea}/OrTextarea.stories.ts +0 -0
@@ -1,354 +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]', '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
- const SidebarCollapseButtonSides = {
87
- [OrSidebarPlacement.left]: [
88
- // Position
89
- '-right-[12px]'],
90
- [OrSidebarPlacement.right]: [
91
- // Position
92
- '-left-[12px]']
93
- };
94
- const SidebarResizingSides = {
95
- [OrSidebarPlacement.left]: [
96
- // Borders
97
- 'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
98
- [OrSidebarPlacement.right]: [
99
- // Borders
100
- 'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
101
- };
102
- const SidebarMain = [
103
- // Layout
104
- 'flex', 'flex-col', 'grow', 'overflow-x-hidden',
105
- // Box
106
- 'min-h-0'];
107
- const SidebarHeader = [
108
- // Layout
109
- 'shrink-0', 'overflow-hidden',
110
- // Sizing
111
- 'p-md',
112
- // Typography
113
- 'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
114
- const SidebarContent = [
115
- // Layout
116
- 'grow', 'overflow-auto',
117
- // Sizing
118
- 'p-md'];
119
- const SidebarFooter = [
120
- // Layout
121
- 'shrink-0', 'overflow-x-hidden',
122
- // Sizing
123
- 'p-md',
124
- // Borders
125
- 'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
126
- const CollapseButtonContainer = [
127
- // Box
128
- 'w-[24px]', 'h-[24px]', 'rounded-full',
129
- // Theme
130
- 'text-primary dark:text-primary-dark', 'bg-background dark:bg-background-dark'];
131
- const CollapseButton = [
132
- // Box
133
- 'w-[24px]', 'h-[24px]',
134
- // Typography
135
- '!text-[16px]',
136
- // Borders
137
- '!border-[1px]', '!border-solid',
138
- // Theme
139
- '!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
140
- // Theme (hover)
141
- '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',
142
- // Theme (active)
143
- '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',
144
- // Theme (focus)
145
- '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',
146
- // Theme (disabled)
147
- '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'];
148
-
149
- var script$1 = defineComponent({
150
- name: 'OrSidebarCollapseButton',
151
- components: {
152
- OrIconButton: script$2
153
- },
154
- props: {
155
- /**
156
- * Must be `true` if sidebar is collapsed.
157
- */
158
- modelValue: {
159
- type: Boolean,
160
- default: false
161
- },
162
- side: {
163
- type: String,
164
- default: OrSidebarPlacement.right,
165
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
166
- }
167
- },
168
- emits: ['update:modelValue'],
169
- expose: ['root'],
170
- setup(props) {
171
- // Refs
172
- const root = ref();
173
- const rootStyles = computed(() => ['or-sidebar-collapse-button', ...CollapseButtonContainer]);
174
- const buttonStyles = computed(() => [...CollapseButton]);
175
- const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
176
- return {
177
- root,
178
- rootStyles,
179
- buttonStyles,
180
- icon
181
- };
182
- }
183
- });
184
-
185
- function render(_ctx, _cache, $props, $setup, $data, $options) {
186
- const _component_or_icon_button = resolveComponent("or-icon-button");
187
- return openBlock(), createElementBlock("div", {
188
- ref: "root",
189
- class: normalizeClass(_ctx.rootStyles)
190
- }, [createVNode(_component_or_icon_button, {
191
- class: normalizeClass(_ctx.buttonStyles),
192
- icon: {
193
- icon: _ctx.icon,
194
- size: 'inherit'
195
- },
196
- color: "inherit",
197
- onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('update:modelValue', !_ctx.modelValue))
198
- }, null, 8 /* PROPS */, ["class", "icon"])], 2 /* CLASS */);
199
- }
200
-
201
- script$1.render = render;
202
- script$1.__file = "src/components/or-sidebar-v3/OrSidebarCollapseButton.vue";
203
-
204
- var script = defineComponent({
205
- name: 'OrSidebar',
206
- components: {
207
- OrSidebarCollapseButton: script$1
208
- },
209
- props: {
210
- width: {
211
- type: Number,
212
- default: 320,
213
- validator: value => _.isNumber(value) && value >= 0
214
- },
215
- minimumWidth: {
216
- type: Number,
217
- default: 256,
218
- validator: value => _.isNumber(value) && value >= 0
219
- },
220
- maximumWidth: {
221
- type: Number,
222
- default: 384,
223
- validator: value => _.isNumber(value) && value >= 0
224
- },
225
- /**
226
- * User may put the component on the right or the left side of a container.
227
- * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
228
- *
229
- * Note: the property doesn't reposition the component in the parent container.
230
- * @values left, right
231
- */
232
- side: {
233
- type: String,
234
- default: OrSidebarPlacement.right,
235
- validator: value => _.includes(_.values(OrSidebarPlacement), value)
236
- },
237
- draggable: {
238
- type: Boolean,
239
- default: true
240
- },
241
- collapsible: {
242
- type: Boolean,
243
- default: false
244
- }
245
- },
246
- emits: ['change:width'],
247
- expose: ['root', 'open', 'close'],
248
- setup(props, {
249
- emit
250
- }) {
251
- // Refs
252
- const root = ref();
253
- const resizeBar = ref(null);
254
- const parentContainer = computed(() => {
255
- var _a;
256
- return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
257
- });
258
- // Slots
259
- const {
260
- toolbar: toolbarSlot
261
- } = useSlots();
262
- // State
263
- const startPositionX = ref(0);
264
- const isResizing = ref(false);
265
- const isCollapsed = ref(false);
266
- const maximumWidth = ref(props.maximumWidth || 384);
267
- const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
268
- const isShowingToolbar = computed(() => !!toolbarSlot);
269
- // Styles
270
- const sidebarStyle = computed(() => ({
271
- width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
272
- }));
273
- const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
274
- const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
275
- const toolbarStyles = computed(() => [...SidebarToolbar, ...SidebarToolbarSides[props.side]]);
276
- const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
277
- const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
278
- const mainStyles = computed(() => [...SidebarMain]);
279
- const headerStyles = computed(() => [...SidebarHeader]);
280
- const contentStyles = computed(() => [...SidebarContent]);
281
- const footerStyles = computed(() => [...SidebarFooter]);
282
- // Effects
283
- useDraggable(resizeBar, {
284
- preventDefault: true,
285
- onStart: (position, event) => {
286
- document.body.style.cursor = 'ew-resize';
287
- document.body.style.userSelect = 'none';
288
- startPositionX.value = event.x;
289
- isResizing.value = true;
290
- },
291
- onMove: position => {
292
- const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
293
- const newWidth = localWidth.value - delta;
294
- localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
295
- startPositionX.value = position.x;
296
- },
297
- onEnd: () => {
298
- document.body.style.cursor = '';
299
- document.body.style.userSelect = '';
300
- isResizing.value = false;
301
- }
302
- });
303
- // Methods
304
- function open() {
305
- isCollapsed.value = false;
306
- }
307
- function close() {
308
- isCollapsed.value = true;
309
- }
310
- const {
311
- width: containerWidth
312
- } = useElementBounding(parentContainer);
313
- watch(() => props.width, newValue => {
314
- if (newValue !== localWidth.value) {
315
- localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
316
- }
317
- });
318
- watch(() => props.minimumWidth, newMinimum => {
319
- if (newMinimum > localWidth.value) localWidth.value = newMinimum;
320
- });
321
- watch(() => props.maximumWidth, newMaximum => {
322
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
323
- });
324
- watch(containerWidth, newMaximum => {
325
- if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
326
- });
327
- watch(maximumWidth, newMaximum => {
328
- if (newMaximum < localWidth.value) localWidth.value = newMaximum;
329
- });
330
- watch(localWidth, val => emit('change:width', val));
331
- return {
332
- root,
333
- resizeBar,
334
- isResizing,
335
- isCollapsed,
336
- localWidth,
337
- isShowingToolbar,
338
- sidebarStyle,
339
- rootStyles,
340
- sidebarStyles,
341
- toolbarStyles,
342
- resizeStyles,
343
- collapsibleButtonStyles,
344
- mainStyles,
345
- headerStyles,
346
- contentStyles,
347
- footerStyles,
348
- open,
349
- close
350
- };
351
- }
352
- });
353
-
354
- export { OrSidebarPlacement as O, script as s };
@@ -1,5 +0,0 @@
1
- export { default as OrTextarea } from './OrTextarea.vue';
2
- export { default as OrInput } from './OrInput.vue';
3
- export { default as OrNumberInput } from './OrNumberInput.vue';
4
- export { default as OrPassword } from './OrPassword.vue';
5
- export { default as OrSearch } from './OrSearch.vue';
@@ -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;