@onereach/ui-components 2.69.2-beta.2136.0 → 2.69.3-beta.2138.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 (61) hide show
  1. package/dist/bundled/v2/{OrAvatar-2fa559e1.js → OrAvatar-ae61bfb9.js} +41 -15
  2. package/dist/bundled/v2/components/index.js +1 -1
  3. package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  4. package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  5. package/dist/bundled/v2/components/or-avatar-v3/index.js +2 -1
  6. package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +2 -1
  7. package/dist/bundled/v2/components/or-avatar-v3/styles.d.ts +2 -0
  8. package/dist/bundled/v2/index.js +2 -2
  9. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-22e46ce1.js → OrAvatar.vue_vue_type_script_lang-0426862b.js} +35 -13
  10. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-3993a015.js → OrCardCollection.vue_vue_type_script_lang-861158b5.js} +2 -2
  11. package/dist/bundled/v3/{OrIconButton-4bd33e3c.js → OrIconButton-1581013c.js} +1 -1
  12. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-641f6e06.js → OrIconButton.vue_vue_type_script_lang-f6f801ff.js} +1 -1
  13. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3a8189f4.js → OrInlineInput.vue_vue_type_script_lang-f29483f4.js} +2 -2
  14. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-890b97ab.js → OrInlineTextarea.vue_vue_type_script_lang-cc40af48.js} +2 -2
  15. package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-f6d793d3.js +2 -2
  16. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-00a477f0.js → OrModal.vue_vue_type_script_lang-80a7b906.js} +2 -2
  17. package/dist/bundled/v3/OrNotification.vue_vue_type_script_lang-fbb35355.js +2 -2
  18. package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-15285ce4.js +1 -1
  19. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-92d9fb12.js → OrTag.vue_vue_type_script_lang-dc6a4011.js} +2 -2
  20. package/dist/bundled/v3/{OrToastContainer-afb51e5d.js → OrToastContainer-7c3c0b12.js} +1 -1
  21. package/dist/bundled/v3/components/index.js +10 -10
  22. package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  23. package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  24. package/dist/bundled/v3/components/or-avatar-v3/index.js +3 -1
  25. package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +2 -1
  26. package/dist/bundled/v3/components/or-avatar-v3/styles.d.ts +2 -0
  27. package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
  28. package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -2
  29. package/dist/bundled/v3/components/or-icon-button-v3/index.js +1 -1
  30. package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -3
  31. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -3
  32. package/dist/bundled/v3/components/or-input-v3/index.js +2 -2
  33. package/dist/bundled/v3/components/or-modal-v3/index.js +3 -3
  34. package/dist/bundled/v3/components/or-notification-v3/index.js +2 -2
  35. package/dist/bundled/v3/components/or-search-v3/index.js +2 -2
  36. package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
  37. package/dist/bundled/v3/components/or-tag-v3/index.js +3 -3
  38. package/dist/bundled/v3/components/or-toast-v3/index.js +4 -4
  39. package/dist/bundled/v3/index.js +26 -20
  40. package/dist/bundled/v3/{types-6c5eee23.js → types-dcc78caa.js} +2 -2
  41. package/dist/esm/v2/{OrAvatar-0afdef36.js → OrAvatar-3d155af3.js} +41 -15
  42. package/dist/esm/v2/components/index.js +1 -1
  43. package/dist/esm/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  44. package/dist/esm/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  45. package/dist/esm/v2/components/or-avatar-v3/index.js +2 -1
  46. package/dist/esm/v2/components/or-avatar-v3/props.d.ts +2 -1
  47. package/dist/esm/v2/components/or-avatar-v3/styles.d.ts +2 -0
  48. package/dist/esm/v2/index.js +1 -1
  49. package/dist/esm/v3/{OrAvatar-ef88d31c.js → OrAvatar-53a4429d.js} +43 -16
  50. package/dist/esm/v3/components/index.js +1 -1
  51. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  52. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  53. package/dist/esm/v3/components/or-avatar-v3/index.js +2 -1
  54. package/dist/esm/v3/components/or-avatar-v3/props.d.ts +2 -1
  55. package/dist/esm/v3/components/or-avatar-v3/styles.d.ts +2 -0
  56. package/dist/esm/v3/index.js +1 -1
  57. package/package.json +1 -1
  58. package/src/components/or-avatar-v3/OrAvatar.stories3.ts +9 -7
  59. package/src/components/or-avatar-v3/OrAvatar.vue +22 -2
  60. package/src/components/or-avatar-v3/props.ts +1 -0
  61. package/src/components/or-avatar-v3/styles.ts +49 -11
