@operato/context 2.0.0-alpha.9 → 2.0.0-alpha.92
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/CHANGELOG.md +470 -0
- package/demo/index.html +13 -2
- package/dist/src/layouts/ox-context-page-toolbar.d.ts +9 -4
- package/dist/src/layouts/ox-context-page-toolbar.js +30 -10
- package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
- package/dist/src/layouts/ox-context-toolbar.d.ts +5 -3
- package/dist/src/layouts/ox-context-toolbar.js +139 -73
- package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
- package/dist/src/styles/ox-context-toolbar-overlay-style.js +2 -2
- package/dist/src/styles/ox-context-toolbar-overlay-style.js.map +1 -1
- package/dist/src/tools/ox-page-action-context-bar.d.ts +12 -5
- package/dist/src/tools/ox-page-action-context-bar.js +43 -48
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-page-action-overlay-template.d.ts +2 -2
- package/dist/src/tools/ox-page-action-overlay-template.js +22 -31
- package/dist/src/tools/ox-page-action-overlay-template.js.map +1 -1
- package/dist/src/tools/ox-page-title-bar.d.ts +2 -2
- package/dist/src/tools/ox-page-title-bar.js +6 -8
- package/dist/src/tools/ox-page-title-bar.js.map +1 -1
- package/dist/src/tools/ox-title-bar.d.ts +2 -2
- package/dist/src/tools/ox-title-bar.js +6 -8
- package/dist/src/tools/ox-title-bar.js.map +1 -1
- 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 +127 -0
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js +85 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -0
- package/dist/stories/ox-context-page-toolbar.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar.stories.js +93 -0
- package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-complex.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js +150 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-empty.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js +88 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.js +131 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar.stories.js +188 -0
- package/dist/stories/ox-context-toolbar.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/layouts/ox-context-page-toolbar.ts +33 -10
- package/src/layouts/ox-context-toolbar.ts +140 -70
- package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
- package/src/tools/ox-page-action-context-bar.ts +71 -67
- package/src/tools/ox-page-action-overlay-template.ts +42 -51
- package/src/tools/ox-page-title-bar.ts +6 -8
- package/src/tools/ox-title-bar.ts +6 -8
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +141 -0
- package/stories/ox-context-page-toolbar-select.stories.ts +99 -0
- package/stories/ox-context-page-toolbar.stories.ts +107 -0
- package/stories/ox-context-toolbar-complex.stories.ts +162 -0
- package/stories/ox-context-toolbar-empty.stories.ts +100 -0
- package/stories/ox-context-toolbar-overflow.stories.ts +143 -0
- package/stories/ox-context-toolbar.stories.ts +200 -0
- package/themes/app-theme.css +161 -0
- package/themes/context-theme.css +74 -0
- package/themes/material-theme.css +38 -0
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar complex',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="height:100px; padding: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[
|
|
51
|
+
{
|
|
52
|
+
position: TOOL_POSITION.FRONT_END,
|
|
53
|
+
template: html` <md-icon>download</md-icon> `,
|
|
54
|
+
context: 'exportable'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
position: TOOL_POSITION.FRONT_END,
|
|
58
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
59
|
+
context: 'importable'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.FRONT,
|
|
63
|
+
template: html` <md-icon>download</md-icon> `,
|
|
64
|
+
context: 'exportable'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
position: TOOL_POSITION.FRONT,
|
|
68
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
69
|
+
context: 'importable'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
position: TOOL_POSITION.CENTER,
|
|
73
|
+
template: html`<ox-page-action-context-bar
|
|
74
|
+
.actions=${[
|
|
75
|
+
{
|
|
76
|
+
title: 'save',
|
|
77
|
+
action: () => {},
|
|
78
|
+
icon: 'save'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'copy',
|
|
82
|
+
action: () => {},
|
|
83
|
+
icon: 'content_copy'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'delete',
|
|
87
|
+
action: () => {},
|
|
88
|
+
icon: 'delete',
|
|
89
|
+
emphasis: {
|
|
90
|
+
danger: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]}
|
|
94
|
+
></ox-page-action-context-bar>`
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
position: TOOL_POSITION.REAR,
|
|
98
|
+
template: html`<ox-page-action-context-bar
|
|
99
|
+
.actions=${[
|
|
100
|
+
{
|
|
101
|
+
title: 'save',
|
|
102
|
+
action: () => {},
|
|
103
|
+
icon: 'save'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'copy',
|
|
107
|
+
action: () => {},
|
|
108
|
+
icon: 'content_copy'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: 'delete',
|
|
112
|
+
action: () => {},
|
|
113
|
+
icon: 'delete'
|
|
114
|
+
}
|
|
115
|
+
]}
|
|
116
|
+
></ox-page-action-context-bar>`
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
position: TOOL_POSITION.REAR_END,
|
|
120
|
+
template: html`<ox-page-action-context-bar
|
|
121
|
+
.actions=${[
|
|
122
|
+
{
|
|
123
|
+
title: 'save',
|
|
124
|
+
action: () => {},
|
|
125
|
+
icon: 'save'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: 'copy',
|
|
129
|
+
action: () => {},
|
|
130
|
+
icon: 'content_copy'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: 'delete',
|
|
134
|
+
action: () => {},
|
|
135
|
+
icon: 'delete'
|
|
136
|
+
}
|
|
137
|
+
]}
|
|
138
|
+
></ox-page-action-context-bar>`
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
position: TOOL_POSITION.REAR_END,
|
|
142
|
+
template: html` <md-icon>download</md-icon> `,
|
|
143
|
+
context: 'exportable'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
position: TOOL_POSITION.REAR_END,
|
|
147
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
148
|
+
context: 'importable'
|
|
149
|
+
}
|
|
150
|
+
]}
|
|
151
|
+
.context=${{
|
|
152
|
+
exportable: true,
|
|
153
|
+
importable: true,
|
|
154
|
+
toolbar: true
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
</ox-context-toolbar>
|
|
158
|
+
</div>
|
|
159
|
+
`
|
|
160
|
+
|
|
161
|
+
export const Regular = Template.bind({})
|
|
162
|
+
Regular.args = {}
|
|
@@ -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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar empty',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[]}
|
|
51
|
+
.context=${{
|
|
52
|
+
exportable: true,
|
|
53
|
+
importable: true,
|
|
54
|
+
toolbar: true
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
</ox-context-toolbar>
|
|
58
|
+
|
|
59
|
+
<ox-context-toolbar
|
|
60
|
+
.tools=${[
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
64
|
+
}
|
|
65
|
+
]}
|
|
66
|
+
.context=${{
|
|
67
|
+
exportable: true,
|
|
68
|
+
importable: true,
|
|
69
|
+
toolbar: true
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
</ox-context-toolbar>
|
|
73
|
+
|
|
74
|
+
<ox-context-toolbar
|
|
75
|
+
.tools=${[
|
|
76
|
+
{
|
|
77
|
+
position: TOOL_POSITION.CENTER,
|
|
78
|
+
template: html`<ox-page-action-context-bar
|
|
79
|
+
.actions=${[
|
|
80
|
+
{
|
|
81
|
+
title: 'save',
|
|
82
|
+
action: () => {},
|
|
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
|
+
|
|
99
|
+
export const Regular = Template.bind({})
|
|
100
|
+
Regular.args = {}
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar overflow',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="height:100px; padding: 10px; background-color: yellow;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[
|
|
51
|
+
{
|
|
52
|
+
position: TOOL_POSITION.FRONT,
|
|
53
|
+
template: html` <md-icon>download</md-icon> `,
|
|
54
|
+
context: 'exportable'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
position: TOOL_POSITION.FRONT,
|
|
58
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
59
|
+
context: 'importable'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar
|
|
64
|
+
.actions=${[
|
|
65
|
+
{
|
|
66
|
+
title: 'save',
|
|
67
|
+
action: () => {},
|
|
68
|
+
icon: 'save'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'copy',
|
|
72
|
+
action: () => {},
|
|
73
|
+
icon: 'content_copy'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'delete',
|
|
77
|
+
action: () => {},
|
|
78
|
+
icon: 'delete'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'save',
|
|
82
|
+
action: () => {},
|
|
83
|
+
icon: 'save'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'copy',
|
|
87
|
+
action: () => {},
|
|
88
|
+
icon: 'content_copy'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'delete',
|
|
92
|
+
action: () => {},
|
|
93
|
+
icon: 'delete'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'save',
|
|
97
|
+
action: () => {},
|
|
98
|
+
icon: 'save'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'copy',
|
|
102
|
+
action: () => {},
|
|
103
|
+
icon: 'content_copy'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'delete',
|
|
107
|
+
action: () => {},
|
|
108
|
+
icon: 'delete'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: 'save',
|
|
112
|
+
action: () => {},
|
|
113
|
+
icon: 'save'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'copy',
|
|
117
|
+
action: () => {},
|
|
118
|
+
icon: 'content_copy'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: 'delete',
|
|
122
|
+
action: () => {},
|
|
123
|
+
icon: 'delete',
|
|
124
|
+
emphasis: {
|
|
125
|
+
danger: true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]}
|
|
129
|
+
></ox-page-action-context-bar>`
|
|
130
|
+
}
|
|
131
|
+
]}
|
|
132
|
+
.context=${{
|
|
133
|
+
exportable: true,
|
|
134
|
+
importable: true,
|
|
135
|
+
toolbar: true
|
|
136
|
+
}}
|
|
137
|
+
>
|
|
138
|
+
</ox-context-toolbar>
|
|
139
|
+
</div>
|
|
140
|
+
`
|
|
141
|
+
|
|
142
|
+
export const Regular = Template.bind({})
|
|
143
|
+
Regular.args = {}
|
|
@@ -0,0 +1,200 @@
|
|
|
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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="height:500px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[
|
|
51
|
+
{
|
|
52
|
+
position: TOOL_POSITION.FRONT,
|
|
53
|
+
template: html` <md-icon>download</md-icon> `,
|
|
54
|
+
context: 'exportable'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
position: TOOL_POSITION.FRONT,
|
|
58
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
59
|
+
context: 'importable'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar
|
|
64
|
+
.actions=${[
|
|
65
|
+
{
|
|
66
|
+
title: 'save',
|
|
67
|
+
action: () => {},
|
|
68
|
+
icon: 'save'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'copy',
|
|
72
|
+
action: () => {},
|
|
73
|
+
icon: 'content_copy'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'delete',
|
|
77
|
+
action: () => {},
|
|
78
|
+
icon: 'delete',
|
|
79
|
+
emphasis: {
|
|
80
|
+
raised: true,
|
|
81
|
+
outlined: false,
|
|
82
|
+
dense: false,
|
|
83
|
+
danger: true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]}
|
|
87
|
+
></ox-page-action-context-bar>`
|
|
88
|
+
}
|
|
89
|
+
]}
|
|
90
|
+
.context=${{
|
|
91
|
+
exportable: true,
|
|
92
|
+
importable: true,
|
|
93
|
+
toolbar: true
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
</ox-context-toolbar>
|
|
97
|
+
|
|
98
|
+
<ox-context-toolbar
|
|
99
|
+
.tools=${[
|
|
100
|
+
{
|
|
101
|
+
position: TOOL_POSITION.FRONT,
|
|
102
|
+
template: html` <md-icon>download</md-icon> `,
|
|
103
|
+
context: 'exportable'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
position: TOOL_POSITION.CENTER,
|
|
107
|
+
template: html`<ox-page-action-context-bar
|
|
108
|
+
.actions=${[
|
|
109
|
+
{
|
|
110
|
+
title: 'save',
|
|
111
|
+
action: () => {},
|
|
112
|
+
icon: 'save'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: 'copy',
|
|
116
|
+
action: () => {},
|
|
117
|
+
icon: 'content_copy'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'delete',
|
|
121
|
+
action: () => {},
|
|
122
|
+
icon: 'delete',
|
|
123
|
+
emphasis: {
|
|
124
|
+
raised: false,
|
|
125
|
+
outlined: false,
|
|
126
|
+
dense: false,
|
|
127
|
+
danger: true
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]}
|
|
131
|
+
></ox-page-action-context-bar>`
|
|
132
|
+
}
|
|
133
|
+
]}
|
|
134
|
+
.context=${{
|
|
135
|
+
exportable: true,
|
|
136
|
+
importable: true,
|
|
137
|
+
toolbar: true
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
</ox-context-toolbar>
|
|
141
|
+
|
|
142
|
+
<ox-context-toolbar
|
|
143
|
+
.tools=${[
|
|
144
|
+
{
|
|
145
|
+
position: TOOL_POSITION.FRONT,
|
|
146
|
+
template: html` <md-icon>download</md-icon> `,
|
|
147
|
+
context: 'exportable'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
position: TOOL_POSITION.FRONT,
|
|
151
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
152
|
+
context: 'importable'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
position: TOOL_POSITION.FRONT,
|
|
156
|
+
template: html` <md-icon>restart_alt</md-icon> `,
|
|
157
|
+
context: 'resettable'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
position: TOOL_POSITION.CENTER,
|
|
161
|
+
template: html`<ox-page-action-context-bar
|
|
162
|
+
.actions=${[
|
|
163
|
+
{
|
|
164
|
+
title: 'save',
|
|
165
|
+
action: () => {},
|
|
166
|
+
icon: 'save'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: 'copy',
|
|
170
|
+
action: () => {},
|
|
171
|
+
icon: 'content_copy'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: 'delete',
|
|
175
|
+
action: () => {},
|
|
176
|
+
icon: 'delete',
|
|
177
|
+
emphasis: {
|
|
178
|
+
raised: true,
|
|
179
|
+
outlined: false,
|
|
180
|
+
dense: false,
|
|
181
|
+
danger: true
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]}
|
|
185
|
+
></ox-page-action-context-bar>`
|
|
186
|
+
}
|
|
187
|
+
]}
|
|
188
|
+
.context=${{
|
|
189
|
+
exportable: true,
|
|
190
|
+
importable: true,
|
|
191
|
+
resettable: true,
|
|
192
|
+
toolbar: true
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
195
|
+
</ox-context-toolbar>
|
|
196
|
+
</div>
|
|
197
|
+
`
|
|
198
|
+
|
|
199
|
+
export const Regular = Template.bind({})
|
|
200
|
+
Regular.args = {}
|