@operato/context 2.0.0-alpha.63 → 2.0.0-alpha.64
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 +11 -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 +19 -0
- package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
- package/dist/src/tools/ox-page-action-context-bar.js +33 -9
- 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 +21 -5
- package/dist/stories/ox-context-page-toolbar-select-buttons.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-toolbar.stories.d.ts +24 -0
- package/dist/stories/ox-context-toolbar.stories.js +90 -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 +19 -0
- package/src/tools/ox-page-action-context-bar.ts +33 -9
- package/src/tools/ox-title-bar.ts +1 -1
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +21 -5
- package/stories/ox-context-toolbar.stories.ts +104 -0
|
@@ -0,0 +1,104 @@
|
|
|
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 { 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-toolbar',
|
|
13
|
+
component: 'ox-context-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>summarize</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-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-toolbar>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
`
|
|
100
|
+
|
|
101
|
+
export const Regular = Template.bind({})
|
|
102
|
+
Regular.args = {
|
|
103
|
+
label: 'common header styles'
|
|
104
|
+
}
|