@operato/context 2.0.0-alpha.7 → 2.0.0-alpha.71
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 +374 -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 +2 -2
- package/dist/src/layouts/ox-context-toolbar.js +98 -70
- 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 +74 -45
- 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 +27 -21
- 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 +90 -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 +146 -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 +48 -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 +127 -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 +82 -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 +98 -70
- package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
- package/src/tools/ox-page-action-context-bar.ts +102 -64
- package/src/tools/ox-page-action-overlay-template.ts +47 -41
- 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 +104 -0
- package/stories/ox-context-toolbar-complex.stories.ts +158 -0
- package/stories/ox-context-toolbar-empty.stories.ts +61 -0
- package/stories/ox-context-toolbar-overflow.stories.ts +139 -0
- package/stories/ox-context-toolbar.stories.ts +94 -0
- package/themes/app-theme.css +145 -0
- package/themes/context-theme.css +74 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '../src/layouts/ox-context-page-toolbar.js'
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
+
import '@operato/input/ox-input-select-buttons.js'
|
|
5
|
+
import { CommonHeaderStyles } from '@operato/styles'
|
|
6
|
+
import { TOOL_POSITION } from '@operato/layout'
|
|
7
|
+
|
|
8
|
+
import '@operato/styles'
|
|
9
|
+
|
|
10
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'ox-context-page-toolbar select buttons',
|
|
14
|
+
component: 'ox-context-page-toolbar',
|
|
15
|
+
argTypes: {
|
|
16
|
+
label: { control: 'string' }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface Story<T> {
|
|
21
|
+
(args: T): TemplateResult
|
|
22
|
+
args?: Partial<T>
|
|
23
|
+
argTypes?: Record<string, unknown>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface ArgTypes {
|
|
27
|
+
label?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
|
|
31
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
32
|
+
|
|
33
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
34
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
35
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
body {
|
|
39
|
+
background-color: white;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${CommonHeaderStyles.cssText}
|
|
43
|
+
</style>
|
|
44
|
+
|
|
45
|
+
<div style="height:600px;">
|
|
46
|
+
<div class="header">
|
|
47
|
+
<div class="title">
|
|
48
|
+
<md-icon>apps</md-icon>
|
|
49
|
+
${label}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="filters">
|
|
53
|
+
<label>Filter-X</label><input type="text" name="name"></input>
|
|
54
|
+
<ox-input-select-buttons
|
|
55
|
+
@change=${(e: Event) => {
|
|
56
|
+
console.log((e.target as HTMLInputElement).value)
|
|
57
|
+
}}
|
|
58
|
+
name="wearables"
|
|
59
|
+
.value=${'Gloves'}
|
|
60
|
+
.options=${[
|
|
61
|
+
{ display: 'SHOOSE', value: 'Shoose' },
|
|
62
|
+
{ display: 'CHOTHES', value: 'Clothes' },
|
|
63
|
+
{ display: 'GLOVES', value: 'Gloves' }
|
|
64
|
+
]}
|
|
65
|
+
multiple
|
|
66
|
+
></ox-input-select-buttons>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<ox-context-page-toolbar class="actions"
|
|
70
|
+
.tools=${[
|
|
71
|
+
{
|
|
72
|
+
position: TOOL_POSITION.FRONT,
|
|
73
|
+
template: html` <md-icon>download</md-icon> `,
|
|
74
|
+
context: 'exportable'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
position: TOOL_POSITION.FRONT,
|
|
78
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
79
|
+
context: 'importable'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
position: TOOL_POSITION.CENTER,
|
|
83
|
+
template: html`<ox-page-action-context-bar
|
|
84
|
+
.actions=${[
|
|
85
|
+
{
|
|
86
|
+
title: 'save',
|
|
87
|
+
action: () => {},
|
|
88
|
+
icon: 'save'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'copy',
|
|
92
|
+
action: () => {},
|
|
93
|
+
icon: 'content_copy',
|
|
94
|
+
emphasis: {
|
|
95
|
+
outlined: true
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'edit',
|
|
100
|
+
action: () => {},
|
|
101
|
+
icon: 'content_copy',
|
|
102
|
+
emphasis: {
|
|
103
|
+
outlined: true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: 'hoppaang',
|
|
108
|
+
action: () => {},
|
|
109
|
+
icon: '',
|
|
110
|
+
emphasis: {
|
|
111
|
+
outlined: true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: 'delete',
|
|
116
|
+
action: () => {},
|
|
117
|
+
icon: 'delete',
|
|
118
|
+
emphasis: {
|
|
119
|
+
danger: true,
|
|
120
|
+
filled: true
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]}
|
|
124
|
+
></ox-page-action-context-bar>`
|
|
125
|
+
}
|
|
126
|
+
]}
|
|
127
|
+
.context=${{
|
|
128
|
+
exportable: true,
|
|
129
|
+
importable: true,
|
|
130
|
+
toolbar: false
|
|
131
|
+
}}
|
|
132
|
+
|
|
133
|
+
}> </ox-context-page-toolbar>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
`
|
|
137
|
+
|
|
138
|
+
export const Regular = Template.bind({})
|
|
139
|
+
Regular.args = {
|
|
140
|
+
label: 'common header styles'
|
|
141
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '../src/layouts/ox-context-page-toolbar.js'
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
+
import { CommonHeaderStyles } from '@operato/styles'
|
|
5
|
+
import { TOOL_POSITION } from '@operato/layout'
|
|
6
|
+
|
|
7
|
+
import '@operato/styles'
|
|
8
|
+
|
|
9
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'ox-context-page-toolbar-select',
|
|
13
|
+
component: 'ox-context-page-toolbar',
|
|
14
|
+
argTypes: {
|
|
15
|
+
label: { control: 'string' }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Story<T> {
|
|
20
|
+
(args: T): TemplateResult
|
|
21
|
+
args?: Partial<T>
|
|
22
|
+
argTypes?: Record<string, unknown>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ArgTypes {
|
|
26
|
+
label?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
|
|
30
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
31
|
+
|
|
32
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
33
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
34
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
body {
|
|
38
|
+
background-color: white;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${CommonHeaderStyles.cssText}
|
|
42
|
+
</style>
|
|
43
|
+
|
|
44
|
+
<div style="height:600px;">
|
|
45
|
+
<div class="header">
|
|
46
|
+
<div class="title">
|
|
47
|
+
<md-icon>apps</md-icon>
|
|
48
|
+
${label}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="filters">
|
|
52
|
+
<label>Filter</label><input type="text"></input>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<ox-context-page-toolbar class="actions"
|
|
56
|
+
.tools=${[
|
|
57
|
+
{
|
|
58
|
+
position: TOOL_POSITION.FRONT,
|
|
59
|
+
template: html` <md-icon>download</md-icon> `,
|
|
60
|
+
context: 'exportable'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
position: TOOL_POSITION.FRONT,
|
|
64
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
65
|
+
context: 'importable'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
position: TOOL_POSITION.CENTER,
|
|
69
|
+
template: html`<ox-page-action-context-bar
|
|
70
|
+
.actions=${[
|
|
71
|
+
{
|
|
72
|
+
title: 'smile',
|
|
73
|
+
action: () => {},
|
|
74
|
+
select: ['', 'delete', 'hahaha', 'hohoho']
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: 'save',
|
|
78
|
+
action: () => {},
|
|
79
|
+
icon: 'save'
|
|
80
|
+
}
|
|
81
|
+
]}
|
|
82
|
+
></ox-page-action-context-bar>`
|
|
83
|
+
}
|
|
84
|
+
]}
|
|
85
|
+
.context=${{
|
|
86
|
+
exportable: true,
|
|
87
|
+
importable: true,
|
|
88
|
+
toolbar: false
|
|
89
|
+
}}
|
|
90
|
+
|
|
91
|
+
}> </ox-context-page-toolbar>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
`
|
|
95
|
+
|
|
96
|
+
export const Regular = Template.bind({})
|
|
97
|
+
Regular.args = {
|
|
98
|
+
label: 'common header styles'
|
|
99
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '../src/layouts/ox-context-page-toolbar.js'
|
|
3
|
+
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
+
import { CommonHeaderStyles } from '@operato/styles'
|
|
5
|
+
import { TOOL_POSITION } from '@operato/layout'
|
|
6
|
+
|
|
7
|
+
import '@operato/styles'
|
|
8
|
+
|
|
9
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'ox-context-page-toolbar',
|
|
13
|
+
component: 'ox-context-page-toolbar',
|
|
14
|
+
argTypes: {
|
|
15
|
+
label: { control: 'string' }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Story<T> {
|
|
20
|
+
(args: T): TemplateResult
|
|
21
|
+
args?: Partial<T>
|
|
22
|
+
argTypes?: Record<string, unknown>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ArgTypes {
|
|
26
|
+
label?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
|
|
30
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
31
|
+
|
|
32
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
33
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
34
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
body {
|
|
38
|
+
background-color: white;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${CommonHeaderStyles.cssText}
|
|
42
|
+
</style>
|
|
43
|
+
|
|
44
|
+
<div style="height:600px;">
|
|
45
|
+
<div class="header">
|
|
46
|
+
<div class="title">
|
|
47
|
+
<md-icon>apps</md-icon>
|
|
48
|
+
${label}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="filters">
|
|
52
|
+
<label>Filter</label><input type="text"></input>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<ox-context-page-toolbar class="actions"
|
|
56
|
+
.tools=${[
|
|
57
|
+
{
|
|
58
|
+
position: TOOL_POSITION.FRONT,
|
|
59
|
+
template: html` <md-icon>download</md-icon> `,
|
|
60
|
+
context: 'exportable'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
position: TOOL_POSITION.FRONT,
|
|
64
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
65
|
+
context: 'importable'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
position: TOOL_POSITION.CENTER,
|
|
69
|
+
template: html`<ox-page-action-context-bar
|
|
70
|
+
.actions=${[
|
|
71
|
+
{
|
|
72
|
+
title: 'save',
|
|
73
|
+
action: () => {},
|
|
74
|
+
icon: 'save'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: 'copy',
|
|
78
|
+
action: () => {},
|
|
79
|
+
icon: 'content_copy'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: 'delete',
|
|
83
|
+
action: () => {},
|
|
84
|
+
icon: 'delete'
|
|
85
|
+
}
|
|
86
|
+
]}
|
|
87
|
+
></ox-page-action-context-bar>`
|
|
88
|
+
}
|
|
89
|
+
]}
|
|
90
|
+
.context=${{
|
|
91
|
+
exportable: true,
|
|
92
|
+
importable: true,
|
|
93
|
+
toolbar: false
|
|
94
|
+
}}
|
|
95
|
+
|
|
96
|
+
}> </ox-context-page-toolbar>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
`
|
|
100
|
+
|
|
101
|
+
export const Regular = Template.bind({})
|
|
102
|
+
Regular.args = {
|
|
103
|
+
label: 'common header styles'
|
|
104
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
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/context-theme.css" rel="stylesheet" />
|
|
27
|
+
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
<link
|
|
33
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
+
rel="stylesheet"
|
|
35
|
+
/>
|
|
36
|
+
<link
|
|
37
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
body {
|
|
43
|
+
background-color: white;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<div style="height:100px; padding: 10px; background-color: black;">
|
|
48
|
+
<ox-context-toolbar
|
|
49
|
+
.tools=${[
|
|
50
|
+
{
|
|
51
|
+
position: TOOL_POSITION.FRONT_END,
|
|
52
|
+
template: html` <md-icon>download</md-icon> `,
|
|
53
|
+
context: 'exportable'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
position: TOOL_POSITION.FRONT_END,
|
|
57
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
58
|
+
context: 'importable'
|
|
59
|
+
},
|
|
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
|
+
}
|
|
89
|
+
]}
|
|
90
|
+
></ox-page-action-context-bar>`
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
position: TOOL_POSITION.REAR,
|
|
94
|
+
template: html`<ox-page-action-context-bar
|
|
95
|
+
.actions=${[
|
|
96
|
+
{
|
|
97
|
+
title: 'save',
|
|
98
|
+
action: () => {},
|
|
99
|
+
icon: 'save'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: 'copy',
|
|
103
|
+
action: () => {},
|
|
104
|
+
icon: 'content_copy'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: 'delete',
|
|
108
|
+
action: () => {},
|
|
109
|
+
icon: 'delete'
|
|
110
|
+
}
|
|
111
|
+
]}
|
|
112
|
+
></ox-page-action-context-bar>`
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
position: TOOL_POSITION.REAR_END,
|
|
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
|
+
}
|
|
133
|
+
]}
|
|
134
|
+
></ox-page-action-context-bar>`
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
position: TOOL_POSITION.REAR_END,
|
|
138
|
+
template: html` <md-icon>download</md-icon> `,
|
|
139
|
+
context: 'exportable'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
position: TOOL_POSITION.REAR_END,
|
|
143
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
144
|
+
context: 'importable'
|
|
145
|
+
}
|
|
146
|
+
]}
|
|
147
|
+
.context=${{
|
|
148
|
+
exportable: true,
|
|
149
|
+
importable: true,
|
|
150
|
+
toolbar: true
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
</ox-context-toolbar>
|
|
154
|
+
</div>
|
|
155
|
+
`
|
|
156
|
+
|
|
157
|
+
export const Regular = Template.bind({})
|
|
158
|
+
Regular.args = {}
|
|
@@ -0,0 +1,61 @@
|
|
|
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/context-theme.css" rel="stylesheet" />
|
|
27
|
+
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
<link
|
|
33
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
+
rel="stylesheet"
|
|
35
|
+
/>
|
|
36
|
+
<link
|
|
37
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
body {
|
|
43
|
+
background-color: white;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<div style="height:100px; padding: 10px; background-color: black;">
|
|
48
|
+
<ox-context-toolbar
|
|
49
|
+
.tools=${[]}
|
|
50
|
+
.context=${{
|
|
51
|
+
exportable: true,
|
|
52
|
+
importable: true,
|
|
53
|
+
toolbar: false
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
</ox-context-toolbar>
|
|
57
|
+
</div>
|
|
58
|
+
`
|
|
59
|
+
|
|
60
|
+
export const Regular = Template.bind({})
|
|
61
|
+
Regular.args = {}
|
|
@@ -0,0 +1,139 @@
|
|
|
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/context-theme.css" rel="stylesheet" />
|
|
27
|
+
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
<link
|
|
33
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
+
rel="stylesheet"
|
|
35
|
+
/>
|
|
36
|
+
<link
|
|
37
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
body {
|
|
43
|
+
background-color: white;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<div style="height:100px; padding: 10px; background-color: yellow;">
|
|
48
|
+
<ox-context-toolbar
|
|
49
|
+
.tools=${[
|
|
50
|
+
{
|
|
51
|
+
position: TOOL_POSITION.FRONT,
|
|
52
|
+
template: html` <md-icon>download</md-icon> `,
|
|
53
|
+
context: 'exportable'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
position: TOOL_POSITION.FRONT,
|
|
57
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
58
|
+
context: 'importable'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
position: TOOL_POSITION.CENTER,
|
|
62
|
+
template: html`<ox-page-action-context-bar
|
|
63
|
+
.actions=${[
|
|
64
|
+
{
|
|
65
|
+
title: 'save',
|
|
66
|
+
action: () => {},
|
|
67
|
+
icon: 'save'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: 'copy',
|
|
71
|
+
action: () => {},
|
|
72
|
+
icon: 'content_copy'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: 'delete',
|
|
76
|
+
action: () => {},
|
|
77
|
+
icon: 'delete'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: 'save',
|
|
81
|
+
action: () => {},
|
|
82
|
+
icon: 'save'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: 'copy',
|
|
86
|
+
action: () => {},
|
|
87
|
+
icon: 'content_copy'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: 'delete',
|
|
91
|
+
action: () => {},
|
|
92
|
+
icon: 'delete'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: 'save',
|
|
96
|
+
action: () => {},
|
|
97
|
+
icon: 'save'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: 'copy',
|
|
101
|
+
action: () => {},
|
|
102
|
+
icon: 'content_copy'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: 'delete',
|
|
106
|
+
action: () => {},
|
|
107
|
+
icon: 'delete'
|
|
108
|
+
},
|
|
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
|
+
}
|
|
124
|
+
]}
|
|
125
|
+
></ox-page-action-context-bar>`
|
|
126
|
+
}
|
|
127
|
+
]}
|
|
128
|
+
.context=${{
|
|
129
|
+
exportable: true,
|
|
130
|
+
importable: true,
|
|
131
|
+
toolbar: true
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
</ox-context-toolbar>
|
|
135
|
+
</div>
|
|
136
|
+
`
|
|
137
|
+
|
|
138
|
+
export const Regular = Template.bind({})
|
|
139
|
+
Regular.args = {}
|