@onereach/ui-components 2.67.5 → 2.67.6-beta.2018.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/{OrSegmentedControl-a3cb285c.js → OrSegmentedControl-65c87f9b.js} +10 -5
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +1 -1
- package/dist/bundled/v2/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +2 -0
- package/dist/bundled/v2/components/or-segmented-control-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/{OrSegmentedControl.vue_vue_type_script_lang-16a52048.js → OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js} +7 -3
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +1 -1
- package/dist/bundled/v3/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +2 -0
- package/dist/bundled/v3/components/or-segmented-control-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +2 -2
- package/dist/esm/v2/{OrSegmentedControl-17df63b8.js → OrSegmentedControl-0b4637ba.js} +11 -6
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +1 -1
- package/dist/esm/v2/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-segmented-control-v3/index.js +1 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrSegmentedControl-2bbc0f22.js → OrSegmentedControl-cdf00d49.js} +11 -4
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +1 -1
- package/dist/esm/v3/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +2 -0
- package/dist/esm/v3/components/or-segmented-control-v3/index.js +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -3
- package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +2 -2
- package/src/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue +11 -3
|
@@ -50,15 +50,22 @@ var script$1 = defineComponent({
|
|
|
50
50
|
default: false
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
setup(props) {
|
|
53
|
+
setup(props, context) {
|
|
54
54
|
// Refs
|
|
55
55
|
const root = ref();
|
|
56
56
|
// Styles
|
|
57
57
|
const classAttribute = useClassAttribute();
|
|
58
58
|
const rootStyles = computed(() => ['or-segmented-control-item', ...SegmentedControlItemRoot, ...SegmentedControlItemRootSizes[props.size], classAttribute.value]);
|
|
59
|
+
// Handlers
|
|
60
|
+
function onClick(event) {
|
|
61
|
+
{
|
|
62
|
+
context.emit('click', event);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
59
65
|
return {
|
|
60
66
|
root,
|
|
61
|
-
rootStyles
|
|
67
|
+
rootStyles,
|
|
68
|
+
onClick
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
});
|
|
@@ -79,9 +86,7 @@ var __vue_render__$1 = function () {
|
|
|
79
86
|
"disabled": _vm.disabled ? '' : null
|
|
80
87
|
},
|
|
81
88
|
on: {
|
|
82
|
-
"click":
|
|
83
|
-
return _vm.$emit('click', $event);
|
|
84
|
-
}
|
|
89
|
+
"click": _vm.onClick
|
|
85
90
|
}
|
|
86
91
|
}, 'div', _vm.$attrs, false), [_c('div', {
|
|
87
92
|
class: ['truncate']
|
|
@@ -64,7 +64,7 @@ export { _ as OrRadio } from '../OrRadio-187d6fc7.js';
|
|
|
64
64
|
export { _ as OrRadioGroup } from '../OrRadioGroup-aa9f0757.js';
|
|
65
65
|
export { _ as OrRadioV3 } from '../OrRadio-8ec1d487.js';
|
|
66
66
|
export { _ as OrSearchV3 } from '../OrSearch-f6d5fc65.js';
|
|
67
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-
|
|
67
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-65c87f9b.js';
|
|
68
68
|
export { _ as OrSelect } from '../OrSelect-bbe8dd58.js';
|
|
69
69
|
export { _ as OrSelectV3 } from '../OrSelect-6cef1b69.js';
|
|
70
70
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-e2b2c9ec.js';
|
|
@@ -5,7 +5,7 @@ declare const _default: Meta<import("vue").ComponentOptions<import("vue").defaul
|
|
|
5
5
|
[x: number]: string;
|
|
6
6
|
} | {}, true>)>;
|
|
7
7
|
export default _default;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
11
11
|
[x: number]: string;
|
|
@@ -3,6 +3,7 @@ import { SegmentedControlSize } from '../../props';
|
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
6
|
+
onClick: (event: Event) => void;
|
|
6
7
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
8
|
size: {
|
|
8
9
|
type: PropType<SegmentedControlSize>;
|
|
@@ -36,6 +37,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
36
37
|
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
37
38
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
38
39
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
40
|
+
onClick: (event: Event) => void;
|
|
39
41
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
40
42
|
size: SegmentedControlSize;
|
|
41
43
|
selected: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-
|
|
1
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-65c87f9b.js';
|
|
2
2
|
import '../../index-fa6eb4ca.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -69,7 +69,7 @@ export { _ as OrRadio } from './OrRadio-187d6fc7.js';
|
|
|
69
69
|
export { _ as OrRadioGroup } from './OrRadioGroup-aa9f0757.js';
|
|
70
70
|
export { _ as OrRadioV3 } from './OrRadio-8ec1d487.js';
|
|
71
71
|
export { _ as OrSearchV3 } from './OrSearch-f6d5fc65.js';
|
|
72
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-
|
|
72
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-65c87f9b.js';
|
|
73
73
|
export { _ as OrSelect } from './OrSelect-bbe8dd58.js';
|
|
74
74
|
export { _ as OrSelectV3 } from './OrSelect-6cef1b69.js';
|
|
75
75
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-e2b2c9ec.js';
|
|
@@ -48,15 +48,19 @@ var script$1 = defineComponent({
|
|
|
48
48
|
default: false
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
setup(props) {
|
|
51
|
+
setup(props, context) {
|
|
52
52
|
// Refs
|
|
53
53
|
const root = ref();
|
|
54
54
|
// Styles
|
|
55
55
|
const classAttribute = useClassAttribute();
|
|
56
56
|
const rootStyles = computed(() => ['or-segmented-control-item', ...SegmentedControlItemRoot, ...SegmentedControlItemRootSizes[props.size], classAttribute.value]);
|
|
57
|
+
// Handlers
|
|
58
|
+
function onClick(event) {
|
|
59
|
+
}
|
|
57
60
|
return {
|
|
58
61
|
root,
|
|
59
|
-
rootStyles
|
|
62
|
+
rootStyles,
|
|
63
|
+
onClick
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
});
|
|
@@ -72,7 +76,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
76
|
class: _ctx.rootStyles,
|
|
73
77
|
selected: _ctx.selected ? '' : null,
|
|
74
78
|
disabled: _ctx.disabled ? '' : null,
|
|
75
|
-
onClick: _cache[0] || (_cache[0] =
|
|
79
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
76
80
|
}), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")])], 16 /* FULL_PROPS */, _hoisted_1);
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -64,7 +64,7 @@ export { s as OrRadio } from '../OrRadio.vue_vue_type_script_lang-c956b54b.js';
|
|
|
64
64
|
export { s as OrRadioGroup } from '../OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
|
|
65
65
|
export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
66
66
|
export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-b254e34c.js';
|
|
67
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-
|
|
67
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
68
68
|
export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-3a6efd93.js';
|
|
69
69
|
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-e6be732c.js';
|
|
70
70
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
|
|
@@ -5,7 +5,7 @@ declare const _default: Meta<import("vue").ComponentOptions<import("vue").defaul
|
|
|
5
5
|
[x: number]: string;
|
|
6
6
|
} | {}, true>)>;
|
|
7
7
|
export default _default;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
11
11
|
[x: number]: string;
|
|
@@ -3,6 +3,7 @@ import { SegmentedControlSize } from '../../props';
|
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
6
|
+
onClick: (event: Event) => void;
|
|
6
7
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
8
|
size: {
|
|
8
9
|
type: PropType<SegmentedControlSize>;
|
|
@@ -36,6 +37,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
36
37
|
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
37
38
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
38
39
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
40
|
+
onClick: (event: Event) => void;
|
|
39
41
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
40
42
|
size: SegmentedControlSize;
|
|
41
43
|
selected: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl.vue_vue_type_script_lang-
|
|
1
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
2
2
|
import 'vue';
|
|
3
3
|
import '../../useClassAttribute-00888f78.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -85,8 +85,8 @@ import { s as script$s } from './OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
|
85
85
|
export { s as OrRadioV3 } from './OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
86
86
|
import { s as script$t } from './OrSearch.vue_vue_type_script_lang-b254e34c.js';
|
|
87
87
|
export { s as OrSearchV3 } from './OrSearch.vue_vue_type_script_lang-b254e34c.js';
|
|
88
|
-
import { s as script$u } from './OrSegmentedControl.vue_vue_type_script_lang-
|
|
89
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl.vue_vue_type_script_lang-
|
|
88
|
+
import { s as script$u } from './OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
89
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
90
90
|
import { s as script$x } from './OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
|
|
91
91
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
|
|
92
92
|
import { s as script$y } from './OrSidebar.vue_vue_type_script_lang-ce0b152c.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
1
|
+
import { defineComponent, ref, computed, isVue2 } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
@@ -50,15 +50,22 @@ var script$1 = defineComponent({
|
|
|
50
50
|
default: false
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
setup(props) {
|
|
53
|
+
setup(props, context) {
|
|
54
54
|
// Refs
|
|
55
55
|
const root = ref();
|
|
56
56
|
// Styles
|
|
57
57
|
const classAttribute = useClassAttribute();
|
|
58
58
|
const rootStyles = computed(() => ['or-segmented-control-item', ...SegmentedControlItemRoot, ...SegmentedControlItemRootSizes[props.size], classAttribute.value]);
|
|
59
|
+
// Handlers
|
|
60
|
+
function onClick(event) {
|
|
61
|
+
if (isVue2) {
|
|
62
|
+
context.emit('click', event);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
59
65
|
return {
|
|
60
66
|
root,
|
|
61
|
-
rootStyles
|
|
67
|
+
rootStyles,
|
|
68
|
+
onClick
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
});
|
|
@@ -79,9 +86,7 @@ var __vue_render__$1 = function () {
|
|
|
79
86
|
"disabled": _vm.disabled ? '' : null
|
|
80
87
|
},
|
|
81
88
|
on: {
|
|
82
|
-
"click":
|
|
83
|
-
return _vm.$emit('click', $event);
|
|
84
|
-
}
|
|
89
|
+
"click": _vm.onClick
|
|
85
90
|
}
|
|
86
91
|
}, 'div', _vm.$attrs, false), [_c('div', {
|
|
87
92
|
class: ['truncate']
|
|
@@ -64,7 +64,7 @@ export { _ as OrRadio } from '../OrRadio-e4198532.js';
|
|
|
64
64
|
export { _ as OrRadioGroup } from '../OrRadioGroup-d9d32cba.js';
|
|
65
65
|
export { _ as OrRadioV3 } from '../OrRadio-19d01c00.js';
|
|
66
66
|
export { _ as OrSearchV3 } from '../OrSearch-42454def.js';
|
|
67
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-
|
|
67
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-0b4637ba.js';
|
|
68
68
|
export { _ as OrSelect } from '../OrSelect-17cdab3d.js';
|
|
69
69
|
export { _ as OrSelectV3 } from '../OrSelect-439f27b9.js';
|
|
70
70
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-7d6125bb.js';
|
|
@@ -5,7 +5,7 @@ declare const _default: Meta<import("vue").ComponentOptions<import("vue").defaul
|
|
|
5
5
|
[x: number]: string;
|
|
6
6
|
} | {}, true>)>;
|
|
7
7
|
export default _default;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
11
11
|
[x: number]: string;
|
|
@@ -3,6 +3,7 @@ import { SegmentedControlSize } from '../../props';
|
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
6
|
+
onClick: (event: Event) => void;
|
|
6
7
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
8
|
size: {
|
|
8
9
|
type: PropType<SegmentedControlSize>;
|
|
@@ -36,6 +37,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
36
37
|
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
37
38
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
38
39
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
40
|
+
onClick: (event: Event) => void;
|
|
39
41
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
40
42
|
size: SegmentedControlSize;
|
|
41
43
|
selected: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-
|
|
1
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-0b4637ba.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -64,7 +64,7 @@ export { _ as OrRadio } from './OrRadio-e4198532.js';
|
|
|
64
64
|
export { _ as OrRadioGroup } from './OrRadioGroup-d9d32cba.js';
|
|
65
65
|
export { _ as OrRadioV3 } from './OrRadio-19d01c00.js';
|
|
66
66
|
export { _ as OrSearchV3 } from './OrSearch-42454def.js';
|
|
67
|
-
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-
|
|
67
|
+
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-0b4637ba.js';
|
|
68
68
|
export { _ as OrSelect } from './OrSelect-17cdab3d.js';
|
|
69
69
|
export { _ as OrSelectV3 } from './OrSelect-439f27b9.js';
|
|
70
70
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-7d6125bb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
1
|
+
import { defineComponent, ref, computed, isVue2 } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import { openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, normalizeClass, resolveComponent, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
@@ -50,15 +50,22 @@ var script$1 = defineComponent({
|
|
|
50
50
|
default: false
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
setup(props) {
|
|
53
|
+
setup(props, context) {
|
|
54
54
|
// Refs
|
|
55
55
|
const root = ref();
|
|
56
56
|
// Styles
|
|
57
57
|
const classAttribute = useClassAttribute();
|
|
58
58
|
const rootStyles = computed(() => ['or-segmented-control-item', ...SegmentedControlItemRoot, ...SegmentedControlItemRootSizes[props.size], classAttribute.value]);
|
|
59
|
+
// Handlers
|
|
60
|
+
function onClick(event) {
|
|
61
|
+
if (isVue2) {
|
|
62
|
+
context.emit('click', event);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
59
65
|
return {
|
|
60
66
|
root,
|
|
61
|
-
rootStyles
|
|
67
|
+
rootStyles,
|
|
68
|
+
onClick
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
});
|
|
@@ -74,7 +81,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
81
|
class: _ctx.rootStyles,
|
|
75
82
|
selected: _ctx.selected ? '' : null,
|
|
76
83
|
disabled: _ctx.disabled ? '' : null,
|
|
77
|
-
onClick: _cache[0] || (_cache[0] =
|
|
84
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
78
85
|
}), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")])], 16 /* FULL_PROPS */, _hoisted_1);
|
|
79
86
|
}
|
|
80
87
|
|
|
@@ -59,7 +59,7 @@ export { s as OrRadio } from '../OrRadio-c3ab11f2.js';
|
|
|
59
59
|
export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from '../OrRadio-0c1883f2.js';
|
|
61
61
|
export { s as OrSearchV3 } from '../OrSearch-2912b7df.js';
|
|
62
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-
|
|
62
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-cdf00d49.js';
|
|
63
63
|
export { s as OrSelect } from '../OrSelect-73690828.js';
|
|
64
64
|
export { s as OrSelectV3 } from '../OrSelect-ff8f8461.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-375c85a3.js';
|
|
@@ -5,7 +5,7 @@ declare const _default: Meta<import("vue").ComponentOptions<import("vue").defaul
|
|
|
5
5
|
[x: number]: string;
|
|
6
6
|
} | {}, true>)>;
|
|
7
7
|
export default _default;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
11
11
|
[x: number]: string;
|
|
@@ -3,6 +3,7 @@ import { SegmentedControlSize } from '../../props';
|
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
6
|
+
onClick: (event: Event) => void;
|
|
6
7
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
8
|
size: {
|
|
8
9
|
type: PropType<SegmentedControlSize>;
|
|
@@ -36,6 +37,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
36
37
|
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
37
38
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
38
39
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
40
|
+
onClick: (event: Event) => void;
|
|
39
41
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
40
42
|
size: SegmentedControlSize;
|
|
41
43
|
selected: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-
|
|
1
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../../OrSegmentedControl-cdf00d49.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -59,7 +59,7 @@ export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
|
59
59
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
|
|
61
61
|
export { s as OrSearchV3 } from './OrSearch-2912b7df.js';
|
|
62
|
-
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-
|
|
62
|
+
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-cdf00d49.js';
|
|
63
63
|
export { s as OrSelect } from './OrSelect-73690828.js';
|
|
64
64
|
export { s as OrSelectV3 } from './OrSelect-ff8f8461.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.67.
|
|
3
|
+
"version": "2.67.6-beta.2018.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -123,6 +123,5 @@
|
|
|
123
123
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
124
124
|
},
|
|
125
125
|
"./package.json": "./package.json"
|
|
126
|
-
}
|
|
127
|
-
"gitHead": "62d6ccba26ea661379e73b57ee335f58f87ff4bf"
|
|
126
|
+
}
|
|
128
127
|
}
|
|
@@ -89,9 +89,9 @@ const Template: StoryFn<typeof OrSegmentedControl> = (args) => ({
|
|
|
89
89
|
`,
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
export const
|
|
92
|
+
export const Default = Template.bind({});
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Default.args = {
|
|
95
95
|
// Props
|
|
96
96
|
options: Array.from<string, SegmentedControlOption>([
|
|
97
97
|
'Alfa',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:class="rootStyles"
|
|
6
6
|
:selected="selected ? '' : null"
|
|
7
7
|
:disabled="disabled ? '' : null"
|
|
8
|
-
@click="
|
|
8
|
+
@click="onClick"
|
|
9
9
|
>
|
|
10
10
|
<div :class="['truncate']">
|
|
11
11
|
<slot />
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script lang="ts">
|
|
17
|
-
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
17
|
+
import { computed, defineComponent, isVue2, PropType, ref } from 'vue-demi';
|
|
18
18
|
import { useClassAttribute } from '../../../../hooks';
|
|
19
19
|
import { SegmentedControlSize } from '../../props';
|
|
20
20
|
import { SegmentedControlItemRoot, SegmentedControlItemRootSizes } from './styles';
|
|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
|
|
44
|
-
setup(props) {
|
|
44
|
+
setup(props, context) {
|
|
45
45
|
// Refs
|
|
46
46
|
const root = ref<HTMLElement>();
|
|
47
47
|
|
|
@@ -55,9 +55,17 @@ export default defineComponent({
|
|
|
55
55
|
classAttribute.value,
|
|
56
56
|
]);
|
|
57
57
|
|
|
58
|
+
// Handlers
|
|
59
|
+
function onClick(event: Event): void {
|
|
60
|
+
if (isVue2) {
|
|
61
|
+
context.emit('click', event);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
58
65
|
return {
|
|
59
66
|
root,
|
|
60
67
|
rootStyles,
|
|
68
|
+
onClick,
|
|
61
69
|
};
|
|
62
70
|
},
|
|
63
71
|
});
|