@onereach/ui-components 2.69.0-beta.2073.0 → 2.69.0-beta.2076.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.
@@ -1,12 +1,13 @@
1
1
  import { PropType } from 'vue-demi';
2
2
  import { EmptyStateSize } from '.';
3
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & import("@vue/composition-api").Data, {}, {
4
- rootClasses(): string[];
5
- imageClasses(): string[];
6
- headingClasses(): string[];
7
- textClasses(): string[];
8
- slotClasses(): string[];
9
- }, {
3
+ declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
+ rootClasses: import("@vue/composition-api").ComputedRef<string[]>;
6
+ imageClasses: import("@vue/composition-api").ComputedRef<string[]>;
7
+ headingClasses: import("@vue/composition-api").ComputedRef<string[]>;
8
+ textClasses: import("@vue/composition-api").ComputedRef<string[]>;
9
+ slotClasses: import("@vue/composition-api").ComputedRef<string[]>;
10
+ }> & import("@vue/composition-api").Data, {}, {}, {
10
11
  /**
11
12
  * Size of the component, affects font and icon size.
12
13
  * Use Large if the component takes all screen space,
@@ -75,13 +76,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
75
76
  heading: string;
76
77
  text: string;
77
78
  imageSrc: string;
78
- } & {}, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data>, import("@vue/composition-api").Data, {
79
- rootClasses(): string[];
80
- imageClasses(): string[];
81
- headingClasses(): string[];
82
- textClasses(): string[];
83
- slotClasses(): string[];
84
- }, {}, {}, {}, {}, {
79
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
80
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
81
+ rootClasses: import("@vue/composition-api").ComputedRef<string[]>;
82
+ imageClasses: import("@vue/composition-api").ComputedRef<string[]>;
83
+ headingClasses: import("@vue/composition-api").ComputedRef<string[]>;
84
+ textClasses: import("@vue/composition-api").ComputedRef<string[]>;
85
+ slotClasses: import("@vue/composition-api").ComputedRef<string[]>;
86
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
85
87
  size: EmptyStateSize;
86
88
  heading: string;
87
89
  text: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent } from 'vue-demi';
1
+ import { defineComponent, ref, computed } from 'vue-demi';
2
2
  import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
3
3
 
4
4
  var EmptyStateSize;
@@ -27,14 +27,14 @@ const EmptyStateImageSizes = {
27
27
  };
28
28
  const EmptyStateHeading = [
29
29
  // Theme
30
- 'text-on-background', 'dark:text-on-background-dark'];
30
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
31
31
  const EmptyStateHeadingSizes = {
32
32
  [EmptyStateSize.L]: [
33
33
  // Typography
34
- 'text-headline-2', 'font-headline-2'],
34
+ 'typography-headline-2'],
35
35
  [EmptyStateSize.M]: [
36
36
  // Typography
37
- 'text-headline-4', 'font-headline-4']
37
+ 'typography-headline-4']
38
38
  };
39
39
  const EmptyStateText = ['text-center',
40
40
  // Theme
@@ -43,10 +43,10 @@ const EmptyStateContent = EmptyStateText;
43
43
  const EmptyStateTextSizes = {
44
44
  [EmptyStateSize.L]: [
45
45
  // Typography
46
- 'text-body-2-regular', 'font-body-2-regular'],
46
+ 'typography-body-2-regular'],
47
47
  [EmptyStateSize.M]: [
48
48
  // Typography
49
- 'text-caption-regular', 'font-caption-regular']
49
+ 'typography-caption-regular']
50
50
  };
51
51
  const EmptyStateContentSizes = EmptyStateTextSizes;
52
52
 
@@ -91,22 +91,21 @@ var script = defineComponent({
91
91
  default: undefined
92
92
  }
93
93
  },
94
- computed: {
95
- rootClasses() {
96
- return ['or-empty-state', ...EmptyStateRoot];
97
- },
98
- imageClasses() {
99
- return ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[this.size]];
100
- },
101
- headingClasses() {
102
- return ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[this.size]];
103
- },
104
- textClasses() {
105
- return ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[this.size]];
106
- },
107
- slotClasses() {
108
- return ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[this.size]];
109
- }
94
+ setup(props) {
95
+ const root = ref();
96
+ const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
97
+ const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
98
+ const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
99
+ const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
100
+ const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
101
+ return {
102
+ root,
103
+ rootClasses,
104
+ imageClasses,
105
+ headingClasses,
106
+ textClasses,
107
+ slotClasses
108
+ };
110
109
  }
111
110
  });
112
111
 
@@ -119,7 +118,7 @@ var __vue_render__ = function () {
119
118
  var _h = _vm.$createElement;
120
119
  var _c = _vm._self._c || _h;
121
120
  return _c('div', {
122
- staticClass: "static",
121
+ ref: "root",
123
122
  class: _vm.rootClasses
124
123
  }, [_vm.imageSrc ? _c('img', {
125
124
  class: _vm.imageClasses,
@@ -140,7 +139,7 @@ var __vue_staticRenderFns__ = [];
140
139
  /* style */
141
140
  const __vue_inject_styles__ = undefined;
142
141
  /* scoped */
143
- const __vue_scope_id__ = "data-v-4ca51b1c";
142
+ const __vue_scope_id__ = undefined;
144
143
  /* module identifier */
145
144
  const __vue_module_identifier__ = undefined;
146
145
  /* functional template */
@@ -1,12 +1,13 @@
1
1
  import { PropType } from 'vue-demi';
2
2
  import { EmptyStateSize } from '.';
3
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & import("@vue/composition-api").Data, {}, {
4
- rootClasses(): string[];
5
- imageClasses(): string[];
6
- headingClasses(): string[];
7
- textClasses(): string[];
8
- slotClasses(): string[];
9
- }, {
3
+ declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
+ rootClasses: import("@vue/composition-api").ComputedRef<string[]>;
6
+ imageClasses: import("@vue/composition-api").ComputedRef<string[]>;
7
+ headingClasses: import("@vue/composition-api").ComputedRef<string[]>;
8
+ textClasses: import("@vue/composition-api").ComputedRef<string[]>;
9
+ slotClasses: import("@vue/composition-api").ComputedRef<string[]>;
10
+ }> & import("@vue/composition-api").Data, {}, {}, {
10
11
  /**
11
12
  * Size of the component, affects font and icon size.
12
13
  * Use Large if the component takes all screen space,
@@ -75,13 +76,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
75
76
  heading: string;
76
77
  text: string;
77
78
  imageSrc: string;
78
- } & {}, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data>, import("@vue/composition-api").Data, {
79
- rootClasses(): string[];
80
- imageClasses(): string[];
81
- headingClasses(): string[];
82
- textClasses(): string[];
83
- slotClasses(): string[];
84
- }, {}, {}, {}, {}, {
79
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
80
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
81
+ rootClasses: import("@vue/composition-api").ComputedRef<string[]>;
82
+ imageClasses: import("@vue/composition-api").ComputedRef<string[]>;
83
+ headingClasses: import("@vue/composition-api").ComputedRef<string[]>;
84
+ textClasses: import("@vue/composition-api").ComputedRef<string[]>;
85
+ slotClasses: import("@vue/composition-api").ComputedRef<string[]>;
86
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
85
87
  size: EmptyStateSize;
86
88
  heading: string;
87
89
  text: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent } from 'vue-demi';
1
+ import { defineComponent, ref, computed } from 'vue-demi';
2
2
  import { openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from 'vue';
3
3
 
4
4
  var EmptyStateSize;
@@ -27,14 +27,14 @@ const EmptyStateImageSizes = {
27
27
  };
28
28
  const EmptyStateHeading = [
29
29
  // Theme
30
- 'text-on-background', 'dark:text-on-background-dark'];
30
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
31
31
  const EmptyStateHeadingSizes = {
32
32
  [EmptyStateSize.L]: [
33
33
  // Typography
34
- 'text-headline-2', 'font-headline-2'],
34
+ 'typography-headline-2'],
35
35
  [EmptyStateSize.M]: [
36
36
  // Typography
37
- 'text-headline-4', 'font-headline-4']
37
+ 'typography-headline-4']
38
38
  };
39
39
  const EmptyStateText = ['text-center',
40
40
  // Theme
@@ -43,10 +43,10 @@ const EmptyStateContent = EmptyStateText;
43
43
  const EmptyStateTextSizes = {
44
44
  [EmptyStateSize.L]: [
45
45
  // Typography
46
- 'text-body-2-regular', 'font-body-2-regular'],
46
+ 'typography-body-2-regular'],
47
47
  [EmptyStateSize.M]: [
48
48
  // Typography
49
- 'text-caption-regular', 'font-caption-regular']
49
+ 'typography-caption-regular']
50
50
  };
51
51
  const EmptyStateContentSizes = EmptyStateTextSizes;
52
52
 
@@ -91,29 +91,29 @@ var script = defineComponent({
91
91
  default: undefined
92
92
  }
93
93
  },
94
- computed: {
95
- rootClasses() {
96
- return ['or-empty-state', ...EmptyStateRoot];
97
- },
98
- imageClasses() {
99
- return ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[this.size]];
100
- },
101
- headingClasses() {
102
- return ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[this.size]];
103
- },
104
- textClasses() {
105
- return ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[this.size]];
106
- },
107
- slotClasses() {
108
- return ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[this.size]];
109
- }
94
+ setup(props) {
95
+ const root = ref();
96
+ const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
97
+ const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
98
+ const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
99
+ const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
100
+ const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
101
+ return {
102
+ root,
103
+ rootClasses,
104
+ imageClasses,
105
+ headingClasses,
106
+ textClasses,
107
+ slotClasses
108
+ };
110
109
  }
111
110
  });
112
111
 
113
112
  const _hoisted_1 = ["src"];
114
113
  function render(_ctx, _cache, $props, $setup, $data, $options) {
115
114
  return openBlock(), createElementBlock("div", {
116
- class: normalizeClass(["static", _ctx.rootClasses])
115
+ ref: "root",
116
+ class: normalizeClass(_ctx.rootClasses)
117
117
  }, [_ctx.imageSrc ? (openBlock(), createElementBlock("img", {
118
118
  key: 0,
119
119
  src: _ctx.imageSrc,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.69.0-beta.2073.0",
3
+ "version": "2.69.0-beta.2076.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="static"
3
+ ref="root"
4
4
  :class="rootClasses">
5
5
  <img v-if="imageSrc"
6
6
  :src="imageSrc"
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
 
22
22
  <script lang="ts">
23
- import { defineComponent, PropType } from 'vue-demi';
23
+ import { computed, defineComponent, PropType, ref } from 'vue-demi';
24
24
  import { EmptyStateSize } from '.';
25
25
  import {
26
26
  EmptyStateContent,
@@ -75,47 +75,42 @@ export default defineComponent({
75
75
  default: undefined,
76
76
  },
77
77
  },
78
- computed: {
79
- rootClasses(): string[] {
80
- return [
81
- 'or-empty-state',
82
- ...EmptyStateRoot,
83
- ];
84
- },
85
- imageClasses(): string[] {
86
- return [
87
- 'or-empty-state_image',
88
- ...EmptyStateImage,
89
- ...EmptyStateImageSizes[this.size],
90
-
91
- ];
92
- },
93
- headingClasses(): string[] {
94
- return [
95
- 'or-empty-state_heading',
96
- ...EmptyStateHeading,
97
- ...EmptyStateHeadingSizes[this.size],
78
+ setup(props) {
79
+ const root = ref<HTMLElement>();
98
80
 
99
- ];
100
- },
101
- textClasses(): string[] {
102
- return [
103
- 'or-empty-state_text',
104
- ...EmptyStateText,
105
- ...EmptyStateTextSizes[this.size],
81
+ const rootClasses = computed(() => [
82
+ 'or-empty-state',
83
+ ...EmptyStateRoot,
84
+ ]);
85
+ const imageClasses = computed(() => [
86
+ 'or-empty-state_image',
87
+ ...EmptyStateImage,
88
+ ...EmptyStateImageSizes[props.size],
89
+ ]);
90
+ const headingClasses = computed(() => [
91
+ 'or-empty-state_heading',
92
+ ...EmptyStateHeading,
93
+ ...EmptyStateHeadingSizes[props.size],
94
+ ]);
95
+ const textClasses = computed(() => [
96
+ 'or-empty-state_text',
97
+ ...EmptyStateText,
98
+ ...EmptyStateTextSizes[props.size],
99
+ ]);
100
+ const slotClasses = computed(() => [
101
+ 'or-empty-state_content',
102
+ ...EmptyStateContent,
103
+ ...EmptyStateContentSizes[props.size],
104
+ ]);
106
105
 
107
- ];
108
- },
109
- slotClasses(): string[] {
110
- return [
111
- 'or-empty-state_content',
112
- ...EmptyStateContent,
113
- ...EmptyStateContentSizes[this.size],
114
- ];
115
- },
106
+ return {
107
+ root,
108
+ rootClasses,
109
+ imageClasses,
110
+ headingClasses,
111
+ textClasses,
112
+ slotClasses,
113
+ }
116
114
  },
117
115
  });
118
116
  </script>
119
-
120
- <style scoped>
121
- </style>
@@ -33,20 +33,18 @@ export const EmptyStateImageSizes: Record<EmptyStateSize, string[]> = {
33
33
 
34
34
  export const EmptyStateHeading: string[] = [
35
35
  // Theme
36
- 'text-on-background',
37
- 'dark:text-on-background-dark'
36
+ 'theme-foreground-default',
37
+ 'dark:theme-foreground-default-dark',
38
38
  ];
39
39
 
40
40
  export const EmptyStateHeadingSizes: Record<EmptyStateSize, string[]> = {
41
41
  [EmptyStateSize.L]: [
42
42
  // Typography
43
- 'text-headline-2',
44
- 'font-headline-2',
43
+ 'typography-headline-2',
45
44
  ],
46
45
  [EmptyStateSize.M]: [
47
46
  // Typography
48
- 'text-headline-4',
49
- 'font-headline-4',
47
+ 'typography-headline-4',
50
48
  ],
51
49
  }
52
50
 
@@ -63,13 +61,11 @@ export const EmptyStateContent = EmptyStateText;
63
61
  export const EmptyStateTextSizes: Record<EmptyStateSize, string[]> = {
64
62
  [EmptyStateSize.L]: [
65
63
  // Typography
66
- 'text-body-2-regular',
67
- 'font-body-2-regular',
64
+ 'typography-body-2-regular',
68
65
  ],
69
66
  [EmptyStateSize.M]: [
70
67
  // Typography
71
- 'text-caption-regular',
72
- 'font-caption-regular',
68
+ 'typography-caption-regular',
73
69
  ],
74
70
  };
75
71