@@ -1,5 +1,6 @@
1
1
  import './index-fa6eb4ca.js';
2
2
  import { h as hslToColorString, g as generateHslFromString } from './color-1f348774.js';
3
+ import { O as OrIcon } from './OrIcon-8625385f.js';
3
4
  import { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
4
5
  import { defineComponent, ref, computed, watchPostEffect } from '@vue/composition-api/dist/vue-composition-api.mjs';
5
6
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
@@ -10,6 +11,7 @@ var AvatarSize;
10
11
  AvatarSize["L"] = "l";
11
12
  AvatarSize["M"] = "m";
12
13
  AvatarSize["S"] = "s";
14
+ AvatarSize["XS"] = "xs";
13
15
  })(AvatarSize || (AvatarSize = {}));
14
16
  var AvatarColor;
15
17
  (function (AvatarColor) {
@@ -34,24 +36,19 @@ const AvatarImage = [
34
36
  const AvatarRootSizes = {
35
37
  'xl': [
36
38
  // Box
37
- 'w-[80px]', 'h-[80px]',
38
- // Typography
39
- 'text-[32px]'],
39
+ 'w-[80px]', 'h-[80px]'],
40
40
  'l': [
41
41
  // Box
42
- 'w-[64px]', 'h-[64px]',
43
- // Typography
44
- 'text-[24px]'],
42
+ 'w-[64px]', 'h-[64px]'],
45
43
  'm': [
46
44
  // Box
47
- 'w-[40px]', 'h-[40px]',
48
- // Typography
49
- 'text-[16px]'],
45
+ 'w-[40px]', 'h-[40px]'],
50
46
  's': [
51
47
  // Box
52
- 'w-[32px]', 'h-[32px]',
53
- // Typography
54
- 'text-[16px]']
48
+ 'w-[32px]', 'h-[32px]'],
49
+ 'xs': [
50
+ // Box
51
+ 'w-[24px]', 'h-[24px]']
55
52
  };
