@operato/context 8.0.0-alpha.8 → 8.0.0-beta.1

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 (35) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/dist/src/layouts/ox-context-page-toolbar.js +2 -0
  3. package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
  4. package/dist/src/tools/ox-page-action-context-bar.js +2 -0
  5. package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
  6. package/dist/src/tools/ox-page-title-bar.js +1 -0
  7. package/dist/src/tools/ox-page-title-bar.js.map +1 -1
  8. package/dist/src/tools/ox-title-bar.js +3 -2
  9. package/dist/src/tools/ox-title-bar.js.map +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/package.json +16 -16
  12. package/themes/calendar-theme.css +3 -1
  13. package/.editorconfig +0 -29
  14. package/.storybook/main.js +0 -3
  15. package/.storybook/preview.js +0 -52
  16. package/.storybook/server.mjs +0 -8
  17. package/src/index.ts +0 -1
  18. package/src/layouts/ox-context-page-toolbar.ts +0 -119
  19. package/src/layouts/ox-context-toolbar.ts +0 -208
  20. package/src/styles/ox-context-toolbar-overlay-style.ts +0 -58
  21. package/src/tools/ox-page-action-context-bar.ts +0 -220
  22. package/src/tools/ox-page-action-overlay-template.ts +0 -111
  23. package/src/tools/ox-page-title-bar.ts +0 -124
  24. package/src/tools/ox-title-bar.ts +0 -120
  25. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +0 -166
  26. package/stories/ox-context-page-toolbar-select.stories.ts +0 -129
  27. package/stories/ox-context-page-toolbar.stories.ts +0 -130
  28. package/stories/ox-context-toolbar-complex.stories.ts +0 -181
  29. package/stories/ox-context-toolbar-cooldown.stories.ts +0 -112
  30. package/stories/ox-context-toolbar-empty.stories.ts +0 -111
  31. package/stories/ox-context-toolbar-overflow.stories.ts +0 -165
  32. package/stories/ox-context-toolbar.stories.ts +0 -221
  33. package/tsconfig.json +0 -24
  34. package/web-dev-server.config.mjs +0 -27
  35. package/web-test-runner.config.mjs +0 -41
