@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,6 +1,8 @@
1
- import { defineComponent, getCurrentInstance, ref, computed } from 'vue-demi';
1
+ import { defineComponent, ref, computed, reactive } from 'vue-demi';
2
2
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
+ import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
3
4
  import '@vueuse/core';
5
+ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
4
6
  import { _ as __vue_component__$1 } from './OrError-d267ee9a.js';
5
7
  import { _ as __vue_component__$2 } from './OrHint-42dc9ebb.js';
6
8
  import { _ as __vue_component__$4 } from './OrIconButton-b3779042.js';
@@ -79,6 +81,10 @@ var script = defineComponent({
79
81
  type: Boolean,
80
82
  default: false
81
83
  },
84
+ readonly: {
85
+ type: Boolean,
86
+ default: false
87
+ },
82
88
  disabled: {
83
89
  type: Boolean,
84
90
  default: false
@@ -89,19 +95,21 @@ var script = defineComponent({
89
95
  }
90
96
  },
91
97
  emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
92
- expose: ['root', 'focus'],
98
+ expose: ['root', 'focus', 'blur'],
93
99
  setup(props, context) {
94
- var _a;
95
- const currentInstance = getCurrentInstance();
96
100
  // Refs
97
101
  const root = ref();
98
- const input = ref();
102
+ const control = ref();
99
103
  // Styles
100
104
  const classAttribute = useClassAttribute();
101
105
  const rootStyles = computed(() => ['or-input', ...InputRoot, classAttribute.value]);
102
106
  const controlStyles = computed(() => [...InputControl]);
103
107
  // State
104
- const controlId = ref((_a = context.attrs.id) !== null && _a !== void 0 ? _a : currentInstance.uid.toString());
108
+ const controlAttributes = reactive({
109
+ id: useIdAttribute(),
110
+ ...useControlAttributes(),
111
+ ...useValidationAttributes()
112
+ });
105
113
  const proxyModelValue = computed({
106
114
  get: () => {
107
115
  var _a;
@@ -113,32 +121,35 @@ var script = defineComponent({
113
121
  context.emit('update:modelValue', value);
114
122
  }
115
123
  });
116
- const invalid = computed(() => !!props.error);
117
- const readonly = computed(() => context.attrs.readonly);
118
124
  const currentLength = computed(() => {
119
125
  var _a, _b;
120
126
  return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.toString().length) !== null && _b !== void 0 ? _b : 0;
121
127
  });
122
- const maxLength = computed(() => context.attrs.maxlength);
128
+ const maxLength = computed(() => controlAttributes.maxlength);
129
+ const invalid = computed(() => !!props.error);
123
130
  const disclosed = ref(false);
124
131
  // Methods
125
132
  function focus() {
126
133
  var _a;
127
- (_a = input.value) === null || _a === void 0 ? void 0 : _a.focus();
134
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
135
+ }
136
+ function blur() {
137
+ var _a;
138
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
128
139
  }
129
140
  return {
130
141
  root,
131
- input,
142
+ control,
132
143
  rootStyles,
133
144
  controlStyles,
134
- controlId,
145
+ controlAttributes,
135
146
  proxyModelValue,
136
- invalid,
137
- readonly,
138
147
  currentLength,
139
148
  maxLength,
149
+ invalid,
140
150
  disclosed,
141
- focus
151
+ focus,
152
+ blur
142
153
  };
143
154
  }
144
155
  });
@@ -151,12 +162,12 @@ var __vue_render__ = function () {
151
162
  var _vm = this;
152
163
  var _h = _vm.$createElement;
153
164
  var _c = _vm._self._c || _h;
154
- return _c('div', {
165
+ return _c('div', _vm._b({
155
166
  ref: "root",
156
167
  class: _vm.rootStyles
157
- }, [_vm.label ? [_c('OrLabel', {
168
+ }, 'div', _vm.$attrs, false), [_vm.label ? [_c('OrLabel', {
158
169
  attrs: {
159
- "control-id": _vm.controlId,
170
+ "control-id": _vm.controlAttributes.id,
160
171
  "variant": 'input',
161
172
  "required": _vm.required,
162
173
  "disabled": _vm.disabled
@@ -183,10 +194,9 @@ var __vue_render__ = function () {
183
194
  value: _vm.proxyModelValue,
184
195
  expression: "proxyModelValue"
185
196
  }],
186
- ref: "input",
197
+ ref: "control",
187
198
  class: _vm.controlStyles,
188
199
  attrs: {
189
- "id": _vm.controlId,
190
200
  "placeholder": _vm.placeholder,
191
201
  "required": _vm.required,
192
202
  "disabled": _vm.disabled,
@@ -225,17 +235,16 @@ var __vue_render__ = function () {
225
235
  }
226
236
  }
227
237
  }
228
- }, 'input', _vm.$attrs, false)) : (_vm.type === 'password' && _vm.disclosed ? 'text' : _vm.type) === 'radio' ? _c('input', _vm._b({
238
+ }, 'input', _vm.controlAttributes, false)) : (_vm.type === 'password' && _vm.disclosed ? 'text' : _vm.type) === 'radio' ? _c('input', _vm._b({
229
239
  directives: [{
230
240
  name: "model",
231
241
  rawName: "v-model",
232
242
  value: _vm.proxyModelValue,
233
243
  expression: "proxyModelValue"
234
244
  }],
235
- ref: "input",
245
+ ref: "control",
236
246
  class: _vm.controlStyles,
237
247
  attrs: {
238
- "id": _vm.controlId,
239
248
  "placeholder": _vm.placeholder,
240
249
  "required": _vm.required,
241
250
  "disabled": _vm.disabled,
@@ -261,17 +270,16 @@ var __vue_render__ = function () {
261
270
  _vm.proxyModelValue = null;
262
271
  }
263
272
  }
264
- }, 'input', _vm.$attrs, false)) : _c('input', _vm._b({
273
+ }, 'input', _vm.controlAttributes, false)) : _c('input', _vm._b({
265
274
  directives: [{
266
275
  name: "model",
267
276
  rawName: "v-model",
268
277
  value: _vm.proxyModelValue,
269
278
  expression: "proxyModelValue"
270
279
  }],
271
- ref: "input",
280
+ ref: "control",
272
281
  class: _vm.controlStyles,
273
282
  attrs: {
274
- "id": _vm.controlId,
275
283
  "placeholder": _vm.placeholder,
276
284
  "required": _vm.required,
277
285
  "disabled": _vm.disabled,
@@ -300,7 +308,7 @@ var __vue_render__ = function () {
300
308
  _vm.proxyModelValue = $event.target.value;
301
309
  }
302
310
  }
303
- }, 'input', _vm.$attrs, false)), _vm._v(" "), _c('div', {
311
+ }, 'input', _vm.controlAttributes, false)), _vm._v(" "), _c('div', {
304
312
  class: ['layout-row']
305
313
  }, [_vm.type === 'password' ? [_c('OrIconButton', {
306
314
  attrs: {
@@ -363,14 +371,14 @@ var __vue_staticRenderFns__ = [];
363
371
  /* style */
364
372
  const __vue_inject_styles__ = function (inject) {
365
373
  if (!inject) return;
366
- inject("data-v-677a1aa4_0", {
367
- source: "input[data-v-677a1aa4]{min-width:0;background:0 0;outline:0}input[type=number][data-v-677a1aa4]::-webkit-inner-spin-button{display:none}input[type=search][data-v-677a1aa4]::-webkit-search-cancel-button{display:none}",
374
+ inject("data-v-8d63a848_0", {
375
+ source: "input[data-v-8d63a848]{min-width:0;background:0 0;outline:0}input[type=number][data-v-8d63a848]::-webkit-inner-spin-button{display:none}input[type=search][data-v-8d63a848]::-webkit-search-cancel-button{display:none}",
368
376
  map: undefined,
369
377
  media: undefined
370
378
  });
371
379
  };
372
380
  /* scoped */
373
- const __vue_scope_id__ = "data-v-677a1aa4";
381
+ const __vue_scope_id__ = "data-v-8d63a848";
374
382
  /* module identifier */
375
383
  const __vue_module_identifier__ = undefined;
376
384
  /* functional template */
@@ -149,7 +149,7 @@ var script = defineComponent({
149
149
  return [...accumulator, page];
150
150
  }, []);
151
151
  });
152
- // Functions
152
+ // Methods
153
153
  function toPreviousPage() {
154
154
  currentPage.value = currentPage.value - 1;
155
155
  }
@@ -1,5 +1,6 @@
1
- import { defineComponent, getCurrentInstance, ref, computed } from 'vue-demi';
1
+ import { defineComponent, ref, computed, reactive } from 'vue-demi';
2
2
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
+ import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
3
4
  import '@vueuse/core';
4
5
  import { _ as __vue_component__$1, L as LabelVariant } from './OrLabel-2a9f1477.js';
5
6
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
@@ -72,18 +73,20 @@ var script = defineComponent({
72
73
  }
73
74
  },
74
75
  emits: ['update:modelValue', 'input', 'focus', 'blur'],
75
- expose: ['root'],
76
+ expose: ['root', 'focus', 'blur'],
76
77
  setup(props, context) {
77
- var _a;
78
- const currentInstance = getCurrentInstance();
79
78
  // Refs
80
79
  const root = ref();
80
+ const control = ref();
81
81
  // Styles
82
82
  const classAttribute = useClassAttribute();
83
83
  const rootStyles = computed(() => ['or-radio', ...RadioRoot, classAttribute.value]);
84
84
  const controlStyles = computed(() => [...RadioControl, ...RadioControlHandle]);
85
85
  // State
86
- const controlId = ref((_a = context.attrs.id) !== null && _a !== void 0 ? _a : currentInstance.uid.toString());
86
+ const controlAttributes = reactive({
87
+ id: useIdAttribute(),
88
+ ...useControlAttributes()
89
+ });
87
90
  const proxyModelValue = computed({
88
91
  get: () => {
89
92
  var _a;
@@ -95,12 +98,24 @@ var script = defineComponent({
95
98
  context.emit('update:modelValue', value);
96
99
  }
97
100
  });
101
+ // Methods
102
+ function focus() {
103
+ var _a;
104
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
105
+ }
106
+ function blur() {
107
+ var _a;
108
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
109
+ }
98
110
  return {
99
111
  root,
112
+ control,
100
113
  rootStyles,
101
114
  controlStyles,
102
- controlId,
103
- proxyModelValue
115
+ controlAttributes,
116
+ proxyModelValue,
117
+ focus,
118
+ blur
104
119
  };
105
120
  }
106
121
  });
@@ -113,19 +128,19 @@ var __vue_render__ = function () {
113
128
  var _vm = this;
114
129
  var _h = _vm.$createElement;
115
130
  var _c = _vm._self._c || _h;
116
- return _c('div', {
131
+ return _c('div', _vm._b({
117
132
  ref: "root",
118
133
  class: _vm.rootStyles
119
- }, [_c('input', _vm._b({
134
+ }, 'div', _vm.$attrs, false), [_c('input', _vm._b({
120
135
  directives: [{
121
136
  name: "model",
122
137
  rawName: "v-model",
123
138
  value: _vm.proxyModelValue,
124
139
  expression: "proxyModelValue"
125
140
  }],
141
+ ref: "control",
126
142
  class: _vm.controlStyles,
127
143
  attrs: {
128
- "id": _vm.controlId,
129
144
  "type": "radio",
130
145
  "required": _vm.required,
131
146
  "disabled": _vm.disabled
@@ -145,9 +160,9 @@ var __vue_render__ = function () {
145
160
  _vm.proxyModelValue = _vm.inputValue;
146
161
  }
147
162
  }
148
- }, 'input', _vm.$attrs, false)), _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
163
+ }, 'input', _vm.controlAttributes, false)), _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
149
164
  attrs: {
150
- "control-id": _vm.controlId,
165
+ "control-id": _vm.controlAttributes.id,
151
166
  "variant": _vm.labelVariant,
152
167
  "required": _vm.required,
153
168
  "disabled": _vm.disabled
@@ -168,14 +183,14 @@ var __vue_staticRenderFns__ = [];
168
183
  /* style */
169
184
  const __vue_inject_styles__ = function (inject) {
170
185
  if (!inject) return;
171
- inject("data-v-3a964458_0", {
172
- source: "input[data-v-3a964458]{appearance:none;line-height:0}",
186
+ inject("data-v-5a34efe0_0", {
187
+ source: "input[data-v-5a34efe0]{appearance:none;line-height:0}",
173
188
  map: undefined,
174
189
  media: undefined
175
190
  });
176
191
  };
177
192
  /* scoped */
178
- const __vue_scope_id__ = "data-v-3a964458";
193
+ const __vue_scope_id__ = "data-v-5a34efe0";
179
194
  /* module identifier */
180
195
  const __vue_module_identifier__ = undefined;
181
196
  /* functional template */
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, watch } from 'vue-demi';
2
2
  import { debouncedWatch } from '@vueuse/core';
3
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
4
- import { _ as __vue_component__$1 } from './OrInput-ada3a970.js';
4
+ import { _ as __vue_component__$1 } from './OrInput-e10cc643.js';
5
5
  import { a as InputBoxSize } from './OrInputBox-4d5a318d.js';
6
6
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
7
7
 
@@ -3,13 +3,13 @@ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.
3
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
4
4
  import { u as useOverflow } from './useOverflow-af6161c8.js';
5
5
  import '@vueuse/core';
6
- import { _ as __vue_component__$1 } from './OrCheckbox-567e387c.js';
6
+ import { _ as __vue_component__$1 } from './OrCheckbox-7317fe1a.js';
7
7
  import { _ as __vue_component__$2 } from './OrError-d267ee9a.js';
8
8
  import { _ as __vue_component__$3 } from './OrExpansionPanel-a123024e.js';
9
9
  import { _ as __vue_component__$4 } from './OrHint-42dc9ebb.js';
10
10
  import { _ as __vue_component__$5 } from './OrIcon-5e394c62.js';
11
11
  import { _ as __vue_component__$7, a as InputBoxSize } from './OrInputBox-4d5a318d.js';
12
- import { _ as __vue_component__$6 } from './OrInput-ada3a970.js';
12
+ import { _ as __vue_component__$6 } from './OrInput-e10cc643.js';
13
13
  import { _ as __vue_component__$8 } from './OrLabel-2a9f1477.js';
14
14
  import { _ as __vue_component__$9 } from './OrMenuItem-c7f28480.js';
15
15
  import { _ as __vue_component__$a } from './OrPopover-9bafbdb4.js';
@@ -0,0 +1,228 @@
1
+ import { useDraggable, useElementBounding } from '@vueuse/core';
2
+ import _ from 'lodash';
3
+ import { defineComponent, ref, computed, watch } from 'vue-demi';
4
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
5
+
6
+ var OrSidebarPlacement;
7
+ (function (OrSidebarPlacement) {
8
+ OrSidebarPlacement["left"] = "left";
9
+ OrSidebarPlacement["right"] = "right";
10
+ })(OrSidebarPlacement || (OrSidebarPlacement = {}));
11
+
12
+ const SidebarRoot = [
13
+ // Position
14
+ 'relative',
15
+ // Layout
16
+ 'flex', 'flex-col', 'shrink-0',
17
+ // Box
18
+ 'min-h-0', 'p-0'];
19
+ const SidebarRootSides = {
20
+ [OrSidebarPlacement.left]: [
21
+ // Borders
22
+ 'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
23
+ [OrSidebarPlacement.right]: [
24
+ // Borders
25
+ 'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
26
+ };
27
+ const SidebarResize = [
28
+ // Position
29
+ 'absolute', 'inset-y-none', 'z-[1]',
30
+ // Box
31
+ 'w-[12px]', 'h-[100%]',
32
+ // Cursor
33
+ 'cursor-ew-resize'];
34
+ const SidebarResizeSides = {
35
+ [OrSidebarPlacement.left]: [
36
+ // Position
37
+ '-right-[1px]',
38
+ // Borders
39
+ 'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
40
+ // Transition
41
+ 'transition-[border-right]'],
42
+ [OrSidebarPlacement.right]: [
43
+ // Position
44
+ '-left-[1px]',
45
+ // Borders
46
+ 'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
47
+ // Transition
48
+ 'transition-[border-left]']
49
+ };
50
+ const SidebarResizingSides = {
51
+ [OrSidebarPlacement.left]: [
52
+ // Borders
53
+ 'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
54
+ [OrSidebarPlacement.right]: [
55
+ // Borders
56
+ 'border-l-2', 'border-l-primary dark:border-l-primary-dark']
57
+ };
58
+ const SidebarMain = [
59
+ // Layout
60
+ 'flex', 'flex-col', 'grow',
61
+ // Box
62
+ 'min-h-0'];
63
+ const SidebarHeader = [
64
+ // Sizing
65
+ 'p-md'];
66
+ const SidebarContent = [
67
+ // Layout
68
+ 'grow', 'overflow-auto',
69
+ // Sizing
70
+ 'p-md'];
71
+ const SidebarFooter = [
72
+ // Sizing
73
+ 'p-md',
74
+ // Borders
75
+ 'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
76
+
77
+ var script = defineComponent({
78
+ name: 'OrSidebar',
79
+ props: {
80
+ width: {
81
+ type: Number,
82
+ required: false,
83
+ default: 0,
84
+ validator: value => _.isNumber(value) && value >= 0
85
+ },
86
+ minimumWidth: {
87
+ type: Number,
88
+ required: false,
89
+ default: 350,
90
+ validator: value => _.isNumber(value) && value >= 0
91
+ },
92
+ /**
93
+ * User may put the component on the right or the left side of a container.
94
+ * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
95
+ *
96
+ * Note: the property doesn't reposition the component in the parent container.
97
+ * @values left, right
98
+ */
99
+ side: {
100
+ type: String,
101
+ default: OrSidebarPlacement.right,
102
+ validator: value => _.includes(_.values(OrSidebarPlacement), value)
103
+ }
104
+ },
105
+ emits: ['change:width'],
106
+ setup(props, {
107
+ emit
108
+ }) {
109
+ // Refs
110
+ const root = ref();
111
+ const resizeBar = ref(null);
112
+ const parentContainer = computed(() => {
113
+ var _a;
114
+ return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
115
+ });
116
+ // State
117
+ const startPositionX = ref(0);
118
+ const isResizing = ref(false);
119
+ const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
120
+ // Styles
121
+ const sidebarStyle = computed(() => ({
122
+ width: localWidth.value + 'px'
123
+ }));
124
+ const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
125
+ const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
126
+ const mainStyles = computed(() => [...SidebarMain]);
127
+ const headerStyles = computed(() => [...SidebarHeader]);
128
+ const contentStyles = computed(() => [...SidebarContent]);
129
+ const footerStyles = computed(() => [...SidebarFooter]);
130
+ // Effects
131
+ useDraggable(resizeBar, {
132
+ preventDefault: true,
133
+ onStart: (position, event) => {
134
+ document.body.style.cursor = 'ew-resize';
135
+ document.body.style.userSelect = 'none';
136
+ startPositionX.value = event.x;
137
+ isResizing.value = true;
138
+ },
139
+ onMove: position => {
140
+ const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
141
+ const newWidth = localWidth.value - delta;
142
+ localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
143
+ startPositionX.value = position.x;
144
+ },
145
+ onEnd: () => {
146
+ document.body.style.cursor = '';
147
+ document.body.style.userSelect = '';
148
+ isResizing.value = false;
149
+ }
150
+ });
151
+ const {
152
+ width: maximumWidth
153
+ } = useElementBounding(parentContainer);
154
+ watch(() => props.width, newValue => {
155
+ if (newValue !== localWidth.value) {
156
+ localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
157
+ }
158
+ });
159
+ watch(() => props.minimumWidth, newMinimum => {
160
+ if (newMinimum > localWidth.value) localWidth.value = newMinimum;
161
+ });
162
+ watch(maximumWidth, newMaximum => {
163
+ if (newMaximum < localWidth.value) localWidth.value = newMaximum;
164
+ });
165
+ watch(localWidth, val => emit('change:width', val));
166
+ return {
167
+ root,
168
+ resizeBar,
169
+ isResizing,
170
+ localWidth,
171
+ sidebarStyle,
172
+ rootStyles,
173
+ resizeStyles,
174
+ mainStyles,
175
+ headerStyles,
176
+ contentStyles,
177
+ footerStyles
178
+ };
179
+ }
180
+ });
181
+
182
+ /* script */
183
+ const __vue_script__ = script;
184
+
185
+ /* template */
186
+ var __vue_render__ = function () {
187
+ var _vm = this;
188
+ var _h = _vm.$createElement;
189
+ var _c = _vm._self._c || _h;
190
+ return _c('aside', {
191
+ ref: "root",
192
+ class: _vm.rootStyles,
193
+ style: _vm.sidebarStyle
194
+ }, [_c('div', {
195
+ ref: "resizeBar",
196
+ class: _vm.resizeStyles
197
+ }), _vm._v(" "), _c('div', {
198
+ class: _vm.mainStyles
199
+ }, [_vm.$slots.header ? _c('div', {
200
+ class: _vm.headerStyles
201
+ }, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _c('div', {
202
+ class: _vm.contentStyles
203
+ }, [_vm._t("default")], 2)]), _vm._v(" "), _vm.$slots.footer ? _c('div', {
204
+ class: _vm.footerStyles
205
+ }, [_vm._t("footer")], 2) : _vm._e()]);
206
+ };
207
+ var __vue_staticRenderFns__ = [];
208
+
209
+ /* style */
210
+ const __vue_inject_styles__ = undefined;
211
+ /* scoped */
212
+ const __vue_scope_id__ = undefined;
213
+ /* module identifier */
214
+ const __vue_module_identifier__ = undefined;
215
+ /* functional template */
216
+ const __vue_is_functional_template__ = false;
217
+ /* style inject */
218
+
219
+ /* style inject SSR */
220
+
221
+ /* style inject shadow dom */
222
+
223
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
224
+ render: __vue_render__,
225
+ staticRenderFns: __vue_staticRenderFns__
226
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
227
+
228
+ export { OrSidebarPlacement as O, __vue_component__ as _ };
@@ -1,5 +1,6 @@
1
- import { defineComponent, getCurrentInstance, ref, computed } from 'vue-demi';
1
+ import { defineComponent, ref, computed, reactive } from 'vue-demi';
2
2
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
+ import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
3
4
  import '@vueuse/core';
4
5
  import { _ as __vue_component__$1, L as LabelVariant } from './OrLabel-2a9f1477.js';
5
6
  import { _ as __vue_component__$2 } from './OrLoader-f857d55b.js';
@@ -98,19 +99,21 @@ var script = defineComponent({
98
99
  }
99
100
  },
100
101
  emits: ['update:modelValue', 'input', 'focus', 'blur'],
101
- expose: ['root'],
102
+ expose: ['root', 'focus', 'blur'],
102
103
  setup(props, context) {
103
- var _a;
104
- const currentInstance = getCurrentInstance();
105
104
  // Refs
106
105
  const root = ref();
106
+ const control = ref();
107
107
  // Styles
108
108
  const classAttribute = useClassAttribute();
109
109
  const rootStyles = computed(() => ['or-switch', ...SwitchRoot, classAttribute.value]);
110
110
  const controlStyles = computed(() => [...SwitchControl, ...SwitchControlHandle]);
111
111
  const loaderStyles = computed(() => [...SwitchLoader, ...SwitchLoaderHandle]);
112
112
  // State
113
- const controlId = ref((_a = context.attrs.id) !== null && _a !== void 0 ? _a : currentInstance.uid.toString());
113
+ const controlAttributes = reactive({
114
+ id: useIdAttribute(),
115
+ ...useControlAttributes()
116
+ });
114
117
  const proxyModelValue = computed({
115
118
  get: () => {
116
119
  var _a;
@@ -122,13 +125,25 @@ var script = defineComponent({
122
125
  context.emit('update:modelValue', value);
123
126
  }
124
127
  });
128
+ // Methods
129
+ function focus() {
130
+ var _a;
131
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
132
+ }
133
+ function blur() {
134
+ var _a;
135
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
136
+ }
125
137
  return {
126
138
  root,
139
+ control,
127
140
  rootStyles,
128
141
  controlStyles,
129
142
  loaderStyles,
130
- controlId,
131
- proxyModelValue
143
+ controlAttributes,
144
+ proxyModelValue,
145
+ focus,
146
+ blur
132
147
  };
133
148
  }
134
149
  });
@@ -141,19 +156,19 @@ var __vue_render__ = function () {
141
156
  var _vm = this;
142
157
  var _h = _vm.$createElement;
143
158
  var _c = _vm._self._c || _h;
144
- return _c('div', {
159
+ return _c('div', _vm._b({
145
160
  ref: "root",
146
161
  class: _vm.rootStyles
147
- }, [!_vm.loading ? [_c('input', _vm._b({
162
+ }, 'div', _vm.$attrs, false), [!_vm.loading ? [_c('input', _vm._b({
148
163
  directives: [{
149
164
  name: "model",
150
165
  rawName: "v-model",
151
166
  value: _vm.proxyModelValue,
152
167
  expression: "proxyModelValue"
153
168
  }],
169
+ ref: "control",
154
170
  class: _vm.controlStyles,
155
171
  attrs: {
156
- "id": _vm.controlId,
157
172
  "type": "checkbox",
158
173
  "required": _vm.required,
159
174
  "disabled": _vm.disabled
@@ -186,7 +201,7 @@ var __vue_render__ = function () {
186
201
  }
187
202
  }
188
203
  }
189
- }, 'input', _vm.$attrs, false))] : [_c('div', {
204
+ }, 'input', _vm.controlAttributes, false))] : [_c('div', {
190
205
  class: _vm.loaderStyles,
191
206
  attrs: {
192
207
  "disabled": _vm.disabled ? '' : null
@@ -199,7 +214,7 @@ var __vue_render__ = function () {
199
214
  }
200
215
  })], 1)], _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
201
216
  attrs: {
202
- "control-id": _vm.controlId,
217
+ "control-id": _vm.controlAttributes.id,
203
218
  "variant": _vm.labelVariant,
204
219
  "required": _vm.required,
205
220
  "disabled": _vm.disabled
@@ -220,14 +235,14 @@ var __vue_staticRenderFns__ = [];
220
235
  /* style */
221
236
  const __vue_inject_styles__ = function (inject) {
222
237
  if (!inject) return;
223
- inject("data-v-bd0f51ac_0", {
224
- source: "input[data-v-bd0f51ac]{appearance:none;line-height:0}",
238
+ inject("data-v-203b3e04_0", {
239
+ source: "input[data-v-203b3e04]{appearance:none;line-height:0}",
225
240
  map: undefined,
226
241
  media: undefined
227
242
  });
228
243
  };
229
244
  /* scoped */
230
- const __vue_scope_id__ = "data-v-bd0f51ac";
245
+ const __vue_scope_id__ = "data-v-203b3e04";
231
246
  /* module identifier */
232
247
  const __vue_module_identifier__ = undefined;
233
248
  /* functional template */