@onereach/ui-components 4.1.1 → 4.1.2-beta.2551.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 (136) hide show
  1. package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +132 -0
  2. package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +110 -0
  3. package/dist/bundled/v2/components/OrCheckboxGroupV3/index.d.ts +1 -0
  4. package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +25 -0
  5. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +189 -0
  6. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +63 -0
  7. package/dist/bundled/v2/components/OrCheckboxTreeV3/index.d.ts +1 -0
  8. package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +17 -0
  9. package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.d.ts +1 -0
  10. package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.js +7 -0
  11. package/dist/bundled/v2/components/OrCheckboxTreeV3/types.d.ts +5 -0
  12. package/dist/bundled/v2/components/OrCheckboxTreeV3/types.js +1 -0
  13. package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +34 -39
  14. package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
  15. package/dist/bundled/v2/components/OrCheckboxV3/index.js +1 -0
  16. package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.js +121 -0
  17. package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.vue.d.ts +83 -0
  18. package/dist/bundled/v2/components/OrFormGroupV3/index.d.ts +2 -0
  19. package/dist/bundled/v2/components/OrFormGroupV3/index.js +12 -0
  20. package/dist/bundled/v2/components/OrFormGroupV3/props.d.ts +4 -0
  21. package/dist/bundled/v2/components/OrFormGroupV3/props.js +7 -0
  22. package/dist/bundled/v2/components/OrFormGroupV3/styles.d.ts +4 -0
  23. package/dist/bundled/v2/components/OrFormGroupV3/styles.js +14 -0
  24. package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +132 -0
  25. package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
  26. package/dist/bundled/v2/components/OrRadioGroupV3/index.d.ts +1 -0
  27. package/dist/bundled/v2/components/OrRadioGroupV3/index.js +19 -0
  28. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
  29. package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
  30. package/dist/bundled/v2/index.js +3 -3
  31. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-60cefcbd.js → OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js} +26 -10
  32. package/dist/bundled/v3/OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js +93 -0
  33. package/dist/bundled/v3/OrFormGroup.vue_vue_type_script_lang-fb14a874.js +58 -0
  34. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-f7601423.js → OrSelect.vue_vue_type_script_lang-c0612348.js} +1 -1
  35. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +110 -0
  36. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +110 -0
  37. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.d.ts +1 -0
  38. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +32 -0
  39. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +70 -0
  40. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +63 -0
  41. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.d.ts +1 -0
  42. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +20 -0
  43. package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.d.ts +1 -0
  44. package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +7 -0
  45. package/dist/bundled/v3/components/OrCheckboxTreeV3/types.d.ts +5 -0
  46. package/dist/bundled/v3/components/OrCheckboxTreeV3/types.js +1 -0
  47. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +9 -7
  48. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
  49. package/dist/bundled/v3/components/OrCheckboxV3/index.js +2 -1
  50. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +58 -0
  51. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +83 -0
  52. package/dist/bundled/v3/components/OrFormGroupV3/index.d.ts +2 -0
  53. package/dist/bundled/v3/components/OrFormGroupV3/index.js +15 -0
  54. package/dist/bundled/v3/components/OrFormGroupV3/props.d.ts +4 -0
  55. package/dist/bundled/v3/components/OrFormGroupV3/props.js +7 -0
  56. package/dist/bundled/v3/components/OrFormGroupV3/styles.d.ts +4 -0
  57. package/dist/bundled/v3/components/OrFormGroupV3/styles.js +14 -0
  58. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +104 -0
  59. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
  60. package/dist/bundled/v3/components/OrRadioGroupV3/index.d.ts +1 -0
  61. package/dist/bundled/v3/components/OrRadioGroupV3/index.js +24 -0
  62. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
  63. package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
  64. package/dist/bundled/v3/components/index.js +2 -2
  65. package/dist/bundled/v3/index.js +6 -7
  66. package/dist/esm/v2/{OrCheckbox-dc587ec9.js → OrCheckbox-e55228e5.js} +34 -40
  67. package/dist/esm/v2/OrCheckboxTree-4f8f74c4.js +185 -0
  68. package/dist/esm/v2/OrFormGroup-e583c054.js +132 -0
  69. package/dist/esm/v2/{OrSelect-40183874.js → OrSelect-4031334e.js} +1 -1
  70. package/dist/esm/v2/components/index.js +2 -2
  71. package/dist/esm/v2/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +110 -0
  72. package/dist/esm/v2/components/or-checkbox-group-v3/index.d.ts +1 -0
  73. package/dist/esm/v2/components/or-checkbox-group-v3/index.js +121 -0
  74. package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +63 -0
  75. package/dist/esm/v2/components/or-checkbox-tree-v3/index.d.ts +1 -0
  76. package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +10 -0
  77. package/dist/esm/v2/components/or-checkbox-tree-v3/styles.d.ts +1 -0
  78. package/dist/esm/v2/components/or-checkbox-tree-v3/types.d.ts +5 -0
  79. package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
  80. package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
  81. package/dist/esm/v2/components/or-form-group-v3/OrFormGroup.vue.d.ts +83 -0
  82. package/dist/esm/v2/components/or-form-group-v3/index.d.ts +2 -0
  83. package/dist/esm/v2/components/or-form-group-v3/index.js +6 -0
  84. package/dist/esm/v2/components/or-form-group-v3/props.d.ts +4 -0
  85. package/dist/esm/v2/components/or-form-group-v3/styles.d.ts +4 -0
  86. package/dist/esm/v2/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
  87. package/dist/esm/v2/components/or-radio-group-v3/index.d.ts +1 -0
  88. package/dist/esm/v2/components/or-radio-group-v3/index.js +124 -0
  89. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  90. package/dist/esm/v2/index.js +2 -2
  91. package/dist/esm/v3/{OrCheckbox-56f849f7.js → OrCheckbox-eab735d0.js} +32 -16
  92. package/dist/esm/v3/OrCheckboxTree-3a9f3ceb.js +146 -0
  93. package/dist/esm/v3/OrFormGroup-e7a78131.js +113 -0
  94. package/dist/esm/v3/{OrSelect-5502d82d.js → OrSelect-ebdab996.js} +1 -1
  95. package/dist/esm/v3/components/index.js +2 -2
  96. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +110 -0
  97. package/dist/esm/v3/components/or-checkbox-group-v3/index.d.ts +1 -0
  98. package/dist/esm/v3/components/or-checkbox-group-v3/index.js +92 -0
  99. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +63 -0
  100. package/dist/esm/v3/components/or-checkbox-tree-v3/index.d.ts +1 -0
  101. package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +10 -0
  102. package/dist/esm/v3/components/or-checkbox-tree-v3/styles.d.ts +1 -0
  103. package/dist/esm/v3/components/or-checkbox-tree-v3/types.d.ts +5 -0
  104. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
  105. package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
  106. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +83 -0
  107. package/dist/esm/v3/components/or-form-group-v3/index.d.ts +2 -0
  108. package/dist/esm/v3/components/or-form-group-v3/index.js +6 -0
  109. package/dist/esm/v3/components/or-form-group-v3/props.d.ts +4 -0
  110. package/dist/esm/v3/components/or-form-group-v3/styles.d.ts +4 -0
  111. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
  112. package/dist/esm/v3/components/or-radio-group-v3/index.d.ts +1 -0
  113. package/dist/esm/v3/components/or-radio-group-v3/index.js +91 -0
  114. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  115. package/dist/esm/v3/index.js +2 -2
  116. package/package.json +2 -3
  117. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +12 -0
  118. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +124 -0
  119. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.vue +78 -0
  120. package/src/components/or-checkbox-group-v3/index.ts +1 -0
  121. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +7 -0
  122. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +99 -0
  123. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +148 -0
  124. package/src/components/or-checkbox-tree-v3/index.ts +1 -0
  125. package/src/components/or-checkbox-tree-v3/styles.ts +9 -0
  126. package/src/components/or-checkbox-tree-v3/types.ts +5 -0
  127. package/src/components/or-checkbox-v3/OrCheckbox.vue +30 -12
  128. package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +114 -0
  129. package/src/components/or-form-group-v3/OrFormGroup.vue +108 -0
  130. package/src/components/or-form-group-v3/index.ts +2 -0
  131. package/src/components/or-form-group-v3/props.ts +4 -0
  132. package/src/components/or-form-group-v3/styles.ts +26 -0
  133. package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +81 -0
  134. package/src/components/or-radio-group-v3/OrRadioGroup.vue +80 -0
  135. package/src/components/or-radio-group-v3/index.ts +1 -0
  136. package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
