@onereach/ui-components 2.69.2-beta.2133.0 → 2.69.2-beta.2136.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/{OrAvatar-ae61bfb9.js → OrAvatar-2fa559e1.js} +15 -41
- package/dist/bundled/v2/{OrButton-0e91a808.js → OrButton-4b99c680.js} +5 -1
- package/dist/bundled/v2/{OrConfirm-18c534df.js → OrConfirm-cab6535b.js} +1 -1
- package/dist/bundled/v2/components/index.js +3 -3
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +0 -11
- package/dist/bundled/v2/components/or-avatar-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +1 -2
- package/dist/bundled/v2/components/or-avatar-v3/styles.d.ts +0 -2
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/index.js +4 -4
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-0426862b.js → OrAvatar.vue_vue_type_script_lang-22e46ce1.js} +13 -35
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-3718b300.js → OrButton.vue_vue_type_script_lang-b0dc31ca.js} +5 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-861158b5.js → OrCardCollection.vue_vue_type_script_lang-3993a015.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-49a3a9bd.js} +1 -1
- package/dist/bundled/v3/{OrIconButton-1581013c.js → OrIconButton-4bd33e3c.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-f6f801ff.js → OrIconButton.vue_vue_type_script_lang-641f6e06.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-f29483f4.js → OrInlineInput.vue_vue_type_script_lang-3a8189f4.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-cc40af48.js → OrInlineTextarea.vue_vue_type_script_lang-890b97ab.js} +2 -2
- package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-f6d793d3.js +2 -2
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-80a7b906.js → OrModal.vue_vue_type_script_lang-00a477f0.js} +2 -2
- package/dist/bundled/v3/OrNotification.vue_vue_type_script_lang-fbb35355.js +2 -2
- package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-15285ce4.js +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-dc6a4011.js → OrTag.vue_vue_type_script_lang-92d9fb12.js} +2 -2
- package/dist/bundled/v3/{OrToastContainer-7c3c0b12.js → OrToastContainer-afb51e5d.js} +1 -1
- package/dist/bundled/v3/components/index.js +12 -12
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +0 -11
- package/dist/bundled/v3/components/or-avatar-v3/index.js +1 -3
- package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +1 -2
- package/dist/bundled/v3/components/or-avatar-v3/styles.d.ts +0 -2
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-confirm-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-icon-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-modal-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-notification-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-search-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tag-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-toast-v3/index.js +4 -4
- package/dist/bundled/v3/index.js +23 -29
- package/dist/bundled/v3/{types-dcc78caa.js → types-6c5eee23.js} +2 -2
- package/dist/esm/v2/{OrAvatar-3d155af3.js → OrAvatar-0afdef36.js} +15 -41
- package/dist/esm/v2/{OrButton-357a5756.js → OrButton-357e1e2c.js} +5 -1
- package/dist/esm/v2/{OrConfirm-b0b2e43c.js → OrConfirm-ec7aef0e.js} +1 -1
- package/dist/esm/v2/components/index.js +3 -3
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +0 -11
- package/dist/esm/v2/components/or-avatar-v3/index.js +1 -2
- package/dist/esm/v2/components/or-avatar-v3/props.d.ts +1 -2
- package/dist/esm/v2/components/or-avatar-v3/styles.d.ts +0 -2
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v2/index.js +3 -3
- package/dist/esm/v3/{OrAvatar-53a4429d.js → OrAvatar-ef88d31c.js} +16 -43
- package/dist/esm/v3/{OrButton-f4b9ee51.js → OrButton-bb6bf8a9.js} +5 -1
- package/dist/esm/v3/{OrConfirm-906427ef.js → OrConfirm-5d56cbd3.js} +1 -1
- package/dist/esm/v3/components/index.js +3 -3
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +0 -11
- package/dist/esm/v3/components/or-avatar-v3/index.js +1 -2
- package/dist/esm/v3/components/or-avatar-v3/props.d.ts +1 -2
- package/dist/esm/v3/components/or-avatar-v3/styles.d.ts +0 -2
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v3/index.js +3 -3
- package/package.json +1 -1
- package/src/components/or-avatar-v3/OrAvatar.stories3.ts +7 -9
- package/src/components/or-avatar-v3/OrAvatar.vue +2 -22
- package/src/components/or-avatar-v3/props.ts +0 -1
- package/src/components/or-avatar-v3/styles.ts +11 -49
- package/src/components/or-button-v3/styles.ts +6 -0
- package/src/components/or-menu-v3/OrMenu.stories3.ts +1 -1
|
@@ -2,6 +2,7 @@ import { Meta, StoryFn } from '@storybook/vue3';
|
|
|
2
2
|
import OrAvatarDocs from './OrAvatar.docs.mdx';
|
|
3
3
|
import OrAvatar from './OrAvatar.vue';
|
|
4
4
|
import { AvatarColor, AvatarSize } from './props';
|
|
5
|
+
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
5
6
|
import { getAbbreviation } from '../../utils/functions/text';
|
|
6
7
|
import { computed } from 'vue-demi';
|
|
7
8
|
|
|
@@ -38,10 +39,6 @@ export default {
|
|
|
38
39
|
colorSalt: {
|
|
39
40
|
control: { type: 'text' },
|
|
40
41
|
},
|
|
41
|
-
|
|
42
|
-
icon: {
|
|
43
|
-
control: { type: 'text' },
|
|
44
|
-
},
|
|
45
42
|
},
|
|
46
43
|
|
|
47
44
|
parameters: {
|
|
@@ -61,6 +58,7 @@ export default {
|
|
|
61
58
|
const DefaultTemplate: StoryFn<typeof OrAvatar> = (args) => ({
|
|
62
59
|
components: {
|
|
63
60
|
OrAvatar,
|
|
61
|
+
OrIcon,
|
|
64
62
|
},
|
|
65
63
|
|
|
66
64
|
setup() {
|
|
@@ -116,22 +114,22 @@ WithTextInSlot.args = {
|
|
|
116
114
|
colorSalt: 'A username',
|
|
117
115
|
};
|
|
118
116
|
|
|
119
|
-
export const
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
export const WithIconInSlot = DefaultTemplate.bind({});
|
|
118
|
+
WithIconInSlot.args = {
|
|
119
|
+
default: '<or-icon icon="face" size="inherit" />',
|
|
122
120
|
colorSalt: 'Any string here',
|
|
123
121
|
};
|
|
124
122
|
|
|
125
123
|
export const WithColor = DefaultTemplate.bind({});
|
|
126
124
|
WithColor.args = {
|
|
127
125
|
color: AvatarColor.blue,
|
|
128
|
-
|
|
126
|
+
default: '<or-icon icon="person" size="inherit" />',
|
|
129
127
|
};
|
|
130
128
|
|
|
131
129
|
export const XL = DefaultTemplate.bind({});
|
|
132
130
|
XL.args = {
|
|
133
131
|
size: AvatarSize.XL,
|
|
134
|
-
|
|
132
|
+
default: '<or-icon icon="person" size="inherit" />',
|
|
135
133
|
colorSalt: 'Big Avatar',
|
|
136
134
|
};
|
|
137
135
|
|
|
@@ -6,16 +6,10 @@
|
|
|
6
6
|
>
|
|
7
7
|
<slot>
|
|
8
8
|
<img
|
|
9
|
-
v-if="src"
|
|
10
9
|
:class="imageStyles"
|
|
11
10
|
:src="src"
|
|
12
11
|
:alt="''"
|
|
13
12
|
>
|
|
14
|
-
<or-icon
|
|
15
|
-
v-else-if="icon"
|
|
16
|
-
:icon="icon"
|
|
17
|
-
size="inherit"
|
|
18
|
-
/>
|
|
19
13
|
</slot>
|
|
20
14
|
</div>
|
|
21
15
|
</template>
|
|
@@ -25,14 +19,10 @@ import { computed, defineComponent, PropType, ref, watchPostEffect } from 'vue-d
|
|
|
25
19
|
import { useClassAttribute } from '../../hooks';
|
|
26
20
|
import { generateHslFromString, hslToColorString } from '../../utils/functions/color';
|
|
27
21
|
import { AvatarColor, AvatarSize } from './props';
|
|
28
|
-
import { AvatarImage, AvatarRoot, AvatarRootColors, AvatarRootSizes
|
|
29
|
-
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
22
|
+
import { AvatarImage, AvatarRoot, AvatarRootColors, AvatarRootSizes } from './styles';
|
|
30
23
|
|
|
31
24
|
export default defineComponent({
|
|
32
25
|
name: 'OrAvatar',
|
|
33
|
-
components: {
|
|
34
|
-
OrIcon,
|
|
35
|
-
},
|
|
36
26
|
|
|
37
27
|
inheritAttrs: false,
|
|
38
28
|
|
|
@@ -46,10 +36,7 @@ export default defineComponent({
|
|
|
46
36
|
type: String as PropType<AvatarSize>,
|
|
47
37
|
default: AvatarSize.M,
|
|
48
38
|
},
|
|
49
|
-
|
|
50
|
-
type: String,
|
|
51
|
-
default: undefined,
|
|
52
|
-
},
|
|
39
|
+
|
|
53
40
|
color: {
|
|
54
41
|
type: String as PropType<AvatarColor>,
|
|
55
42
|
default: AvatarColor.auto,
|
|
@@ -71,9 +58,6 @@ export default defineComponent({
|
|
|
71
58
|
// Refs
|
|
72
59
|
const root = ref<HTMLElement>();
|
|
73
60
|
|
|
74
|
-
const isIcon = computed(() => {
|
|
75
|
-
return !props.icon;
|
|
76
|
-
});
|
|
77
61
|
// Styles
|
|
78
62
|
const classAttribute = useClassAttribute();
|
|
79
63
|
|
|
@@ -82,10 +66,6 @@ export default defineComponent({
|
|
|
82
66
|
...AvatarRoot,
|
|
83
67
|
...AvatarRootSizes[props.size],
|
|
84
68
|
...AvatarRootColors[props.color],
|
|
85
|
-
...(isIcon.value
|
|
86
|
-
? AvatarRootAbbreviationSizes[props.size]
|
|
87
|
-
: AvatarRootIconSizes[props.size]
|
|
88
|
-
),
|
|
89
69
|
classAttribute.value,
|
|
90
70
|
]);
|
|
91
71
|
|
|
@@ -27,30 +27,36 @@ export const AvatarRootSizes: Record<AvatarSize, string[]> = {
|
|
|
27
27
|
// Box
|
|
28
28
|
'w-[80px]',
|
|
29
29
|
'h-[80px]',
|
|
30
|
+
|
|
31
|
+
// Typography
|
|
32
|
+
'text-[32px]',
|
|
30
33
|
],
|
|
31
34
|
|
|
32
35
|
'l': [
|
|
33
36
|
// Box
|
|
34
37
|
'w-[64px]',
|
|
35
38
|
'h-[64px]',
|
|
39
|
+
|
|
40
|
+
// Typography
|
|
41
|
+
'text-[24px]',
|
|
36
42
|
],
|
|
37
43
|
|
|
38
44
|
'm': [
|
|
39
45
|
// Box
|
|
40
46
|
'w-[40px]',
|
|
41
47
|
'h-[40px]',
|
|
48
|
+
|
|
49
|
+
// Typography
|
|
50
|
+
'text-[16px]',
|
|
42
51
|
],
|
|
43
52
|
|
|
44
53
|
's': [
|
|
45
54
|
// Box
|
|
46
55
|
'w-[32px]',
|
|
47
56
|
'h-[32px]',
|
|
48
|
-
],
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'w-[24px]',
|
|
53
|
-
'h-[24px]',
|
|
58
|
+
// Typography
|
|
59
|
+
'text-[16px]',
|
|
54
60
|
],
|
|
55
61
|
};
|
|
56
62
|
|
|
@@ -91,47 +97,3 @@ export const AvatarRootColors: Record<AvatarColor, string[]> = {
|
|
|
91
97
|
'dark:text-overlay-dark',
|
|
92
98
|
],
|
|
93
99
|
};
|
|
94
|
-
|
|
95
|
-
export const AvatarRootAbbreviationSizes: Record<AvatarSize, string[]> = {
|
|
96
|
-
'xl': [
|
|
97
|
-
'typography-headline-1',
|
|
98
|
-
],
|
|
99
|
-
|
|
100
|
-
'l': [
|
|
101
|
-
'typography-headline-1',
|
|
102
|
-
],
|
|
103
|
-
|
|
104
|
-
'm': [
|
|
105
|
-
'typography-body-1-bold',
|
|
106
|
-
],
|
|
107
|
-
|
|
108
|
-
's': [
|
|
109
|
-
'typography-body-1-bold',
|
|
110
|
-
],
|
|
111
|
-
|
|
112
|
-
'xs': [
|
|
113
|
-
'typography-caption-semibold',
|
|
114
|
-
],
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const AvatarRootIconSizes: Record<AvatarSize, string[]> = {
|
|
118
|
-
'xl': [
|
|
119
|
-
'text-[40px]',
|
|
120
|
-
],
|
|
121
|
-
|
|
122
|
-
'l': [
|
|
123
|
-
'text-[32px]',
|
|
124
|
-
],
|
|
125
|
-
|
|
126
|
-
'm': [
|
|
127
|
-
'text-[20px]',
|
|
128
|
-
],
|
|
129
|
-
|
|
130
|
-
's': [
|
|
131
|
-
'text-[16px]',
|
|
132
|
-
],
|
|
133
|
-
|
|
134
|
-
'xs': [
|
|
135
|
-
'text-[16px]',
|
|
136
|
-
],
|
|
137
|
-
};
|
|
@@ -7,6 +7,9 @@ export const ButtonRoot: string[] = [
|
|
|
7
7
|
// Shape
|
|
8
8
|
'rounded-md',
|
|
9
9
|
|
|
10
|
+
// Sizing
|
|
11
|
+
'min-w-[96px]',
|
|
12
|
+
|
|
10
13
|
// Interactivity
|
|
11
14
|
'interactivity-auto',
|
|
12
15
|
|
|
@@ -46,6 +49,9 @@ export const ButtonRootVariants: Record<ButtonVariant, string[]> = {
|
|
|
46
49
|
'link': [
|
|
47
50
|
// Spacing
|
|
48
51
|
'gap-sm md:gap-xs',
|
|
52
|
+
|
|
53
|
+
// Sizing
|
|
54
|
+
'min-w-[auto]',
|
|
49
55
|
],
|
|
50
56
|
};
|
|
51
57
|
|