@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.
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
- package/dist/bundled/v2/components/or-empty-state-v3/index.d.ts +3 -0
- package/dist/bundled/v2/components/or-empty-state-v3/index.js +162 -0
- package/dist/bundled/v2/components/or-empty-state-v3/props.d.ts +4 -0
- package/dist/bundled/v2/components/or-empty-state-v3/styles.d.ts +10 -0
- package/dist/bundled/v2/components/or-empty-state-v3/types.d.ts +2 -0
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
- package/dist/bundled/v3/components/or-empty-state-v3/index.d.ts +3 -0
- package/dist/bundled/v3/components/or-empty-state-v3/index.js +134 -0
- package/dist/bundled/v3/components/or-empty-state-v3/props.d.ts +4 -0
- package/dist/bundled/v3/components/or-empty-state-v3/styles.d.ts +10 -0
- package/dist/bundled/v3/components/or-empty-state-v3/types.d.ts +2 -0
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
- package/dist/esm/v2/components/or-empty-state-v3/index.d.ts +3 -0
- package/dist/esm/v2/components/or-empty-state-v3/index.js +159 -0
- package/dist/esm/v2/components/or-empty-state-v3/props.d.ts +4 -0
- package/dist/esm/v2/components/or-empty-state-v3/styles.d.ts +10 -0
- package/dist/esm/v2/components/or-empty-state-v3/types.d.ts +2 -0
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +24 -0
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +101 -0
- package/dist/esm/v3/components/or-empty-state-v3/index.d.ts +3 -0
- package/dist/esm/v3/components/or-empty-state-v3/index.js +135 -0
- package/dist/esm/v3/components/or-empty-state-v3/props.d.ts +4 -0
- package/dist/esm/v3/components/or-empty-state-v3/styles.d.ts +10 -0
- package/dist/esm/v3/components/or-empty-state-v3/types.d.ts +2 -0
- package/package.json +2 -3
- package/src/components/or-empty-state-v3/OrEmptyState.stories3.ts +87 -0
- package/src/components/or-empty-state-v3/OrEmptyState.vue +121 -0
- package/src/components/or-empty-state-v3/index.ts +3 -0
- package/src/components/or-empty-state-v3/props.ts +4 -0
- package/src/components/or-empty-state-v3/styles.ts +76 -0
- 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,134 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from 'vue';
|
|
2
|
+
|
|
3
|
+
var EmptyStateSize;
|
|
4
|
+
(function (EmptyStateSize) {
|
|
5
|
+
EmptyStateSize["L"] = "l";
|
|
6
|
+
EmptyStateSize["M"] = "m";
|
|
7
|
+
})(EmptyStateSize || (EmptyStateSize = {}));
|
|
8
|
+
|
|
9
|
+
const EmptyStateRoot = [
|
|
10
|
+
// Layout
|
|
11
|
+
'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
|
|
12
|
+
// Box
|
|
13
|
+
'w-full',
|
|
14
|
+
// Sizing
|
|
15
|
+
'gap-sm'];
|
|
16
|
+
const EmptyStateImage = [
|
|
17
|
+
// Sizing
|
|
18
|
+
'mb-sm'];
|
|
19
|
+
const EmptyStateImageSizes = {
|
|
20
|
+
[EmptyStateSize.L]: [
|
|
21
|
+
// Box
|
|
22
|
+
'h-3xl'],
|
|
23
|
+
[EmptyStateSize.M]: [
|
|
24
|
+
// Box
|
|
25
|
+
'h-2xl']
|
|
26
|
+
};
|
|
27
|
+
const EmptyStateHeading = [
|
|
28
|
+
// Theme
|
|
29
|
+
'text-on-background', 'dark:text-on-background-dark'];
|
|
30
|
+
const EmptyStateHeadingSizes = {
|
|
31
|
+
[EmptyStateSize.L]: [
|
|
32
|
+
// Typography
|
|
33
|
+
'text-headline-2', 'font-headline-2'],
|
|
34
|
+
[EmptyStateSize.M]: [
|
|
35
|
+
// Typography
|
|
36
|
+
'text-headline-4', 'font-headline-4']
|
|
37
|
+
};
|
|
38
|
+
const EmptyStateText = ['text-center',
|
|
39
|
+
// Theme
|
|
40
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
41
|
+
const EmptyStateContent = EmptyStateText;
|
|
42
|
+
const EmptyStateTextSizes = {
|
|
43
|
+
[EmptyStateSize.L]: [
|
|
44
|
+
// Typography
|
|
45
|
+
'text-body-2-regular', 'font-body-2-regular'],
|
|
46
|
+
[EmptyStateSize.M]: [
|
|
47
|
+
// Typography
|
|
48
|
+
'text-caption-regular', 'font-caption-regular']
|
|
49
|
+
};
|
|
50
|
+
const EmptyStateContentSizes = EmptyStateTextSizes;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The component to display when there is no content on a page,
|
|
54
|
+
* no records found or selected, or while the data is being loaded.
|
|
55
|
+
* Provides a hint to the user on what to do.
|
|
56
|
+
* Consists of text message, optional icon and optional loader.
|
|
57
|
+
*/
|
|
58
|
+
var script = defineComponent({
|
|
59
|
+
name: 'OrEmptyState',
|
|
60
|
+
props: {
|
|
61
|
+
/**
|
|
62
|
+
* Size of the component, affects font and icon size.
|
|
63
|
+
* Use Large if the component takes all screen space,
|
|
64
|
+
* and Medium if it is a part of the complex layout.
|
|
65
|
+
*/
|
|
66
|
+
size: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: EmptyStateSize.M
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* The heading of the empty state block.
|
|
72
|
+
*/
|
|
73
|
+
heading: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: ''
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
79
|
+
*/
|
|
80
|
+
text: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: ''
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Path to the image to display above the heading.
|
|
86
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
87
|
+
*/
|
|
88
|
+
imageSrc: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: undefined
|
|
91
|
+
}
|
|
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
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const _hoisted_1 = ["src"];
|
|
113
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
114
|
+
return openBlock(), createElementBlock("div", {
|
|
115
|
+
class: normalizeClass(["static", _ctx.rootClasses])
|
|
116
|
+
}, [_ctx.imageSrc ? (openBlock(), createElementBlock("img", {
|
|
117
|
+
key: 0,
|
|
118
|
+
src: _ctx.imageSrc,
|
|
119
|
+
class: normalizeClass(_ctx.imageClasses),
|
|
120
|
+
alt: ""
|
|
121
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_1)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
122
|
+
class: normalizeClass(_ctx.headingClasses)
|
|
123
|
+
}, toDisplayString(_ctx.heading), 3 /* TEXT, CLASS */), _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
124
|
+
key: 1,
|
|
125
|
+
class: normalizeClass(_ctx.slotClasses)
|
|
126
|
+
}, [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", {
|
|
127
|
+
class: normalizeClass(_ctx.textClasses)
|
|
128
|
+
}, toDisplayString(_ctx.text), 3 /* TEXT, CLASS */)], 2 /* CLASS */);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
script.render = render;
|
|
132
|
+
script.__file = "src/components/or-empty-state-v3/OrEmptyState.vue";
|
|
133
|
+
|
|
134
|
+
export { EmptyStateSize, script as OrEmptyStateV3 };
|
|
@@ -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[]>;
|