@onereach/ui-components 4.1.1 → 4.1.2-beta.2552.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 +190 -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 +71 -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-636b7553.js +186 -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-1acfe5c8.js +147 -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 +163 -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 +149 -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
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, computed, reactive } from 'vue-demi';
2
+ import { useVModel } from '@vueuse/core';
2
3
  import { CheckboxRoot, CheckboxControl, CheckboxControlHandle } from './components/OrCheckboxV3/styles.js';
3
4
  import './components/OrLabelV3/OrLabel.js';
4
5
  import { LabelVariant } from './components/OrLabelV3/props.js';
@@ -17,12 +18,12 @@ var script = defineComponent({
17
18
  },
18
19
  props: {
19
20
  modelValue: {
20
- type: [Boolean, Array],
21
- default: undefined
21
+ type: null,
22
+ default: null
22
23
  },
23
24
  value: {
24
- type: String,
25
- default: undefined
25
+ type: [String, Boolean, Number],
26
+ default: null
26
27
  },
27
28
  label: {
28
29
  type: String,
@@ -47,7 +48,9 @@ var script = defineComponent({
47
48
  },
48
49
  emits: ['update:modelValue', 'focus', 'blur'],
49
50
  expose: ['root', 'focus', 'blur'],
50
- setup(props, context) {
51
+ setup(props, {
52
+ emit
53
+ }) {
51
54
  // Refs
52
55
  const root = ref();
53
56
  const control = ref();
@@ -59,13 +62,25 @@ var script = defineComponent({
59
62
  id: useIdAttribute(),
60
63
  ...useControlAttributes()
61
64
  });
62
- const proxyModelValue = computed({
63
- get: () => props.modelValue,
64
- set: value => {
65
- context.emit('update:modelValue', value);
65
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
66
+ const isChecked = computed(() => {
67
+ if (Array.isArray(proxyModelValue.value)) {
68
+ return props.value && proxyModelValue.value.includes(props.value);
66
69
  }
70
+ return !!proxyModelValue.value;
67
71
  });
68
72
  // Methods
73
+ function handleChange() {
74
+ if (Array.isArray(proxyModelValue.value)) {
75
+ if (isChecked.value) {
76
+ proxyModelValue.value = proxyModelValue.value.filter(v => v !== props.value);
77
+ } else {
78
+ proxyModelValue.value = [...proxyModelValue.value, props.value];
79
+ }
80
+ } else {
81
+ proxyModelValue.value = !proxyModelValue.value;
82
+ }
83
+ }
69
84
  function focus() {
70
85
  var _a;
71
86
  (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
@@ -80,7 +95,8 @@ var script = defineComponent({
80
95
  rootStyles,
81
96
  controlStyles,
82
97
  controlAttributes,
83
- proxyModelValue,
98
+ isChecked,
99
+ handleChange,
84
100
  focus,
85
101
  blur
86
102
  };
@@ -0,0 +1,93 @@
1
+ import { defineComponent, computed } from 'vue-demi';
2
+ import _ from 'lodash';
3
+ import { useVModel, useToggle } from '@vueuse/core';
4
+ import { CheckboxDeepRoot } from './components/OrCheckboxTreeV3/styles.js';
5
+ import './components/OrIconV3/OrIcon.js';
6
+ import './components/OrCheckboxV3/OrCheckbox.js';
7
+ import { s as script$1 } from './OrIcon.vue_vue_type_script_lang-73f9cc63.js';
8
+ import { s as script$2 } from './OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
9
+
10
+ var script = defineComponent({
11
+ name: 'OrCheckboxTree',
12
+ components: {
13
+ OrIcon: script$1,
14
+ OrCheckbox: script$2
15
+ },
16
+ model: {
17
+ prop: 'modelValue',
18
+ event: 'update:modelValue'
19
+ },
20
+ props: {
21
+ modelValue: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ item: {
26
+ type: Object,
27
+ required: true
28
+ },
29
+ collapsible: {
30
+ type: Boolean,
31
+ default: true
32
+ }
33
+ },
34
+ setup(props, {
35
+ emit
36
+ }) {
37
+ const hasChildren = computed(() => props.item.children && props.item.children.length > 0);
38
+ const childrenValues = computed(() => {
39
+ const getChildValues = children => {
40
+ return children === null || children === void 0 ? void 0 : children.map(child => {
41
+ if (child.children) {
42
+ return getChildValues(child.children);
43
+ } else {
44
+ return child.value;
45
+ }
46
+ });
47
+ };
48
+ return _.flatten(getChildValues(props.item.children));
49
+ });
50
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
51
+ const isAnyChildrenSelected = computed(() => {
52
+ var _a;
53
+ return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.some(value => {
54
+ var _a;
55
+ return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.includes(value);
56
+ });
57
+ });
58
+ const isAllChildrenSelected = computed(() => {
59
+ var _a;
60
+ return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.every(value => {
61
+ var _a;
62
+ return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.includes(value);
63
+ });
64
+ });
65
+ const isIntermediate = computed(() => {
66
+ return isAnyChildrenSelected.value && !isAllChildrenSelected.value;
67
+ });
68
+ const [isOpen, setIsOpen] = useToggle(true);
69
+ // Styles
70
+ const rootStyles = computed(() => ['or-checkbox-deep-v3', ...CheckboxDeepRoot]);
71
+ const handleParentClick = () => {
72
+ if (isAllChildrenSelected.value) {
73
+ proxyModelValue.value = proxyModelValue.value.filter(value => !childrenValues.value.includes(value));
74
+ } else {
75
+ proxyModelValue.value = [...proxyModelValue.value, ...childrenValues.value];
76
+ }
77
+ };
78
+ return {
79
+ rootStyles,
80
+ hasChildren,
81
+ proxyModelValue,
82
+ isOpen,
83
+ setIsOpen,
84
+ isIntermediate,
85
+ isAllChildrenSelected,
86
+ isAnyChildrenSelected,
87
+ childrenValues,
88
+ handleParentClick
89
+ };
90
+ }
91
+ });
92
+
93
+ export { script as s };
@@ -0,0 +1,58 @@
1
+ import { defineComponent, ref, computed } from 'vue-demi';
2
+ import { FormGroupDirection } from './components/OrFormGroupV3/props.js';
3
+ import { FormGroupRoot, FormGroupContent, FormGroupContentDirections } from './components/OrFormGroupV3/styles.js';
4
+ import './components/OrLabelV3/OrLabel.js';
5
+ import './components/OrErrorV3/OrError.js';
6
+ import './components/OrHintV3/OrHint.js';
7
+ import { s as script$1 } from './OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
8
+ import { s as script$2 } from './OrError.vue_vue_type_script_lang-df7b5e32.js';
9
+ import { s as script$3 } from './OrHint.vue_vue_type_script_lang-0f5e8377.js';
10
+
11
+ var script = defineComponent({
12
+ name: 'OrFormGroupV3',
13
+ components: {
14
+ OrLabel: script$1,
15
+ OrError: script$2,
16
+ OrHint: script$3
17
+ },
18
+ props: {
19
+ label: {
20
+ type: String,
21
+ default: undefined
22
+ },
23
+ required: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ direction: {
32
+ type: String,
33
+ default: FormGroupDirection.Vertical
34
+ },
35
+ error: {
36
+ type: [String, Boolean],
37
+ default: undefined
38
+ },
39
+ hint: {
40
+ type: String,
41
+ default: undefined
42
+ }
43
+ },
44
+ setup(props) {
45
+ // Refs
46
+ const root = ref();
47
+ // Styles
48
+ const rootStyles = computed(() => ['or-form-group-v3', ...FormGroupRoot]);
49
+ const contentStyles = computed(() => [...FormGroupContent, ...FormGroupContentDirections[props.direction]]);
50
+ return {
51
+ root,
52
+ rootStyles,
53
+ contentStyles
54
+ };
55
+ }
56
+ });
57
+
58
+ export { script as s };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
2
2
  import { SelectRoot, SelectControl, SelectPlaceholder, SelectDropdown, SelectNoSearchResults } from './components/OrSelectV3/styles.js';
3
3
  import './components/OrCheckboxV3/OrCheckbox.js';
4
- import { s as script$1 } from './OrCheckbox.vue_vue_type_script_lang-60cefcbd.js';
4
+ import { s as script$1 } from './OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
5
5
  import './components/OrErrorV3/OrError.js';
6
6
  import './components/OrExpansionPanelV3/OrExpansionPanel.js';
7
7
  import { s as script$3 } from './OrExpansionPanel.vue_vue_type_script_lang-f1b6ff7d.js';
@@ -0,0 +1,110 @@
1
+ import { defineComponent } from 'vue-demi';
2
+ import { useVModel } from '@vueuse/core';
3
+ import '../OrCheckboxTreeV3/OrCheckboxTree.js';
4
+ import { s as script$1 } from '../../OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js';
5
+ import '../OrFormGroupV3/OrFormGroup.js';
6
+ import { FormGroupDirection } from '../OrFormGroupV3/props.js';
7
+ import { s as script$2 } from '../../OrFormGroup.vue_vue_type_script_lang-fb14a874.js';
8
+ import { resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList } from 'vue';
9
+ import 'lodash';
10
+ import '../OrCheckboxTreeV3/styles.js';
11
+ import '../OrIconV3/OrIcon.js';
12
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
13
+ import '../OrIconV3/props.js';
14
+ import '../OrIconV3/styles.js';
15
+ import '../OrCheckboxV3/OrCheckbox.js';
16
+ import '../../OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
17
+ import '../OrCheckboxV3/styles.js';
18
+ import '../OrLabelV3/OrLabel.js';
19
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
20
+ import '../OrLabelV3/props.js';
21
+ import '../OrLabelV3/styles.js';
22
+ import '../../hooks/useIdAttribute.js';
23
+ import '../../hooks/useControlAttributes.js';
24
+ import '../../style-inject.es-4c6f2515.js';
25
+ import '../OrFormGroupV3/styles.js';
26
+ import '../OrErrorV3/OrError.js';
27
+ import '../../OrError.vue_vue_type_script_lang-df7b5e32.js';
28
+ import '../OrErrorV3/styles.js';
29
+ import '../OrHintV3/OrHint.js';
30
+ import '../../OrHint.vue_vue_type_script_lang-0f5e8377.js';
31
+ import '../OrHintV3/styles.js';
32
+
33
+ var script = defineComponent({
34
+ name: 'OrCheckboxGroup',
35
+ components: {
36
+ OrCheckboxTree: script$1,
37
+ OrFormGroup: script$2
38
+ },
39
+ model: {
40
+ prop: 'modelValue',
41
+ event: 'update:modelValue'
42
+ },
43
+ props: {
44
+ modelValue: {
45
+ type: Array,
46
+ default: () => []
47
+ },
48
+ label: {
49
+ type: String,
50
+ default: ''
51
+ },
52
+ error: {
53
+ type: String,
54
+ default: ''
55
+ },
56
+ hint: {
57
+ type: String,
58
+ default: ''
59
+ },
60
+ direction: {
61
+ type: String,
62
+ default: FormGroupDirection.Vertical
63
+ },
64
+ options: {
65
+ type: Array,
66
+ default: () => []
67
+ },
68
+ disabled: {
69
+ type: Boolean,
70
+ default: false
71
+ }
72
+ },
73
+ setup(props, {
74
+ emit
75
+ }) {
76
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
77
+ return {
78
+ proxyModelValue
79
+ };
80
+ }
81
+ });
82
+
83
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
84
+ const _component_OrCheckboxTree = resolveComponent("OrCheckboxTree");
85
+ const _component_OrFormGroup = resolveComponent("OrFormGroup");
86
+ return openBlock(), createBlock(_component_OrFormGroup, {
87
+ label: _ctx.label,
88
+ error: _ctx.error,
89
+ hint: _ctx.hint,
90
+ disabled: _ctx.disabled,
91
+ direction: _ctx.direction
92
+ }, {
93
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, option => {
94
+ return openBlock(), createBlock(_component_OrCheckboxTree, {
95
+ key: option.value,
96
+ modelValue: _ctx.proxyModelValue,
97
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxyModelValue = $event),
98
+ item: option,
99
+ disabeld: _ctx.disabled || option.disabled
100
+ }, null, 8 /* PROPS */, ["modelValue", "item", "disabeld"]);
101
+ }), 128 /* KEYED_FRAGMENT */))]),
102
+
103
+ _: 1 /* STABLE */
104
+ }, 8 /* PROPS */, ["label", "error", "hint", "disabled", "direction"]);
105
+ }
106
+
107
+ script.render = render;
108
+ script.__file = "src/components/or-checkbox-group-v3/OrCheckboxGroup.vue";
109
+
110
+ export { script 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,32 @@
1
+ export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.js';
2
+ import 'vue-demi';
3
+ import '@vueuse/core';
4
+ import '../OrCheckboxTreeV3/OrCheckboxTree.js';
5
+ import '../../OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js';
6
+ import 'lodash';
7
+ import '../OrCheckboxTreeV3/styles.js';
8
+ import '../OrIconV3/OrIcon.js';
9
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
10
+ import '../OrIconV3/props.js';
11
+ import '../OrIconV3/styles.js';
12
+ import 'vue';
13
+ import '../OrCheckboxV3/OrCheckbox.js';
14
+ import '../../OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
15
+ import '../OrCheckboxV3/styles.js';
16
+ import '../OrLabelV3/OrLabel.js';
17
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
18
+ import '../OrLabelV3/props.js';
19
+ import '../OrLabelV3/styles.js';
20
+ import '../../hooks/useIdAttribute.js';
21
+ import '../../hooks/useControlAttributes.js';
22
+ import '../../style-inject.es-4c6f2515.js';
23
+ import '../OrFormGroupV3/OrFormGroup.js';
24
+ import '../../OrFormGroup.vue_vue_type_script_lang-fb14a874.js';
25
+ import '../OrFormGroupV3/props.js';
26
+ import '../OrFormGroupV3/styles.js';
27
+ import '../OrErrorV3/OrError.js';
28
+ import '../../OrError.vue_vue_type_script_lang-df7b5e32.js';
29
+ import '../OrErrorV3/styles.js';
30
+ import '../OrHintV3/OrHint.js';
31
+ import '../../OrHint.vue_vue_type_script_lang-0f5e8377.js';
32
+ import '../OrHintV3/styles.js';
@@ -0,0 +1,71 @@
1
+ import { s as script } from '../../OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js';
2
+ export { s as default } from '../../OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js';
3
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, createElementVNode, createBlock, createCommentVNode, createVNode, renderList } from 'vue';
4
+ import 'vue-demi';
5
+ import 'lodash';
6
+ import '@vueuse/core';
7
+ import './styles.js';
8
+ import '../OrIconV3/OrIcon.js';
9
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
10
+ import '../OrIconV3/props.js';
11
+ import '../OrIconV3/styles.js';
12
+ import '../OrCheckboxV3/OrCheckbox.js';
13
+ import '../../OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
14
+ import '../OrCheckboxV3/styles.js';
15
+ import '../OrLabelV3/OrLabel.js';
16
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
17
+ import '../OrLabelV3/props.js';
18
+ import '../OrLabelV3/styles.js';
19
+ import '../../hooks/useIdAttribute.js';
20
+ import '../../hooks/useControlAttributes.js';
21
+ import '../../style-inject.es-4c6f2515.js';
22
+
23
+ const _hoisted_1 = {
24
+ class: "flex flex-row gap-xs"
25
+ };
26
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
27
+ const _component_OrIcon = resolveComponent("OrIcon");
28
+ const _component_OrCheckbox = resolveComponent("OrCheckbox");
29
+ const _component_OrCheckboxTree = resolveComponent("OrCheckboxTree", true);
30
+ return openBlock(), createElementBlock("div", {
31
+ ref: "root",
32
+ class: normalizeClass(_ctx.rootStyles)
33
+ }, [_ctx.hasChildren ? (openBlock(), createElementBlock(Fragment, {
34
+ key: 0
35
+ }, [createElementVNode("div", _hoisted_1, [_ctx.collapsible ? (openBlock(), createBlock(_component_OrIcon, {
36
+ key: 0,
37
+ class: normalizeClass([_ctx.isOpen ? 'rotate-0' : 'rotate-[-90deg]']),
38
+ icon: "arrow_drop_down",
39
+ size: "l",
40
+ onClick: _cache[0] || (_cache[0] = () => _ctx.setIsOpen(!_ctx.isOpen))
41
+ }, null, 8 /* PROPS */, ["class"])) : createCommentVNode("v-if", true), createVNode(_component_OrCheckbox, {
42
+ value: "true",
43
+ "model-value": _ctx.isAllChildrenSelected,
44
+ indeterminate: _ctx.isIntermediate,
45
+ label: _ctx.item.label,
46
+ onClick: _ctx.handleParentClick
47
+ }, null, 8 /* PROPS */, ["model-value", "indeterminate", "label", "onClick"])]), _ctx.hasChildren && _ctx.isOpen ? (openBlock(), createElementBlock("div", {
48
+ key: 0,
49
+ class: normalizeClass({
50
+ 'ml-2xl': _ctx.collapsible
51
+ })
52
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.item.children, child => {
53
+ return openBlock(), createBlock(_component_OrCheckboxTree, {
54
+ key: child.value,
55
+ modelValue: _ctx.proxyModelValue,
56
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxyModelValue = $event),
57
+ class: "mt-xs",
58
+ item: child,
59
+ collapsible: _ctx.collapsible
60
+ }, null, 8 /* PROPS */, ["modelValue", "item", "collapsible"]);
61
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createBlock(_component_OrCheckbox, {
62
+ key: 1,
63
+ modelValue: _ctx.proxyModelValue,
64
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.proxyModelValue = $event),
65
+ label: _ctx.item.label,
66
+ value: _ctx.item.value
67
+ }, null, 8 /* PROPS */, ["modelValue", "label", "value"]))], 2 /* CLASS */);
68
+ }
69
+
70
+ script.render = render;
71
+ script.__file = "src/components/or-checkbox-tree-v3/OrCheckboxTree.vue";
@@ -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,20 @@
1
+ export { s as OrCheckboxTreeV3 } from '../../OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js';
2
+ import 'vue-demi';
3
+ import 'lodash';
4
+ import '@vueuse/core';
5
+ import './styles.js';
6
+ import '../OrIconV3/OrIcon.js';
7
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
8
+ import '../OrIconV3/props.js';
9
+ import '../OrIconV3/styles.js';
10
+ import 'vue';
11
+ import '../OrCheckboxV3/OrCheckbox.js';
12
+ import '../../OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js';
13
+ import '../OrCheckboxV3/styles.js';
14
+ import '../OrLabelV3/OrLabel.js';
15
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
16
+ import '../OrLabelV3/props.js';
17
+ import '../OrLabelV3/styles.js';
18
+ import '../../hooks/useIdAttribute.js';
19
+ import '../../hooks/useControlAttributes.js';
20
+ 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
+ };