@@ -1,130 +0,0 @@
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
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
11
-
12
- export default {
13
- title: 'ox-context-page-toolbar',
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="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
32
-
33
- <link href="/themes/light.css" rel="stylesheet" />
34
- <link href="/themes/dark.css" rel="stylesheet" />
35
- <link href="/themes/spacing.css" rel="stylesheet" />
36
-
37
- <link
38
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
39
- rel="stylesheet"
40
- />
41
- <link
42
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
43
- rel="stylesheet"
44
- />
45
- <link
46
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
47
- rel="stylesheet"
48
- />
49
-
50
- <style>
51
- ${MDTypeScaleStyles.cssText}
52
- </style>
53
-
54
- <style>
55
- .container {
56
- height: 500px;
57
- text-align: center;
58
- padding: 20px;
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
-
62
- padding: 20px;
63
- }
64
-
65
- ox-buttons-radio {
66
- padding: 20px;
67
- }
68
- </style>
69
-
70
- <div class="container md-typescale-body-large-prominent">
71
- <div class="header">
72
- <div class="title">${label}</div>
73
-
74
- <div class="filters"><label>Filter</label><input type="text" /></div>
75
-
76
- <ox-context-page-toolbar
77
- class="actions"
78
- .tools=${[
79
- {
80
- position: TOOL_POSITION.FRONT,
81
- template: html` <md-icon>download</md-icon> `,
82
- context: 'exportable'
83
- },
84
- {
85
- position: TOOL_POSITION.FRONT,
86
- template: html` <md-icon>upload</md-icon> `,
87
- context: 'importable'
88
- },
89
- {
90
- position: TOOL_POSITION.CENTER,
91
- template: html`<ox-page-action-context-bar
92
- .actions=${[
93
- {
94
- title: 'save',
95
- action: () => {},
96
- icon: 'save'
97
- },
98
- {
99
- title: 'copy',
100
- action: () => {},
101
- icon: 'content_copy'
102
- },
103
- {
104
- title: 'delete',
105
- action: () => {},
106
- icon: 'delete',
107
- emphasis: {
108
- danger: true
109
- }
110
- }
111
- ]}
112
- ></ox-page-action-context-bar>`
113
- }
114
- ]}
115
- .context=${{
116
- exportable: true,
117
- importable: true,
118
- toolbar: false
119
- }}
120
- }
121
- >
122
- </ox-context-page-toolbar>
123
- </div>
124
- </div>
125
- `
126
-
127
- export const Regular = Template.bind({})
128
- Regular.args = {
129
- label: 'common header styles'
130
- }
@@ -1,181 +0,0 @@
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
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
10
-
11
- export default {
12
- title: 'ox-context-toolbar complex',
13
- component: 'ox-context-toolbar',
14
- argTypes: {
15
- theme: { control: 'select', options: ['light', 'dark'] }
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
-
27
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
28
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
29
-
30
- <link href="/themes/light.css" rel="stylesheet" />
31
- <link href="/themes/dark.css" rel="stylesheet" />
32
- <link href="/themes/spacing.css" rel="stylesheet" />
33
-
34
- <link
35
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
36
- rel="stylesheet"
37
- />
38
- <link
39
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
40
- rel="stylesheet"
41
- />
42
- <link
43
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
44
- rel="stylesheet"
45
- />
46
-
47
- <style>
48
- ${MDTypeScaleStyles.cssText}
49
- </style>
50
-
51
- <style>
52
- .container {
53
- height: 500px;
54
- text-align: center;
55
- padding: 20px;
56
- background-color: var(--md-sys-color-primary-container);
57
- color: var(--md-sys-color-on-primary-container);
58
-
59
- padding: 20px;
60
- }
61
-
62
- ox-buttons-radio {
63
- padding: 20px;
64
- }
65
- </style>
66
-
67
- <div class="container md-typescale-body-large-prominent">
68
- <ox-context-toolbar
69
- .tools=${[
70
- {
71
- position: TOOL_POSITION.FRONT_END,
72
- template: html` <md-icon>download</md-icon> `,
73
- context: 'exportable'
74
- },
75
- {
76
- position: TOOL_POSITION.FRONT_END,
77
- template: html` <md-icon>upload</md-icon> `,
78
- context: 'importable'
79
- },
80
- {
81
- position: TOOL_POSITION.FRONT,
82
- template: html` <md-icon>download</md-icon> `,
83
- context: 'exportable'
84
- },
85
- {
86
- position: TOOL_POSITION.FRONT,
87
- template: html` <md-icon>upload</md-icon> `,
88
- context: 'importable'
89
- },
90
- {
91
- position: TOOL_POSITION.CENTER,
92
- template: html`<ox-page-action-context-bar
93
- .actions=${[
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
- emphasis: {
109
- danger: true
110
- }
111
- }
112
- ]}
113
- ></ox-page-action-context-bar>`
114
- },
115
- {
116
- position: TOOL_POSITION.REAR,
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`<ox-page-action-context-bar
140
- .actions=${[
141
- {
142
- title: 'save',
143
- action: () => {},
144
- icon: 'save'
145
- },
146
- {
147
- title: 'copy',
148
- action: () => {},
149
- icon: 'content_copy'
150
- },
151
- {
152
- title: 'delete',
153
- action: () => {},
154
- icon: 'delete'
155
- }
156
- ]}
157
- ></ox-page-action-context-bar>`
158
- },
159
- {
160
- position: TOOL_POSITION.REAR_END,
161
- template: html` <md-icon>download</md-icon> `,
162
- context: 'exportable'
163
- },
164
- {
165
- position: TOOL_POSITION.REAR_END,
166
- template: html` <md-icon>upload</md-icon> `,
167
- context: 'importable'
168
- }
169
- ]}
170
- .context=${{
171
- exportable: true,
172
- importable: true,
173
- toolbar: true
174
- }}
175
- >
176
- </ox-context-toolbar>
177
- </div>
178
- `
179
-
180
- export const Regular = Template.bind({})
181
- Regular.args = {}
@@ -1,112 +0,0 @@
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 { sleep } from '@operato/utils'
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: var(--md-sys-color-surface);
45
- }
46
- </style>
47
-
48
- <div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
49
- <ox-context-toolbar
50
- .tools=${[]}
51
- .context=${{
52
- exportable: true,
53
- importable: true,
54
- toolbar: true
55
- }}
56
- >
57
- </ox-context-toolbar>
58
-
59
- <ox-context-toolbar
60
- .tools=${[
61
- {
62
- position: TOOL_POSITION.CENTER,
63
- template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
64
- }
65
- ]}
66
- .context=${{
67
- exportable: true,
68
- importable: true,
69
- toolbar: true
70
- }}
71
- >
72
- </ox-context-toolbar>
73
-
74
- <ox-context-toolbar
75
- .tools=${[
76
- {
77
- position: TOOL_POSITION.CENTER,
78
- template: html`<ox-page-action-context-bar
79
- .actions=${[
80
- {
81
- type: 'icon',
82
- action: async () => {},
83
- icon: 'check'
84
- },
85
- {
86
- title: 'short-take(0secs)',
87
- action: async () => {},
88
- icon: 'delete'
89
- },
90
- {
91
- title: 'long-take(3secs)',
92
- action: async () => {
93
- await sleep(3000)
94
- },
95
- icon: 'save'
96
- }
97
- ]}
98
- ></ox-page-action-context-bar>`
99
- }
100
- ]}
101
- .context=${{
102
- exportable: true,
103
- importable: true,
104
- toolbar: true
105
- }}
106
- >
107
- </ox-context-toolbar>
108
- </div>
109
- `
110
-
111
- export const Regular = Template.bind({})
112
- Regular.args = {}
@@ -1,111 +0,0 @@
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 { sleep } from '@operato/utils'
7
-
8
- import { css, html, render, TemplateResult } from 'lit'
9
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
10
-
11
- export default {
12
- title: 'ox-context-toolbar empty',
13
- component: 'ox-context-toolbar',
14
- argTypes: {
15
- theme: { control: 'select', options: ['light', 'dark'] }
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
-
27
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
28
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
29
-
30
- <link href="/themes/light.css" rel="stylesheet" />
31
- <link href="/themes/dark.css" rel="stylesheet" />
32
- <link href="/themes/spacing.css" rel="stylesheet" />
33
-
34
- <link
35
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
36
- rel="stylesheet"
37
- />
38
- <link
39
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
40
- rel="stylesheet"
41
- />
42
- <link
43
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
44
- rel="stylesheet"
45
- />
46
-
47
- <style>
48
- ${MDTypeScaleStyles.cssText}
49
- </style>
50
-
51
- <style>
52
- .container {
53
- height: 500px;
54
- text-align: center;
55
- padding: 20px;
56
- background-color: var(--md-sys-color-primary-container);
57
- color: var(--md-sys-color-on-primary-container);
58
-
59
- padding: 20px;
60
- }
61
-
62
- ox-buttons-radio {
63
- padding: 20px;
64
- }
65
- </style>
66
-
67
- <div class="container md-typescale-body-large-prominent">
68
- <ox-context-toolbar
69
- .tools=${[]}
70
- .context=${{
71
- exportable: true,
72
- importable: true,
73
- toolbar: true
74
- }}
75
- >
76
- </ox-context-toolbar>
77
-
78
- <ox-context-toolbar
79
- .tools=${[
80
- {
81
- position: TOOL_POSITION.CENTER,
82
- template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
83
- }
84
- ]}
85
- .context=${{
86
- exportable: true,
87
- importable: true,
88
- toolbar: true
89
- }}
90
- >
91
- </ox-context-toolbar>
92
-
93
- <ox-context-toolbar
94
- .tools=${[
95
- {
96
- position: TOOL_POSITION.CENTER,
97
- template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
98
- }
99
- ]}
100
- .context=${{
101
- exportable: true,
102
- importable: true,
103
- toolbar: true
104
- }}
105
- >
106
- </ox-context-toolbar>
107
- </div>
108
- `
109
-
110
- export const Regular = Template.bind({})
111
- Regular.args = {}
@@ -1,165 +0,0 @@
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
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
10
-
11
- export default {
12
- title: 'ox-context-toolbar overflow',
13
- component: 'ox-context-toolbar',
14
- argTypes: {
15
- theme: { control: 'select', options: ['light', 'dark'] }
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
-
27
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
28
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
29
-
30
- <link href="/themes/light.css" rel="stylesheet" />
31
- <link href="/themes/dark.css" rel="stylesheet" />
32
- <link href="/themes/spacing.css" rel="stylesheet" />
33
-
34
- <link
35
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
36
- rel="stylesheet"
37
- />
38
- <link
39
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
40
- rel="stylesheet"
41
- />
42
- <link
43
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
44
- rel="stylesheet"
45
- />
46
-
47
- <style>
48
- ${MDTypeScaleStyles.cssText}
49
- </style>
50
-
51
- <style>
52
- .container {
53
- height: 500px;
54
- text-align: center;
55
- padding: 20px;
56
- background-color: var(--md-sys-color-primary-container);
57
- color: var(--md-sys-color-on-primary-container);
58
-
59
- padding: 20px;
60
- }
61
-
62
- ox-buttons-radio {
63
- padding: 20px;
64
- }
65
- </style>
66
-
67
- <div class="container md-typescale-body-large-prominent">
68
- <ox-context-toolbar
69
- .tools=${[
70
- {
71
- position: TOOL_POSITION.FRONT,
72
- template: html` <md-icon>download</md-icon> `,
73
- context: 'exportable'
74
- },
75
- {
76
- position: TOOL_POSITION.FRONT,
77
- template: html` <md-icon>upload</md-icon> `,
78
- context: 'importable'
79
- },
80
- {
81
- position: TOOL_POSITION.CENTER,
82
- template: html`<ox-page-action-context-bar
83
- .actions=${[
84
- {
85
- title: 'save',
86
- action: () => {},
87
- icon: 'save'
88
- },
89
- {
90
- title: 'copy',
91
- action: () => {},
92
- icon: 'content_copy'
93
- },
94
- {
95
- title: 'delete',
96
- action: () => {},
97
- icon: 'delete'
98
- },
99
- {
100
- title: 'save',
101
- action: () => {},
102
- icon: 'save',
103
- emphasis: {
104
- raised: true
105
- }
106
- },
107
- {
108
- title: 'copy',
109
- action: () => {},
110
- icon: 'content_copy'
111
- },
112
- {
113
- title: 'delete',
114
- action: () => {},
115
- icon: 'delete'
116
- },
117
- {
118
- title: 'save',
119
- action: () => {},
120
- icon: 'save'
121
- },
122
- {
123
- title: 'copy',
124
- action: () => {},
125
- icon: 'content_copy'
126
- },
127
- {
128
- title: 'delete',
129
- action: () => {},
130
- icon: 'delete'
131
- },
132
- {
133
- title: 'save',
134
- action: () => {},
135
- icon: 'save'
136
- },
137
- {
138
- title: 'copy',
139
- action: () => {},
140
- icon: 'content_copy'
141
- },
142
- {
143
- title: 'delete',
144
- action: () => {},
145
- icon: 'delete',
146
- emphasis: {
147
- danger: true
148
- }
149
- }
150
- ]}
151
- ></ox-page-action-context-bar>`
152
- }
153
- ]}
154
- .context=${{
155
- exportable: true,
156
- importable: true,
157
- toolbar: true
158
- }}
159
- >
160
- </ox-context-toolbar>
161
- </div>
162
- `
163
-
164
- export const Regular = Template.bind({})
165
- Regular.args = {}