@operato/context 2.0.0-alpha.8 → 2.0.0-alpha.80

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 (62) hide show
  1. package/CHANGELOG.md +385 -0
  2. package/demo/index.html +13 -2
  3. package/dist/src/layouts/ox-context-page-toolbar.d.ts +9 -4
  4. package/dist/src/layouts/ox-context-page-toolbar.js +30 -10
  5. package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
  6. package/dist/src/layouts/ox-context-toolbar.d.ts +2 -2
  7. package/dist/src/layouts/ox-context-toolbar.js +104 -70
  8. package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
  9. package/dist/src/styles/ox-context-toolbar-overlay-style.js +2 -2
  10. package/dist/src/styles/ox-context-toolbar-overlay-style.js.map +1 -1
  11. package/dist/src/tools/ox-page-action-context-bar.d.ts +12 -5
  12. package/dist/src/tools/ox-page-action-context-bar.js +83 -44
  13. package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
  14. package/dist/src/tools/ox-page-action-overlay-template.d.ts +2 -2
  15. package/dist/src/tools/ox-page-action-overlay-template.js +28 -22
  16. package/dist/src/tools/ox-page-action-overlay-template.js.map +1 -1
  17. package/dist/src/tools/ox-page-title-bar.d.ts +2 -2
  18. package/dist/src/tools/ox-page-title-bar.js +6 -8
  19. package/dist/src/tools/ox-page-title-bar.js.map +1 -1
  20. package/dist/src/tools/ox-title-bar.d.ts +2 -2
  21. package/dist/src/tools/ox-title-bar.js +6 -8
  22. package/dist/src/tools/ox-title-bar.js.map +1 -1
  23. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.d.ts +25 -0
  24. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +127 -0
  25. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -0
  26. package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +24 -0
  27. package/dist/stories/ox-context-page-toolbar-select.stories.js +85 -0
  28. package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -0
  29. package/dist/stories/ox-context-page-toolbar.stories.d.ts +24 -0
  30. package/dist/stories/ox-context-page-toolbar.stories.js +90 -0
  31. package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -0
  32. package/dist/stories/ox-context-toolbar-complex.stories.d.ts +19 -0
  33. package/dist/stories/ox-context-toolbar-complex.stories.js +147 -0
  34. package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
  35. package/dist/stories/ox-context-toolbar-empty.stories.d.ts +19 -0
  36. package/dist/stories/ox-context-toolbar-empty.stories.js +49 -0
  37. package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -0
  38. package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +19 -0
  39. package/dist/stories/ox-context-toolbar-overflow.stories.js +128 -0
  40. package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -0
  41. package/dist/stories/ox-context-toolbar.stories.d.ts +19 -0
  42. package/dist/stories/ox-context-toolbar.stories.js +83 -0
  43. package/dist/stories/ox-context-toolbar.stories.js.map +1 -0
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +20 -20
  46. package/src/layouts/ox-context-page-toolbar.ts +33 -10
  47. package/src/layouts/ox-context-toolbar.ts +104 -70
  48. package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
  49. package/src/tools/ox-page-action-context-bar.ts +111 -63
  50. package/src/tools/ox-page-action-overlay-template.ts +48 -42
  51. package/src/tools/ox-page-title-bar.ts +6 -8
  52. package/src/tools/ox-title-bar.ts +6 -8
  53. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +141 -0
  54. package/stories/ox-context-page-toolbar-select.stories.ts +99 -0
  55. package/stories/ox-context-page-toolbar.stories.ts +104 -0
  56. package/stories/ox-context-toolbar-complex.stories.ts +159 -0
  57. package/stories/ox-context-toolbar-empty.stories.ts +62 -0
  58. package/stories/ox-context-toolbar-overflow.stories.ts +140 -0
  59. package/stories/ox-context-toolbar.stories.ts +95 -0
  60. package/themes/app-theme.css +162 -0
  61. package/themes/context-theme.css +74 -0
  62. package/themes/material-theme.css +38 -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
+ <link href="/themes/material-theme.css" rel="stylesheet" />
33
+
34
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
35
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
36
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
37
+
38
+ <style>
39
+ body {
40
+ background-color: white;
41
+ }
42
+
43
+ ${CommonHeaderStyles.cssText}
44
+ </style>
45
+
46
+ <div style="height:600px;">
47
+ <div class="header">
48
+ <div class="title">
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
+ <link href="/themes/material-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
+ ${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
+ <link href="/themes/material-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
+ ${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,159 @@
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
+ }
90
+ ]}
91
+ ></ox-page-action-context-bar>`
92
+ },
93
+ {
94
+ position: TOOL_POSITION.REAR,
95
+ template: html`<ox-page-action-context-bar
96
+ .actions=${[
97
+ {
98
+ title: 'save',
99
+ action: () => {},
100
+ icon: 'save'
101
+ },
102
+ {
103
+ title: 'copy',
104
+ action: () => {},
105
+ icon: 'content_copy'
106
+ },
107
+ {
108
+ title: 'delete',
109
+ action: () => {},
110
+ icon: 'delete'
111
+ }
112
+ ]}
113
+ ></ox-page-action-context-bar>`
114
+ },
115
+ {
116
+ position: TOOL_POSITION.REAR_END,
117
+ template: html`<ox-page-action-context-bar
118
+ .actions=${[
119
+ {
120
+ title: 'save',
121
+ action: () => {},
122
+ icon: 'save'
123
+ },
124
+ {
125
+ title: 'copy',
126
+ action: () => {},
127
+ icon: 'content_copy'
128
+ },
129
+ {
130
+ title: 'delete',
131
+ action: () => {},
132
+ icon: 'delete'
133
+ }
134
+ ]}
135
+ ></ox-page-action-context-bar>`
136
+ },
137
+ {
138
+ position: TOOL_POSITION.REAR_END,
139
+ template: html` <md-icon>download</md-icon> `,
140
+ context: 'exportable'
141
+ },
142
+ {
143
+ position: TOOL_POSITION.REAR_END,
144
+ template: html` <md-icon>upload</md-icon> `,
145
+ context: 'importable'
146
+ }
147
+ ]}
148
+ .context=${{
149
+ exportable: true,
150
+ importable: true,
151
+ toolbar: true
152
+ }}
153
+ >
154
+ </ox-context-toolbar>
155
+ </div>
156
+ `
157
+
158
+ export const Regular = Template.bind({})
159
+ Regular.args = {}
@@ -0,0 +1,62 @@
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="height:100px; padding: 10px; background-color: black;">
49
+ <ox-context-toolbar
50
+ .tools=${[]}
51
+ .context=${{
52
+ exportable: true,
53
+ importable: true,
54
+ toolbar: false
55
+ }}
56
+ >
57
+ </ox-context-toolbar>
58
+ </div>
59
+ `
60
+
61
+ export const Regular = Template.bind({})
62
+ Regular.args = {}
@@ -0,0 +1,140 @@
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
+ }
125
+ ]}
126
+ ></ox-page-action-context-bar>`
127
+ }
128
+ ]}
129
+ .context=${{
130
+ exportable: true,
131
+ importable: true,
132
+ toolbar: true
133
+ }}
134
+ >
135
+ </ox-context-toolbar>
136
+ </div>
137
+ `
138
+
139
+ export const Regular = Template.bind({})
140
+ Regular.args = {}