@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,221 +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',
13
- component: 'ox-context-toolbar',
14
- argTypes: {}
15
- }
16
-
17
- interface Story<T> {
18
- (args: T): TemplateResult
19
- args?: Partial<T>
20
- argTypes?: Record<string, unknown>
21
- }
22
-
23
- interface ArgTypes {}
24
-
25
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
26
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
27
-
28
- <link href="/themes/light.css" rel="stylesheet" />
29
- <link href="/themes/dark.css" rel="stylesheet" />
30
- <link href="/themes/spacing.css" rel="stylesheet" />
31
-
32
- <link
33
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined: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+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
38
- rel="stylesheet"
39
- />
40
- <link
41
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
42
- rel="stylesheet"
43
- />
44
-
45
- <style>
46
- ${MDTypeScaleStyles.cssText}
47
- </style>
48
-
49
- <style>
50
- .container {
51
- height: 500px;
52
- text-align: center;
53
- padding: 20px;
54
- background-color: var(--md-sys-color-primary-container);
55
- color: var(--md-sys-color-on-primary-container);
56
-
57
- padding: 20px;
58
-
59
- display: flex;
60
- flex-direction: column;
61
- gap: 20px;
62
- }
63
-
64
- ox-buttons-radio {
65
- padding: 20px;
66
- }
67
- </style>
68
-
69
- <div class="container md-typescale-body-large-prominent">
70
- <ox-context-toolbar
71
- .tools=${[
72
- {
73
- position: TOOL_POSITION.FRONT,
74
- template: html` <md-icon>download</md-icon> `,
75
- context: 'exportable'
76
- },
77
- {
78
- position: TOOL_POSITION.FRONT,
79
- template: html` <md-icon>upload</md-icon> `,
80
- context: 'importable'
81
- },
82
- {
83
- position: TOOL_POSITION.CENTER,
84
- template: html`<ox-page-action-context-bar
85
- .actions=${[
86
- {
87
- title: 'save',
88
- action: () => {},
89
- icon: 'save'
90
- },
91
- {
92
- title: 'copy',
93
- action: () => {},
94
- icon: 'content_copy'
95
- },
96
- {
97
- title: 'delete',
98
- action: () => {},
99
- icon: 'delete',
100
- emphasis: {
101
- raised: true,
102
- outlined: false,
103
- dense: false,
104
- danger: true
105
- }
106
- }
107
- ]}
108
- ></ox-page-action-context-bar>`
109
- }
110
- ]}
111
- .context=${{
112
- exportable: true,
113
- importable: true,
114
- toolbar: true
115
- }}
116
- >
117
- </ox-context-toolbar>
118
-
119
- <ox-context-toolbar
120
- .tools=${[
121
- {
122
- position: TOOL_POSITION.FRONT,
123
- template: html` <md-icon>download</md-icon> `,
124
- context: 'exportable'
125
- },
126
- {
127
- position: TOOL_POSITION.CENTER,
128
- template: html`<ox-page-action-context-bar
129
- .actions=${[
130
- {
131
- title: 'save',
132
- action: () => {},
133
- icon: 'save'
134
- },
135
- {
136
- title: 'copy',
137
- action: () => {},
138
- icon: 'content_copy'
139
- },
140
- {
141
- title: 'delete',
142
- action: () => {},
143
- icon: 'delete',
144
- emphasis: {
145
- raised: false,
146
- outlined: false,
147
- dense: false,
148
- danger: true
149
- }
150
- }
151
- ]}
152
- ></ox-page-action-context-bar>`
153
- }
154
- ]}
155
- .context=${{
156
- exportable: true,
157
- importable: true,
158
- toolbar: true
159
- }}
160
- >
161
- </ox-context-toolbar>
162
-
163
- <ox-context-toolbar
164
- .tools=${[
165
- {
166
- position: TOOL_POSITION.FRONT,
167
- template: html` <md-icon>download</md-icon> `,
168
- context: 'exportable'
169
- },
170
- {
171
- position: TOOL_POSITION.FRONT,
172
- template: html` <md-icon>upload</md-icon> `,
173
- context: 'importable'
174
- },
175
- {
176
- position: TOOL_POSITION.FRONT,
177
- template: html` <md-icon>restart_alt</md-icon> `,
178
- context: 'resettable'
179
- },
180
- {
181
- position: TOOL_POSITION.CENTER,
182
- template: html`<ox-page-action-context-bar
183
- .actions=${[
184
- {
185
- title: 'save',
186
- action: () => {},
187
- icon: 'save'
188
- },
189
- {
190
- title: 'copy',
191
- action: () => {},
192
- icon: 'content_copy'
193
- },
194
- {
195
- title: 'delete',
196
- action: () => {},
197
- icon: 'delete',
198
- emphasis: {
199
- raised: true,
200
- outlined: false,
201
- dense: false,
202
- danger: true
203
- }
204
- }
205
- ]}
206
- ></ox-page-action-context-bar>`
207
- }
208
- ]}
209
- .context=${{
210
- exportable: true,
211
- importable: true,
212
- resettable: true,
213
- toolbar: true
214
- }}
215
- >
216
- </ox-context-toolbar>
217
- </div>
218
- `
219
-
220
- export const Regular = Template.bind({})
221
- Regular.args = {}
package/tsconfig.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2017", "dom"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowSyntheticDefaultImports": true,
11
- "experimentalDecorators": true,
12
- "useDefineForClassFields": false,
13
- "importHelpers": true,
14
- "outDir": "dist",
15
- "sourceMap": true,
16
- "inlineSources": true,
17
- "rootDir": "./",
18
- "declaration": true,
19
- "incremental": true,
20
- "skipLibCheck": true,
21
- "types": ["node", "mocha"]
22
- },
23
- "include": ["**/*.ts"]
24
- }
@@ -1,27 +0,0 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- open: '/demo/',
8
- /** Use regular watch mode if HMR is not enabled. */
9
- watch: !hmr,
10
- /** Resolve bare module imports */
11
- nodeResolve: {
12
- exportConditions: ['browser', 'development'],
13
- },
14
-
15
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
16
- // esbuildTarget: 'auto'
17
-
18
- /** Set appIndex to enable SPA routing */
19
- // appIndex: 'demo/index.html',
20
-
21
- plugins: [
22
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
23
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
24
- ],
25
-
26
- // See documentation for all available options
27
- });
@@ -1,41 +0,0 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });