@onereach/ui-components 2.62.7-beta.1932.0 → 2.62.7
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/v2/{OrInlineInput-f00cba5e.js → OrInlineInput-8455f9da.js} +4 -5
- package/dist/v2/{OrInlineTextarea-75de33d0.js → OrInlineTextarea-1127e512.js} +4 -5
- package/dist/v2/{OrTabs-f2a60b41.js → OrTabs-b4a9740b.js} +1 -1
- package/dist/v2/components/index.d.ts +0 -1
- package/dist/v2/index.js +3 -4
- package/dist/v2/index2.js +3 -4
- package/dist/v2/index34.js +1 -1
- package/dist/v2/index36.js +1 -1
- package/dist/v2/index63.js +16 -2
- package/dist/v2/index64.js +24 -15
- package/dist/v2/index65.js +4 -26
- package/dist/v2/index66.js +1 -2
- package/dist/v2/index67.js +4 -3
- package/dist/v2/index68.js +4 -3
- package/dist/v2/index69.js +10 -3
- package/dist/v2/index70.js +6 -3
- package/dist/v2/index71.js +2 -13
- package/dist/v2/index72.js +6 -4
- package/dist/v2/index73.js +4 -6
- package/dist/v2/index74.js +1 -2
- package/dist/v2/index75.js +3 -3
- package/dist/v2/index76.js +4 -3
- package/dist/v2/index77.js +15 -4
- package/dist/v2/index78.js +11 -14
- package/dist/v2/index79.js +13 -11
- package/dist/v2/index80.js +2 -14
- package/dist/v2/index81.js +2 -2
- package/dist/v2/index82.js +3 -2
- package/dist/v2/index83.js +6 -1
- package/dist/v2/index84.js +20 -7
- package/dist/v2/index85.js +9 -12
- package/dist/v2/index86.js +1 -18
- package/dist/v2/index87.js +18 -2
- package/dist/v2/index88.js +2 -18
- package/dist/v2/index89.js +10 -2
- package/dist/v2/index90.js +11 -9
- package/dist/v2/index91.js +1 -12
- package/dist/v2/index92.js +6 -1
- package/dist/v2/index93.js +1 -5
- package/dist/v3/{OrInlineInput-bac4abdd.js → OrInlineInput-a080b0a3.js} +2 -3
- package/dist/v3/{OrInlineTextarea-d1ec1bba.js → OrInlineTextarea-08767485.js} +2 -3
- package/dist/v3/{OrTabs-ac0be933.js → OrTabs-194ca950.js} +1 -1
- package/dist/v3/components/index.d.ts +0 -1
- package/dist/v3/index.js +3 -4
- package/dist/v3/index2.js +3 -4
- package/dist/v3/index34.js +1 -1
- package/dist/v3/index36.js +1 -1
- package/dist/v3/index63.js +15 -2
- package/dist/v3/index64.js +22 -13
- package/dist/v3/index65.js +3 -24
- package/dist/v3/index66.js +1 -2
- package/dist/v3/index67.js +4 -3
- package/dist/v3/index68.js +4 -3
- package/dist/v3/index69.js +9 -3
- package/dist/v3/index70.js +4 -3
- package/dist/v3/index71.js +2 -10
- package/dist/v3/index72.js +5 -3
- package/dist/v3/index73.js +3 -5
- package/dist/v3/index74.js +1 -2
- package/dist/v3/index75.js +3 -3
- package/dist/v3/index76.js +4 -3
- package/dist/v3/index77.js +14 -4
- package/dist/v3/index78.js +10 -13
- package/dist/v3/index79.js +12 -10
- package/dist/v3/index80.js +1 -13
- package/dist/v3/index81.js +1 -1
- package/dist/v3/index82.js +3 -1
- package/dist/v3/index83.js +6 -1
- package/dist/v3/index84.js +16 -6
- package/dist/v3/index85.js +9 -12
- package/dist/v3/index86.js +1 -15
- package/dist/v3/index87.js +17 -2
- package/dist/v3/index88.js +2 -17
- package/dist/v3/index89.js +8 -2
- package/dist/v3/index90.js +9 -6
- package/dist/v3/index91.js +1 -11
- package/dist/v3/index92.js +6 -1
- package/dist/v3/index93.js +1 -5
- package/package.json +4 -3
- package/src/components/index.ts +0 -1
- package/src/components/or-checkbox-v3/OrCheckbox.stories3.ts +1 -1
- package/src/components/or-inline-input-v3/OrInlineInput.vue +2 -2
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +2 -2
- package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
- package/src/components/or-switch-v3/OrSwitch.stories3.ts +1 -1
- package/src/components/or-tabs-v3/OrTabs.stories3.ts +4 -9
- package/src/components/or-tabs-v3/OrTabs.vue +1 -1
- package/src/hooks/useClassAttribute.ts +1 -1
- package/dist/v2/OrSegmentedControl-17df63b8.js +0 -236
- package/dist/v2/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +0 -12
- package/dist/v2/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +0 -77
- package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +0 -47
- package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/index.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/props.d.ts +0 -4
- package/dist/v2/components/or-segmented-control-v3/styles.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/types.d.ts +0 -4
- package/dist/v2/index94.js +0 -3
- package/dist/v3/OrSegmentedControl-2bbc0f22.js +0 -184
- package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +0 -12
- package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +0 -77
- package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +0 -47
- package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/index.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/props.d.ts +0 -4
- package/dist/v3/components/or-segmented-control-v3/styles.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/types.d.ts +0 -4
- package/dist/v3/index94.js +0 -3
- package/src/components/or-segmented-control-v3/OrSegmentedControl.docs.mdx +0 -7
- package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +0 -106
- package/src/components/or-segmented-control-v3/OrSegmentedControl.vue +0 -107
- package/src/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue +0 -64
- package/src/components/or-segmented-control-v3/components/or-segmented-control-item/styles.ts +0 -50
- package/src/components/or-segmented-control-v3/index.ts +0 -3
- package/src/components/or-segmented-control-v3/props.ts +0 -4
- package/src/components/or-segmented-control-v3/styles.ts +0 -24
- package/src/components/or-segmented-control-v3/types.ts +0 -4
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="root"
|
|
4
|
-
v-bind="$attrs"
|
|
5
|
-
:class="rootStyles"
|
|
6
|
-
>
|
|
7
|
-
<OrSegmentedControlItem
|
|
8
|
-
v-for="option in options"
|
|
9
|
-
:key="option.value"
|
|
10
|
-
:size="size"
|
|
11
|
-
:selected="option.value === proxyModelValue"
|
|
12
|
-
:disabled="disabled"
|
|
13
|
-
@click.stop="proxyModelValue = option.value"
|
|
14
|
-
>
|
|
15
|
-
{{ option.label }}
|
|
16
|
-
</OrSegmentedControlItem>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script lang="ts">
|
|
21
|
-
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
22
|
-
import { useClassAttribute } from '../../hooks';
|
|
23
|
-
import OrSegmentedControlItem from './components/or-segmented-control-item/OrSegmentedControlItem.vue';
|
|
24
|
-
import { SegmentedControlSize } from './props';
|
|
25
|
-
import { SegmentedControlRoot, SegmentedControlRootSizes } from './styles';
|
|
26
|
-
import { SegmentedControlOption } from './types';
|
|
27
|
-
|
|
28
|
-
export default defineComponent({
|
|
29
|
-
name: 'OrSegmentedControl',
|
|
30
|
-
|
|
31
|
-
components: {
|
|
32
|
-
OrSegmentedControlItem,
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
inheritAttrs: false,
|
|
36
|
-
|
|
37
|
-
props: {
|
|
38
|
-
options: {
|
|
39
|
-
type: Array as PropType<SegmentedControlOption[]>,
|
|
40
|
-
default: [] as SegmentedControlOption[],
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
modelValue: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: undefined,
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
value: { // TODO: Remove Vue 2 fallback
|
|
49
|
-
type: String,
|
|
50
|
-
default: undefined,
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
size: {
|
|
54
|
-
type: String as PropType<SegmentedControlSize>,
|
|
55
|
-
default: SegmentedControlSize.M,
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
disabled: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
emits: [
|
|
65
|
-
'update:modelValue',
|
|
66
|
-
|
|
67
|
-
'input',
|
|
68
|
-
],
|
|
69
|
-
|
|
70
|
-
expose: [
|
|
71
|
-
'root',
|
|
72
|
-
],
|
|
73
|
-
|
|
74
|
-
setup(props, context) {
|
|
75
|
-
// Refs
|
|
76
|
-
const root = ref<HTMLElement>();
|
|
77
|
-
|
|
78
|
-
// Styles
|
|
79
|
-
const classAttribute = useClassAttribute();
|
|
80
|
-
|
|
81
|
-
const rootStyles = computed(() => [
|
|
82
|
-
'or-segmented-control',
|
|
83
|
-
...SegmentedControlRoot,
|
|
84
|
-
...SegmentedControlRootSizes[props.size],
|
|
85
|
-
classAttribute.value,
|
|
86
|
-
]);
|
|
87
|
-
|
|
88
|
-
// State
|
|
89
|
-
const proxyModelValue = computed({
|
|
90
|
-
get: () => {
|
|
91
|
-
return props.modelValue ?? props.value; // TODO: Remove Vue 2 fallback
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
set: (value) => {
|
|
95
|
-
context.emit('input', value);
|
|
96
|
-
context.emit('update:modelValue', value);
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
root,
|
|
102
|
-
rootStyles,
|
|
103
|
-
proxyModelValue,
|
|
104
|
-
};
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
</script>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="root"
|
|
4
|
-
v-bind="$attrs"
|
|
5
|
-
:class="rootStyles"
|
|
6
|
-
:selected="selected ? '' : null"
|
|
7
|
-
:disabled="disabled ? '' : null"
|
|
8
|
-
@click="$emit('click', $event)"
|
|
9
|
-
>
|
|
10
|
-
<div :class="['truncate']">
|
|
11
|
-
<slot />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
18
|
-
import { useClassAttribute } from '../../../../hooks';
|
|
19
|
-
import { SegmentedControlSize } from '../../props';
|
|
20
|
-
import { SegmentedControlItemRoot, SegmentedControlItemRootSizes } from './styles';
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
name: 'OrSegmentedControlItem',
|
|
24
|
-
|
|
25
|
-
inheritAttrs: false,
|
|
26
|
-
|
|
27
|
-
props: {
|
|
28
|
-
size: {
|
|
29
|
-
type: String as PropType<SegmentedControlSize>,
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
selected: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false,
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
disabled: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
setup(props) {
|
|
45
|
-
// Refs
|
|
46
|
-
const root = ref<HTMLElement>();
|
|
47
|
-
|
|
48
|
-
// Styles
|
|
49
|
-
const classAttribute = useClassAttribute();
|
|
50
|
-
|
|
51
|
-
const rootStyles = computed(() => [
|
|
52
|
-
'or-segmented-control-item',
|
|
53
|
-
...SegmentedControlItemRoot,
|
|
54
|
-
...SegmentedControlItemRootSizes[props.size],
|
|
55
|
-
classAttribute.value,
|
|
56
|
-
]);
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
root,
|
|
60
|
-
rootStyles,
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
</script>
|
package/src/components/or-segmented-control-v3/components/or-segmented-control-item/styles.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { SegmentedControlSize } from '../../props';
|
|
2
|
-
|
|
3
|
-
export const SegmentedControlItemRoot: string[] = [
|
|
4
|
-
// Layout
|
|
5
|
-
'flex',
|
|
6
|
-
'items-center',
|
|
7
|
-
'justify-center',
|
|
8
|
-
|
|
9
|
-
// Shape
|
|
10
|
-
'rounded-md',
|
|
11
|
-
|
|
12
|
-
// Interactivity
|
|
13
|
-
'interactivity-auto',
|
|
14
|
-
|
|
15
|
-
// Theme
|
|
16
|
-
'theme-foreground-default',
|
|
17
|
-
'dark:theme-foreground-default-dark',
|
|
18
|
-
|
|
19
|
-
// Theme (selected)
|
|
20
|
-
'selected:theme-background-default',
|
|
21
|
-
'dark:selected:theme-background-default-dark',
|
|
22
|
-
|
|
23
|
-
// Theme (selected, enabled)
|
|
24
|
-
'selected:enabled:shadow-card',
|
|
25
|
-
'dark:selected:enabled:shadow-card-dark',
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
export const SegmentedControlItemRootSizes: Record<SegmentedControlSize, string[]> = {
|
|
29
|
-
'm': [
|
|
30
|
-
// Box
|
|
31
|
-
'h-[44px] md:h-[36px]',
|
|
32
|
-
|
|
33
|
-
// Spacing
|
|
34
|
-
'px-sm+ md:px-sm+',
|
|
35
|
-
|
|
36
|
-
// Typography
|
|
37
|
-
'typography-body-2-regular',
|
|
38
|
-
],
|
|
39
|
-
|
|
40
|
-
's': [
|
|
41
|
-
// Box
|
|
42
|
-
'h-[36px] md:h-[32px]',
|
|
43
|
-
|
|
44
|
-
// Spacing
|
|
45
|
-
'px-sm+ md:px-sm',
|
|
46
|
-
|
|
47
|
-
// Typography
|
|
48
|
-
'typography-caption-regular',
|
|
49
|
-
],
|
|
50
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SegmentedControlSize } from './props';
|
|
2
|
-
|
|
3
|
-
export const SegmentedControlRoot: string[] = [
|
|
4
|
-
// Layout
|
|
5
|
-
'grid',
|
|
6
|
-
'grid-flow-col',
|
|
7
|
-
'auto-cols-fr',
|
|
8
|
-
|
|
9
|
-
// Shape
|
|
10
|
-
'rounded-md',
|
|
11
|
-
|
|
12
|
-
// Spacing
|
|
13
|
-
'px-[2px]',
|
|
14
|
-
'py-[2px]',
|
|
15
|
-
|
|
16
|
-
// Theme
|
|
17
|
-
'theme-background-surface-variant',
|
|
18
|
-
'dark:theme-background-surface-variant-dark',
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
export const SegmentedControlRootSizes: Record<SegmentedControlSize, string[]> = {
|
|
22
|
-
'm': [],
|
|
23
|
-
's': [],
|
|
24
|
-
};
|