@onereach/ui-components 2.68.1 → 2.69.0-beta.2073.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 (37) hide show
  1. package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
  2. package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
  3. package/dist/bundled/v2/components/or-empty-state-v3/index.d.ts +3 -0
  4. package/dist/bundled/v2/components/or-empty-state-v3/index.js +162 -0
  5. package/dist/bundled/v2/components/or-empty-state-v3/props.d.ts +4 -0
  6. package/dist/bundled/v2/components/or-empty-state-v3/styles.d.ts +10 -0
  7. package/dist/bundled/v2/components/or-empty-state-v3/types.d.ts +2 -0
  8. package/dist/bundled/v2/index.js +1 -1
  9. package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
  10. package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
  11. package/dist/bundled/v3/components/or-empty-state-v3/index.d.ts +3 -0
  12. package/dist/bundled/v3/components/or-empty-state-v3/index.js +134 -0
  13. package/dist/bundled/v3/components/or-empty-state-v3/props.d.ts +4 -0
  14. package/dist/bundled/v3/components/or-empty-state-v3/styles.d.ts +10 -0
  15. package/dist/bundled/v3/components/or-empty-state-v3/types.d.ts +2 -0
  16. package/dist/bundled/v3/index.js +1 -1
  17. package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
  18. package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
  19. package/dist/esm/v2/components/or-empty-state-v3/index.d.ts +3 -0
  20. package/dist/esm/v2/components/or-empty-state-v3/index.js +159 -0
  21. package/dist/esm/v2/components/or-empty-state-v3/props.d.ts +4 -0
  22. package/dist/esm/v2/components/or-empty-state-v3/styles.d.ts +10 -0
  23. package/dist/esm/v2/components/or-empty-state-v3/types.d.ts +2 -0
  24. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
  25. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
  26. package/dist/esm/v3/components/or-empty-state-v3/index.d.ts +3 -0
  27. package/dist/esm/v3/components/or-empty-state-v3/index.js +135 -0
  28. package/dist/esm/v3/components/or-empty-state-v3/props.d.ts +4 -0
  29. package/dist/esm/v3/components/or-empty-state-v3/styles.d.ts +10 -0
  30. package/dist/esm/v3/components/or-empty-state-v3/types.d.ts +2 -0
  31. package/package.json +2 -3
  32. package/src/components/or-empty-state-v3/OrEmptyState.stories3.ts +87 -0
  33. package/src/components/or-empty-state-v3/OrEmptyState.vue +121 -0
  34. package/src/components/or-empty-state-v3/index.ts +3 -0
  35. package/src/components/or-empty-state-v3/props.ts +4 -0
  36. package/src/components/or-empty-state-v3/styles.ts +76 -0
  37. package/src/components/or-empty-state-v3/types.ts +3 -0
