@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
@@ -0,0 +1,26 @@
1
+ import { FormGroupDirection } from './props';
2
+
3
+ export const FormGroupRoot: string[] = [
4
+ // Layout
5
+ 'flex',
6
+ 'flex-col',
7
+ 'gap-md md:gap-sm',
8
+ ];
9
+ export const FormGroupContent: string[] = [
10
+ // Layout
11
+ 'flex',
12
+ 'pl-[10px] md:pl-[0]',
13
+ 'gap-md md:gap-sm',
14
+ ];
15
+
16
+
17
+ export const FormGroupContentDirections: Record<FormGroupDirection, string[]> = {
18
+ [FormGroupDirection.Vertical]: [
19
+ 'flex-col',
20
+ 'gap-sm',
21
+ ],
22
+ [FormGroupDirection.Horizontal]: [
23
+ 'flex-row',
24
+ 'gap-[18px] md:gap-md',
25
+ ],
26
+ };
@@ -0,0 +1,81 @@
1
+ import { action } from '@storybook/addon-actions';
2
+ import { Meta, StoryFn } from '@storybook/vue3';
3
+ import { ref, watch } from 'vue-demi';
4
+ import OrRadioGroup from './OrRadioGroup.vue';
5
+ import { FormGroupDirection } from '../or-form-group-v3';
6
+
7
+ export default {
8
+ title: 'Components/Forms/Radio/Group',
9
+ component: OrRadioGroup,
10
+
11
+ argTypes: {
12
+ options: {
13
+ control: { type: 'object' },
14
+ },
15
+ direction: {
16
+ control: { type: 'select' },
17
+ options: Object.values(FormGroupDirection),
18
+ },
19
+ },
20
+
21
+ parameters: {
22
+ layout: 'centered',
23
+ },
24
+ } as Meta<typeof OrRadioGroup>;
25
+
26
+ const Template: StoryFn<typeof OrRadioGroup> = (args) => ({
27
+ components: {
28
+ OrRadioGroup,
29
+ },
30
+
31
+ setup() {
32
+ // State
33
+ const model = ref<string>();
34
+
35
+ // Effects
36
+ watch(model, (value) => {
37
+ console.debug(value);
38
+ });
39
+
40
+ return {
41
+ args,
42
+ model,
43
+ onUpdateModelValue: action('update:modelValue'),
44
+ };
45
+ },
46
+
47
+ template: `
48
+ <div class="contents">
49
+ <OrRadioGroup
50
+ v-model="model"
51
+ v-bind="args"
52
+ @update:modelValue="onUpdateModelValue"
53
+ />
54
+ </div>
55
+ `,
56
+ });
57
+
58
+ export const Group = Template.bind({});
59
+
60
+ Group.args = {
61
+ label: 'Radio Group',
62
+ options: [
63
+ {
64
+ label: 'Radio 1',
65
+ value: 'radio-1',
66
+ },
67
+ {
68
+ label: 'Radio 2',
69
+ value: 'radio-2',
70
+ },
71
+ {
72
+ label: 'Radio 3',
73
+ value: 'radio-3',
74
+ disabled: true,
75
+ },
76
+ {
77
+ label: 'Radio 4',
78
+ value: 'radio-4',
79
+ },
80
+ ],
81
+ };
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <OrFormGroup
3
+ :direction="direction"
4
+ :label="label"
5
+ :error="error"
6
+ :hint="hint"
7
+ :disabled="disabled"
8
+ >
9
+ <template v-slot:addon>
10
+ <slot name="addon" />
11
+ </template>
12
+ <OrRadio
13
+ v-for="option in options"
14
+ :key="option.value"
15
+ v-model="proxyModelValue"
16
+ :label="option.label"
17
+ :value="option.value"
18
+ :disabled="disabled || option.disabled"
19
+ />
20
+ </OrFormGroup>
21
+ </template>
22
+
23
+ <script lang="ts">
24
+ import { defineComponent, PropType } from 'vue-demi';
25
+ import { useVModel } from '@vueuse/core';
26
+ import { OrFormGroupV3 as OrFormGroup, FormGroupDirection } from '../or-form-group-v3';
27
+ import { OrRadioV3 as OrRadio } from '../or-radio-v3';
28
+
29
+ export default defineComponent({
30
+ name: 'OrRadioGroup',
31
+ components: {
32
+ OrFormGroup,
33
+ OrRadio,
34
+ },
35
+ model: {
36
+ prop: 'modelValue',
37
+ event: 'update:modelValue',
38
+ },
39
+
40
+ props: {
41
+ modelValue: {
42
+ type: null as any,
43
+ default: null,
44
+ },
45
+ direction: {
46
+ type: String as PropType<FormGroupDirection>,
47
+ default: 'vertical',
48
+ },
49
+ label: {
50
+ type: String,
51
+ default: '',
52
+ },
53
+ options: {
54
+ type: Array as PropType<{ label: string; value: any; disabled?: boolean;}[]>,
55
+ default: () => [],
56
+ },
57
+ error: {
58
+ type: String,
59
+ default: '',
60
+ },
61
+ hint: {
62
+ type: String,
63
+ default: '',
64
+ },
65
+ disabled: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ },
70
+
71
+ setup(props, { emit }) {
72
+
73
+ const proxyModelValue = useVModel(props, 'modelValue', emit);
74
+
75
+ return {
76
+ proxyModelValue,
77
+ };
78
+ },
79
+ });
80
+ </script>
@@ -0,0 +1 @@
1
+ export { default as OrRadioGroupV3 } from './OrRadioGroup.vue';
@@ -7,7 +7,7 @@ import OrRadioDocs from './OrRadio.docs.mdx';
7
7
  import OrRadio from './OrRadio.vue';
8
8
 
9
9
  export default {
10
- title: 'Components/Forms/Radio',
10
+ title: 'Components/Forms/Radio/Radio',
11
11
  component: OrRadio,
12
12
 
13
13
  argTypes: {