@onereach/ui-components 2.71.1-beta.2223.0 → 2.71.1-beta.2227.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-0141a358.js → OrCardCollection-f6c1318a.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-057e997e.js → OrConfirm-371a99bf.js} +1 -1
- package/dist/bundled/v2/{OrInput-82ccfe00.js → OrInput-b0cdd2ae.js} +23 -6
- package/dist/bundled/v2/{OrSearch-53470b0e.js → OrSearch-fe562cfd.js} +1 -1
- package/dist/bundled/v2/{OrSelect-02fb39f0.js → OrSelect-0c169a4f.js} +1 -1
- package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
- package/dist/bundled/v2/components/index.js +7 -7
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/bundled/v2/components/or-input-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +3 -2
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -2
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/bundled/v2/components/or-sidebar-v3/index.js +1 -13
- package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +1 -9
- package/dist/bundled/v2/index.js +7 -7
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-2d78a51a.js → OrCardCollection.vue_vue_type_script_lang-1fa9e6ce.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9d9a3917.js → OrConfirm.vue_vue_type_script_lang-5eef57a2.js} +2 -2
- package/dist/bundled/v3/{OrInput-a4f220ed.js → OrInput-04b89444.js} +13 -4
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-607d79d4.js → OrInput.vue_vue_type_script_lang-caab1e89.js} +13 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-06f318ca.js → OrSearch.vue_vue_type_script_lang-10ff525e.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-83f15704.js → OrSelect.vue_vue_type_script_lang-4fad2bfb.js} +2 -2
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
- package/dist/bundled/v3/components/index.js +8 -8
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -3
- package/dist/bundled/v3/components/or-select-v3/index.js +5 -3
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
- package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -9
- package/dist/bundled/v3/index.js +18 -34
- package/dist/esm/v2/{OrCardCollection-3c38fc85.js → OrCardCollection-e08a4637.js} +1 -1
- package/dist/esm/v2/{OrConfirm-047d4086.js → OrConfirm-43f97635.js} +1 -1
- package/dist/esm/v2/{OrInput-ada3a970.js → OrInput-5e46af9a.js} +23 -6
- package/dist/esm/v2/{OrSearch-0f08f2f5.js → OrSearch-84143c15.js} +1 -1
- package/dist/esm/v2/{OrSelect-f8837f5d.js → OrSelect-5a2ff296.js} +1 -1
- package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
- package/dist/esm/v2/components/index.js +7 -7
- package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/esm/v2/components/or-input-v3/index.js +3 -2
- package/dist/esm/v2/components/or-search-v3/index.js +4 -3
- package/dist/esm/v2/components/or-select-v3/index.js +4 -3
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
- package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -9
- package/dist/esm/v2/index.js +6 -6
- package/dist/esm/v3/{OrCardCollection-dbb3e839.js → OrCardCollection-6912f897.js} +1 -1
- package/dist/esm/v3/{OrConfirm-fee3c859.js → OrConfirm-d1c05034.js} +1 -1
- package/dist/esm/v3/{OrInput-9c0426b9.js → OrInput-a2c4cfb5.js} +24 -4
- package/dist/esm/v3/{OrSearch-9885d178.js → OrSearch-dbb07738.js} +1 -1
- package/dist/esm/v3/{OrSelect-8fbd88bc.js → OrSelect-511acc24.js} +1 -1
- package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
- package/dist/esm/v3/components/index.js +7 -7
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/esm/v3/components/or-input-v3/index.js +3 -2
- package/dist/esm/v3/components/or-search-v3/index.js +4 -3
- package/dist/esm/v3/components/or-select-v3/index.js +4 -3
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
- package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -9
- package/dist/esm/v3/index.js +6 -6
- package/package.json +1 -1
- package/src/components/or-input-v3/OrInput.stories3.ts +4 -0
- package/src/components/or-input-v3/OrInput.vue +36 -16
- package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +12 -253
- package/src/components/or-sidebar-v3/OrSidebar.vue +23 -130
- package/src/components/or-sidebar-v3/styles.ts +9 -164
- package/dist/bundled/v2/OrSidebar-eedd2d6e.js +0 -464
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-6dc222bd.js +0 -356
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
- package/dist/esm/v2/OrSidebar-e43a6e55.js +0 -461
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
- package/dist/esm/v3/OrSidebar-2abaf7d6.js +0 -396
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
- package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
- package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -74
|
@@ -10,17 +10,7 @@ export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue
|
|
|
10
10
|
} | string[], {} & {}, {
|
|
11
11
|
[x: number]: string;
|
|
12
12
|
} | {}, true>)>;
|
|
13
|
-
export declare const
|
|
14
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
15
|
-
} | string[], {} & {}, {
|
|
16
|
-
[x: number]: string;
|
|
17
|
-
} | {}, true>)>;
|
|
18
|
-
export declare const NotDraggable: 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, {
|
|
19
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
20
|
-
} | string[], {} & {}, {
|
|
21
|
-
[x: number]: string;
|
|
22
|
-
} | {}, true>)>;
|
|
23
|
-
export declare const Collapsible: 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, {
|
|
13
|
+
export declare const WithMinimumWidth: 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, {
|
|
24
14
|
[x: string]: ((...args: any[]) => any) | null;
|
|
25
15
|
} | string[], {} & {}, {
|
|
26
16
|
[x: number]: string;
|
|
@@ -40,33 +30,8 @@ export declare const WithFooter: StoryFn<import("vue").ComponentOptions<import("
|
|
|
40
30
|
} | string[], {} & {}, {
|
|
41
31
|
[x: number]: string;
|
|
42
32
|
} | {}, true>)>;
|
|
43
|
-
export declare const WithToolbar: 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, {
|
|
44
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
45
|
-
} | string[], {} & {}, {
|
|
46
|
-
[x: number]: string;
|
|
47
|
-
} | {}, true>)>;
|
|
48
|
-
export declare const CollapsibleWithToolbar: 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, {
|
|
49
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
50
|
-
} | string[], {} & {}, {
|
|
51
|
-
[x: number]: string;
|
|
52
|
-
} | {}, true>)>;
|
|
53
|
-
export declare const WithTabs: 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, {
|
|
54
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
55
|
-
} | string[], {} & {}, {
|
|
56
|
-
[x: number]: string;
|
|
57
|
-
} | {}, true>)>;
|
|
58
33
|
export declare const LeftSidebar: 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, {
|
|
59
34
|
[x: string]: ((...args: any[]) => any) | null;
|
|
60
35
|
} | string[], {} & {}, {
|
|
61
36
|
[x: number]: string;
|
|
62
37
|
} | {}, true>)>;
|
|
63
|
-
export declare const WithLeftToolbar: 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, {
|
|
64
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
65
|
-
} | string[], {} & {}, {
|
|
66
|
-
[x: number]: string;
|
|
67
|
-
} | {}, true>)>;
|
|
68
|
-
export declare const CollapsibleWithWithLeftToolbar: 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, {
|
|
69
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
70
|
-
} | string[], {} & {}, {
|
|
71
|
-
[x: number]: string;
|
|
72
|
-
} | {}, true>)>;
|
|
@@ -4,36 +4,26 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
resizeBar: import("@vue/composition-api").Ref<HTMLElement | null>;
|
|
6
6
|
isResizing: import("@vue/composition-api").Ref<boolean>;
|
|
7
|
-
isCollapsed: import("@vue/composition-api").Ref<boolean>;
|
|
8
7
|
localWidth: import("@vue/composition-api").Ref<number>;
|
|
9
|
-
isShowingToolbar: import("@vue/composition-api").ComputedRef<boolean>;
|
|
10
8
|
sidebarStyle: import("@vue/composition-api").ComputedRef<{
|
|
11
9
|
width: string;
|
|
12
10
|
}>;
|
|
13
11
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
14
|
-
sidebarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
15
|
-
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
16
12
|
resizeStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
17
|
-
collapsibleButtonStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
18
13
|
mainStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
19
14
|
headerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
20
15
|
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
21
16
|
footerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
22
|
-
open: () => void;
|
|
23
|
-
close: () => void;
|
|
24
17
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
25
18
|
width: {
|
|
26
19
|
type: NumberConstructor;
|
|
20
|
+
required: false;
|
|
27
21
|
default: number;
|
|
28
22
|
validator: (value?: any) => boolean;
|
|
29
23
|
};
|
|
30
24
|
minimumWidth: {
|
|
31
25
|
type: NumberConstructor;
|
|
32
|
-
|
|
33
|
-
validator: (value?: any) => boolean;
|
|
34
|
-
};
|
|
35
|
-
maximumWidth: {
|
|
36
|
-
type: NumberConstructor;
|
|
26
|
+
required: false;
|
|
37
27
|
default: number;
|
|
38
28
|
validator: (value?: any) => boolean;
|
|
39
29
|
};
|
|
@@ -49,27 +39,16 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
49
39
|
default: OrSidebarPlacement;
|
|
50
40
|
validator: (value?: any) => boolean;
|
|
51
41
|
};
|
|
52
|
-
draggable: {
|
|
53
|
-
type: BooleanConstructor;
|
|
54
|
-
default: boolean;
|
|
55
|
-
};
|
|
56
|
-
collapsible: {
|
|
57
|
-
type: BooleanConstructor;
|
|
58
|
-
default: boolean;
|
|
59
|
-
};
|
|
60
42
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
61
43
|
width: {
|
|
62
44
|
type: NumberConstructor;
|
|
45
|
+
required: false;
|
|
63
46
|
default: number;
|
|
64
47
|
validator: (value?: any) => boolean;
|
|
65
48
|
};
|
|
66
49
|
minimumWidth: {
|
|
67
50
|
type: NumberConstructor;
|
|
68
|
-
|
|
69
|
-
validator: (value?: any) => boolean;
|
|
70
|
-
};
|
|
71
|
-
maximumWidth: {
|
|
72
|
-
type: NumberConstructor;
|
|
51
|
+
required: false;
|
|
73
52
|
default: number;
|
|
74
53
|
validator: (value?: any) => boolean;
|
|
75
54
|
};
|
|
@@ -85,59 +64,35 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
85
64
|
default: OrSidebarPlacement;
|
|
86
65
|
validator: (value?: any) => boolean;
|
|
87
66
|
};
|
|
88
|
-
draggable: {
|
|
89
|
-
type: BooleanConstructor;
|
|
90
|
-
default: boolean;
|
|
91
|
-
};
|
|
92
|
-
collapsible: {
|
|
93
|
-
type: BooleanConstructor;
|
|
94
|
-
default: boolean;
|
|
95
|
-
};
|
|
96
67
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
97
68
|
width: number;
|
|
98
69
|
minimumWidth: number;
|
|
99
|
-
maximumWidth: number;
|
|
100
70
|
side: OrSidebarPlacement;
|
|
101
|
-
draggable: boolean;
|
|
102
|
-
collapsible: boolean;
|
|
103
71
|
} & {} & {
|
|
104
72
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
105
73
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
106
74
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
107
75
|
resizeBar: import("@vue/composition-api").Ref<HTMLElement | null>;
|
|
108
76
|
isResizing: import("@vue/composition-api").Ref<boolean>;
|
|
109
|
-
isCollapsed: import("@vue/composition-api").Ref<boolean>;
|
|
110
77
|
localWidth: import("@vue/composition-api").Ref<number>;
|
|
111
|
-
isShowingToolbar: import("@vue/composition-api").ComputedRef<boolean>;
|
|
112
78
|
sidebarStyle: import("@vue/composition-api").ComputedRef<{
|
|
113
79
|
width: string;
|
|
114
80
|
}>;
|
|
115
81
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
116
|
-
sidebarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
117
|
-
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
118
82
|
resizeStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
119
|
-
collapsibleButtonStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
120
83
|
mainStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
121
84
|
headerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
122
85
|
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
123
86
|
footerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
124
|
-
open: () => void;
|
|
125
|
-
close: () => void;
|
|
126
87
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
127
88
|
width: number;
|
|
128
89
|
minimumWidth: number;
|
|
129
|
-
maximumWidth: number;
|
|
130
90
|
side: OrSidebarPlacement;
|
|
131
|
-
draggable: boolean;
|
|
132
|
-
collapsible: boolean;
|
|
133
91
|
} & {} & {
|
|
134
92
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
135
93
|
}, {
|
|
136
94
|
width: number;
|
|
137
95
|
minimumWidth: number;
|
|
138
|
-
maximumWidth: number;
|
|
139
96
|
side: OrSidebarPlacement;
|
|
140
|
-
draggable: boolean;
|
|
141
|
-
collapsible: boolean;
|
|
142
97
|
}, true>);
|
|
143
98
|
export default _default;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from '../../OrSidebar-
|
|
1
|
+
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from '../../OrSidebar-fabc7bc9.js';
|
|
2
2
|
import '@vueuse/core';
|
|
3
3
|
import 'lodash';
|
|
4
4
|
import 'vue-demi';
|
|
5
|
-
import '../../OrIconButton-b3779042.js';
|
|
6
|
-
import '../../useClassAttribute-47fdb016.js';
|
|
7
|
-
import '../../OrIcon-5e394c62.js';
|
|
8
5
|
import '../../normalize-component-6e8e3d80.js';
|
|
9
|
-
import '../../OrTooltip-513bee30.js';
|
|
10
|
-
import '../../OrPopover-9bafbdb4.js';
|
|
11
|
-
import '@floating-ui/dom';
|
|
12
|
-
import '../../useElevation-31bfe1f6.js';
|
|
13
|
-
import '../../useResponsive-a02e95b7.js';
|
|
14
|
-
import '../../OrBottomSheet-16c2e610.js';
|
|
15
|
-
import '../../OrOverlay-18ba2dc6.js';
|
|
16
|
-
import '../../OrTeleport.vue2-fb92f29f.js';
|
|
17
|
-
import 'portal-vue';
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { OrSidebarPlacement } from './props';
|
|
2
2
|
export declare const SidebarRoot: string[];
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const SidebarToolbar: string[];
|
|
5
|
-
export declare const CollapsibleSidebarToolbar: string[];
|
|
6
|
-
export declare const SidebarSides: Record<OrSidebarPlacement, string[]>;
|
|
7
|
-
export declare const SidebarToolbarSides: Record<OrSidebarPlacement, string[]>;
|
|
3
|
+
export declare const SidebarRootSides: Record<OrSidebarPlacement, string[]>;
|
|
8
4
|
export declare const SidebarResize: string[];
|
|
9
5
|
export declare const SidebarResizeSides: Record<OrSidebarPlacement, string[]>;
|
|
10
|
-
export declare const SidebarCollapseButton: string[];
|
|
11
|
-
export declare const SidebarCollapseButtonSides: Record<OrSidebarPlacement, string[]>;
|
|
12
6
|
export declare const SidebarResizingSides: Record<OrSidebarPlacement, string[]>;
|
|
13
7
|
export declare const SidebarMain: string[];
|
|
14
8
|
export declare const SidebarHeader: string[];
|
|
15
9
|
export declare const SidebarContent: string[];
|
|
16
10
|
export declare const SidebarFooter: string[];
|
|
17
|
-
export declare const CollapseButtonContainer: string[];
|
|
18
|
-
export declare const CollapseButton: string[];
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
|
|
|
8
8
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from './OrButton-835d4f11.js';
|
|
9
9
|
export { _ as OrCard } from './OrCard-b7268256.js';
|
|
10
10
|
export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from './OrCardCollection-f6b07557.js';
|
|
11
|
-
export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-
|
|
11
|
+
export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-e08a4637.js';
|
|
12
12
|
export { _ as OrCardV3 } from './OrCard-de799db0.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from './OrCarouselItem-4e2cf3d8.js';
|
|
14
14
|
export { _ as OrCheckbox } from './OrCheckbox-915f1f0a.js';
|
|
@@ -19,7 +19,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-d4400b42.js';
|
|
|
19
19
|
export { _ as OrCollapse } from './OrCollapse-4d892ca3.js';
|
|
20
20
|
export { _ 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-75abefdd.js';
|
|
21
21
|
export { _ as OrConfirm } from './OrConfirm-d7112dd3.js';
|
|
22
|
-
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-
|
|
22
|
+
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-43f97635.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-349df9b2.js';
|
|
24
24
|
export { _ as OrError } from './OrError-081130bb.js';
|
|
25
25
|
export { _ as OrErrorTagV3 } from './OrErrorTag-782dd714.js';
|
|
@@ -38,7 +38,7 @@ export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-1020
|
|
|
38
38
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, _ as OrInlineTextEdit } from './OrInlineTextEdit-b47cfc2d.js';
|
|
39
39
|
export { _ as OrInlineTextareaV3 } from './OrInlineTextarea-7658611e.js';
|
|
40
40
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, _ as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-4d5a318d.js';
|
|
41
|
-
export { I as InputType, _ as OrInputV3 } from './OrInput-
|
|
41
|
+
export { I as InputType, _ as OrInputV3 } from './OrInput-5e46af9a.js';
|
|
42
42
|
export { a as OrNumberInput, b as OrPassword, _ as OrTextarea } from './OrPassword-1fa97156.js';
|
|
43
43
|
export { _ as OrInput } from './OrSearch.vue_rollup-plugin-vue_script-197d77fc.js';
|
|
44
44
|
export { _ as OrSearch } from './OrSearch-0589d17d.js';
|
|
@@ -65,12 +65,12 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
65
65
|
export { _ as OrRadio } from './OrRadio-e4198532.js';
|
|
66
66
|
export { _ as OrRadioGroup } from './OrRadioGroup-d9d32cba.js';
|
|
67
67
|
export { _ as OrRadioV3 } from './OrRadio-848ce55d.js';
|
|
68
|
-
export { _ as OrSearchV3 } from './OrSearch-
|
|
68
|
+
export { _ as OrSearchV3 } from './OrSearch-84143c15.js';
|
|
69
69
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-e8dce8f9.js';
|
|
70
70
|
export { _ as OrSelect } from './OrSelect-dae2b069.js';
|
|
71
|
-
export { _ as OrSelectV3 } from './OrSelect-
|
|
71
|
+
export { _ as OrSelectV3 } from './OrSelect-5a2ff296.js';
|
|
72
72
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-7d6125bb.js';
|
|
73
|
-
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-
|
|
73
|
+
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
|
|
74
74
|
export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-cc94bdc9.js';
|
|
75
75
|
export { _ as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './OrSkeletonText-950be6a2.js';
|
|
76
76
|
export { _ as OrSlider } from './OrSlider-f7b9c7c2.js';
|
|
@@ -8,7 +8,7 @@ import { s as script$5 } from './OrMenuItem-9da279f6.js';
|
|
|
8
8
|
import { s as script$6 } from './OrIcon-b195169c.js';
|
|
9
9
|
import { openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, mergeProps, createTextVNode, toDisplayString, resolveComponent, createElementVNode, createVNode, withCtx, createBlock, createCommentVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
10
10
|
import { s as script$3 } from './OrButton-0fa67a0d.js';
|
|
11
|
-
import { s as script$7 } from './OrSearch-
|
|
11
|
+
import { s as script$7 } from './OrSearch-dbb07738.js';
|
|
12
12
|
import './OrInputBox-6d1b6059.js';
|
|
13
13
|
|
|
14
14
|
const CardCollectionRoot = [
|
|
@@ -2,7 +2,7 @@ import { useMagicKeys, whenever, onClickOutside } from '@vueuse/core';
|
|
|
2
2
|
import { logicAnd } from '@vueuse/math';
|
|
3
3
|
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
4
4
|
import { s as script$2, a as ButtonColor } from './OrButton-0fa67a0d.js';
|
|
5
|
-
import { s as script$3 } from './OrInput-
|
|
5
|
+
import { s as script$3 } from './OrInput-a2c4cfb5.js';
|
|
6
6
|
import { s as script$1 } from './OrOverlay-738a44d5.js';
|
|
7
7
|
import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, mergeProps, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementBlock, createVNode, createCommentVNode } from 'vue';
|
|
8
8
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, ref, computed } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
|
+
import { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
4
5
|
import { s as script$1 } from './OrError-ec8c709d.js';
|
|
5
6
|
import { s as script$2 } from './OrHint-74bb732d.js';
|
|
6
7
|
import { s as script$4 } from './OrIconButton-1a89fbf9.js';
|
|
7
8
|
import { s as script$3 } from './OrIcon-b195169c.js';
|
|
8
9
|
import { s as script$5, a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
9
10
|
import { s as script$6 } from './OrLabel-bdaec602.js';
|
|
10
|
-
import {
|
|
11
|
+
import { s as script$7 } from './OrLoader-b3cf4231.js';
|
|
12
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives, createElementVNode, mergeProps, vModelDynamic, Fragment, withModifiers, createSlots } from 'vue';
|
|
11
13
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
12
14
|
|
|
13
15
|
var InputType;
|
|
@@ -39,7 +41,8 @@ var script = defineComponent({
|
|
|
39
41
|
OrIcon: script$3,
|
|
40
42
|
OrIconButton: script$4,
|
|
41
43
|
OrInputBox: script$5,
|
|
42
|
-
OrLabel: script$6
|
|
44
|
+
OrLabel: script$6,
|
|
45
|
+
OrLoader: script$7
|
|
43
46
|
},
|
|
44
47
|
inheritAttrs: false,
|
|
45
48
|
props: {
|
|
@@ -75,6 +78,10 @@ var script = defineComponent({
|
|
|
75
78
|
type: String,
|
|
76
79
|
default: undefined
|
|
77
80
|
},
|
|
81
|
+
loading: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false
|
|
84
|
+
},
|
|
78
85
|
required: {
|
|
79
86
|
type: Boolean,
|
|
80
87
|
default: false
|
|
@@ -121,6 +128,9 @@ var script = defineComponent({
|
|
|
121
128
|
});
|
|
122
129
|
const maxLength = computed(() => context.attrs.maxlength);
|
|
123
130
|
const disclosed = ref(false);
|
|
131
|
+
const {
|
|
132
|
+
isMobile
|
|
133
|
+
} = useResponsive();
|
|
124
134
|
// Methods
|
|
125
135
|
function focus() {
|
|
126
136
|
var _a;
|
|
@@ -138,6 +148,7 @@ var script = defineComponent({
|
|
|
138
148
|
currentLength,
|
|
139
149
|
maxLength,
|
|
140
150
|
disclosed,
|
|
151
|
+
isMobile,
|
|
141
152
|
focus
|
|
142
153
|
};
|
|
143
154
|
}
|
|
@@ -149,6 +160,7 @@ const _hoisted_2 = {
|
|
|
149
160
|
};
|
|
150
161
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
151
162
|
const _component_OrLabel = resolveComponent("OrLabel");
|
|
163
|
+
const _component_OrLoader = resolveComponent("OrLoader");
|
|
152
164
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
153
165
|
const _component_OrIcon = resolveComponent("OrIcon");
|
|
154
166
|
const _component_OrInputBox = resolveComponent("OrInputBox");
|
|
@@ -189,7 +201,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
189
201
|
onKeyup: _cache[2] || (_cache[2] = $event => _ctx.$emit('keyup', $event)),
|
|
190
202
|
onFocus: _cache[3] || (_cache[3] = $event => _ctx.$emit('focus', $event)),
|
|
191
203
|
onBlur: _cache[4] || (_cache[4] = $event => _ctx.$emit('blur', $event))
|
|
192
|
-
}), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), createElementVNode("div", _hoisted_2, [_ctx.
|
|
204
|
+
}), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), createElementVNode("div", _hoisted_2, [_ctx.loading ? (openBlock(), createBlock(_component_OrLoader, {
|
|
205
|
+
key: 0,
|
|
206
|
+
variant: 'circular',
|
|
207
|
+
color: 'primary',
|
|
208
|
+
size: _ctx.isMobile ? 'm' : 's'
|
|
209
|
+
}, null, 8 /* PROPS */, ["size"])) : (openBlock(), createElementBlock(Fragment, {
|
|
210
|
+
key: 1
|
|
211
|
+
}, [_ctx.type === 'password' ? (openBlock(), createBlock(_component_OrIconButton, {
|
|
193
212
|
key: 0,
|
|
194
213
|
icon: {
|
|
195
214
|
icon: _ctx.disclosed ? 'visibility_off' : 'visibility',
|
|
@@ -210,7 +229,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
210
229
|
key: 1,
|
|
211
230
|
icon: 'search',
|
|
212
231
|
variant: 'outlined'
|
|
213
|
-
}))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)])]),
|
|
232
|
+
}))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */))])]),
|
|
233
|
+
|
|
214
234
|
_: 1 /* STABLE */
|
|
215
235
|
}, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"]), !_ctx.invalid ? (openBlock(), createElementBlock(Fragment, {
|
|
216
236
|
key: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
|
-
import { s as script$1 } from './OrInput-
|
|
4
|
+
import { s as script$1 } from './OrInput-a2c4cfb5.js';
|
|
5
5
|
import { a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
6
6
|
import { resolveComponent, openBlock, createBlock, mergeProps } from 'vue';
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ import { s as script$3 } from './OrExpansionPanel-f8d7ff8d.js';
|
|
|
9
9
|
import { s as script$4 } from './OrHint-74bb732d.js';
|
|
10
10
|
import { s as script$5 } from './OrIcon-b195169c.js';
|
|
11
11
|
import { s as script$7, a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
12
|
-
import { s as script$6 } from './OrInput-
|
|
12
|
+
import { s as script$6 } from './OrInput-a2c4cfb5.js';
|
|
13
13
|
import { s as script$8 } from './OrLabel-bdaec602.js';
|
|
14
14
|
import { s as script$9 } from './OrMenuItem-9da279f6.js';
|
|
15
15
|
import { s as script$a } from './OrPopover-1075dd38.js';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
4
|
+
import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode } from 'vue';
|
|
5
|
+
|
|
6
|
+
var OrSidebarPlacement;
|
|
7
|
+
(function (OrSidebarPlacement) {
|
|
8
|
+
OrSidebarPlacement["left"] = "left";
|
|
9
|
+
OrSidebarPlacement["right"] = "right";
|
|
10
|
+
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
11
|
+
|
|
12
|
+
const SidebarRoot = [
|
|
13
|
+
// Position
|
|
14
|
+
'relative',
|
|
15
|
+
// Layout
|
|
16
|
+
'flex', 'flex-col', 'shrink-0',
|
|
17
|
+
// Box
|
|
18
|
+
'min-h-0', 'p-0'];
|
|
19
|
+
const SidebarRootSides = {
|
|
20
|
+
[OrSidebarPlacement.left]: [
|
|
21
|
+
// Borders
|
|
22
|
+
'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
|
|
23
|
+
[OrSidebarPlacement.right]: [
|
|
24
|
+
// Borders
|
|
25
|
+
'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
|
|
26
|
+
};
|
|
27
|
+
const SidebarResize = [
|
|
28
|
+
// Position
|
|
29
|
+
'absolute', 'inset-y-none', 'z-[1]',
|
|
30
|
+
// Box
|
|
31
|
+
'w-[12px]', 'h-[100%]',
|
|
32
|
+
// Cursor
|
|
33
|
+
'cursor-ew-resize'];
|
|
34
|
+
const SidebarResizeSides = {
|
|
35
|
+
[OrSidebarPlacement.left]: [
|
|
36
|
+
// Position
|
|
37
|
+
'-right-[1px]',
|
|
38
|
+
// Borders
|
|
39
|
+
'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
40
|
+
// Transition
|
|
41
|
+
'transition-[border-right]'],
|
|
42
|
+
[OrSidebarPlacement.right]: [
|
|
43
|
+
// Position
|
|
44
|
+
'-left-[1px]',
|
|
45
|
+
// Borders
|
|
46
|
+
'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
47
|
+
// Transition
|
|
48
|
+
'transition-[border-left]']
|
|
49
|
+
};
|
|
50
|
+
const SidebarResizingSides = {
|
|
51
|
+
[OrSidebarPlacement.left]: [
|
|
52
|
+
// Borders
|
|
53
|
+
'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
|
|
54
|
+
[OrSidebarPlacement.right]: [
|
|
55
|
+
// Borders
|
|
56
|
+
'border-l-2', 'border-l-primary dark:border-l-primary-dark']
|
|
57
|
+
};
|
|
58
|
+
const SidebarMain = [
|
|
59
|
+
// Layout
|
|
60
|
+
'flex', 'flex-col', 'grow',
|
|
61
|
+
// Box
|
|
62
|
+
'min-h-0'];
|
|
63
|
+
const SidebarHeader = [
|
|
64
|
+
// Sizing
|
|
65
|
+
'p-md'];
|
|
66
|
+
const SidebarContent = [
|
|
67
|
+
// Layout
|
|
68
|
+
'grow', 'overflow-auto',
|
|
69
|
+
// Sizing
|
|
70
|
+
'p-md'];
|
|
71
|
+
const SidebarFooter = [
|
|
72
|
+
// Sizing
|
|
73
|
+
'p-md',
|
|
74
|
+
// Borders
|
|
75
|
+
'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
|
|
76
|
+
|
|
77
|
+
var script = defineComponent({
|
|
78
|
+
name: 'OrSidebar',
|
|
79
|
+
props: {
|
|
80
|
+
width: {
|
|
81
|
+
type: Number,
|
|
82
|
+
required: false,
|
|
83
|
+
default: 0,
|
|
84
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
85
|
+
},
|
|
86
|
+
minimumWidth: {
|
|
87
|
+
type: Number,
|
|
88
|
+
required: false,
|
|
89
|
+
default: 350,
|
|
90
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* User may put the component on the right or the left side of a container.
|
|
94
|
+
* This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
|
|
95
|
+
*
|
|
96
|
+
* Note: the property doesn't reposition the component in the parent container.
|
|
97
|
+
* @values left, right
|
|
98
|
+
*/
|
|
99
|
+
side: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: OrSidebarPlacement.right,
|
|
102
|
+
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
emits: ['change:width'],
|
|
106
|
+
setup(props, {
|
|
107
|
+
emit
|
|
108
|
+
}) {
|
|
109
|
+
// Refs
|
|
110
|
+
const root = ref();
|
|
111
|
+
const resizeBar = ref(null);
|
|
112
|
+
const parentContainer = computed(() => {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
115
|
+
});
|
|
116
|
+
// State
|
|
117
|
+
const startPositionX = ref(0);
|
|
118
|
+
const isResizing = ref(false);
|
|
119
|
+
const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
|
|
120
|
+
// Styles
|
|
121
|
+
const sidebarStyle = computed(() => ({
|
|
122
|
+
width: localWidth.value + 'px'
|
|
123
|
+
}));
|
|
124
|
+
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
|
|
125
|
+
const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
|
|
126
|
+
const mainStyles = computed(() => [...SidebarMain]);
|
|
127
|
+
const headerStyles = computed(() => [...SidebarHeader]);
|
|
128
|
+
const contentStyles = computed(() => [...SidebarContent]);
|
|
129
|
+
const footerStyles = computed(() => [...SidebarFooter]);
|
|
130
|
+
// Effects
|
|
131
|
+
useDraggable(resizeBar, {
|
|
132
|
+
preventDefault: true,
|
|
133
|
+
onStart: (position, event) => {
|
|
134
|
+
document.body.style.cursor = 'ew-resize';
|
|
135
|
+
document.body.style.userSelect = 'none';
|
|
136
|
+
startPositionX.value = event.x;
|
|
137
|
+
isResizing.value = true;
|
|
138
|
+
},
|
|
139
|
+
onMove: position => {
|
|
140
|
+
const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
|
|
141
|
+
const newWidth = localWidth.value - delta;
|
|
142
|
+
localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
|
|
143
|
+
startPositionX.value = position.x;
|
|
144
|
+
},
|
|
145
|
+
onEnd: () => {
|
|
146
|
+
document.body.style.cursor = '';
|
|
147
|
+
document.body.style.userSelect = '';
|
|
148
|
+
isResizing.value = false;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const {
|
|
152
|
+
width: maximumWidth
|
|
153
|
+
} = useElementBounding(parentContainer);
|
|
154
|
+
watch(() => props.width, newValue => {
|
|
155
|
+
if (newValue !== localWidth.value) {
|
|
156
|
+
localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
watch(() => props.minimumWidth, newMinimum => {
|
|
160
|
+
if (newMinimum > localWidth.value) localWidth.value = newMinimum;
|
|
161
|
+
});
|
|
162
|
+
watch(maximumWidth, newMaximum => {
|
|
163
|
+
if (newMaximum < localWidth.value) localWidth.value = newMaximum;
|
|
164
|
+
});
|
|
165
|
+
watch(localWidth, val => emit('change:width', val));
|
|
166
|
+
return {
|
|
167
|
+
root,
|
|
168
|
+
resizeBar,
|
|
169
|
+
isResizing,
|
|
170
|
+
localWidth,
|
|
171
|
+
sidebarStyle,
|
|
172
|
+
rootStyles,
|
|
173
|
+
resizeStyles,
|
|
174
|
+
mainStyles,
|
|
175
|
+
headerStyles,
|
|
176
|
+
contentStyles,
|
|
177
|
+
footerStyles
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
183
|
+
return openBlock(), createElementBlock("aside", {
|
|
184
|
+
ref: "root",
|
|
185
|
+
class: normalizeClass(_ctx.rootStyles),
|
|
186
|
+
style: normalizeStyle(_ctx.sidebarStyle)
|
|
187
|
+
}, [createElementVNode("div", {
|
|
188
|
+
ref: "resizeBar",
|
|
189
|
+
class: normalizeClass(_ctx.resizeStyles)
|
|
190
|
+
}, null, 2 /* CLASS */), createElementVNode("div", {
|
|
191
|
+
class: normalizeClass(_ctx.mainStyles)
|
|
192
|
+
}, [_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
193
|
+
key: 0,
|
|
194
|
+
class: normalizeClass(_ctx.headerStyles)
|
|
195
|
+
}, [renderSlot(_ctx.$slots, "header")], 2 /* CLASS */)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
196
|
+
class: normalizeClass(_ctx.contentStyles)
|
|
197
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: normalizeClass(_ctx.footerStyles)
|
|
200
|
+
}, [renderSlot(_ctx.$slots, "footer")], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 6 /* CLASS, STYLE */);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
script.render = render;
|
|
204
|
+
script.__file = "src/components/or-sidebar-v3/OrSidebar.vue";
|
|
205
|
+
|
|
206
|
+
export { OrSidebarPlacement as O, script as s };
|