@onereach/ui-components 4.1.2-beta.2554.0 → 4.1.2

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 (354) hide show
  1. package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +39 -34
  2. package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +16 -18
  3. package/dist/bundled/v2/components/OrCheckboxV3/index.js +0 -1
  4. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
  5. package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
  6. package/dist/bundled/v2/components/OrTooltipContent/OrTooltipContent.js +2 -2
  7. package/dist/bundled/v2/index.d.ts +0 -1
  8. package/dist/bundled/v2/index.js +3 -4
  9. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-29e8ad0e.js → OrAvatar.vue_vue_type_script_lang-6511e348.js} +1 -1
  10. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-a4a16fe5.js → OrButton.vue_vue_type_script_lang-da7f7ed0.js} +1 -1
  11. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-c1d83552.js → OrCardCollection.vue_vue_type_script_lang-7a2e1332.js} +3 -3
  12. package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-0e87c56b.js → OrCarousel.vue_vue_type_script_lang-6976844a.js} +1 -1
  13. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-6ff51af9.js → OrCheckbox.vue_vue_type_script_lang-11b16d93.js} +1 -1
  14. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js → OrCheckbox.vue_vue_type_script_lang-60cefcbd.js} +10 -26
  15. package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-ceebbd82.js → OrChip.vue_vue_type_script_lang-5a390853.js} +1 -1
  16. package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-94b456c7.js → OrChips.vue_vue_type_script_lang-d4bb44eb.js} +1 -1
  17. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-c5a9adb7.js → OrCode.vue_vue_type_script_lang-5397df6a.js} +2 -2
  18. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-806d209b.js → OrConfirm.vue_vue_type_script_lang-89febea7.js} +2 -2
  19. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-5c1a5d4a.js → OrDateTimePicker.vue_vue_type_script_lang-8ff54abd.js} +1 -1
  20. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-5d204461.js → OrIconButton.vue_vue_type_script_lang-96cb5b59.js} +2 -2
  21. package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-424e2c26.js → OrInlineTextEdit.vue_vue_type_script_lang-45987769.js} +1 -1
  22. package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-c65271b9.js → OrList.vue_vue_type_script_lang-2c7537cc.js} +3 -3
  23. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-d3dce7b8.js → OrListOfInputs.vue_vue_type_script_lang-009f62a5.js} +3 -3
  24. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-d5fb0b11.js → OrModal.vue_vue_type_script_lang-c53617ae.js} +1 -1
  25. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-ef4f2661.js → OrNotification.vue_vue_type_script_lang-efb05bb2.js} +2 -2
  26. package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-0c461991.js → OrOverflowMenu.vue_vue_type_script_lang-ba50133f.js} +2 -2
  27. package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-3d308fef.js → OrPassword.vue_vue_type_script_lang-37f52611.js} +1 -1
  28. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-86f4f5c7.js → OrSearch.vue_vue_type_script_lang-bcb935c3.js} +1 -1
  29. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-d2fecd97.js → OrSelect.vue_vue_type_script_lang-c82d8f58.js} +3 -3
  30. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-c0612348.js → OrSelect.vue_vue_type_script_lang-f7601423.js} +1 -1
  31. package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-900036a2.js → OrSlider.vue_vue_type_script_lang-45ecddbe.js} +1 -1
  32. package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-2821c496.js → OrStepper.vue_vue_type_script_lang-975a4df6.js} +1 -1
  33. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-f06b54a2.js → OrTag.vue_vue_type_script_lang-621e9307.js} +1 -1
  34. package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-b8d5341b.js → OrTextbox.vue_vue_type_script_lang-812f302d.js} +1 -1
  35. package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +3 -3
  36. package/dist/bundled/v3/components/OrAvatar/index.js +2 -2
  37. package/dist/bundled/v3/components/OrButtonV2/OrButton.js +3 -3
  38. package/dist/bundled/v3/components/OrButtonV2/index.js +4 -4
  39. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +6 -6
  40. package/dist/bundled/v3/components/OrCardCollection/index.js +5 -5
  41. package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +3 -3
  42. package/dist/bundled/v3/components/OrCarousel/index.js +2 -2
  43. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +3 -3
  44. package/dist/bundled/v3/components/OrCheckbox/index.js +2 -2
  45. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +7 -9
  46. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +16 -18
  47. package/dist/bundled/v3/components/OrCheckboxV3/index.js +1 -2
  48. package/dist/bundled/v3/components/OrChip/OrChip.js +3 -3
  49. package/dist/bundled/v3/components/OrChip/index.js +2 -2
  50. package/dist/bundled/v3/components/OrChips/OrChips.js +4 -4
  51. package/dist/bundled/v3/components/OrChips/index.js +3 -3
  52. package/dist/bundled/v3/components/OrCode/OrCode.js +6 -6
  53. package/dist/bundled/v3/components/OrCode/index.js +5 -5
  54. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +7 -7
  55. package/dist/bundled/v3/components/OrConfirm/index.js +6 -6
  56. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +5 -5
  57. package/dist/bundled/v3/components/OrDateTimePicker/index.js +4 -4
  58. package/dist/bundled/v3/components/OrIcon/OrIcon.js +2 -2
  59. package/dist/bundled/v3/components/OrIcon/index.js +1 -1
  60. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +4 -4
  61. package/dist/bundled/v3/components/OrIconButtonV2/index.js +3 -3
  62. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +5 -5
  63. package/dist/bundled/v3/components/OrInlineTextEdit/index.js +4 -4
  64. package/dist/bundled/v3/components/OrList/OrList.js +6 -6
  65. package/dist/bundled/v3/components/OrList/index.js +5 -5
  66. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +7 -7
  67. package/dist/bundled/v3/components/OrListOfInputs/index.js +6 -6
  68. package/dist/bundled/v3/components/OrModal/OrModal.js +5 -5
  69. package/dist/bundled/v3/components/OrModal/index.js +4 -4
  70. package/dist/bundled/v3/components/OrNotification/OrNotification.js +5 -5
  71. package/dist/bundled/v3/components/OrNotification/index.js +4 -4
  72. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +6 -6
  73. package/dist/bundled/v3/components/OrOverflowMenu/index.js +5 -5
  74. package/dist/bundled/v3/components/OrPassword/OrPassword.js +5 -5
  75. package/dist/bundled/v3/components/OrPassword/index.js +4 -4
  76. package/dist/bundled/v3/components/OrSearch/OrSearch.js +5 -5
  77. package/dist/bundled/v3/components/OrSearch/index.js +4 -4
  78. package/dist/bundled/v3/components/OrSelect/OrSelect.js +5 -5
  79. package/dist/bundled/v3/components/OrSelect/index.js +4 -4
  80. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
  81. package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
  82. package/dist/bundled/v3/components/OrSlider/OrSlider.js +3 -3
  83. package/dist/bundled/v3/components/OrSlider/index.js +2 -2
  84. package/dist/bundled/v3/components/OrStepper/OrStepper.js +4 -4
  85. package/dist/bundled/v3/components/OrStepper/index.js +3 -3
  86. package/dist/bundled/v3/components/OrTag/OrTag.js +3 -3
  87. package/dist/bundled/v3/components/OrTag/index.js +2 -2
  88. package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +5 -5
  89. package/dist/bundled/v3/components/OrTextbox/index.js +4 -4
  90. package/dist/bundled/v3/components/OrToast/OrToast.js +3 -3
  91. package/dist/bundled/v3/components/OrToast/index.js +4 -4
  92. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +5 -5
  93. package/dist/bundled/v3/components/OrToastContainer/index.js +4 -4
  94. package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +2 -2
  95. package/dist/bundled/v3/components/OrTooltip/index.js +1 -1
  96. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.js +1 -1
  97. package/dist/bundled/v3/components/index.js +29 -29
  98. package/dist/bundled/v3/index.d.ts +0 -1
  99. package/dist/bundled/v3/index.js +34 -34
  100. package/dist/esm/v2/{OrAvatar-da5cba16.js → OrAvatar-7c024521.js} +1 -1
  101. package/dist/esm/v2/{OrButton-bdddd8d4.js → OrButton-4e532ddb.js} +1 -1
  102. package/dist/esm/v2/{OrButton.vue_rollup-plugin-vue_styles.0-3dbd90b4.js → OrButton.vue_rollup-plugin-vue_styles.0-48c5883e.js} +2 -2
  103. package/dist/esm/v2/{OrCardCollection-4e014d25.js → OrCardCollection-9bf513b7.js} +5 -5
  104. package/dist/esm/v2/{OrCarousel-3c809a13.js → OrCarousel-e0c2e387.js} +1 -1
  105. package/dist/esm/v2/{OrCheckbox-bf34eb0f.js → OrCheckbox-7b98fc08.js} +1 -1
  106. package/dist/esm/v2/{OrCheckbox-e55228e5.js → OrCheckbox-dc587ec9.js} +40 -34
  107. package/dist/esm/v2/{OrChip-416e848e.js → OrChip-8a1abfc5.js} +1 -1
  108. package/dist/esm/v2/{OrChips-77e789e9.js → OrChips-a01d8520.js} +1 -1
  109. package/dist/esm/v2/{OrChips.vue_rollup-plugin-vue_styles.0-e05c5ca8.js → OrChips.vue_rollup-plugin-vue_styles.0-3cbb0871.js} +1 -1
  110. package/dist/esm/v2/{OrCode-dcb0132a.js → OrCode-e54e09f7.js} +4 -4
  111. package/dist/esm/v2/{OrConfirm-497cd260.js → OrConfirm-5d5dd9bc.js} +3 -3
  112. package/dist/esm/v2/{OrDateTimePicker-c88ca716.js → OrDateTimePicker-6e2853ec.js} +3 -3
  113. package/dist/esm/v2/{OrIcon-8a6d663a.js → OrIcon-a40e60af.js} +2 -2
  114. package/dist/esm/v2/{OrIconButton-97bfd51d.js → OrIconButton-23972f7d.js} +1 -1
  115. package/dist/esm/v2/{OrIconButton.vue_rollup-plugin-vue_styles.0-e3806cef.js → OrIconButton.vue_rollup-plugin-vue_styles.0-277ce06c.js} +3 -3
  116. package/dist/esm/v2/{OrInlineTextEdit-e8414fb6.js → OrInlineTextEdit-9541b625.js} +3 -3
  117. package/dist/esm/v2/{OrList-a46d6306.js → OrList-61c7b8ea.js} +4 -4
  118. package/dist/esm/v2/{OrListOfInputs-33a7bf87.js → OrListOfInputs-e1b09290.js} +5 -5
  119. package/dist/esm/v2/{OrModal-6d84829c.js → OrModal-b9cfb8ec.js} +3 -3
  120. package/dist/esm/v2/{OrNotification-7945568d.js → OrNotification-fdb88eec.js} +4 -4
  121. package/dist/esm/v2/{OrOverflowMenu-5ce7171b.js → OrOverflowMenu-83540c76.js} +4 -4
  122. package/dist/esm/v2/{OrPassword-3597153d.js → OrPassword-022e10fd.js} +3 -3
  123. package/dist/esm/v2/{OrSearch-49ceaac4.js → OrSearch-620d5d76.js} +3 -3
  124. package/dist/esm/v2/{OrSelect-4031334e.js → OrSelect-40183874.js} +1 -1
  125. package/dist/esm/v2/{OrSelect-eb5cc918.js → OrSelect-d887118b.js} +4 -4
  126. package/dist/esm/v2/{OrSlider-32a14ca4.js → OrSlider-c0a7f9cf.js} +1 -1
  127. package/dist/esm/v2/{OrStepper-462bc9e6.js → OrStepper-b00f7531.js} +2 -2
  128. package/dist/esm/v2/{OrTag-a1fff567.js → OrTag-6349049b.js} +1 -1
  129. package/dist/esm/v2/{OrTextbox-0a89a533.js → OrTextbox-0373bd6a.js} +3 -3
  130. package/dist/esm/v2/{OrToastContainer-5ce15a5b.js → OrToastContainer-1625b803.js} +3 -3
  131. package/dist/esm/v2/{OrTooltip-cfb56e8f.js → OrTooltip-97a42707.js} +1 -1
  132. package/dist/esm/v2/{OrTooltip.vue_rollup-plugin-vue_styles.0-122f7804.js → OrTooltip.vue_rollup-plugin-vue_styles.0-a256ac18.js} +1 -1
  133. package/dist/esm/v2/{OrTooltipContent-c9540548.js → OrTooltipContent-d85e1071.js} +2 -2
  134. package/dist/esm/v2/components/index.js +34 -34
  135. package/dist/esm/v2/components/or-avatar/index.js +4 -4
  136. package/dist/esm/v2/components/or-button-v2/index.js +8 -8
  137. package/dist/esm/v2/components/or-card-collection/index.js +9 -9
  138. package/dist/esm/v2/components/or-carousel/index.js +4 -4
  139. package/dist/esm/v2/components/or-checkbox/index.js +4 -4
  140. package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +16 -18
  141. package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
  142. package/dist/esm/v2/components/or-chips/index.js +6 -6
  143. package/dist/esm/v2/components/or-chips/or-chip/index.js +4 -4
  144. package/dist/esm/v2/components/or-code/index.js +9 -9
  145. package/dist/esm/v2/components/or-confirm/index.js +10 -10
  146. package/dist/esm/v2/components/or-date-time-picker/index.js +8 -8
  147. package/dist/esm/v2/components/or-icon/index.js +3 -3
  148. package/dist/esm/v2/components/or-icon-button-v2/index.js +6 -6
  149. package/dist/esm/v2/components/or-inline-text-edit/index.js +8 -8
  150. package/dist/esm/v2/components/or-list/index.js +9 -9
  151. package/dist/esm/v2/components/or-list-of-inputs/index.js +10 -10
  152. package/dist/esm/v2/components/or-modal/index.js +8 -8
  153. package/dist/esm/v2/components/or-notification/index.js +8 -8
  154. package/dist/esm/v2/components/or-overflow-menu/index.js +9 -9
  155. package/dist/esm/v2/components/or-password/index.js +8 -8
  156. package/dist/esm/v2/components/or-search/index.js +8 -8
  157. package/dist/esm/v2/components/or-select/index.js +7 -7
  158. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  159. package/dist/esm/v2/components/or-slider/index.js +4 -4
  160. package/dist/esm/v2/components/or-stepper/index.js +8 -8
  161. package/dist/esm/v2/components/or-tag/index.js +4 -4
  162. package/dist/esm/v2/components/or-textbox/index.js +8 -8
  163. package/dist/esm/v2/components/or-toast/index.js +8 -8
  164. package/dist/esm/v2/components/or-toast/or-toast-container/index.js +8 -8
  165. package/dist/esm/v2/components/or-tooltip/index.js +3 -3
  166. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/index.js +1 -1
  167. package/dist/esm/v2/index.d.ts +0 -1
  168. package/dist/esm/v2/index.js +34 -35
  169. package/dist/esm/v3/{OrAvatar-b18f2208.js → OrAvatar-14a5c5f0.js} +1 -1
  170. package/dist/esm/v3/{OrButton-170b493f.js → OrButton-f8b10d79.js} +2 -2
  171. package/dist/esm/v3/{OrCardCollection-dc158967.js → OrCardCollection-ffbb9eda.js} +4 -4
  172. package/dist/esm/v3/{OrCarousel-8de5d65b.js → OrCarousel-03597740.js} +1 -1
  173. package/dist/esm/v3/{OrCheckbox-eab735d0.js → OrCheckbox-56f849f7.js} +16 -32
  174. package/dist/esm/v3/{OrCheckbox-c2d9cf53.js → OrCheckbox-7efd5f26.js} +1 -1
  175. package/dist/esm/v3/{OrChip-ccd4b331.js → OrChip-97a85e10.js} +1 -1
  176. package/dist/esm/v3/{OrChips-9a19aa03.js → OrChips-64b86761.js} +1 -1
  177. package/dist/esm/v3/{OrCode-b0b514ab.js → OrCode-6f2e4d99.js} +3 -3
  178. package/dist/esm/v3/{OrConfirm-1ffb7ed6.js → OrConfirm-ab04201f.js} +3 -3
  179. package/dist/esm/v3/{OrDateTimePicker-02c6de49.js → OrDateTimePicker-014f7819.js} +2 -2
  180. package/dist/esm/v3/{OrIcon-9b3d24cc.js → OrIcon-925c5413.js} +2 -2
  181. package/dist/esm/v3/{OrIconButton-9d08aa44.js → OrIconButton-5387fd59.js} +3 -3
  182. package/dist/esm/v3/{OrInlineTextEdit-8cfde85c.js → OrInlineTextEdit-6f97629f.js} +2 -2
  183. package/dist/esm/v3/{OrList-d3e330be.js → OrList-b8799cf4.js} +3 -3
  184. package/dist/esm/v3/{OrListOfInputs-3c8eaf97.js → OrListOfInputs-16ba8358.js} +4 -4
  185. package/dist/esm/v3/{OrModal-f8ae7146.js → OrModal-e6513e8c.js} +2 -2
  186. package/dist/esm/v3/{OrNotification-24192897.js → OrNotification-4c56f7ea.js} +3 -3
  187. package/dist/esm/v3/{OrOverflowMenu-a7568f8d.js → OrOverflowMenu-fe77e22c.js} +2 -2
  188. package/dist/esm/v3/{OrPassword-88a67993.js → OrPassword-9c8a458d.js} +2 -2
  189. package/dist/esm/v3/{OrSearch-fb2dd591.js → OrSearch-c4caf04e.js} +2 -2
  190. package/dist/esm/v3/{OrSelect-ebdab996.js → OrSelect-5502d82d.js} +1 -1
  191. package/dist/esm/v3/{OrSelect-3d923250.js → OrSelect-d8a78242.js} +4 -4
  192. package/dist/esm/v3/{OrSlider-ae7b8a11.js → OrSlider-80e0f2e6.js} +1 -1
  193. package/dist/esm/v3/{OrStepper-446007c5.js → OrStepper-3a586401.js} +2 -2
  194. package/dist/esm/v3/{OrTag-38d1ba92.js → OrTag-e7adb078.js} +1 -1
  195. package/dist/esm/v3/{OrTextbox-7de2b10c.js → OrTextbox-f7388a30.js} +2 -2
  196. package/dist/esm/v3/{OrToastContainer-c3ecb1c8.js → OrToastContainer-94ba2803.js} +2 -2
  197. package/dist/esm/v3/{OrTooltip-be7209e5.js → OrTooltip-618ce7c9.js} +1 -1
  198. package/dist/esm/v3/{OrTooltipContent-68c34911.js → OrTooltipContent-37a5f562.js} +1 -1
  199. package/dist/esm/v3/components/index.js +30 -30
  200. package/dist/esm/v3/components/or-avatar/index.js +4 -4
  201. package/dist/esm/v3/components/or-button-v2/index.js +5 -5
  202. package/dist/esm/v3/components/or-card-collection/index.js +7 -7
  203. package/dist/esm/v3/components/or-carousel/index.js +4 -4
  204. package/dist/esm/v3/components/or-checkbox/index.js +4 -4
  205. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +16 -18
  206. package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
  207. package/dist/esm/v3/components/or-chips/index.js +5 -5
  208. package/dist/esm/v3/components/or-chips/or-chip/index.js +4 -4
  209. package/dist/esm/v3/components/or-code/index.js +7 -7
  210. package/dist/esm/v3/components/or-confirm/index.js +7 -7
  211. package/dist/esm/v3/components/or-date-time-picker/index.js +6 -6
  212. package/dist/esm/v3/components/or-icon/index.js +3 -3
  213. package/dist/esm/v3/components/or-icon-button-v2/index.js +4 -4
  214. package/dist/esm/v3/components/or-inline-text-edit/index.js +6 -6
  215. package/dist/esm/v3/components/or-list/index.js +6 -6
  216. package/dist/esm/v3/components/or-list-of-inputs/index.js +7 -7
  217. package/dist/esm/v3/components/or-modal/index.js +6 -6
  218. package/dist/esm/v3/components/or-notification/index.js +6 -6
  219. package/dist/esm/v3/components/or-overflow-menu/index.js +6 -6
  220. package/dist/esm/v3/components/or-password/index.js +6 -6
  221. package/dist/esm/v3/components/or-search/index.js +6 -6
  222. package/dist/esm/v3/components/or-select/index.js +7 -7
  223. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  224. package/dist/esm/v3/components/or-slider/index.js +4 -4
  225. package/dist/esm/v3/components/or-stepper/index.js +6 -6
  226. package/dist/esm/v3/components/or-tag/index.js +4 -4
  227. package/dist/esm/v3/components/or-textbox/index.js +6 -6
  228. package/dist/esm/v3/components/or-toast/index.js +6 -6
  229. package/dist/esm/v3/components/or-toast/or-toast-container/index.js +6 -6
  230. package/dist/esm/v3/components/or-tooltip/index.js +2 -2
  231. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/index.js +1 -1
  232. package/dist/esm/v3/index.d.ts +0 -1
  233. package/dist/esm/v3/index.js +30 -31
  234. package/package.json +3 -2
  235. package/src/components/or-checkbox-v3/OrCheckbox.vue +12 -30
  236. package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
  237. package/src/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue +0 -1
  238. package/src/index.ts +0 -1
  239. package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +0 -140
  240. package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +0 -115
  241. package/dist/bundled/v2/components/OrCheckboxGroupV3/index.d.ts +0 -1
  242. package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +0 -25
  243. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +0 -196
  244. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +0 -65
  245. package/dist/bundled/v2/components/OrCheckboxTreeV3/index.d.ts +0 -1
  246. package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +0 -17
  247. package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.d.ts +0 -2
  248. package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.js +0 -10
  249. package/dist/bundled/v2/components/OrCheckboxTreeV3/types.d.ts +0 -6
  250. package/dist/bundled/v2/components/OrCheckboxTreeV3/types.js +0 -1
  251. package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.js +0 -123
  252. package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.vue.d.ts +0 -85
  253. package/dist/bundled/v2/components/OrFormGroupV3/index.d.ts +0 -2
  254. package/dist/bundled/v2/components/OrFormGroupV3/index.js +0 -12
  255. package/dist/bundled/v2/components/OrFormGroupV3/props.d.ts +0 -4
  256. package/dist/bundled/v2/components/OrFormGroupV3/props.js +0 -7
  257. package/dist/bundled/v2/components/OrFormGroupV3/styles.d.ts +0 -6
  258. package/dist/bundled/v2/components/OrFormGroupV3/styles.js +0 -20
  259. package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +0 -132
  260. package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +0 -110
  261. package/dist/bundled/v2/components/OrRadioGroupV3/index.d.ts +0 -1
  262. package/dist/bundled/v2/components/OrRadioGroupV3/index.js +0 -19
  263. package/dist/bundled/v2/utils/functions/flattenDeep.d.ts +0 -2
  264. package/dist/bundled/v2/utils/functions/flattenDeep.js +0 -5
  265. package/dist/bundled/v3/OrCheckboxTree.vue_vue_type_script_lang-2068c512.js +0 -98
  266. package/dist/bundled/v3/OrFormGroup.vue_vue_type_script_lang-360b258b.js +0 -60
  267. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +0 -112
  268. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +0 -115
  269. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.d.ts +0 -1
  270. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +0 -32
  271. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +0 -71
  272. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +0 -65
  273. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.d.ts +0 -1
  274. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +0 -20
  275. package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.d.ts +0 -2
  276. package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +0 -10
  277. package/dist/bundled/v3/components/OrCheckboxTreeV3/types.d.ts +0 -6
  278. package/dist/bundled/v3/components/OrCheckboxTreeV3/types.js +0 -1
  279. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +0 -58
  280. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +0 -85
  281. package/dist/bundled/v3/components/OrFormGroupV3/index.d.ts +0 -2
  282. package/dist/bundled/v3/components/OrFormGroupV3/index.js +0 -15
  283. package/dist/bundled/v3/components/OrFormGroupV3/props.d.ts +0 -4
  284. package/dist/bundled/v3/components/OrFormGroupV3/props.js +0 -7
  285. package/dist/bundled/v3/components/OrFormGroupV3/styles.d.ts +0 -6
  286. package/dist/bundled/v3/components/OrFormGroupV3/styles.js +0 -20
  287. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +0 -104
  288. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +0 -110
  289. package/dist/bundled/v3/components/OrRadioGroupV3/index.d.ts +0 -1
  290. package/dist/bundled/v3/components/OrRadioGroupV3/index.js +0 -24
  291. package/dist/bundled/v3/utils/functions/flattenDeep.d.ts +0 -2
  292. package/dist/bundled/v3/utils/functions/flattenDeep.js +0 -5
  293. package/dist/esm/v2/OrCheckboxTree-2a61ebed.js +0 -195
  294. package/dist/esm/v2/OrFormGroup-7a883bce.js +0 -140
  295. package/dist/esm/v2/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +0 -115
  296. package/dist/esm/v2/components/or-checkbox-group-v3/index.d.ts +0 -1
  297. package/dist/esm/v2/components/or-checkbox-group-v3/index.js +0 -129
  298. package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +0 -65
  299. package/dist/esm/v2/components/or-checkbox-tree-v3/index.d.ts +0 -1
  300. package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +0 -10
  301. package/dist/esm/v2/components/or-checkbox-tree-v3/styles.d.ts +0 -2
  302. package/dist/esm/v2/components/or-checkbox-tree-v3/types.d.ts +0 -6
  303. package/dist/esm/v2/components/or-form-group-v3/OrFormGroup.vue.d.ts +0 -85
  304. package/dist/esm/v2/components/or-form-group-v3/index.d.ts +0 -2
  305. package/dist/esm/v2/components/or-form-group-v3/index.js +0 -6
  306. package/dist/esm/v2/components/or-form-group-v3/props.d.ts +0 -4
  307. package/dist/esm/v2/components/or-form-group-v3/styles.d.ts +0 -6
  308. package/dist/esm/v2/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +0 -110
  309. package/dist/esm/v2/components/or-radio-group-v3/index.d.ts +0 -1
  310. package/dist/esm/v2/components/or-radio-group-v3/index.js +0 -124
  311. package/dist/esm/v2/flattenDeep-e7a8b995.js +0 -5
  312. package/dist/esm/v2/utils/functions/flattenDeep.d.ts +0 -2
  313. package/dist/esm/v3/OrCheckboxTree-995dde34.js +0 -155
  314. package/dist/esm/v3/OrFormGroup-d9255559.js +0 -121
  315. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +0 -115
  316. package/dist/esm/v3/components/or-checkbox-group-v3/index.d.ts +0 -1
  317. package/dist/esm/v3/components/or-checkbox-group-v3/index.js +0 -94
  318. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +0 -65
  319. package/dist/esm/v3/components/or-checkbox-tree-v3/index.d.ts +0 -1
  320. package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +0 -10
  321. package/dist/esm/v3/components/or-checkbox-tree-v3/styles.d.ts +0 -2
  322. package/dist/esm/v3/components/or-checkbox-tree-v3/types.d.ts +0 -6
  323. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +0 -85
  324. package/dist/esm/v3/components/or-form-group-v3/index.d.ts +0 -2
  325. package/dist/esm/v3/components/or-form-group-v3/index.js +0 -6
  326. package/dist/esm/v3/components/or-form-group-v3/props.d.ts +0 -4
  327. package/dist/esm/v3/components/or-form-group-v3/styles.d.ts +0 -6
  328. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +0 -110
  329. package/dist/esm/v3/components/or-radio-group-v3/index.d.ts +0 -1
  330. package/dist/esm/v3/components/or-radio-group-v3/index.js +0 -91
  331. package/dist/esm/v3/flattenDeep-e7a8b995.js +0 -5
  332. package/dist/esm/v3/utils/functions/flattenDeep.d.ts +0 -2
  333. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +0 -7
  334. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +0 -263
  335. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.vue +0 -82
  336. package/src/components/or-checkbox-group-v3/index.ts +0 -1
  337. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +0 -7
  338. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +0 -112
  339. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +0 -161
  340. package/src/components/or-checkbox-tree-v3/index.ts +0 -1
  341. package/src/components/or-checkbox-tree-v3/styles.ts +0 -15
  342. package/src/components/or-checkbox-tree-v3/types.ts +0 -6
  343. package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +0 -114
  344. package/src/components/or-form-group-v3/OrFormGroup.vue +0 -114
  345. package/src/components/or-form-group-v3/index.ts +0 -2
  346. package/src/components/or-form-group-v3/props.ts +0 -4
  347. package/src/components/or-form-group-v3/styles.ts +0 -36
  348. package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +0 -81
  349. package/src/components/or-radio-group-v3/OrRadioGroup.vue +0 -80
  350. package/src/components/or-radio-group-v3/index.ts +0 -1
  351. package/src/utils/functions/flattenDeep.ts +0 -5
  352. /package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-e3152dc5.js → OrIcon.vue_vue_type_script_lang-e5349e49.js} +0 -0
  353. /package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-0811fd48.js → OrToastContainer.vue_vue_type_script_lang-70cc38be.js} +0 -0
  354. /package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-b8594f7e.js → OrTooltip.vue_vue_type_script_lang-76a6b7f4.js} +0 -0
