@operato/context 2.0.0-alpha.62 → 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.
Files changed (26) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/src/layouts/ox-context-page-toolbar.js +11 -2
  3. package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
  4. package/dist/src/layouts/ox-context-toolbar.d.ts +1 -1
  5. package/dist/src/layouts/ox-context-toolbar.js +19 -0
  6. package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
  7. package/dist/src/tools/ox-page-action-context-bar.js +33 -9
  8. package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
  9. package/dist/src/tools/ox-title-bar.js +1 -1
  10. package/dist/src/tools/ox-title-bar.js.map +1 -1
  11. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +21 -5
  12. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -1
  13. package/dist/stories/ox-context-page-toolbar.stories copy.d.ts +24 -0
  14. package/dist/stories/ox-context-page-toolbar.stories copy.js +90 -0
  15. package/dist/stories/ox-context-page-toolbar.stories copy.js.map +1 -0
  16. package/dist/stories/ox-context-toolbar.stories.d.ts +24 -0
  17. package/dist/stories/ox-context-toolbar.stories.js +90 -0
  18. package/dist/stories/ox-context-toolbar.stories.js.map +1 -0
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +6 -6
  21. package/src/layouts/ox-context-page-toolbar.ts +11 -2
  22. package/src/layouts/ox-context-toolbar.ts +19 -0
  23. package/src/tools/ox-page-action-context-bar.ts +33 -9
  24. package/src/tools/ox-title-bar.ts +1 -1
  25. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +21 -5
  26. package/stories/ox-context-toolbar.stories.ts +104 -0
@@ -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
- danger: true,
91
- filled: true
95
+ outlined: true
92
96
  }
93
97
  },
94
98
  {
95
- title: 'copy',
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,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
+ }