@operato/context 10.29.81 → 10.29.84
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/stories/ox-context-page-toolbar-select-buttons.stories.d.ts +25 -0
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +151 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js +115 -0
- package/dist/stories/ox-context-page-toolbar.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar.stories.js +115 -0
- package/dist/stories/ox-context-toolbar-complex.stories.d.ts +24 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js +169 -0
- package/dist/stories/ox-context-toolbar-cooldown.stories.d.ts +18 -0
- package/dist/stories/ox-context-toolbar-cooldown.stories.js +100 -0
- package/dist/stories/ox-context-toolbar-empty.stories.d.ts +23 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js +98 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +24 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.js +153 -0
- package/dist/stories/ox-context-toolbar.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar.stories.js +209 -0
- package/package.json +21 -8
- package/CHANGELOG.md +0 -5517
- package/dist/src/index.js.map +0 -1
- package/dist/src/layouts/ox-context-page-toolbar.js.map +0 -1
- package/dist/src/layouts/ox-context-toolbar.js.map +0 -1
- package/dist/src/styles/ox-context-toolbar-overlay-style.js.map +0 -1
- package/dist/src/tools/ox-page-action-context-bar.js.map +0 -1
- package/dist/src/tools/ox-page-action-overlay-template.js.map +0 -1
- package/dist/src/tools/ox-page-title-bar.js.map +0 -1
- package/dist/src/tools/ox-title-bar.js.map +0 -1
- package/dist/src/tools/page-action-render.js.map +0 -1
- package/dist/src/tools/page-action.js.map +0 -1
- package/dist/test/action-bar-contract.test.d.ts +0 -2
- package/dist/test/action-bar-contract.test.js +0 -179
- package/dist/test/action-bar-contract.test.js.map +0 -1
- package/dist/test/action-bar-focus.test.d.ts +0 -1
- package/dist/test/action-bar-focus.test.js +0 -67
- package/dist/test/action-bar-focus.test.js.map +0 -1
- package/dist/test/action-bar-overflow.test.d.ts +0 -1
- package/dist/test/action-bar-overflow.test.js +0 -42
- package/dist/test/action-bar-overflow.test.js.map +0 -1
- package/dist/test/page-frames.test.d.ts +0 -1
- package/dist/test/page-frames.test.js +0 -59
- package/dist/test/page-frames.test.js.map +0 -1
- package/dist/test/page-title-description.test.d.ts +0 -1
- package/dist/test/page-title-description.test.js +0 -90
- package/dist/test/page-title-description.test.js.map +0 -1
- package/dist/test/title-search-typing.test.d.ts +0 -2
- package/dist/test/title-search-typing.test.js +0 -37
- package/dist/test/title-search-typing.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/test/action-bar-contract.test.ts +0 -200
- package/test/action-bar-focus.test.ts +0 -83
- package/test/action-bar-overflow.test.ts +0 -50
- package/test/page-frames.test.ts +0 -67
- package/test/page-title-description.test.ts +0 -106
- package/test/title-search-typing.test.ts +0 -43
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import { TOOL_POSITION } from '@operato/layout';
|
|
5
|
+
import { sleep } from '@operato/utils';
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'ox-context-toolbar empty',
|
|
9
|
+
component: 'ox-context-toolbar',
|
|
10
|
+
argTypes: {}
|
|
11
|
+
};
|
|
12
|
+
const Template = () => html `
|
|
13
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
14
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
15
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
16
|
+
|
|
17
|
+
<link
|
|
18
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
19
|
+
rel="stylesheet"
|
|
20
|
+
/>
|
|
21
|
+
<link
|
|
22
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
23
|
+
rel="stylesheet"
|
|
24
|
+
/>
|
|
25
|
+
<link
|
|
26
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
27
|
+
rel="stylesheet"
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
body {
|
|
32
|
+
background-color: var(--md-sys-color-surface);
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
35
|
+
|
|
36
|
+
<div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
|
|
37
|
+
<ox-context-toolbar
|
|
38
|
+
.tools=${[]}
|
|
39
|
+
.context=${{
|
|
40
|
+
exportable: true,
|
|
41
|
+
importable: true,
|
|
42
|
+
toolbar: true
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
</ox-context-toolbar>
|
|
46
|
+
|
|
47
|
+
<ox-context-toolbar
|
|
48
|
+
.tools=${[
|
|
49
|
+
{
|
|
50
|
+
position: TOOL_POSITION.CENTER,
|
|
51
|
+
template: html `<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
52
|
+
}
|
|
53
|
+
]}
|
|
54
|
+
.context=${{
|
|
55
|
+
exportable: true,
|
|
56
|
+
importable: true,
|
|
57
|
+
toolbar: true
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
</ox-context-toolbar>
|
|
61
|
+
|
|
62
|
+
<ox-context-toolbar
|
|
63
|
+
.tools=${[
|
|
64
|
+
{
|
|
65
|
+
position: TOOL_POSITION.CENTER,
|
|
66
|
+
template: html `<ox-page-action-context-bar
|
|
67
|
+
.actions=${[
|
|
68
|
+
{
|
|
69
|
+
type: 'icon',
|
|
70
|
+
action: async () => { },
|
|
71
|
+
icon: 'check'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'short-take(0secs)',
|
|
75
|
+
action: async () => { },
|
|
76
|
+
icon: 'delete'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: 'long-take(3secs)',
|
|
80
|
+
action: async () => {
|
|
81
|
+
await sleep(3000);
|
|
82
|
+
},
|
|
83
|
+
icon: 'save'
|
|
84
|
+
}
|
|
85
|
+
]}
|
|
86
|
+
></ox-page-action-context-bar>`
|
|
87
|
+
}
|
|
88
|
+
]}
|
|
89
|
+
.context=${{
|
|
90
|
+
exportable: true,
|
|
91
|
+
importable: true,
|
|
92
|
+
toolbar: true
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
</ox-context-toolbar>
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
98
|
+
export const Regular = Template.bind({});
|
|
99
|
+
Regular.args = {};
|
|
100
|
+
//# sourceMappingURL=ox-context-toolbar-cooldown.stories.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import { TemplateResult } from 'lit';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: string;
|
|
8
|
+
argTypes: {
|
|
9
|
+
theme: {
|
|
10
|
+
control: string;
|
|
11
|
+
options: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult;
|
|
18
|
+
args?: Partial<T>;
|
|
19
|
+
argTypes?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
interface ArgTypes {
|
|
22
|
+
}
|
|
23
|
+
export declare const Regular: Story<ArgTypes>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import { TOOL_POSITION } from '@operato/layout';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'ox-context-toolbar empty',
|
|
9
|
+
component: 'ox-context-toolbar',
|
|
10
|
+
argTypes: {
|
|
11
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const Template = ({}) => html `
|
|
15
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
16
|
+
|
|
17
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
18
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
19
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
20
|
+
|
|
21
|
+
<link
|
|
22
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
23
|
+
rel="stylesheet"
|
|
24
|
+
/>
|
|
25
|
+
<link
|
|
26
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
27
|
+
rel="stylesheet"
|
|
28
|
+
/>
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
${MDTypeScaleStyles.cssText}
|
|
36
|
+
</style>
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
.container {
|
|
40
|
+
height: 500px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
padding: 20px;
|
|
43
|
+
background-color: var(--md-sys-color-primary-container);
|
|
44
|
+
color: var(--md-sys-color-on-primary-container);
|
|
45
|
+
|
|
46
|
+
padding: 20px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
ox-buttons-radio {
|
|
50
|
+
padding: 20px;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
53
|
+
|
|
54
|
+
<div class="container md-typescale-body-large-prominent">
|
|
55
|
+
<ox-context-toolbar
|
|
56
|
+
.tools=${[]}
|
|
57
|
+
.context=${{
|
|
58
|
+
exportable: true,
|
|
59
|
+
importable: true,
|
|
60
|
+
toolbar: true
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
</ox-context-toolbar>
|
|
64
|
+
|
|
65
|
+
<ox-context-toolbar
|
|
66
|
+
.tools=${[
|
|
67
|
+
{
|
|
68
|
+
position: TOOL_POSITION.CENTER,
|
|
69
|
+
template: html `<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
70
|
+
}
|
|
71
|
+
]}
|
|
72
|
+
.context=${{
|
|
73
|
+
exportable: true,
|
|
74
|
+
importable: true,
|
|
75
|
+
toolbar: true
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
</ox-context-toolbar>
|
|
79
|
+
|
|
80
|
+
<ox-context-toolbar
|
|
81
|
+
.tools=${[
|
|
82
|
+
{
|
|
83
|
+
position: TOOL_POSITION.CENTER,
|
|
84
|
+
template: html `<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
85
|
+
}
|
|
86
|
+
]}
|
|
87
|
+
.context=${{
|
|
88
|
+
exportable: true,
|
|
89
|
+
importable: true,
|
|
90
|
+
toolbar: true
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
</ox-context-toolbar>
|
|
94
|
+
</div>
|
|
95
|
+
`;
|
|
96
|
+
export const Regular = Template.bind({});
|
|
97
|
+
Regular.args = {};
|
|
98
|
+
//# sourceMappingURL=ox-context-toolbar-empty.stories.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import '@operato/styles';
|
|
5
|
+
import { TemplateResult } from 'lit';
|
|
6
|
+
declare const _default: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: string;
|
|
9
|
+
argTypes: {
|
|
10
|
+
theme: {
|
|
11
|
+
control: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
interface Story<T> {
|
|
18
|
+
(args: T): TemplateResult;
|
|
19
|
+
args?: Partial<T>;
|
|
20
|
+
argTypes?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
interface ArgTypes {
|
|
23
|
+
}
|
|
24
|
+
export declare const Regular: Story<ArgTypes>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import { TOOL_POSITION } from '@operato/layout';
|
|
5
|
+
import '@operato/styles';
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ox-context-toolbar overflow',
|
|
10
|
+
component: 'ox-context-toolbar',
|
|
11
|
+
argTypes: {
|
|
12
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const Template = ({}) => html `
|
|
16
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
17
|
+
|
|
18
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
19
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
20
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
21
|
+
|
|
22
|
+
<link
|
|
23
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
24
|
+
rel="stylesheet"
|
|
25
|
+
/>
|
|
26
|
+
<link
|
|
27
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
28
|
+
rel="stylesheet"
|
|
29
|
+
/>
|
|
30
|
+
<link
|
|
31
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
${MDTypeScaleStyles.cssText}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
.container {
|
|
41
|
+
height: 500px;
|
|
42
|
+
text-align: center;
|
|
43
|
+
padding: 20px;
|
|
44
|
+
background-color: var(--md-sys-color-primary-container);
|
|
45
|
+
color: var(--md-sys-color-on-primary-container);
|
|
46
|
+
|
|
47
|
+
padding: 20px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ox-buttons-radio {
|
|
51
|
+
padding: 20px;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
54
|
+
|
|
55
|
+
<div class="container md-typescale-body-large-prominent">
|
|
56
|
+
<ox-context-toolbar
|
|
57
|
+
.tools=${[
|
|
58
|
+
{
|
|
59
|
+
position: TOOL_POSITION.FRONT,
|
|
60
|
+
template: html ` <md-icon>download</md-icon> `,
|
|
61
|
+
context: 'exportable'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
position: TOOL_POSITION.FRONT,
|
|
65
|
+
template: html ` <md-icon>upload</md-icon> `,
|
|
66
|
+
context: 'importable'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
position: TOOL_POSITION.CENTER,
|
|
70
|
+
template: html `<ox-page-action-context-bar
|
|
71
|
+
.actions=${[
|
|
72
|
+
{
|
|
73
|
+
title: 'save',
|
|
74
|
+
action: () => { },
|
|
75
|
+
icon: 'save'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: 'copy',
|
|
79
|
+
action: () => { },
|
|
80
|
+
icon: 'content_copy'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: 'delete',
|
|
84
|
+
action: () => { },
|
|
85
|
+
icon: 'delete'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'save',
|
|
89
|
+
action: () => { },
|
|
90
|
+
icon: 'save',
|
|
91
|
+
emphasis: {
|
|
92
|
+
raised: true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'copy',
|
|
97
|
+
action: () => { },
|
|
98
|
+
icon: 'content_copy'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'delete',
|
|
102
|
+
action: () => { },
|
|
103
|
+
icon: 'delete'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'save',
|
|
107
|
+
action: () => { },
|
|
108
|
+
icon: 'save'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: 'copy',
|
|
112
|
+
action: () => { },
|
|
113
|
+
icon: 'content_copy'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'delete',
|
|
117
|
+
action: () => { },
|
|
118
|
+
icon: 'delete'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: 'save',
|
|
122
|
+
action: () => { },
|
|
123
|
+
icon: 'save'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'copy',
|
|
127
|
+
action: () => { },
|
|
128
|
+
icon: 'content_copy'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: 'delete',
|
|
132
|
+
action: () => { },
|
|
133
|
+
icon: 'delete',
|
|
134
|
+
emphasis: {
|
|
135
|
+
danger: true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]}
|
|
139
|
+
></ox-page-action-context-bar>`
|
|
140
|
+
}
|
|
141
|
+
]}
|
|
142
|
+
.context=${{
|
|
143
|
+
exportable: true,
|
|
144
|
+
importable: true,
|
|
145
|
+
toolbar: true
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
</ox-context-toolbar>
|
|
149
|
+
</div>
|
|
150
|
+
`;
|
|
151
|
+
export const Regular = Template.bind({});
|
|
152
|
+
Regular.args = {};
|
|
153
|
+
//# sourceMappingURL=ox-context-toolbar-overflow.stories.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import '@operato/styles';
|
|
5
|
+
import { TemplateResult } from 'lit';
|
|
6
|
+
declare const _default: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: string;
|
|
9
|
+
argTypes: {};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
interface Story<T> {
|
|
13
|
+
(args: T): TemplateResult;
|
|
14
|
+
args?: Partial<T>;
|
|
15
|
+
argTypes?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
interface ArgTypes {
|
|
18
|
+
}
|
|
19
|
+
export declare const Regular: Story<ArgTypes>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '../src/layouts/ox-context-toolbar.js';
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
+
import { TOOL_POSITION } from '@operato/layout';
|
|
5
|
+
import '@operato/styles';
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ox-context-toolbar',
|
|
10
|
+
component: 'ox-context-toolbar',
|
|
11
|
+
argTypes: {}
|
|
12
|
+
};
|
|
13
|
+
const Template = ({}) => html `
|
|
14
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
15
|
+
|
|
16
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
17
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
18
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
19
|
+
|
|
20
|
+
<link
|
|
21
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
22
|
+
rel="stylesheet"
|
|
23
|
+
/>
|
|
24
|
+
<link
|
|
25
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
${MDTypeScaleStyles.cssText}
|
|
35
|
+
</style>
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
.container {
|
|
39
|
+
height: 500px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
padding: 20px;
|
|
42
|
+
background-color: var(--md-sys-color-primary-container);
|
|
43
|
+
color: var(--md-sys-color-on-primary-container);
|
|
44
|
+
|
|
45
|
+
padding: 20px;
|
|
46
|
+
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: 20px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
ox-buttons-radio {
|
|
53
|
+
padding: 20px;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
|
|
57
|
+
<div class="container md-typescale-body-large-prominent">
|
|
58
|
+
<ox-context-toolbar
|
|
59
|
+
.tools=${[
|
|
60
|
+
{
|
|
61
|
+
position: TOOL_POSITION.FRONT,
|
|
62
|
+
template: html ` <md-icon>download</md-icon> `,
|
|
63
|
+
context: 'exportable'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
position: TOOL_POSITION.FRONT,
|
|
67
|
+
template: html ` <md-icon>upload</md-icon> `,
|
|
68
|
+
context: 'importable'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
position: TOOL_POSITION.CENTER,
|
|
72
|
+
template: html `<ox-page-action-context-bar
|
|
73
|
+
.actions=${[
|
|
74
|
+
{
|
|
75
|
+
title: 'save',
|
|
76
|
+
action: () => { },
|
|
77
|
+
icon: 'save'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: 'copy',
|
|
81
|
+
action: () => { },
|
|
82
|
+
icon: 'content_copy'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: 'delete',
|
|
86
|
+
action: () => { },
|
|
87
|
+
icon: 'delete',
|
|
88
|
+
emphasis: {
|
|
89
|
+
raised: true,
|
|
90
|
+
outlined: false,
|
|
91
|
+
dense: false,
|
|
92
|
+
danger: true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]}
|
|
96
|
+
></ox-page-action-context-bar>`
|
|
97
|
+
}
|
|
98
|
+
]}
|
|
99
|
+
.context=${{
|
|
100
|
+
exportable: true,
|
|
101
|
+
importable: true,
|
|
102
|
+
toolbar: true
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
</ox-context-toolbar>
|
|
106
|
+
|
|
107
|
+
<ox-context-toolbar
|
|
108
|
+
.tools=${[
|
|
109
|
+
{
|
|
110
|
+
position: TOOL_POSITION.FRONT,
|
|
111
|
+
template: html ` <md-icon>download</md-icon> `,
|
|
112
|
+
context: 'exportable'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
position: TOOL_POSITION.CENTER,
|
|
116
|
+
template: html `<ox-page-action-context-bar
|
|
117
|
+
.actions=${[
|
|
118
|
+
{
|
|
119
|
+
title: 'save',
|
|
120
|
+
action: () => { },
|
|
121
|
+
icon: 'save'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
title: 'copy',
|
|
125
|
+
action: () => { },
|
|
126
|
+
icon: 'content_copy'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: 'delete',
|
|
130
|
+
action: () => { },
|
|
131
|
+
icon: 'delete',
|
|
132
|
+
emphasis: {
|
|
133
|
+
raised: false,
|
|
134
|
+
outlined: false,
|
|
135
|
+
dense: false,
|
|
136
|
+
danger: true
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]}
|
|
140
|
+
></ox-page-action-context-bar>`
|
|
141
|
+
}
|
|
142
|
+
]}
|
|
143
|
+
.context=${{
|
|
144
|
+
exportable: true,
|
|
145
|
+
importable: true,
|
|
146
|
+
toolbar: true
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
</ox-context-toolbar>
|
|
150
|
+
|
|
151
|
+
<ox-context-toolbar
|
|
152
|
+
.tools=${[
|
|
153
|
+
{
|
|
154
|
+
position: TOOL_POSITION.FRONT,
|
|
155
|
+
template: html ` <md-icon>download</md-icon> `,
|
|
156
|
+
context: 'exportable'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
position: TOOL_POSITION.FRONT,
|
|
160
|
+
template: html ` <md-icon>upload</md-icon> `,
|
|
161
|
+
context: 'importable'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
position: TOOL_POSITION.FRONT,
|
|
165
|
+
template: html ` <md-icon>restart_alt</md-icon> `,
|
|
166
|
+
context: 'resettable'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
position: TOOL_POSITION.CENTER,
|
|
170
|
+
template: html `<ox-page-action-context-bar
|
|
171
|
+
.actions=${[
|
|
172
|
+
{
|
|
173
|
+
title: 'save',
|
|
174
|
+
action: () => { },
|
|
175
|
+
icon: 'save'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
title: 'copy',
|
|
179
|
+
action: () => { },
|
|
180
|
+
icon: 'content_copy'
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
title: 'delete',
|
|
184
|
+
action: () => { },
|
|
185
|
+
icon: 'delete',
|
|
186
|
+
emphasis: {
|
|
187
|
+
raised: true,
|
|
188
|
+
outlined: false,
|
|
189
|
+
dense: false,
|
|
190
|
+
danger: true
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]}
|
|
194
|
+
></ox-page-action-context-bar>`
|
|
195
|
+
}
|
|
196
|
+
]}
|
|
197
|
+
.context=${{
|
|
198
|
+
exportable: true,
|
|
199
|
+
importable: true,
|
|
200
|
+
resettable: true,
|
|
201
|
+
toolbar: true
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
</ox-context-toolbar>
|
|
205
|
+
</div>
|
|
206
|
+
`;
|
|
207
|
+
export const Regular = Template.bind({});
|
|
208
|
+
Regular.args = {};
|
|
209
|
+
//# sourceMappingURL=ox-context-toolbar.stories.js.map
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/context",
|
|
3
3
|
"description": "Webcomponent context following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.84",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -17,6 +17,19 @@
|
|
|
17
17
|
"./ox-context-page-toolbar.js": "./dist/src/layouts/ox-context-page-toolbar.js",
|
|
18
18
|
"./ox-context-toolbar-overlay-style.js": "./dist/src/styles/ox-context-toolbar-overlay-style.js"
|
|
19
19
|
},
|
|
20
|
+
"files": [
|
|
21
|
+
"README.md",
|
|
22
|
+
"dist",
|
|
23
|
+
"themes",
|
|
24
|
+
"!**/*.map",
|
|
25
|
+
"!**/*.test.*",
|
|
26
|
+
"!**/*.spec.*",
|
|
27
|
+
"!**/test/**",
|
|
28
|
+
"!**/tests/**",
|
|
29
|
+
"!**/__tests__/**",
|
|
30
|
+
"!**/*.tsbuildinfo",
|
|
31
|
+
"!**/.DS_Store"
|
|
32
|
+
],
|
|
20
33
|
"typesVersions": {
|
|
21
34
|
"*": {
|
|
22
35
|
"ox-title-bar.js": [
|
|
@@ -67,12 +80,12 @@
|
|
|
67
80
|
},
|
|
68
81
|
"dependencies": {
|
|
69
82
|
"@material/web": "^2.0.0",
|
|
70
|
-
"@operato/help": "^10.29.
|
|
71
|
-
"@operato/input": "^10.29.
|
|
72
|
-
"@operato/layout": "^10.29.
|
|
73
|
-
"@operato/shell": "^10.29.
|
|
74
|
-
"@operato/styles": "^10.29.
|
|
75
|
-
"@operato/utils": "^10.29.
|
|
83
|
+
"@operato/help": "^10.29.84",
|
|
84
|
+
"@operato/input": "^10.29.83",
|
|
85
|
+
"@operato/layout": "^10.29.83",
|
|
86
|
+
"@operato/shell": "^10.29.83",
|
|
87
|
+
"@operato/styles": "^10.29.83",
|
|
88
|
+
"@operato/utils": "^10.29.83",
|
|
76
89
|
"lit": "^3.1.2",
|
|
77
90
|
"lodash-es": "^4.17.21"
|
|
78
91
|
},
|
|
@@ -108,5 +121,5 @@
|
|
|
108
121
|
"prettier --write"
|
|
109
122
|
]
|
|
110
123
|
},
|
|
111
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "a6c30e4a03a2a71b4aba24f09853d8be78655147"
|
|
112
125
|
}
|