@@ -1,263 +0,0 @@
1
- import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref, watch } from 'vue-demi';
4
- import { FormGroupDirection } from '../or-form-group-v3';
5
- import OrCheckboxGroupDocs from './OrCheckboxGroup.docs.mdx';
6
- import OrCheckboxGroup from './OrCheckboxGroup.vue';
7
- import { OrIconV3 as OrIcon } from '../or-icon-v3';
8
-
9
- export default {
10
- title: 'Components/Forms/Checkbox/Group',
11
- component: OrCheckboxGroup,
12
- argTypes: {
13
- label: {
14
- control: { type: 'text' },
15
- },
16
- error: {
17
- control: { type: 'text' },
18
- },
19
- hint: {
20
- control: { type: 'text' },
21
- },
22
- direction: {
23
- control: {
24
- type: 'radio',
25
- options: Object.values(FormGroupDirection),
26
- },
27
- },
28
- },
29
- parameters: {
30
- docs: {
31
- page: OrCheckboxGroupDocs,
32
- },
33
- design: {
34
- type: 'figma',
35
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=202%3A12',
36
- },
37
- },
38
- } as Meta<typeof OrCheckboxGroup>;
39
-
40
- const Template: StoryFn<typeof OrCheckboxGroup> = (args) => ({
41
- components: {
42
- OrCheckboxGroup,
43
- },
44
- setup() {
45
- const model = ref([]);
46
-
47
- watch(model, (value) => {
48
- console.debug(value);
49
- });
50
-
51
- return {
52
- args,
53
- model,
54
- onUpdateModelValue: action('update:modelValue'),
55
- };
56
- },
57
-
58
- template: `
59
- <div class="contents">
60
- <OrCheckboxGroup
61
- v-bind="args"
62
- v-model="model"
63
- @update:modelValue="onUpdateModelValue"
64
- />
65
- </div>
66
- `,
67
- });
68
-
69
- export const CheckboxGroup = Template.bind({});
70
-
71
- CheckboxGroup.args = {
72
- label: 'Checkbox Group',
73
- options: [
74
- {
75
- label: 'Option 1',
76
- value: '1',
77
- },
78
- {
79
- label: 'Option 2',
80
- value: '2',
81
- },
82
- {
83
- label: 'Option 3',
84
- value: '3',
85
- },
86
- ],
87
- };
88
-
89
- export const CheckboxGroupTree = Template.bind({});
90
-
91
- CheckboxGroupTree.args = {
92
- label: 'Checkbox Group tree',
93
- options: [
94
- {
95
- label: 'Option 1',
96
- children: [
97
- {
98
- label: 'Option 1.1',
99
- value: '1.1',
100
- },
101
- {
102
- label: 'Option 1.2',
103
- value: '1.2',
104
- },
105
- {
106
- label: 'Option 1.3',
107
- value: '1.3',
108
- },
109
- ],
110
- },
111
- ],
112
- };
113
-
114
-
115
- export const CheckboxGroupDeepTree = Template.bind({});
116
-
117
- CheckboxGroupDeepTree.args = {
118
- label: 'Checkbox Group tree',
119
- options: [
120
- {
121
- label: 'Option 1',
122
- value: '1',
123
- },
124
- {
125
- label: 'Option 2',
126
- value: '2',
127
- },
128
- {
129
- label: 'Option 3',
130
- children: [
131
- {
132
- label: 'Option 3.1',
133
- value: '3.1',
134
- },
135
- {
136
- label: 'Option 3.2',
137
- value: '3.2',
138
- },
139
- {
140
- label: 'Option 3.3',
141
- children: [
142
- {
143
- label: 'Option 3.3.1',
144
- value: '3.3.1',
145
- },
146
- {
147
- label: 'Option 3.3.2',
148
- value: '3.3.2',
149
- },
150
- {
151
- label: 'Option 3.3.3',
152
- value: '3.3.3',
153
- },
154
- ],
155
- },
156
- ],
157
- },
158
- ],
159
- };
160
-
161
-
162
- export const CheckboxGroupDeepCollapsibleTree = Template.bind({});
163
-
164
- CheckboxGroupDeepCollapsibleTree.args = {
165
- label: 'Checkbox Group tree',
166
- options: [
167
- {
168
- label: 'Option 1',
169
- value: '1',
170
- },
171
- {
172
- label: 'Option 2',
173
- value: '2',
174
- },
175
- {
176
- label: 'Option 3',
177
- collapsible: true,
178
- children: [
179
- {
180
- label: 'Option 3.1',
181
- value: '3.1',
182
- },
183
- {
184
- label: 'Option 3.2',
185
- value: '3.2',
186
- },
187
- {
188
- label: 'Option 3.3',
189
- collapsible: true,
190
- children: [
191
- {
192
- label: 'Option 3.3.1',
193
- value: '3.3.1',
194
- },
195
- {
196
- label: 'Option 3.3.2',
197
- value: '3.3.2',
198
- },
199
- {
200
- label: 'Option 3.3.3',
201
- value: '3.3.3',
202
- },
203
- ],
204
- },
205
- ],
206
- },
207
- ],
208
- };
209
-
210
-
211
- const TemplateWithAddon: StoryFn<typeof OrCheckboxGroup> = (args) => ({
212
- components: {
213
- OrCheckboxGroup,
214
- OrIcon,
215
- },
216
- setup() {
217
- const model = ref([]);
218
-
219
- watch(model, (value) => {
220
- console.debug(value);
221
- });
222
-
223
- return {
224
- args,
225
- model,
226
- onUpdateModelValue: action('update:modelValue'),
227
- };
228
- },
229
-
230
- template: `
231
- <div class="contents">
232
- <OrCheckboxGroup
233
- v-bind="args"
234
- v-model="model"
235
- @update:modelValue="onUpdateModelValue"
236
- >
237
- <template #addon>
238
- <OrIcon icon="info" />
239
- </template>
240
- </OrCheckboxGroup>
241
- </div>
242
- `,
243
- });
244
-
245
- export const CheckboxGroupWithAddon = TemplateWithAddon.bind({});
246
-
247
- CheckboxGroupWithAddon.args = {
248
- label: 'Checkbox Group',
249
- options: [
250
- {
251
- label: 'Option 1',
252
- value: '1',
253
- },
254
- {
255
- label: 'Option 2',
256
- value: '2',
257
- },
258
- {
259
- label: 'Option 3',
260
- value: '3',
261
- },
262
- ],
263
- };
@@ -1,82 +0,0 @@
1
- <template>
2
- <OrFormGroup
3
- :label="label"
4
- :error="error"
5
- :hint="hint"
6
- :disabled="disabled"
7
- :direction="direction"
8
- >
9
- <template v-slot:addon>
10
- <slot name="addon" />
11
- </template>
12
- <OrCheckboxTree
13
- v-for="option in options"
14
- :key="option.value"
15
- v-model="proxyModelValue"
16
- :item="option"
17
- :disabeld="disabled || option.disabled"
18
- :collapsible="option.collapsible"
19
- />
20
- </OrFormGroup>
21
- </template>
22
-
23
- <script lang="ts">
24
- import { defineComponent, PropType } from 'vue-demi';
25
- import { useVModel } from '@vueuse/core';
26
- import { OrFormGroupV3 as OrFormGroup, FormGroupDirection } from '../or-form-group-v3';
27
- import { OrCheckboxTreeV3 as OrCheckboxTree } from '../or-checkbox-tree-v3';
28
-
29
-
30
- export default defineComponent({
31
- name: 'OrCheckboxGroup',
32
- components: {
33
- OrCheckboxTree,
34
- OrFormGroup,
35
- },
36
- model: {
37
- prop: 'modelValue',
38
- event: 'update:modelValue',
39
- },
40
- props: {
41
- modelValue: {
42
- type: Array as PropType<string[]>,
43
- default: () => [],
44
- },
45
- label: {
46
- type: String,
47
- default: '',
48
- },
49
- error: {
50
- type: String,
51
- default: '',
52
- },
53
- hint: {
54
- type: String,
55
- default: '',
56
- },
57
- direction: {
58
- type: String as PropType<FormGroupDirection>,
59
- default: FormGroupDirection.Vertical,
60
- },
61
- options: {
62
- type: Array as PropType<{ label: string; value: any; disabled?: boolean; collapsible: boolean;}[]>,
63
- default: () => [],
64
- },
65
- disabled: {
66
- type: Boolean,
67
- default: false,
68
- },
69
- },
70
- setup(props, { emit }) {
71
- const proxyModelValue = useVModel(props, 'modelValue', emit);
72
- return {
73
- proxyModelValue,
74
- };
75
- },
76
- });
77
-
78
- </script>
79
-
80
- <style scoped>
81
-
82
- </style>
@@ -1 +0,0 @@
1
- export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.vue';
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrCheckboxTreeV3 as OrCheckboxTree } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
@@ -1,112 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- import { ref } from 'vue-demi';
3
- import OrCheckboxTreeDocs from './OrCheckboxTree.docs.mdx';
4
- import OrCheckboxTree from './OrCheckboxTree.vue';
5
-
6
- export default {
7
- title: 'Components/Forms/Checkbox/Tree',
8
- component: OrCheckboxTree,
9
- parameters: {
10
- docs: {
11
- page: OrCheckboxTreeDocs,
12
- },
13
- },
14
- } as Meta<typeof OrCheckboxTree>;
15
-
16
- const Template: StoryFn<typeof OrCheckboxTree> = (args) => ({
17
- components: {
18
- OrCheckboxTree,
19
- },
20
- setup() {
21
- const model = ref<string[]>([]);
22
- return {
23
- args,
24
- model,
25
- };
26
- },
27
- template: `
28
- <div class="contents">
29
- <OrCheckboxTree
30
- v-for="item in args.items"
31
- v-model="model"
32
- :item="item"
33
- />
34
- </div>
35
- `,
36
- });
37
-
38
- export const Default = Template.bind({});
39
- Default.args = {
40
- items: [
41
- {
42
- label: 'Option 1',
43
- value: '1',
44
- },
45
- {
46
- label: 'Option 2',
47
- value: '2',
48
- },
49
- {
50
- label: 'Option 3',
51
- children: [
52
- {
53
- label: 'Option 3.1',
54
- value: '3.1',
55
- },
56
- {
57
- label: 'Option 3.2',
58
- collapsible: true,
59
- children: [
60
- {
61
- label: 'Option 3.2.1',
62
- value: '3.2.1',
63
- },
64
- {
65
- label: 'Option 3.2.2',
66
- value: '3.2.2',
67
- },
68
- {
69
- label: 'Option 3.2.3',
70
- children: [
71
- {
72
- label: 'Option',
73
- value: '3.3.1',
74
- },
75
- {
76
- label: 'Option',
77
- value: '3.3.2',
78
- },
79
- {
80
- label: 'Option',
81
- value: '3.3.3',
82
- },
83
- ],
84
- },
85
- ],
86
- },
87
- {
88
- label: 'Option 3.3',
89
- value: '3.3',
90
- },
91
- ],
92
- },
93
- {
94
- label: 'Option 4',
95
- value: '4',
96
- },
97
- {
98
- label: 'Option 5',
99
- collapsible: true,
100
- children: [
101
- {
102
- label: 'Option 5.1',
103
- value: '5.1',
104
- },
105
- {
106
- label: 'Option 5.2',
107
- value: '5.2',
108
- },
109
- ],
110
- },
111
- ],
112
- };
@@ -1,161 +0,0 @@
1
- <template>
2
- <div
3
- ref="root"
4
- :class="rootStyles"
5
- >
6
- <template v-if="hasChildren">
7
- <div :class="parentStyles">
8
- <template
9
- v-if="collapsible"
10
- >
11
- <OrIcon
12
- :class="[isOpen ? 'rotate-[180deg]': 'rotate-0']"
13
- icon="arrow_drop_down"
14
- size="l"
15
- @click="() => setIsOpen(!isOpen)"
16
- />
17
- </template>
18
- <OrCheckbox
19
- value="true"
20
- :model-value="isAllChildrenSelected"
21
- :indeterminate="isIntermediate"
22
- :label="item.label"
23
- @click="handleParentClick"
24
- />
25
- </div>
26
- <div
27
- v-if="hasChildren && isOpen"
28
- :class="{
29
- 'ml-2xl': collapsible,
30
- 'ml-lg': !collapsible
31
- }"
32
- >
33
- <OrCheckboxTree
34
- v-for="child in item.children"
35
- :key="child.value"
36
- v-model="proxyModelValue"
37
- class="mt-xs"
38
- :item="child"
39
- :collapsible="collapsible || child.collapsible"
40
- />
41
- </div>
42
- </template>
43
- <template v-else>
44
- <OrCheckbox
45
- v-model="proxyModelValue"
46
- :label="item.label"
47
- :value="item.value"
48
- />
49
- </template>
50
- </div>
51
- </template>
52
-
53
- <script lang="ts">
54
- import { computed, defineComponent, PropType } from 'vue-demi';
55
- import { useVModel, useToggle } from '@vueuse/core';
56
- import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
57
- import { OrIconV3 as OrIcon } from '../or-icon-v3';
58
- import { CheckboxTreeRoot, CheckboxTreeRootParent } from './styles';
59
- import { CheckboxNode } from './types';
60
- import flattenDeep from '../../utils/functions/flattenDeep';
61
-
62
- export default defineComponent({
63
- name: 'OrCheckboxTree',
64
- components: {
65
- OrIcon,
66
- OrCheckbox,
67
- },
68
-
69
- model: {
70
- prop: 'modelValue',
71
- event: 'update:modelValue',
72
- },
73
-
74
- props: {
75
- modelValue: {
76
- type: Array as PropType<string[]>,
77
- default: () => [],
78
- },
79
- item: {
80
- type: Object as PropType<CheckboxNode>,
81
- required: true,
82
- },
83
- collapsible: {
84
- type: Boolean,
85
- default: false,
86
- },
87
- },
88
-
89
- setup(props, { emit }) {
90
-
91
- // State
92
- const hasChildren = computed(() => props.item.children && props.item.children.length > 0);
93
- const childrenValues = computed(() => {
94
- const getChildValues = (children?: CheckboxNode[]): any[] | undefined => {
95
- return children?.map((child) => {
96
- if (child.children) {
97
- return getChildValues(child.children);
98
- } else {
99
- return child.value;
100
- }
101
- });
102
- };
103
-
104
- return flattenDeep(getChildValues(props.item.children));
105
- });
106
-
107
- const proxyModelValue = useVModel(props, 'modelValue', emit);
108
-
109
- const isAnyChildrenSelected = computed(() => {
110
- return proxyModelValue.value?.some((value) => childrenValues.value?.includes(value));
111
- });
112
-
113
- const isAllChildrenSelected = computed(() => {
114
- return childrenValues.value?.every((value) => proxyModelValue.value?.includes(value));
115
- });
116
-
117
- const isIntermediate = computed(() => {
118
- return isAnyChildrenSelected.value && !isAllChildrenSelected.value;
119
- });
120
-
121
- const [isOpen, setIsOpen] = useToggle(true);
122
-
123
- // Styles
124
- const rootStyles = computed(() => [
125
- 'or-checkbox-tree-v3',
126
- ...CheckboxTreeRoot,
127
- ]);
128
-
129
- // Styles
130
- const parentStyles = computed(() => [
131
- ...CheckboxTreeRootParent,
132
- ]);
133
-
134
- // Methods
135
- const handleParentClick = () => {
136
- if (isAllChildrenSelected.value) {
137
- proxyModelValue.value = proxyModelValue.value.filter((value) => !childrenValues.value.includes(value));
138
- } else {
139
- proxyModelValue.value = [
140
- ...proxyModelValue.value,
141
- ...childrenValues.value,
142
- ];
143
- }
144
- };
145
-
146
- return {
147
- rootStyles,
148
- parentStyles,
149
- hasChildren,
150
- proxyModelValue,
151
- isOpen,
152
- setIsOpen,
153
- isIntermediate,
154
- isAllChildrenSelected,
155
- isAnyChildrenSelected,
156
- childrenValues,
157
- handleParentClick,
158
- };
159
- },
160
- });
161
- </script>
@@ -1 +0,0 @@
1
- export { default as OrCheckboxTreeV3 } from './OrCheckboxTree.vue';
@@ -1,15 +0,0 @@
1
- export const CheckboxTreeRoot: string[] = [
2
- // Layout
3
- 'flex',
4
- 'flex-col',
5
-
6
- // Spacing
7
- 'gap-sm+ md:gap-sm',
8
- ];
9
-
10
- export const CheckboxTreeRootParent: string[] = [
11
- // Layout
12
- 'flex',
13
- 'flex-row',
14
- 'gap-xs',
15
- ];
@@ -1,6 +0,0 @@
1
- export type CheckboxNode = {
2
- label: string;
3
- value: string;
4
- children?: CheckboxNode[];
5
- collapsible?: boolean;
6
- };