@@ -0,0 +1,132 @@
1
+ import { defineComponent } from 'vue-demi';
2
+ import { useVModel } from '@vueuse/core';
3
+ import __vue_component__$1 from '../OrCheckboxTreeV3/OrCheckboxTree.js';
4
+ import __vue_component__$2 from '../OrFormGroupV3/OrFormGroup.js';
5
+ import { FormGroupDirection } from '../OrFormGroupV3/props.js';
6
+ import { s as styleInject } from '../../style-inject.es-4c6f2515.js';
7
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
8
+ import 'lodash';
9
+ import '../OrCheckboxTreeV3/styles.js';
10
+ import '../OrIconV3/OrIcon.js';
11
+ import '../OrIconV3/props.js';
12
+ import '../OrIconV3/styles.js';
13
+ import '../OrCheckboxV3/OrCheckbox.js';
14
+ import '../OrCheckboxV3/styles.js';
15
+ import '../OrLabelV3/OrLabel.js';
16
+ import '../OrLabelV3/props.js';
17
+ import '../OrLabelV3/styles.js';
18
+ import '../../hooks/useIdAttribute.js';
19
+ import '../../hooks/useControlAttributes.js';
20
+ import '../OrFormGroupV3/styles.js';
21
+ import '../OrErrorV3/OrError.js';
22
+ import '../OrErrorV3/styles.js';
23
+ import '../OrHintV3/OrHint.js';
24
+ import '../OrHintV3/styles.js';
25
+
26
+ var script = defineComponent({
27
+ name: 'OrCheckboxGroup',
28
+ components: {
29
+ OrCheckboxTree: __vue_component__$1,
30
+ OrFormGroup: __vue_component__$2
31
+ },
32
+ model: {
33
+ prop: 'modelValue',
34
+ event: 'update:modelValue'
35
+ },
36
+ props: {
37
+ modelValue: {
38
+ type: Array,
39
+ default: () => []
40
+ },
41
+ label: {
42
+ type: String,
43
+ default: ''
44
+ },
45
+ error: {
46
+ type: String,
47
+ default: ''
48
+ },
49
+ hint: {
50
+ type: String,
51
+ default: ''
52
+ },
53
+ direction: {
54
+ type: String,
55
+ default: FormGroupDirection.Vertical
56
+ },
57
+ options: {
58
+ type: Array,
59
+ default: () => []
60
+ },
61
+ disabled: {
62
+ type: Boolean,
63
+ default: false
64
+ }
65
+ },
66
+ setup(props, {
67
+ emit
68
+ }) {
69
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
70
+ return {
71
+ proxyModelValue
72
+ };
73
+ }
74
+ });
75
+
76
+ var css_248z = "";
77
+ styleInject(css_248z);
78
+
79
+ /* script */
80
+ const __vue_script__ = script;
81
+ /* template */
82
+ var __vue_render__ = function () {
83
+ var _vm = this;
84
+ var _h = _vm.$createElement;
85
+ var _c = _vm._self._c || _h;
86
+ return _c('OrFormGroup', {
87
+ attrs: {
88
+ "label": _vm.label,
89
+ "error": _vm.error,
90
+ "hint": _vm.hint,
91
+ "disabled": _vm.disabled,
92
+ "direction": _vm.direction
93
+ }
94
+ }, _vm._l(_vm.options, function (option) {
95
+ return _c('OrCheckboxTree', {
96
+ key: option.value,
97
+ attrs: {
98
+ "item": option,
99
+ "disabeld": _vm.disabled || option.disabled
100
+ },
101
+ model: {
102
+ value: _vm.proxyModelValue,
103
+ callback: function ($$v) {
104
+ _vm.proxyModelValue = $$v;
105
+ },
106
+ expression: "proxyModelValue"
107
+ }
108
+ });
109
+ }), 1);
110
+ };
111
+ var __vue_staticRenderFns__ = [];
112
+
113
+ /* style */
114
+ const __vue_inject_styles__ = undefined;
115
+ /* scoped */
116
+ const __vue_scope_id__ = "data-v-62e87895";
117
+ /* module identifier */
118
+ const __vue_module_identifier__ = undefined;
119
+ /* functional template */
120
+ const __vue_is_functional_template__ = false;
121
+ /* style inject */
122
+
123
+ /* style inject SSR */
124
+
125
+ /* style inject shadow dom */
126
+
127
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
128
+ render: __vue_render__,
129
+ staticRenderFns: __vue_staticRenderFns__
130
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
131
+
132
+ export { __vue_component__ as default };
@@ -0,0 +1,110 @@
1
+ import { PropType } from 'vue-demi';
2
+ import { FormGroupDirection } from '../or-form-group-v3';
3
+ declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
+ proxyModelValue: import("@vue/composition-api").Ref<string[]> | import("@vue/composition-api").WritableComputedRef<string[]>;
5
+ }> & import("@vue/composition-api").Data, {}, {}, {
6
+ modelValue: {
7
+ type: PropType<string[]>;
8
+ default: () => never[];
9
+ };
10
+ label: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ error: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ hint: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ direction: {
23
+ type: PropType<FormGroupDirection>;
24
+ default: FormGroupDirection;
25
+ };
26
+ options: {
27
+ type: PropType<{
28
+ label: string;
29
+ value: any;
30
+ disabled?: boolean | undefined;
31
+ }[]>;
32
+ default: () => never[];
33
+ };
34
+ disabled: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ }, import("@vue/composition-api").ExtractPropTypes<{
39
+ modelValue: {
40
+ type: PropType<string[]>;
41
+ default: () => never[];
42
+ };
43
+ label: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ error: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ hint: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ direction: {
56
+ type: PropType<FormGroupDirection>;
57
+ default: FormGroupDirection;
58
+ };
59
+ options: {
60
+ type: PropType<{
61
+ label: string;
62
+ value: any;
63
+ disabled?: boolean | undefined;
64
+ }[]>;
65
+ default: () => never[];
66
+ };
67
+ disabled: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
72
+ modelValue: string[];
73
+ label: string;
74
+ error: string;
75
+ hint: string;
76
+ direction: FormGroupDirection;
77
+ options: {
78
+ label: string;
79
+ value: any;
80
+ disabled?: boolean | undefined;
81
+ }[];
82
+ disabled: boolean;
83
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
84
+ proxyModelValue: import("@vue/composition-api").Ref<string[]> | import("@vue/composition-api").WritableComputedRef<string[]>;
85
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
86
+ modelValue: string[];
87
+ label: string;
88
+ error: string;
89
+ hint: string;
90
+ direction: FormGroupDirection;
91
+ options: {
92
+ label: string;
93
+ value: any;
94
+ disabled?: boolean | undefined;
95
+ }[];
96
+ disabled: boolean;
97
+ } & {}, {
98
+ modelValue: string[];
99
+ label: string;
100
+ error: string;
101
+ hint: string;
102
+ direction: FormGroupDirection;
103
+ options: {
104
+ label: string;
105
+ value: any;
106
+ disabled?: boolean | undefined;
107
+ }[];
108
+ disabled: boolean;
109
+ }, true>);
110
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.vue';
@@ -0,0 +1,25 @@
1
+ export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.js';
2
+ import 'vue-demi';
3
+ import '@vueuse/core';
4
+ import '../OrCheckboxTreeV3/OrCheckboxTree.js';
5
+ import 'lodash';
6
+ import '../OrCheckboxTreeV3/styles.js';
7
+ import '../OrIconV3/OrIcon.js';
8
+ import '../OrIconV3/props.js';
9
+ import '../OrIconV3/styles.js';
10
+ import '../../normalize-component-6e8e3d80.js';
11
+ import '../OrCheckboxV3/OrCheckbox.js';
12
+ import '../OrCheckboxV3/styles.js';
13
+ import '../OrLabelV3/OrLabel.js';
14
+ import '../OrLabelV3/props.js';
15
+ import '../OrLabelV3/styles.js';
16
+ import '../../hooks/useIdAttribute.js';
17
+ import '../../hooks/useControlAttributes.js';
18
+ import '../../style-inject.es-4c6f2515.js';
19
+ import '../OrFormGroupV3/OrFormGroup.js';
20
+ import '../OrFormGroupV3/props.js';
21
+ import '../OrFormGroupV3/styles.js';
22
+ import '../OrErrorV3/OrError.js';
23
+ import '../OrErrorV3/styles.js';
24
+ import '../OrHintV3/OrHint.js';
25
+ import '../OrHintV3/styles.js';
@@ -0,0 +1,189 @@
1
+ import { defineComponent, computed } from 'vue-demi';
2
+ import _ from 'lodash';
3
+ import { useVModel, useToggle } from '@vueuse/core';
4
+ import { CheckboxDeepRoot } from './styles.js';
5
+ import __vue_component__$1 from '../OrIconV3/OrIcon.js';
6
+ import __vue_component__$2 from '../OrCheckboxV3/OrCheckbox.js';
7
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
8
+ import '../OrIconV3/props.js';
9
+ import '../OrIconV3/styles.js';
10
+ import '../OrCheckboxV3/styles.js';
11
+ import '../OrLabelV3/OrLabel.js';
12
+ import '../OrLabelV3/props.js';
13
+ import '../OrLabelV3/styles.js';
14
+ import '../../hooks/useIdAttribute.js';
15
+ import '../../hooks/useControlAttributes.js';
16
+ import '../../style-inject.es-4c6f2515.js';
17
+
18
+ var script = defineComponent({
19
+ name: 'OrCheckboxTree',
20
+ components: {
21
+ OrIcon: __vue_component__$1,
22
+ OrCheckbox: __vue_component__$2
23
+ },
24
+ model: {
25
+ prop: 'modelValue',
26
+ event: 'update:modelValue'
27
+ },
28
+ props: {
29
+ modelValue: {
30
+ type: Array,
31
+ default: () => []
32
+ },
33
+ item: {
34
+ type: Object,
35
+ required: true
36
+ },
37
+ collapsible: {
38
+ type: Boolean,
39
+ default: true
40
+ }
41
+ },
42
+ setup(props, {
43
+ emit
44
+ }) {
45
+ const hasChildren = computed(() => props.item.children && props.item.children.length > 0);
46
+ const childrenValues = computed(() => {
47
+ const getChildValues = children => {
48
+ return children === null || children === void 0 ? void 0 : children.map(child => {
49
+ if (child.children) {
50
+ return getChildValues(child.children);
51
+ } else {
52
+ return child.value;
53
+ }
54
+ });
55
+ };
56
+ return _.flatten(getChildValues(props.item.children));
57
+ });
58
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
59
+ const isAnyChildrenSelected = computed(() => {
60
+ var _a;
61
+ return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.some(value => {
62
+ var _a;
63
+ return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.includes(value);
64
+ });
65
+ });
66
+ const isAllChildrenSelected = computed(() => {
67
+ var _a;
68
+ return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.every(value => {
69
+ var _a;
70
+ return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.includes(value);
71
+ });
72
+ });
73
+ const isIntermediate = computed(() => {
74
+ return isAnyChildrenSelected.value && !isAllChildrenSelected.value;
75
+ });
76
+ const [isOpen, setIsOpen] = useToggle(true);
77
+ // Styles
78
+ const rootStyles = computed(() => ['or-checkbox-deep-v3', ...CheckboxDeepRoot]);
79
+ const handleParentClick = () => {
80
+ if (isAllChildrenSelected.value) {
81
+ proxyModelValue.value = proxyModelValue.value.filter(value => !childrenValues.value.includes(value));
82
+ } else {
83
+ proxyModelValue.value = [...proxyModelValue.value, ...childrenValues.value];
84
+ }
85
+ };
86
+ return {
87
+ rootStyles,
88
+ hasChildren,
89
+ proxyModelValue,
90
+ isOpen,
91
+ setIsOpen,
92
+ isIntermediate,
93
+ isAllChildrenSelected,
94
+ isAnyChildrenSelected,
95
+ childrenValues,
96
+ handleParentClick
97
+ };
98
+ }
99
+ });
100
+
101
+ /* script */
102
+ const __vue_script__ = script;
103
+
104
+ /* template */
105
+ var __vue_render__ = function () {
106
+ var _vm = this;
107
+ var _h = _vm.$createElement;
108
+ var _c = _vm._self._c || _h;
109
+ return _c('div', {
110
+ ref: "root",
111
+ class: _vm.rootStyles
112
+ }, [_vm.hasChildren ? [_c('div', {
113
+ staticClass: "flex flex-row gap-xs"
114
+ }, [_vm.collapsible ? [_c('OrIcon', {
115
+ class: [_vm.isOpen ? 'rotate-0' : 'rotate-[-90deg]'],
116
+ attrs: {
117
+ "icon": "arrow_drop_down"
118
+ },
119
+ on: {
120
+ "click": function () {
121
+ return _vm.setIsOpen(!_vm.isOpen);
122
+ }
123
+ }
124
+ })] : _vm._e(), _vm._v(" "), _c('OrCheckbox', {
125
+ attrs: {
126
+ "value": "true",
127
+ "model-value": _vm.isAllChildrenSelected,
128
+ "indeterminate": _vm.isIntermediate,
129
+ "label": _vm.item.label
130
+ },
131
+ on: {
132
+ "click": _vm.handleParentClick
133
+ }
134
+ })], 2), _vm._v(" "), _vm.hasChildren && _vm.isOpen ? _c('div', {
135
+ class: {
136
+ 'ml-md': _vm.collapsible
137
+ }
138
+ }, _vm._l(_vm.item.children, function (item) {
139
+ return _c('OrCheckboxTree', {
140
+ key: item.value,
141
+ staticClass: "ml-lg mt-xs",
142
+ attrs: {
143
+ "item": item,
144
+ "collapsible": _vm.collapsible
145
+ },
146
+ model: {
147
+ value: _vm.proxyModelValue,
148
+ callback: function ($$v) {
149
+ _vm.proxyModelValue = $$v;
150
+ },
151
+ expression: "proxyModelValue"
152
+ }
153
+ });
154
+ }), 1) : _vm._e()] : [_c('OrCheckbox', {
155
+ attrs: {
156
+ "label": _vm.item.label,
157
+ "value": _vm.item.value
158
+ },
159
+ model: {
160
+ value: _vm.proxyModelValue,
161
+ callback: function ($$v) {
162
+ _vm.proxyModelValue = $$v;
163
+ },
164
+ expression: "proxyModelValue"
165
+ }
166
+ })]], 2);
167
+ };
168
+ var __vue_staticRenderFns__ = [];
169
+
170
+ /* style */
171
+ const __vue_inject_styles__ = undefined;
172
+ /* scoped */
173
+ const __vue_scope_id__ = undefined;
174
+ /* module identifier */
175
+ const __vue_module_identifier__ = undefined;
176
+ /* functional template */
177
+ const __vue_is_functional_template__ = false;
178
+ /* style inject */
179
+
180
+ /* style inject SSR */
181
+
182
+ /* style inject shadow dom */
183
+
184
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
185
+ render: __vue_render__,
186
+ staticRenderFns: __vue_staticRenderFns__
187
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
188
+
189
+ export { __vue_component__ as default };
@@ -0,0 +1,63 @@
1
+ import { PropType } from 'vue-demi';
2
+ import { CheckboxNode } from './types';
3
+ declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
+ rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
5
+ hasChildren: import("@vue/composition-api").ComputedRef<boolean | undefined>;
6
+ proxyModelValue: import("@vue/composition-api").WritableComputedRef<string[]> | import("@vue/composition-api").Ref<string[]>;
7
+ isOpen: import("@vue/composition-api").Ref<boolean>;
8
+ setIsOpen: (value?: boolean | undefined) => boolean;
9
+ isIntermediate: import("@vue/composition-api").ComputedRef<boolean>;
10
+ isAllChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
11
+ isAnyChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
12
+ childrenValues: import("@vue/composition-api").ComputedRef<any[]>;
13
+ handleParentClick: () => void;
14
+ }> & import("@vue/composition-api").Data, {}, {}, {
15
+ modelValue: {
16
+ type: PropType<string[]>;
17
+ default: () => never[];
18
+ };
19
+ item: {
20
+ type: PropType<CheckboxNode>;
21
+ required: true;
22
+ };
23
+ collapsible: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ }, import("@vue/composition-api").ExtractPropTypes<{
28
+ modelValue: {
29
+ type: PropType<string[]>;
30
+ default: () => never[];
31
+ };
32
+ item: {
33
+ type: PropType<CheckboxNode>;
34
+ required: true;
35
+ };
36
+ collapsible: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
41
+ modelValue: string[];
42
+ item: CheckboxNode;
43
+ collapsible: boolean;
44
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
45
+ rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
46
+ hasChildren: import("@vue/composition-api").ComputedRef<boolean | undefined>;
47
+ proxyModelValue: import("@vue/composition-api").WritableComputedRef<string[]> | import("@vue/composition-api").Ref<string[]>;
48
+ isOpen: import("@vue/composition-api").Ref<boolean>;
49
+ setIsOpen: (value?: boolean | undefined) => boolean;
50
+ isIntermediate: import("@vue/composition-api").ComputedRef<boolean>;
51
+ isAllChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
52
+ isAnyChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
53
+ childrenValues: import("@vue/composition-api").ComputedRef<any[]>;
54
+ handleParentClick: () => void;
55
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
56
+ modelValue: string[];
57
+ item: CheckboxNode;
58
+ collapsible: boolean;
59
+ } & {}, {
60
+ modelValue: string[];
61
+ collapsible: boolean;
62
+ }, true>);
63
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as OrCheckboxTreeV3 } from './OrCheckboxTree.vue';
@@ -0,0 +1,17 @@
1
+ export { default as OrCheckboxTreeV3 } from './OrCheckboxTree.js';
2
+ import 'vue-demi';
3
+ import 'lodash';
4
+ import '@vueuse/core';
5
+ import './styles.js';
6
+ import '../OrIconV3/OrIcon.js';
7
+ import '../OrIconV3/props.js';
8
+ import '../OrIconV3/styles.js';
9
+ import '../../normalize-component-6e8e3d80.js';
10
+ import '../OrCheckboxV3/OrCheckbox.js';
11
+ import '../OrCheckboxV3/styles.js';
12
+ import '../OrLabelV3/OrLabel.js';
13
+ import '../OrLabelV3/props.js';
14
+ import '../OrLabelV3/styles.js';
15
+ import '../../hooks/useIdAttribute.js';
16
+ import '../../hooks/useControlAttributes.js';
17
+ import '../../style-inject.es-4c6f2515.js';
@@ -0,0 +1 @@
1
+ export declare const CheckboxDeepRoot: string[];
@@ -0,0 +1,7 @@
1
+ const CheckboxDeepRoot = [
2
+ // Layout
3
+ 'flex', 'flex-col',
4
+ // Spacing
5
+ 'gap-sm+ md:gap-sm'];
6
+
7
+ export { CheckboxDeepRoot };
@@ -0,0 +1,5 @@
1
+ export type CheckboxNode = {
2
+ label: string;
3
+ value: string;
4
+ children?: CheckboxNode[];
5
+ };