@@ -0,0 +1,24 @@
1
+ import { Meta, StoryFn } from '@storybook/vue3';
2
+ import OrEmptyState from './OrEmptyState.vue';
3
+ declare const _default: Meta<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, {
4
+ [x: string]: ((...args: any[]) => any) | null;
5
+ } | string[], {} & {}, {
6
+ [x: number]: string;
7
+ } | {}, true>)>;
8
+ export default _default;
9
+ export declare const Default: 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, {
10
+ [x: string]: ((...args: any[]) => any) | null;
11
+ } | string[], {} & {}, {
12
+ [x: number]: string;
13
+ } | {}, true>)>;
14
+ export declare const ImageIcon: 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, {
15
+ [x: string]: ((...args: any[]) => any) | null;
16
+ } | string[], {} & {}, {
17
+ [x: number]: string;
18
+ } | {}, true>)>;
19
+ export declare const LargeSize: 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, {
20
+ [x: string]: ((...args: any[]) => any) | null;
21
+ } | string[], {} & {}, {
22
+ [x: number]: string;
23
+ } | {}, true>)>;
24
+ export declare const ExtraContentInSlot: StoryFn<typeof OrEmptyState>;
@@ -0,0 +1,101 @@
1
+ import { PropType } from 'vue-demi';
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
+ }, {
10
+ /**
11
+ * Size of the component, affects font and icon size.
12
+ * Use Large if the component takes all screen space,
13
+ * and Medium if it is a part of the complex layout.
14
+ */
15
+ size: {
16
+ type: PropType<EmptyStateSize>;
17
+ default: EmptyStateSize;
18
+ };
19
+ /**
20
+ * The heading of the empty state block.
21
+ */
22
+ heading: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ /**
27
+ * Additional text such as a hint for a user with proposed next steps.
28
+ */
29
+ text: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ /**
34
+ * Path to the image to display above the heading.
35
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
36
+ */
37
+ imageSrc: {
38
+ type: StringConstructor;
39
+ default: undefined;
40
+ };
41
+ }, import("@vue/composition-api").ExtractPropTypes<{
42
+ /**
43
+ * Size of the component, affects font and icon size.
44
+ * Use Large if the component takes all screen space,
45
+ * and Medium if it is a part of the complex layout.
46
+ */
47
+ size: {
48
+ type: PropType<EmptyStateSize>;
49
+ default: EmptyStateSize;
50
+ };
51
+ /**
52
+ * The heading of the empty state block.
53
+ */
54
+ heading: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ /**
59
+ * Additional text such as a hint for a user with proposed next steps.
60
+ */
61
+ text: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ /**
66
+ * Path to the image to display above the heading.
67
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
68
+ */
69
+ imageSrc: {
70
+ type: StringConstructor;
71
+ default: undefined;
72
+ };
73
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
74
+ size: EmptyStateSize;
75
+ heading: string;
76
+ text: string;
77
+ 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
+ }, {}, {}, {}, {}, {
85
+ size: EmptyStateSize;
86
+ heading: string;
87
+ text: string;
88
+ imageSrc: string;
89
+ } & {}, {
90
+ size: EmptyStateSize;
91
+ heading: string;
92
+ text: string;
93
+ imageSrc: string;
94
+ }, true>);
95
+ /**
96
+ * The component to display when there is no content on a page,
97
+ * no records found or selected, or while the data is being loaded.
98
+ * Provides a hint to the user on what to do.
99
+ * Consists of text message, optional icon and optional loader.
100
+ */
101
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as OrEmptyStateV3 } from './OrEmptyState.vue';
2
+ export * from './types';
3
+ export * from './props';
@@ -0,0 +1,159 @@
1
+ import { defineComponent } from 'vue-demi';
2
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
3
+
4
+ var EmptyStateSize;
5
+ (function (EmptyStateSize) {
6
+ EmptyStateSize["L"] = "l";
7
+ EmptyStateSize["M"] = "m";
8
+ })(EmptyStateSize || (EmptyStateSize = {}));
9
+
10
+ const EmptyStateRoot = [
11
+ // Layout
12
+ 'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
13
+ // Box
14
+ 'w-full',
15
+ // Sizing
16
+ 'gap-sm'];
17
+ const EmptyStateImage = [
18
+ // Sizing
19
+ 'mb-sm'];
20
+ const EmptyStateImageSizes = {
21
+ [EmptyStateSize.L]: [
22
+ // Box
23
+ 'h-3xl'],
24
+ [EmptyStateSize.M]: [
25
+ // Box
26
+ 'h-2xl']
27
+ };
28
+ const EmptyStateHeading = [
29
+ // Theme
30
+ 'text-on-background', 'dark:text-on-background-dark'];
31
+ const EmptyStateHeadingSizes = {
32
+ [EmptyStateSize.L]: [
33
+ // Typography
34
+ 'text-headline-2', 'font-headline-2'],
35
+ [EmptyStateSize.M]: [
36
+ // Typography
37
+ 'text-headline-4', 'font-headline-4']
38
+ };
39
+ const EmptyStateText = ['text-center',
40
+ // Theme
41
+ 'text-outline', 'dark:text-outline-dark'];
42
+ const EmptyStateContent = EmptyStateText;
43
+ const EmptyStateTextSizes = {
44
+ [EmptyStateSize.L]: [
45
+ // Typography
46
+ 'text-body-2-regular', 'font-body-2-regular'],
47
+ [EmptyStateSize.M]: [
48
+ // Typography
49
+ 'text-caption-regular', 'font-caption-regular']
50
+ };
51
+ const EmptyStateContentSizes = EmptyStateTextSizes;
52
+
53
+ /**
54
+ * The component to display when there is no content on a page,
55
+ * no records found or selected, or while the data is being loaded.
56
+ * Provides a hint to the user on what to do.
57
+ * Consists of text message, optional icon and optional loader.
58
+ */
59
+ var script = defineComponent({
60
+ name: 'OrEmptyState',
61
+ props: {
62
+ /**
63
+ * Size of the component, affects font and icon size.
64
+ * Use Large if the component takes all screen space,
65
+ * and Medium if it is a part of the complex layout.
66
+ */
67
+ size: {
68
+ type: String,
69
+ default: EmptyStateSize.M
70
+ },
71
+ /**
72
+ * The heading of the empty state block.
73
+ */
74
+ heading: {
75
+ type: String,
76
+ default: ''
77
+ },
78
+ /**
79
+ * Additional text such as a hint for a user with proposed next steps.
80
+ */
81
+ text: {
82
+ type: String,
83
+ default: ''
84
+ },
85
+ /**
86
+ * Path to the image to display above the heading.
87
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
88
+ */
89
+ imageSrc: {
90
+ type: String,
91
+ default: undefined
92
+ }
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
+ }
110
+ }
111
+ });
112
+
113
+ /* script */
114
+ const __vue_script__ = script;
115
+
116
+ /* template */
117
+ var __vue_render__ = function () {
118
+ var _vm = this;
119
+ var _h = _vm.$createElement;
120
+ var _c = _vm._self._c || _h;
121
+ return _c('div', {
122
+ staticClass: "static",
123
+ class: _vm.rootClasses
124
+ }, [_vm.imageSrc ? _c('img', {
125
+ class: _vm.imageClasses,
126
+ attrs: {
127
+ "src": _vm.imageSrc,
128
+ "alt": ""
129
+ }
130
+ }) : _vm._e(), _vm._v(" "), _c('div', {
131
+ class: _vm.headingClasses
132
+ }, [_vm._v("\n " + _vm._s(_vm.heading) + "\n ")]), _vm._v(" "), _vm.$slots.default ? _c('div', {
133
+ class: _vm.slotClasses
134
+ }, [_vm._t("default")], 2) : _vm._e(), _vm._v(" "), _c('div', {
135
+ class: _vm.textClasses
136
+ }, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])]);
137
+ };
138
+ var __vue_staticRenderFns__ = [];
139
+
140
+ /* style */
141
+ const __vue_inject_styles__ = undefined;
142
+ /* scoped */
143
+ const __vue_scope_id__ = "data-v-4ca51b1c";
144
+ /* module identifier */
145
+ const __vue_module_identifier__ = undefined;
146
+ /* functional template */
147
+ const __vue_is_functional_template__ = false;
148
+ /* style inject */
149
+
150
+ /* style inject SSR */
151
+
152
+ /* style inject shadow dom */
153
+
154
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
155
+ render: __vue_render__,
156
+ staticRenderFns: __vue_staticRenderFns__
157
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
158
+
159
+ export { EmptyStateSize, __vue_component__ as OrEmptyStateV3 };
@@ -0,0 +1,4 @@
1
+ export declare enum EmptyStateSize {
2
+ L = "l",
3
+ M = "m"
4
+ }
@@ -0,0 +1,10 @@
1
+ import { EmptyStateSize } from './props';
2
+ export declare const EmptyStateRoot: string[];
3
+ export declare const EmptyStateImage: string[];
4
+ export declare const EmptyStateImageSizes: Record<EmptyStateSize, string[]>;
5
+ export declare const EmptyStateHeading: string[];
6
+ export declare const EmptyStateHeadingSizes: Record<EmptyStateSize, string[]>;
7
+ export declare const EmptyStateText: string[];
8
+ export declare const EmptyStateContent: string[];
9
+ export declare const EmptyStateTextSizes: Record<EmptyStateSize, string[]>;
10
+ export declare const EmptyStateContentSizes: Record<EmptyStateSize, string[]>;
@@ -0,0 +1,2 @@
1
+ import { LoaderVariant } from '../or-loader-v3';
2
+ export declare type EmptyStateLoader = boolean | LoaderVariant | undefined;
@@ -0,0 +1,24 @@
1
+ import { Meta, StoryFn } from '@storybook/vue3';
2
+ import OrEmptyState from './OrEmptyState.vue';
3
+ declare const _default: Meta<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, {
4
+ [x: string]: ((...args: any[]) => any) | null;
5
+ } | string[], {} & {}, {
6
+ [x: number]: string;
7
+ } | {}, true>)>;
8
+ export default _default;
9
+ export declare const Default: 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, {
10
+ [x: string]: ((...args: any[]) => any) | null;
11
+ } | string[], {} & {}, {
12
+ [x: number]: string;
13
+ } | {}, true>)>;
14
+ export declare const ImageIcon: 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, {
15
+ [x: string]: ((...args: any[]) => any) | null;
16
+ } | string[], {} & {}, {
17
+ [x: number]: string;
18
+ } | {}, true>)>;
19
+ export declare const LargeSize: 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, {
20
+ [x: string]: ((...args: any[]) => any) | null;
21
+ } | string[], {} & {}, {
22
+ [x: number]: string;
23
+ } | {}, true>)>;
24
+ export declare const ExtraContentInSlot: StoryFn<typeof OrEmptyState>;
@@ -0,0 +1,101 @@
1
+ import { PropType } from 'vue-demi';
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
+ }, {
10
+ /**
11
+ * Size of the component, affects font and icon size.
12
+ * Use Large if the component takes all screen space,
13
+ * and Medium if it is a part of the complex layout.
14
+ */
15
+ size: {
16
+ type: PropType<EmptyStateSize>;
17
+ default: EmptyStateSize;
18
+ };
19
+ /**
20
+ * The heading of the empty state block.
21
+ */
22
+ heading: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ /**
27
+ * Additional text such as a hint for a user with proposed next steps.
28
+ */
29
+ text: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ /**
34
+ * Path to the image to display above the heading.
35
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
36
+ */
37
+ imageSrc: {
38
+ type: StringConstructor;
39
+ default: undefined;
40
+ };
41
+ }, import("@vue/composition-api").ExtractPropTypes<{
42
+ /**
43
+ * Size of the component, affects font and icon size.
44
+ * Use Large if the component takes all screen space,
45
+ * and Medium if it is a part of the complex layout.
46
+ */
47
+ size: {
48
+ type: PropType<EmptyStateSize>;
49
+ default: EmptyStateSize;
50
+ };
51
+ /**
52
+ * The heading of the empty state block.
53
+ */
54
+ heading: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ /**
59
+ * Additional text such as a hint for a user with proposed next steps.
60
+ */
61
+ text: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ /**
66
+ * Path to the image to display above the heading.
67
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
68
+ */
69
+ imageSrc: {
70
+ type: StringConstructor;
71
+ default: undefined;
72
+ };
73
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
74
+ size: EmptyStateSize;
75
+ heading: string;
76
+ text: string;
77
+ 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
+ }, {}, {}, {}, {}, {
85
+ size: EmptyStateSize;
86
+ heading: string;
87
+ text: string;
88
+ imageSrc: string;
89
+ } & {}, {
90
+ size: EmptyStateSize;
91
+ heading: string;
92
+ text: string;
93
+ imageSrc: string;
94
+ }, true>);
95
+ /**
96
+ * The component to display when there is no content on a page,
97
+ * no records found or selected, or while the data is being loaded.
98
+ * Provides a hint to the user on what to do.
99
+ * Consists of text message, optional icon and optional loader.
100
+ */
101
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as OrEmptyStateV3 } from './OrEmptyState.vue';
2
+ export * from './types';
3
+ export * from './props';
@@ -0,0 +1,135 @@
1
+ import { defineComponent } from 'vue-demi';
2
+ import { openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from 'vue';
3
+
4
+ var EmptyStateSize;
5
+ (function (EmptyStateSize) {
6
+ EmptyStateSize["L"] = "l";
7
+ EmptyStateSize["M"] = "m";
8
+ })(EmptyStateSize || (EmptyStateSize = {}));
9
+
10
+ const EmptyStateRoot = [
11
+ // Layout
12
+ 'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
13
+ // Box
14
+ 'w-full',
15
+ // Sizing
16
+ 'gap-sm'];
17
+ const EmptyStateImage = [
18
+ // Sizing
19
+ 'mb-sm'];
20
+ const EmptyStateImageSizes = {
21
+ [EmptyStateSize.L]: [
22
+ // Box
23
+ 'h-3xl'],
24
+ [EmptyStateSize.M]: [
25
+ // Box
26
+ 'h-2xl']
27
+ };
28
+ const EmptyStateHeading = [
29
+ // Theme
30
+ 'text-on-background', 'dark:text-on-background-dark'];
31
+ const EmptyStateHeadingSizes = {
32
+ [EmptyStateSize.L]: [
33
+ // Typography
34
+ 'text-headline-2', 'font-headline-2'],
35
+ [EmptyStateSize.M]: [
36
+ // Typography
37
+ 'text-headline-4', 'font-headline-4']
38
+ };
39
+ const EmptyStateText = ['text-center',
40
+ // Theme
41
+ 'text-outline', 'dark:text-outline-dark'];
42
+ const EmptyStateContent = EmptyStateText;
43
+ const EmptyStateTextSizes = {
44
+ [EmptyStateSize.L]: [
45
+ // Typography
46
+ 'text-body-2-regular', 'font-body-2-regular'],
47
+ [EmptyStateSize.M]: [
48
+ // Typography
49
+ 'text-caption-regular', 'font-caption-regular']
50
+ };
51
+ const EmptyStateContentSizes = EmptyStateTextSizes;
52
+
53
+ /**
54
+ * The component to display when there is no content on a page,
55
+ * no records found or selected, or while the data is being loaded.
56
+ * Provides a hint to the user on what to do.
57
+ * Consists of text message, optional icon and optional loader.
58
+ */
59
+ var script = defineComponent({
60
+ name: 'OrEmptyState',
61
+ props: {
62
+ /**
63
+ * Size of the component, affects font and icon size.
64
+ * Use Large if the component takes all screen space,
65
+ * and Medium if it is a part of the complex layout.
66
+ */
67
+ size: {
68
+ type: String,
69
+ default: EmptyStateSize.M
70
+ },
71
+ /**
72
+ * The heading of the empty state block.
73
+ */
74
+ heading: {
75
+ type: String,
76
+ default: ''
77
+ },
78
+ /**
79
+ * Additional text such as a hint for a user with proposed next steps.
80
+ */
81
+ text: {
82
+ type: String,
83
+ default: ''
84
+ },
85
+ /**
86
+ * Path to the image to display above the heading.
87
+ * Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
88
+ */
89
+ imageSrc: {
90
+ type: String,
91
+ default: undefined
92
+ }
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
+ }
110
+ }
111
+ });
112
+
113
+ const _hoisted_1 = ["src"];
114
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
115
+ return openBlock(), createElementBlock("div", {
116
+ class: normalizeClass(["static", _ctx.rootClasses])
117
+ }, [_ctx.imageSrc ? (openBlock(), createElementBlock("img", {
118
+ key: 0,
119
+ src: _ctx.imageSrc,
120
+ class: normalizeClass(_ctx.imageClasses),
121
+ alt: ""
122
+ }, null, 10 /* CLASS, PROPS */, _hoisted_1)) : createCommentVNode("v-if", true), createElementVNode("div", {
123
+ class: normalizeClass(_ctx.headingClasses)
124
+ }, toDisplayString(_ctx.heading), 3 /* TEXT, CLASS */), _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
125
+ key: 1,
126
+ class: normalizeClass(_ctx.slotClasses)
127
+ }, [createCommentVNode(" @slot Additional content can be inserted via default slot. The slot uses the same font as a `text` prop. "), renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)) : createCommentVNode("v-if", true), createElementVNode("div", {
128
+ class: normalizeClass(_ctx.textClasses)
129
+ }, toDisplayString(_ctx.text), 3 /* TEXT, CLASS */)], 2 /* CLASS */);
130
+ }
131
+
132
+ script.render = render;
133
+ script.__file = "src/components/or-empty-state-v3/OrEmptyState.vue";
134
+
135
+ export { EmptyStateSize, script as OrEmptyStateV3 };
@@ -0,0 +1,4 @@
1
+ export declare enum EmptyStateSize {
2
+ L = "l",
3
+ M = "m"
4
+ }
@@ -0,0 +1,10 @@
1
+ import { EmptyStateSize } from './props';
2
+ export declare const EmptyStateRoot: string[];
3
+ export declare const EmptyStateImage: string[];
4
+ export declare const EmptyStateImageSizes: Record<EmptyStateSize, string[]>;
5
+ export declare const EmptyStateHeading: string[];
6
+ export declare const EmptyStateHeadingSizes: Record<EmptyStateSize, string[]>;
7
+ export declare const EmptyStateText: string[];
8
+ export declare const EmptyStateContent: string[];
9
+ export declare const EmptyStateTextSizes: Record<EmptyStateSize, string[]>;
10
+ export declare const EmptyStateContentSizes: Record<EmptyStateSize, string[]>;
@@ -0,0 +1,2 @@
1
+ import { LoaderVariant } from '../or-loader-v3';
2
+ export declare type EmptyStateLoader = boolean | LoaderVariant | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.68.1",
3
+ "version": "2.69.0-beta.2073.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -123,6 +123,5 @@
123
123
  "default": "./dist/bundled/v3/components/*/index.js"
124
124
  },
125
125
  "./package.json": "./package.json"
126
- },
127
- "gitHead": "55398360b64c548aaca507b97933932bff0475da"
126
+ }
128
127
  }