@operato/context 2.0.0-alpha.63 → 2.0.0-alpha.65
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 +20 -0
- package/dist/src/layouts/ox-context-page-toolbar.js +11 -2
- package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
- package/dist/src/layouts/ox-context-toolbar.d.ts +1 -1
- package/dist/src/layouts/ox-context-toolbar.js +62 -52
- package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
- package/dist/src/tools/ox-page-action-context-bar.js +39 -18
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-title-bar.js +1 -1
- package/dist/src/tools/ox-title-bar.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +22 -6
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar-select.stories.js +1 -1
- package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar.stories copy.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar.stories copy.js +90 -0
- package/dist/stories/ox-context-page-toolbar.stories copy.js.map +1 -0
- package/dist/stories/ox-context-page-toolbar.stories.js +1 -1
- package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -1
- package/dist/stories/ox-context-toolbar-complex-2.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-complex-2.stories.js +136 -0
- package/dist/stories/ox-context-toolbar-complex-2.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-complex.stories copy.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-complex.stories copy.js +146 -0
- package/dist/stories/ox-context-toolbar-complex.stories copy.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-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 copy.d.ts +19 -0
- package/dist/stories/ox-context-toolbar.stories copy.js +82 -0
- package/dist/stories/ox-context-toolbar.stories copy.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 +4 -4
- package/src/layouts/ox-context-page-toolbar.ts +11 -2
- package/src/layouts/ox-context-toolbar.ts +62 -52
- package/src/tools/ox-page-action-context-bar.ts +39 -18
- package/src/tools/ox-title-bar.ts +1 -1
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +22 -6
- package/stories/ox-context-page-toolbar-select.stories.ts +1 -1
- package/stories/ox-context-page-toolbar.stories.ts +1 -1
- package/stories/ox-context-toolbar-complex.stories.ts +158 -0
- package/stories/ox-context-toolbar-overflow.stories.ts +139 -0
- package/stories/ox-context-toolbar.stories.ts +94 -0
- package/themes/context-theme.css +74 -0
|
@@ -18,7 +18,7 @@ export class PageActionContextBar extends connect(store)(LitElement) {
|
|
|
18
18
|
:host {
|
|
19
19
|
display: flex;
|
|
20
20
|
overflow: hidden;
|
|
21
|
-
|
|
21
|
+
gap: var(--padding-narrow);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
:host *:focus {
|
|
@@ -26,16 +26,30 @@ export class PageActionContextBar extends connect(store)(LitElement) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
button {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
md-icon {
|
|
35
|
-
background-color: var(--theme-white-color);
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
background-color: var(--button-background-color, #fafbfc);
|
|
36
32
|
border: 1px solid rgba(var(--primary-color-rgb), 0.5);
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
border-radius: var(--button-border-radius);
|
|
34
|
+
|
|
35
|
+
font-size: var(--fontsize-default);
|
|
36
|
+
color: var(--secondary-color);
|
|
37
|
+
|
|
38
|
+
md-icon {
|
|
39
|
+
margin: 4px 1px;
|
|
40
|
+
|
|
41
|
+
--md-icon-size: 18px;
|
|
42
|
+
color: var(--primary-color);
|
|
43
|
+
}
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: var(--primary-color);
|
|
46
|
+
|
|
47
|
+
color: var(--theme-white-color);
|
|
48
|
+
|
|
49
|
+
md-icon {
|
|
50
|
+
color: var(--white-theme-color);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
39
53
|
}
|
|
40
54
|
|
|
41
55
|
[filled] {
|
|
@@ -45,31 +59,38 @@ export class PageActionContextBar extends connect(store)(LitElement) {
|
|
|
45
59
|
[danger] {
|
|
46
60
|
color: var(--mdc-danger-button-primary-color);
|
|
47
61
|
border-color: var(--mdc-danger-button-outline-color);
|
|
62
|
+
|
|
63
|
+
md-icon {
|
|
64
|
+
color: var(--mdc-danger-button-primary-color);
|
|
65
|
+
}
|
|
66
|
+
&:hover {
|
|
67
|
+
background-color: var(--mdc-danger-button-primary-color);
|
|
68
|
+
}
|
|
48
69
|
}
|
|
49
70
|
|
|
50
71
|
[more] {
|
|
51
72
|
position: absolute;
|
|
52
73
|
top: 0;
|
|
53
|
-
right:
|
|
74
|
+
right: 0;
|
|
54
75
|
background-color: var(--context-action-bar-more-button-background-color);
|
|
55
76
|
box-shadow: -2px 0px 2px 1px rgba(0, 0, 0, 0.2);
|
|
56
77
|
padding: var(--context-action-bar-more-button-padding);
|
|
57
78
|
color: var(--context-action-bar-more-button-color);
|
|
79
|
+
padding: 10px;
|
|
58
80
|
font-size: 2rem;
|
|
59
81
|
}
|
|
60
82
|
|
|
61
83
|
@media screen and (max-width: 460px) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--mdc-shape-small: var(--context-action-bar-more-button-border-radius);
|
|
84
|
+
:host {
|
|
85
|
+
gap: 0;
|
|
65
86
|
}
|
|
66
87
|
|
|
67
88
|
[more] {
|
|
68
|
-
position: absolute;
|
|
69
89
|
margin-top: -10px;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button {
|
|
93
|
+
border-radius: 0;
|
|
73
94
|
}
|
|
74
95
|
}
|
|
75
96
|
|
|
@@ -45,7 +45,7 @@ const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
|
|
|
45
45
|
<div style="height:600px;">
|
|
46
46
|
<div class="header">
|
|
47
47
|
<div class="title">
|
|
48
|
-
<md-icon>
|
|
48
|
+
<md-icon>apps</md-icon>
|
|
49
49
|
${label}
|
|
50
50
|
</div>
|
|
51
51
|
|
|
@@ -85,24 +85,40 @@ const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
|
|
|
85
85
|
{
|
|
86
86
|
title: 'save',
|
|
87
87
|
action: () => {},
|
|
88
|
-
icon: 'save'
|
|
88
|
+
icon: 'save'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'copy',
|
|
92
|
+
action: () => {},
|
|
93
|
+
icon: 'content_copy',
|
|
89
94
|
emphasis: {
|
|
90
|
-
|
|
91
|
-
filled: true
|
|
95
|
+
outlined: true
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
98
|
{
|
|
95
|
-
title: '
|
|
99
|
+
title: 'edit',
|
|
96
100
|
action: () => {},
|
|
97
101
|
icon: 'content_copy',
|
|
98
102
|
emphasis: {
|
|
99
103
|
outlined: true
|
|
100
104
|
}
|
|
101
105
|
},
|
|
106
|
+
{
|
|
107
|
+
title: 'hoppaang',
|
|
108
|
+
action: () => {},
|
|
109
|
+
icon: '',
|
|
110
|
+
emphasis: {
|
|
111
|
+
outlined: true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
102
114
|
{
|
|
103
115
|
title: 'delete',
|
|
104
116
|
action: () => {},
|
|
105
|
-
icon: 'delete'
|
|
117
|
+
icon: 'delete',
|
|
118
|
+
emphasis: {
|
|
119
|
+
danger: true,
|
|
120
|
+
filled: true
|
|
121
|
+
}
|
|
106
122
|
}
|
|
107
123
|
]}
|
|
108
124
|
></ox-page-action-context-bar>`
|
|
@@ -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,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 = {}
|
|
@@ -0,0 +1,94 @@
|
|
|
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/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,
|
|
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
|
+
></ox-page-action-context-bar>`
|
|
81
|
+
}
|
|
82
|
+
]}
|
|
83
|
+
.context=${{
|
|
84
|
+
exportable: true,
|
|
85
|
+
importable: true,
|
|
86
|
+
toolbar: true
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
</ox-context-toolbar>
|
|
90
|
+
</div>
|
|
91
|
+
`
|
|
92
|
+
|
|
93
|
+
export const Regular = Template.bind({})
|
|
94
|
+
Regular.args = {}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
body {
|
|
2
|
+
--context-toolbar-background-color: var(--main-section-background-color);
|
|
3
|
+
--context-toolbar-button-background-color: #fff;
|
|
4
|
+
--context-toolbar-border: 1px solid rgba(57, 78, 100, 0.5);
|
|
5
|
+
--context-toolbar-border-hover: 1px solid var(--primary-color);
|
|
6
|
+
--context-toolbar-button-max-width: auto;
|
|
7
|
+
--context-toolbar-button-height: 36px;
|
|
8
|
+
--context-toolbar-button-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
|
|
9
|
+
--context-toolbar-button-padding: 0 9px;
|
|
10
|
+
--context-toolbar-button: normal 13px var(--theme-font);
|
|
11
|
+
--context-toolbar-button-color: var(--secondary-color);
|
|
12
|
+
--context-toolbar-iconbutton-color: var(--primary-text-color);
|
|
13
|
+
--context-toolbar-iconbutton-size: 16px;
|
|
14
|
+
--context-toolbar-function-button-height: 34px;
|
|
15
|
+
--context-toolbar-function-button-radius: 5px;
|
|
16
|
+
--context-toolbar-function-button-background-color: #446281;
|
|
17
|
+
--context-toolbar-function-button-hover-background-color: var(--primary-color);
|
|
18
|
+
--context-toolbar-function-iconbutton-size: 28px;
|
|
19
|
+
--context-toolbar-function-iconbutton-color: var(--primary-background-color);
|
|
20
|
+
--context-toolbar-function-button-lineheight: 36px;
|
|
21
|
+
--context-toolbar-function-button-color: #fff;
|
|
22
|
+
--context-toolbar-function-button-padding: 0 10px;
|
|
23
|
+
--context-toolbar-function-button-border: 1px solid rgba(0, 0, 0, 0.1);
|
|
24
|
+
--context-toolbar-list-background-color: var(--primary-background-color);
|
|
25
|
+
--context-toolbar-list-text: bold 18px var(--theme-font);
|
|
26
|
+
--context-toolbar-list-icon-size: var(--icon-default-size);
|
|
27
|
+
--context-toolbar-side-padding: 15px;
|
|
28
|
+
--context-toolbar-shadow-line: none;
|
|
29
|
+
--context-toolbar-title: bold 19px var(--theme-font);
|
|
30
|
+
|
|
31
|
+
--context-ui-background-color: rgba(40, 54, 68, 0.9);
|
|
32
|
+
--context-ui-box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.2);
|
|
33
|
+
--context-ui-border-radius: 10px;
|
|
34
|
+
--context-ui-padding: 10px;
|
|
35
|
+
--context-ui-list-color: #d0fdee;
|
|
36
|
+
--context-ui-list-border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
|
37
|
+
--context-ui-list-border-hover-bottom: 1px solid var(--primary-color);
|
|
38
|
+
--context-ui-list-padding: 5px;
|
|
39
|
+
--context-ui-button-color: var(--secondary-text-color);
|
|
40
|
+
--context-ui-button-hover-color: #fff;
|
|
41
|
+
--context-ui-button-background-color: #fff;
|
|
42
|
+
--context-ui-button-background-hover-color: var(--primary-color);
|
|
43
|
+
|
|
44
|
+
--context-action-bar-button-margin: var(--margin-narrow) 0 var(--margin-wide) var(--margin-narrow);
|
|
45
|
+
--context-action-bar-more-button-background-color: var(--context-ui-background-color);
|
|
46
|
+
--context-action-bar-more-button-padding: 6px var(--padding-default);
|
|
47
|
+
--context-action-bar-more-button-color: var(--theme-white-color);
|
|
48
|
+
--context-action-bar-more-button-border-radius: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media only screen and (max-width: 460px) {
|
|
52
|
+
body {
|
|
53
|
+
--context-toolbar-button: normal 9px var(--theme-font);
|
|
54
|
+
--context-toolbar-button-max-width: 60px;
|
|
55
|
+
--context-toolbar-button-height: 50px;
|
|
56
|
+
--context-toolbar-iconbutton-size: 30px;
|
|
57
|
+
--context-toolbar-border: none;
|
|
58
|
+
--context-toolbar-border-hover: none;
|
|
59
|
+
--context-toolbar-iconbutton-display: block;
|
|
60
|
+
--context-toolbar-iconbutton-margin: -2px;
|
|
61
|
+
--context-toolbar-button-background-color: transparent;
|
|
62
|
+
--context-toolbar-button-margin: 0;
|
|
63
|
+
--context-toolbar-function-button-height: 34px;
|
|
64
|
+
--context-toolbar-function-button-lineheight: 34px;
|
|
65
|
+
--context-toolbar-function-button-radius: 0;
|
|
66
|
+
--context-toolbar-side-padding: 0;
|
|
67
|
+
--context-toolbar-shadow-line: inset 0px 2px 2px 0px rgba(0, 0, 0, 0.1);
|
|
68
|
+
--context-toolbar-button-padding: 0 10px 0 0;
|
|
69
|
+
|
|
70
|
+
--context-action-bar-button-margin: 0;
|
|
71
|
+
--context-action-bar-more-button-border-radius: 0;
|
|
72
|
+
--context-action-bar-more-button-padding: 6px var(--padding-wide);
|
|
73
|
+
}
|
|
74
|
+
}
|