@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, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from 'vue';
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from 'vue';
2
2
 
3
3
  var EmptyStateSize;
4
4
  (function (EmptyStateSize) {
@@ -26,14 +26,14 @@ const EmptyStateImageSizes = {
26
26
  };
27
27
  const EmptyStateHeading = [
28
28
  // Theme
29
- 'text-on-background', 'dark:text-on-background-dark'];
29
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
30
30
  const EmptyStateHeadingSizes = {
31
31
  [EmptyStateSize.L]: [
32
32
  // Typography
33
- 'text-headline-2', 'font-headline-2'],
33
+ 'typography-headline-2'],
34
34
  [EmptyStateSize.M]: [
35
35
  // Typography
36
- 'text-headline-4', 'font-headline-4']
36
+ 'typography-headline-4']
37
37
  };
38
38
  const EmptyStateText = ['text-center',
39
39
  // Theme
@@ -42,10 +42,10 @@ const EmptyStateContent = EmptyStateText;
42
42
  const EmptyStateTextSizes = {
43
43
  [EmptyStateSize.L]: [
44
44
  // Typography
45
- 'text-body-2-regular', 'font-body-2-regular'],
45
+ 'typography-body-2-regular'],
46
46
  [EmptyStateSize.M]: [
47
47
  // Typography
48
- 'text-caption-regular', 'font-caption-regular']
48
+ 'typography-caption-regular']
49
49
  };
50
50
  const EmptyStateContentSizes = EmptyStateTextSizes;
51
51
 
@@ -90,29 +90,29 @@ var script = defineComponent({
90
90
  default: undefined
91
91
  }
92
92
  },
93
- computed: {
94
- rootClasses() {
95
- return ['or-empty-state', ...EmptyStateRoot];
96
- },
97
- imageClasses() {
98
- return ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[this.size]];
99
- },
100
- headingClasses() {
101
- return ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[this.size]];
102
- },
103
- textClasses() {
104
- return ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[this.size]];
105
- },
106
- slotClasses() {
107
- return ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[this.size]];
108
- }
93
+ setup(props) {
94
+ const root = ref();
95
+ const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
96
+ const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
97
+ const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
98
+ const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
99
+ const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
100
+ return {
101
+ root,
102
+ rootClasses,
103
+ imageClasses,
104
+ headingClasses,
105
+ textClasses,
106
+ slotClasses
107
+ };
109
108
  }
110
109
  });
111
110
 
112
111
  const _hoisted_1 = ["src"];
113
112
  function render(_ctx, _cache, $props, $setup, $data, $options) {
114
113
  return openBlock(), createElementBlock("div", {
115
- class: normalizeClass(["static", _ctx.rootClasses])
114
+ ref: "root",
115
+ class: normalizeClass(_ctx.rootClasses)
116
116
  }, [_ctx.imageSrc ? (openBlock(), createElementBlock("img", {
117
117
  key: 0,
118
118
  src: _ctx.imageSrc,