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