@onereach/ui-components 2.68.2 → 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.
- package/dist/bundled/v2/{OrCardCollection-a9a779ea.js → OrCardCollection-dac9fd1e.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-18c534df.js → OrConfirm-ff57274f.js} +1 -1
- package/dist/bundled/v2/{OrInput-8b90e08f.js → OrInput-4b82eb59.js} +4 -4
- package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-e34afaee.js} +1 -1
- package/dist/bundled/v2/{OrSelect-759b4410.js → OrSelect-a2dbc872.js} +2 -2
- package/dist/bundled/v2/components/index.js +5 -5
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- 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 +103 -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 +161 -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/components/or-input-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v2/index.js +6 -6
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-3993a015.js → OrCardCollection.vue_vue_type_script_lang-7a07be47.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-2e7fa659.js} +1 -1
- package/dist/bundled/v3/{OrInput-fa782fc1.js → OrInput-e97211bb.js} +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-1d2a20e0.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-dfadd12f.js → OrSelect.vue_vue_type_script_lang-619d6eb7.js} +1 -1
- package/dist/bundled/v3/components/index.js +5 -5
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -2
- 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 +103 -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/components/or-search-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v3/index.js +11 -11
- package/dist/esm/v2/{OrCardCollection-4f001551.js → OrCardCollection-e46b220e.js} +1 -1
- package/dist/esm/v2/{OrConfirm-b0b2e43c.js → OrConfirm-74e21c56.js} +1 -1
- package/dist/esm/v2/{OrInput-2f16a7ac.js → OrInput-b8a1627f.js} +4 -4
- package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-0c0d1773.js} +1 -1
- package/dist/esm/v2/{OrSelect-ac382aa6.js → OrSelect-acc13b49.js} +2 -2
- package/dist/esm/v2/components/index.js +5 -5
- package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- 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 +103 -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 +158 -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/v2/components/or-input-v3/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +2 -2
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/index.js +5 -5
- package/dist/esm/v3/{OrCardCollection-5a0febaf.js → OrCardCollection-5924d035.js} +1 -1
- package/dist/esm/v3/{OrConfirm-906427ef.js → OrConfirm-a3f312a6.js} +1 -1
- package/dist/esm/v3/{OrInput-41691fb3.js → OrInput-e2ac1182.js} +1 -1
- package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-01225d82.js} +1 -1
- package/dist/esm/v3/{OrSelect-fee9c099.js → OrSelect-fbf4a140.js} +2 -2
- package/dist/esm/v3/components/index.js +5 -5
- package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- 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 +103 -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/dist/esm/v3/components/or-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/index.js +5 -5
- 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 +116 -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 +72 -0
- package/src/components/or-empty-state-v3/types.ts +3 -0
- package/src/components/or-input-v3/OrInput.vue +1 -1
- package/src/components/or-select-v3/OrSelect.vue +1 -1
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from '../OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-5924d035.js';
|
|
10
10
|
export { s as OrCardV3 } from '../OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from '../OrCheckbox-ed4a19cf.js';
|
|
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from '../OrCode-ee19a5e6.js';
|
|
|
16
16
|
export { s as OrCollapse } from '../OrCollapse-445141ab.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-189cb097.js';
|
|
18
18
|
export { s as OrConfirm } from '../OrConfirm-f39bd784.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-a3f312a6.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-f2e08564.js';
|
|
21
21
|
export { s as OrError } from '../OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from '../OrErrorTag-98252eef.js';
|
|
@@ -34,7 +34,7 @@ export { I as InlineInputType, s as OrInlineInputV3 } from '../OrInlineInput-310
|
|
|
34
34
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from '../OrInlineTextEdit-1aa477b5.js';
|
|
35
35
|
export { s as OrInlineTextareaV3 } from '../OrInlineTextarea-b28c3d8c.js';
|
|
36
36
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from '../OrInputBox-5247ab25.js';
|
|
37
|
-
export { I as InputType, s as OrInputV3 } from '../OrInput-
|
|
37
|
+
export { I as InputType, s as OrInputV3 } from '../OrInput-e2ac1182.js';
|
|
38
38
|
export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from '../OrSearch-7cb2c91c.js';
|
|
39
39
|
export { s as OrLabel } from '../OrLabel-876f8729.js';
|
|
40
40
|
export { L as LabelVariant, s as OrLabelV3 } from '../OrLabel-bdaec602.js';
|
|
@@ -58,10 +58,10 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
58
58
|
export { s as OrRadio } from '../OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from '../OrRadio-54b6d0de.js';
|
|
61
|
-
export { s as OrSearchV3 } from '../OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from '../OrSearch-01225d82.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from '../OrSelect-0821b907.js';
|
|
64
|
-
export { s as OrSelectV3 } from '../OrSelect-
|
|
64
|
+
export { s as OrSelectV3 } from '../OrSelect-fbf4a140.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-375c85a3.js';
|
|
66
66
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from '../OrSidebar-a62972f5.js';
|
|
67
67
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText-2b1610ce.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-5924d035.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
@@ -14,7 +14,7 @@ import '../../useResponsive-a02e95b7.js';
|
|
|
14
14
|
import '../../OrBottomSheet-62817aec.js';
|
|
15
15
|
import '../../OrOverlay-738a44d5.js';
|
|
16
16
|
import '../../OrTeleport.vue3-8099178c.js';
|
|
17
|
-
import '../../OrInput-
|
|
17
|
+
import '../../OrInput-e2ac1182.js';
|
|
18
18
|
import '../../OrError-ec8c709d.js';
|
|
19
19
|
import '../../OrHint-74bb732d.js';
|
|
20
20
|
import '../../OrInputBox-5247ab25.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-
|
|
1
|
+
export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-a3f312a6.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../OrButton-f4b9ee51.js';
|
|
4
4
|
import '../../useClassAttribute-47fdb016.js';
|
|
@@ -8,7 +8,7 @@ import 'vue';
|
|
|
8
8
|
import '../../OrOverlay-738a44d5.js';
|
|
9
9
|
import '../../useElevation-31bfe1f6.js';
|
|
10
10
|
import '../../OrTeleport.vue3-8099178c.js';
|
|
11
|
-
import '../../OrInput-
|
|
11
|
+
import '../../OrInput-e2ac1182.js';
|
|
12
12
|
import '../../OrError-ec8c709d.js';
|
|
13
13
|
import '../../OrHint-74bb732d.js';
|
|
14
14
|
import '../../OrIconButton-1eebcafc.js';
|
|
@@ -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,103 @@
|
|
|
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<{
|
|
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, {}, {}, {
|
|
11
|
+
/**
|
|
12
|
+
* Size of the component, affects font and icon size.
|
|
13
|
+
* Use Large if the component takes all screen space,
|
|
14
|
+
* and Medium if it is a part of the complex layout.
|
|
15
|
+
*/
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<EmptyStateSize>;
|
|
18
|
+
default: EmptyStateSize;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The heading of the empty state block.
|
|
22
|
+
*/
|
|
23
|
+
heading: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
29
|
+
*/
|
|
30
|
+
text: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Path to the image to display above the heading.
|
|
36
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
37
|
+
*/
|
|
38
|
+
imageSrc: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
43
|
+
/**
|
|
44
|
+
* Size of the component, affects font and icon size.
|
|
45
|
+
* Use Large if the component takes all screen space,
|
|
46
|
+
* and Medium if it is a part of the complex layout.
|
|
47
|
+
*/
|
|
48
|
+
size: {
|
|
49
|
+
type: PropType<EmptyStateSize>;
|
|
50
|
+
default: EmptyStateSize;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The heading of the empty state block.
|
|
54
|
+
*/
|
|
55
|
+
heading: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
61
|
+
*/
|
|
62
|
+
text: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Path to the image to display above the heading.
|
|
68
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
69
|
+
*/
|
|
70
|
+
imageSrc: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
75
|
+
size: EmptyStateSize;
|
|
76
|
+
heading: string;
|
|
77
|
+
text: string;
|
|
78
|
+
imageSrc: string;
|
|
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, {}, {}, {}, {}, {}, {
|
|
87
|
+
size: EmptyStateSize;
|
|
88
|
+
heading: string;
|
|
89
|
+
text: string;
|
|
90
|
+
imageSrc: string;
|
|
91
|
+
} & {}, {
|
|
92
|
+
size: EmptyStateSize;
|
|
93
|
+
heading: string;
|
|
94
|
+
text: string;
|
|
95
|
+
imageSrc: string;
|
|
96
|
+
}, true>);
|
|
97
|
+
/**
|
|
98
|
+
* The component to display when there is no content on a page,
|
|
99
|
+
* no records found or selected, or while the data is being loaded.
|
|
100
|
+
* Provides a hint to the user on what to do.
|
|
101
|
+
* Consists of text message, optional icon and optional loader.
|
|
102
|
+
*/
|
|
103
|
+
export default _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { defineComponent, ref, computed } 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
|
+
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
31
|
+
const EmptyStateHeadingSizes = {
|
|
32
|
+
[EmptyStateSize.L]: [
|
|
33
|
+
// Typography
|
|
34
|
+
'typography-headline-2'],
|
|
35
|
+
[EmptyStateSize.M]: [
|
|
36
|
+
// Typography
|
|
37
|
+
'typography-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
|
+
'typography-body-2-regular'],
|
|
47
|
+
[EmptyStateSize.M]: [
|
|
48
|
+
// Typography
|
|
49
|
+
'typography-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
|
+
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
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const _hoisted_1 = ["src"];
|
|
113
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
114
|
+
return openBlock(), createElementBlock("div", {
|
|
115
|
+
ref: "root",
|
|
116
|
+
class: normalizeClass(_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,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[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as InputType, s as OrInputV3 } from '../../OrInput-
|
|
1
|
+
export { I as InputType, s as OrInputV3 } from '../../OrInput-e2ac1182.js';
|
|
2
2
|
export { a as InputSize } from '../../OrInputBox-5247ab25.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../useClassAttribute-47fdb016.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { s as OrSearchV3 } from '../../OrSearch-
|
|
1
|
+
export { s as OrSearchV3 } from '../../OrSearch-01225d82.js';
|
|
2
2
|
export { a as SearchSize } from '../../OrInputBox-5247ab25.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '@vueuse/core';
|
|
5
5
|
import '../../useClassAttribute-47fdb016.js';
|
|
6
|
-
import '../../OrInput-
|
|
6
|
+
import '../../OrInput-e2ac1182.js';
|
|
7
7
|
import '../../OrError-ec8c709d.js';
|
|
8
8
|
import 'vue';
|
|
9
9
|
import '../../OrHint-74bb732d.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { s as OrSelectV3 } from '../../OrSelect-fbf4a140.js';
|
|
2
2
|
export { a as SelectSize } from '../../OrInputBox-5247ab25.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-0d314aa4.js';
|
|
@@ -13,7 +13,7 @@ import '../../OrError-ec8c709d.js';
|
|
|
13
13
|
import '../../OrExpansionPanel-311e64cf.js';
|
|
14
14
|
import '../../OrIcon-b195169c.js';
|
|
15
15
|
import '../../OrHint-74bb732d.js';
|
|
16
|
-
import '../../OrInput-
|
|
16
|
+
import '../../OrInput-e2ac1182.js';
|
|
17
17
|
import '../../OrIconButton-1eebcafc.js';
|
|
18
18
|
import '../../OrTooltip-50d27b4f.js';
|
|
19
19
|
import '../../OrPopover-1075dd38.js';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-5924d035.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from './OrCode-ee19a5e6.js';
|
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-189cb097.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-f39bd784.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-a3f312a6.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-f2e08564.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-98252eef.js';
|
|
@@ -34,7 +34,7 @@ export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-3102
|
|
|
34
34
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-1aa477b5.js';
|
|
35
35
|
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-b28c3d8c.js';
|
|
36
36
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-5247ab25.js';
|
|
37
|
-
export { I as InputType, s as OrInputV3 } from './OrInput-
|
|
37
|
+
export { I as InputType, s as OrInputV3 } from './OrInput-e2ac1182.js';
|
|
38
38
|
export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from './OrSearch-7cb2c91c.js';
|
|
39
39
|
export { s as OrLabel } from './OrLabel-876f8729.js';
|
|
40
40
|
export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-bdaec602.js';
|
|
@@ -58,10 +58,10 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
58
58
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from './OrRadio-54b6d0de.js';
|
|
61
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from './OrSearch-01225d82.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
64
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
64
|
+
export { s as OrSelectV3 } from './OrSelect-fbf4a140.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
66
66
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
|
|
67
67
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.
|
|
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",
|
|
@@ -123,6 +123,5 @@
|
|
|
123
123
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
124
124
|
},
|
|
125
125
|
"./package.json": "./package.json"
|
|
126
|
-
}
|
|
127
|
-
"gitHead": "f819664340b4cd8510306ebeec73d4a6c5e1ca01"
|
|
126
|
+
}
|
|
128
127
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import OrEmptyState from './OrEmptyState.vue';
|
|
3
|
+
import successPng from '../../assets/success.png';
|
|
4
|
+
import { EmptyStateSize } from './props';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/Empty State',
|
|
8
|
+
component: OrEmptyState,
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: {
|
|
12
|
+
type: 'inline-radio',
|
|
13
|
+
labels: {
|
|
14
|
+
[EmptyStateSize.M]: 'Medium',
|
|
15
|
+
[EmptyStateSize.L]: 'Large',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
options: Object.values(EmptyStateSize),
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: 'centered',
|
|
23
|
+
},
|
|
24
|
+
} as Meta<typeof OrEmptyState>
|
|
25
|
+
|
|
26
|
+
const Template: StoryFn<typeof OrEmptyState> = (args) => ({
|
|
27
|
+
components: { OrEmptyState },
|
|
28
|
+
setup() {
|
|
29
|
+
return { args };
|
|
30
|
+
},
|
|
31
|
+
template: `
|
|
32
|
+
<OrEmptyState v-bind="args"/>
|
|
33
|
+
`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const Default = Template.bind({});
|
|
37
|
+
Default.args = {
|
|
38
|
+
heading: 'No aliens detected',
|
|
39
|
+
text: 'Invite some aliens to your planet.'
|
|
40
|
+
};
|
|
41
|
+
Default.parameters = {
|
|
42
|
+
layout: 'fullscreen',
|
|
43
|
+
};
|
|
44
|
+
Default.decorators = [
|
|
45
|
+
() => ({
|
|
46
|
+
template: `
|
|
47
|
+
<div class="
|
|
48
|
+
demo-wrapper w-full min-h-[200px] h-screen box-border relative
|
|
49
|
+
gap-sm p-md bg-surface-variant
|
|
50
|
+
flex flex-col
|
|
51
|
+
text-body-2-regular">
|
|
52
|
+
<div>
|
|
53
|
+
Note: This frame is added for demo purpose.<br>
|
|
54
|
+
The OrEmptyState component is transparent and has <code>width:100%</code> and <code>flex-grow:1</code> attributes.<br>
|
|
55
|
+
It is recommended to put it inside a column flex container or a row flex container that wraps.
|
|
56
|
+
</div>
|
|
57
|
+
<div class="demo-container grow bg-background dark:bg-background-dark flex flex-col"><story /></div>
|
|
58
|
+
</div>
|
|
59
|
+
`
|
|
60
|
+
})
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export const ImageIcon = Template.bind({});
|
|
64
|
+
ImageIcon.args = {
|
|
65
|
+
heading: 'Planet populated',
|
|
66
|
+
text: 'So many aliens on this planet!',
|
|
67
|
+
imageSrc: successPng,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const LargeSize = Template.bind({});
|
|
71
|
+
LargeSize.args = {
|
|
72
|
+
...ImageIcon.args,
|
|
73
|
+
size: EmptyStateSize.L,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const ExtraContentInSlot: StoryFn<typeof OrEmptyState> = (args) => ({
|
|
77
|
+
components: { OrEmptyState },
|
|
78
|
+
setup() {
|
|
79
|
+
return { args };
|
|
80
|
+
},
|
|
81
|
+
template: `
|
|
82
|
+
<OrEmptyState v-bind="args" heading="Alien not found" text="Pass formatted content via a default slot.">
|
|
83
|
+
Alien named <b>Garry</b> not found.<br>
|
|
84
|
+
The text in the slot is by default formatted as a component's text prop.
|
|
85
|
+
</OrEmptyState>
|
|
86
|
+
`,
|
|
87
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="rootClasses">
|
|
5
|
+
<img v-if="imageSrc"
|
|
6
|
+
:src="imageSrc"
|
|
7
|
+
:class="imageClasses"
|
|
8
|
+
alt="">
|
|
9
|
+
<div :class="headingClasses">
|
|
10
|
+
{{ heading }}
|
|
11
|
+
</div>
|
|
12
|
+
<div v-if="$slots.default" :class="slotClasses">
|
|
13
|
+
<!-- @slot Additional content can be inserted via default slot. The slot uses the same font as a `text` prop. -->
|
|
14
|
+
<slot/>
|
|
15
|
+
</div>
|
|
16
|
+
<div :class="textClasses">
|
|
17
|
+
{{ text }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
24
|
+
import { EmptyStateSize } from '.';
|
|
25
|
+
import {
|
|
26
|
+
EmptyStateContent,
|
|
27
|
+
EmptyStateContentSizes,
|
|
28
|
+
EmptyStateHeading,
|
|
29
|
+
EmptyStateHeadingSizes,
|
|
30
|
+
EmptyStateImage,
|
|
31
|
+
EmptyStateImageSizes,
|
|
32
|
+
EmptyStateRoot,
|
|
33
|
+
EmptyStateText,
|
|
34
|
+
EmptyStateTextSizes
|
|
35
|
+
} from './styles';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The component to display when there is no content on a page,
|
|
39
|
+
* no records found or selected, or while the data is being loaded.
|
|
40
|
+
* Provides a hint to the user on what to do.
|
|
41
|
+
* Consists of text message, optional icon and optional loader.
|
|
42
|
+
*/
|
|
43
|
+
export default defineComponent({
|
|
44
|
+
name: 'OrEmptyState',
|
|
45
|
+
props: {
|
|
46
|
+
/**
|
|
47
|
+
* Size of the component, affects font and icon size.
|
|
48
|
+
* Use Large if the component takes all screen space,
|
|
49
|
+
* and Medium if it is a part of the complex layout.
|
|
50
|
+
*/
|
|
51
|
+
size: {
|
|
52
|
+
type: String as PropType<EmptyStateSize>,
|
|
53
|
+
default: EmptyStateSize.M,
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* The heading of the empty state block.
|
|
57
|
+
*/
|
|
58
|
+
heading: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
64
|
+
*/
|
|
65
|
+
text: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Path to the image to display above the heading.
|
|
71
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
72
|
+
*/
|
|
73
|
+
imageSrc: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: undefined,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
setup(props) {
|
|
79
|
+
const root = ref<HTMLElement>();
|
|
80
|
+
|
|
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
|
+
]);
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
root,
|
|
108
|
+
rootClasses,
|
|
109
|
+
imageClasses,
|
|
110
|
+
headingClasses,
|
|
111
|
+
textClasses,
|
|
112
|
+
slotClasses,
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
</script>
|