56
53
  const AvatarRootColors = {
57
54
  [AvatarColor.blue]: [
@@ -73,9 +70,26 @@ const AvatarRootColors = {
73
70
  // Theme
74
71
  'text-white', 'dark:text-overlay-dark']
75
72
  };
73
+ const AvatarRootAbbreviationSizes = {
74
+ 'xl': ['typography-headline-1'],
75
+ 'l': ['typography-headline-1'],
76
+ 'm': ['typography-body-1-bold'],
77
+ 's': ['typography-body-1-bold'],
78
+ 'xs': ['typography-caption-semibold']
79
+ };
80
+ const AvatarRootIconSizes = {
81
+ 'xl': ['text-[40px]'],
82
+ 'l': ['text-[32px]'],
83
+ 'm': ['text-[20px]'],
84
+ 's': ['text-[16px]'],
85
+ 'xs': ['text-[16px]']
86
+ };
76
87
 
77
88
  var script = defineComponent({
78
89
  name: 'OrAvatar',
90
+ components: {
91
+ OrIcon
92
+ },
79
93
  inheritAttrs: false,
80
94
  props: {
81
95
  src: {
@@ -86,6 +100,10 @@ var script = defineComponent({
86
100
  type: String,
87
101
  default: AvatarSize.M
88
102
  },
103
+ icon: {
104
+ type: String,
105
+ default: undefined
106
+ },
89
107
  color: {
90
108
  type: String,
91
109
  default: AvatarColor.auto,
@@ -101,9 +119,12 @@ var script = defineComponent({
101
119
  setup(props) {
102
120
  // Refs
103
121
  const root = ref();
122
+ const isIcon = computed(() => {
123
+ return !props.icon;
124
+ });
104
125
  // Styles
105
126
  const classAttribute = useClassAttribute();
106
- const rootStyles = computed(() => ['or-avatar', ...AvatarRoot, ...AvatarRootSizes[props.size], ...AvatarRootColors[props.color], classAttribute.value]);
127
+ const rootStyles = computed(() => ['or-avatar', ...AvatarRoot, ...AvatarRootSizes[props.size], ...AvatarRootColors[props.color], ...(isIcon.value ? AvatarRootAbbreviationSizes[props.size] : AvatarRootIconSizes[props.size]), classAttribute.value]);
107
128
  const imageStyles = computed(() => [...AvatarImage]);
108
129
  // Effects
109
130
  watchPostEffect(() => {
@@ -136,13 +157,18 @@ var __vue_render__ = function () {
136
157
  ref: "root",
137
158
  class: _vm.rootStyles
138
159
  }, 'div', _vm.$attrs, false), [_vm._t("default", function () {
139
- return [_c('img', {
160
+ return [_vm.src ? _c('img', {
140
161
  class: _vm.imageStyles,
141
162
  attrs: {
142
163
  "src": _vm.src,
143
164
  "alt": ''
144
165
  }
145
- })];
166
+ }) : _vm.icon ? _c('or-icon', {
167
+ attrs: {
168
+ "icon": _vm.icon,
169
+ "size": "inherit"
170
+ }
171
+ }) : _vm._e()];
146
172
  })], 2);
147
173
  };
148
174
  var __vue_staticRenderFns__ = [];
@@ -1,5 +1,5 @@
1
1
  export { O as OR_AVATAR_SIZE, _ as OrAvatar } from '../OrAvatar-0a2c265f.js';
2
- export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../OrAvatar-2fa559e1.js';
2
+ export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../OrAvatar-ae61bfb9.js';
3
3
  export { O as OrBottomSheetV3 } from '../OrBottomSheet-1cd1ab4c.js';
4
4
  export { _ as OrButton, a as OrButtonColors, b as OrButtonSizes, O as OrButtonViews } from '../OrButton-2abd29d0.js';
5
5
  export { O as OrButtonV2 } from '../OrButton-705cd0bd.js';
@@ -20,7 +20,7 @@ export declare const WithTextInSlot: StoryFn<import("vue").ComponentOptions<impo
20
20
  } | string[], {} & {}, {
21
21
  [x: number]: string;
22
22
  } | {}, true>)>;
23
- export declare const WithIconInSlot: 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, {
23
+ export declare const WithIcon: 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, {
24
24
  [x: string]: ((...args: any[]) => any) | null;
25
25
  } | string[], {} & {}, {
26
26
  [x: number]: string;
@@ -13,6 +13,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
13
13
  type: PropType<AvatarSize>;
14
14
  default: AvatarSize;
15
15
  };
16
+ icon: {
17
+ type: StringConstructor;
18
+ default: undefined;
19
+ };
16
20
  color: {
17
21
  type: PropType<AvatarColor>;
18
22
  default: AvatarColor;
@@ -32,6 +36,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
32
36
  type: PropType<AvatarSize>;
33
37
  default: AvatarSize;
34
38
  };
39
+ icon: {
40
+ type: StringConstructor;
41
+ default: undefined;
42
+ };
35
43
  color: {
36
44
  type: PropType<AvatarColor>;
37
45
  default: AvatarColor;
@@ -45,6 +53,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
45
53
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
46
54
  src: string;
47
55
  size: AvatarSize;
56
+ icon: string;
48
57
  color: AvatarColor;
49
58
  colorSalt: string;
50
59
  } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -54,11 +63,13 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
54
63
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
55
64
  src: string;
56
65
  size: AvatarSize;
66
+ icon: string;
57
67
  color: AvatarColor;
58
68
  colorSalt: string;
59
69
  } & {}, {
60
70
  src: string;
61
71
  size: AvatarSize;
72
+ icon: string;
62
73
  color: AvatarColor;
63
74
  colorSalt: string;
64
75
  }, true>);
@@ -1,7 +1,8 @@
1
- export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../../OrAvatar-2fa559e1.js';
1
+ export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../../OrAvatar-ae61bfb9.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';
5
5
  import '../../color-1f348774.js';
6
+ import '../../OrIcon-8625385f.js';
6
7
  import '../../useClassAttribute-9bf33346.js';
7
8
  import '../../normalize-component-6e8e3d80.js';
@@ -2,7 +2,8 @@ export declare enum AvatarSize {
2
2
  XL = "xl",
3
3
  L = "l",
4
4
  M = "m",
5
- S = "s"
5
+ S = "s",
6
+ XS = "xs"
6
7
  }
7
8
  export declare enum AvatarColor {
8
9
  blue = "blue",
@@ -3,3 +3,5 @@ export declare const AvatarRoot: string[];
3
3
  export declare const AvatarImage: string[];
4
4
  export declare const AvatarRootSizes: Record<AvatarSize, string[]>;
5
5
  export declare const AvatarRootColors: Record<AvatarColor, string[]>;
6
+ export declare const AvatarRootAbbreviationSizes: Record<AvatarSize, string[]>;
7
+ export declare const AvatarRootIconSizes: Record<AvatarSize, string[]>;