@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.
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +132 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +110 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +25 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +190 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +63 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +17 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.js +7 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/types.d.ts +5 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/types.js +1 -0
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +34 -39
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v2/components/OrCheckboxV3/index.js +1 -0
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.js +121 -0
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.vue.d.ts +83 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.js +12 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.d.ts +4 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.js +14 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +132 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.js +19 -0
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v2/index.js +3 -3
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-60cefcbd.js → OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js} +26 -10
- package/dist/bundled/v3/OrCheckboxTree.vue_vue_type_script_lang-80c4ebd5.js +93 -0
- package/dist/bundled/v3/OrFormGroup.vue_vue_type_script_lang-fb14a874.js +58 -0
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-f7601423.js → OrSelect.vue_vue_type_script_lang-c0612348.js} +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +110 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +110 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +32 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +71 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +63 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +20 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +7 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/types.d.ts +5 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/types.js +1 -0
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +9 -7
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +2 -1
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +58 -0
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +83 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.js +15 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.d.ts +4 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.js +14 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +104 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.js +24 -0
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/index.js +6 -7
- package/dist/esm/v2/{OrCheckbox-dc587ec9.js → OrCheckbox-e55228e5.js} +34 -40
- package/dist/esm/v2/OrCheckboxTree-636b7553.js +186 -0
- package/dist/esm/v2/OrFormGroup-e583c054.js +132 -0
- package/dist/esm/v2/{OrSelect-40183874.js → OrSelect-4031334e.js} +1 -1
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +110 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +121 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +63 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +10 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/types.d.ts +5 -0
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v2/components/or-form-group-v3/OrFormGroup.vue.d.ts +83 -0
- package/dist/esm/v2/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v2/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v2/components/or-form-group-v3/styles.d.ts +4 -0
- package/dist/esm/v2/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.js +124 -0
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrCheckbox-56f849f7.js → OrCheckbox-eab735d0.js} +32 -16
- package/dist/esm/v3/OrCheckboxTree-1acfe5c8.js +147 -0
- package/dist/esm/v3/OrFormGroup-e7a78131.js +113 -0
- package/dist/esm/v3/{OrSelect-5502d82d.js → OrSelect-ebdab996.js} +1 -1
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +110 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +92 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +63 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +10 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/types.d.ts +5 -0
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +83 -0
- package/dist/esm/v3/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v3/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v3/components/or-form-group-v3/styles.d.ts +4 -0
- package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.js +91 -0
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -3
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +12 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +163 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.vue +78 -0
- package/src/components/or-checkbox-group-v3/index.ts +1 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +7 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +99 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +149 -0
- package/src/components/or-checkbox-tree-v3/index.ts +1 -0
- package/src/components/or-checkbox-tree-v3/styles.ts +9 -0
- package/src/components/or-checkbox-tree-v3/types.ts +5 -0
- package/src/components/or-checkbox-v3/OrCheckbox.vue +30 -12
- package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +114 -0
- package/src/components/or-form-group-v3/OrFormGroup.vue +108 -0
- package/src/components/or-form-group-v3/index.ts +2 -0
- package/src/components/or-form-group-v3/props.ts +4 -0
- package/src/components/or-form-group-v3/styles.ts +26 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +81 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.vue +80 -0
- package/src/components/or-radio-group-v3/index.ts +1 -0
- 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';
|