@operato/context 2.0.0-alpha.64 → 2.0.0-alpha.66

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 (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/src/layouts/ox-context-toolbar.js +91 -82
  3. package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
  4. package/dist/src/tools/ox-page-action-context-bar.js +20 -23
  5. package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
  6. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +1 -1
  7. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -1
  8. package/dist/stories/ox-context-page-toolbar-select.stories.js +1 -1
  9. package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -1
  10. package/dist/stories/ox-context-page-toolbar.stories.js +1 -1
  11. package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -1
  12. package/dist/stories/ox-context-toolbar-complex-2.stories.d.ts +19 -0
  13. package/dist/stories/ox-context-toolbar-complex-2.stories.js +136 -0
  14. package/dist/stories/ox-context-toolbar-complex-2.stories.js.map +1 -0
  15. package/dist/stories/ox-context-toolbar-complex.stories copy.d.ts +19 -0
  16. package/dist/stories/ox-context-toolbar-complex.stories copy.js +146 -0
  17. package/dist/stories/ox-context-toolbar-complex.stories copy.js.map +1 -0
  18. package/dist/stories/ox-context-toolbar-complex.stories.d.ts +19 -0
  19. package/dist/stories/ox-context-toolbar-complex.stories.js +146 -0
  20. package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
  21. package/dist/stories/ox-context-toolbar-empty.stories.d.ts +19 -0
  22. package/dist/stories/ox-context-toolbar-empty.stories.js +48 -0
  23. package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -0
  24. package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +19 -0
  25. package/dist/stories/ox-context-toolbar-overflow.stories.js +127 -0
  26. package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -0
  27. package/dist/stories/ox-context-toolbar.stories copy.d.ts +19 -0
  28. package/dist/stories/ox-context-toolbar.stories copy.js +82 -0
  29. package/dist/stories/ox-context-toolbar.stories copy.js.map +1 -0
  30. package/dist/stories/ox-context-toolbar.stories.d.ts +1 -6
  31. package/dist/stories/ox-context-toolbar.stories.js +23 -31
  32. package/dist/stories/ox-context-toolbar.stories.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +2 -2
  35. package/src/layouts/ox-context-toolbar.ts +91 -82
  36. package/src/tools/ox-page-action-context-bar.ts +20 -23
  37. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +1 -1
  38. package/stories/ox-context-page-toolbar-select.stories.ts +1 -1
  39. package/stories/ox-context-page-toolbar.stories.ts +1 -1
  40. package/stories/ox-context-toolbar-complex.stories.ts +158 -0
  41. package/stories/ox-context-toolbar-empty.stories.ts +61 -0
  42. package/stories/ox-context-toolbar-overflow.stories.ts +139 -0
  43. package/stories/ox-context-toolbar.stories.ts +24 -34
  44. package/themes/context-theme.css +74 -0
@@ -0,0 +1,127 @@
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
+ import '@operato/styles';
6
+ import { html } from 'lit';
7
+ export default {
8
+ title: 'ox-context-toolbar overflow',
9
+ component: 'ox-context-toolbar',
10
+ argTypes: {}
11
+ };
12
+ const Template = () => html `
13
+ <link href="/themes/app-theme.css" rel="stylesheet" />
14
+ <link href="/themes/context-theme.css" rel="stylesheet" />
15
+
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
18
+ rel="stylesheet"
19
+ />
20
+ <link
21
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
22
+ rel="stylesheet"
23
+ />
24
+ <link
25
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
26
+ rel="stylesheet"
27
+ />
28
+
29
+ <style>
30
+ body {
31
+ background-color: white;
32
+ }
33
+ </style>
34
+
35
+ <div style="height:100px; padding: 10px; background-color: yellow;">
36
+ <ox-context-toolbar
37
+ .tools=${[
38
+ {
39
+ position: TOOL_POSITION.FRONT,
40
+ template: html ` <md-icon>download</md-icon> `,
41
+ context: 'exportable'
42
+ },
43
+ {
44
+ position: TOOL_POSITION.FRONT,
45
+ template: html ` <md-icon>upload</md-icon> `,
46
+ context: 'importable'
47
+ },
48
+ {
49
+ position: TOOL_POSITION.CENTER,
50
+ template: html `<ox-page-action-context-bar
51
+ .actions=${[
52
+ {
53
+ title: 'save',
54
+ action: () => { },
55
+ icon: 'save'
56
+ },
57
+ {
58
+ title: 'copy',
59
+ action: () => { },
60
+ icon: 'content_copy'
61
+ },
62
+ {
63
+ title: 'delete',
64
+ action: () => { },
65
+ icon: 'delete'
66
+ },
67
+ {
68
+ title: 'save',
69
+ action: () => { },
70
+ icon: 'save'
71
+ },
72
+ {
73
+ title: 'copy',
74
+ action: () => { },
75
+ icon: 'content_copy'
76
+ },
77
+ {
78
+ title: 'delete',
79
+ action: () => { },
80
+ icon: 'delete'
81
+ },
82
+ {
83
+ title: 'save',
84
+ action: () => { },
85
+ icon: 'save'
86
+ },
87
+ {
88
+ title: 'copy',
89
+ action: () => { },
90
+ icon: 'content_copy'
91
+ },
92
+ {
93
+ title: 'delete',
94
+ action: () => { },
95
+ icon: 'delete'
96
+ },
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
+ .context=${{
117
+ exportable: true,
118
+ importable: true,
119
+ toolbar: true
120
+ }}
121
+ >
122
+ </ox-context-toolbar>
123
+ </div>
124
+ `;
125
+ export const Regular = Template.bind({});
126
+ Regular.args = {};
127
+ //# sourceMappingURL=ox-context-toolbar-overflow.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-toolbar-overflow.stories.js","sourceRoot":"","sources":["../../stories/ox-context-toolbar-overflow.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,4CAA4C,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAO,IAAI,EAA0B,MAAM,KAAK,CAAA;AAEvD,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,QAAQ,GAAoB,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;eAyB7B;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,6BAA6B;QAC3C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,MAAM;QAC9B,QAAQ,EAAE,IAAI,CAAA;uBACD;YACT;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,MAAM;aACb;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,cAAc;aACrB;YACD;gBACE,KAAK,EAAE,QAAQ;gB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","sourcesContent":["import '@material/web/icon/icon.js'\nimport '../src/layouts/ox-context-toolbar.js'\nimport '../src/tools/ox-page-action-context-bar.js'\nimport { TOOL_POSITION } from '@operato/layout'\n\nimport '@operato/styles'\n\nimport { css, html, render, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-context-toolbar overflow',\n component: 'ox-context-toolbar',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = () => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/context-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n body {\n background-color: white;\n }\n </style>\n\n <div style=\"height:100px; padding: 10px; background-color: yellow;\">\n <ox-context-toolbar\n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\n },\n {\n position: TOOL_POSITION.CENTER,\n template: html`<ox-page-action-context-bar\n .actions=${[\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n },\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n },\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n },\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n }\n ]}\n ></ox-page-action-context-bar>`\n }\n ]}\n .context=${{\n exportable: true,\n importable: true,\n toolbar: true\n }}\n >\n </ox-context-toolbar>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -0,0 +1,19 @@
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 '@operato/styles';
5
+ import { TemplateResult } from 'lit';
6
+ declare const _default: {
7
+ title: string;
8
+ component: string;
9
+ argTypes: {};
10
+ };
11
+ export default _default;
12
+ interface Story<T> {
13
+ (args: T): TemplateResult;
14
+ args?: Partial<T>;
15
+ argTypes?: Record<string, unknown>;
16
+ }
17
+ interface ArgTypes {
18
+ }
19
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,82 @@
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
+ import '@operato/styles';
6
+ import { html } from 'lit';
7
+ export default {
8
+ title: 'ox-context-toolbar',
9
+ component: 'ox-context-toolbar',
10
+ argTypes: {}
11
+ };
12
+ const Template = () => html `
13
+ <link href="/themes/app-theme.css" rel="stylesheet" />
14
+ <link href="/themes/context-theme.css" rel="stylesheet" />
15
+
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
18
+ rel="stylesheet"
19
+ />
20
+ <link
21
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
22
+ rel="stylesheet"
23
+ />
24
+ <link
25
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
26
+ rel="stylesheet"
27
+ />
28
+
29
+ <style>
30
+ body {
31
+ background-color: white;
32
+ }
33
+ </style>
34
+
35
+ <div style="height:100px; padding: 10px; background-color: black;">
36
+ <ox-context-toolbar
37
+ .tools=${[
38
+ {
39
+ position: TOOL_POSITION.FRONT,
40
+ template: html ` <md-icon>download</md-icon> `,
41
+ context: 'exportable'
42
+ },
43
+ {
44
+ position: TOOL_POSITION.FRONT,
45
+ template: html ` <md-icon>upload</md-icon> `,
46
+ context: 'importable'
47
+ },
48
+ {
49
+ position: TOOL_POSITION.CENTER,
50
+ template: html `<ox-page-action-context-bar
51
+ .actions=${[
52
+ {
53
+ title: 'save',
54
+ action: () => { },
55
+ icon: 'save'
56
+ },
57
+ {
58
+ title: 'copy',
59
+ action: () => { },
60
+ icon: 'content_copy'
61
+ },
62
+ {
63
+ title: 'delete',
64
+ action: () => { },
65
+ icon: 'delete'
66
+ }
67
+ ]}
68
+ ></ox-page-action-context-bar>`
69
+ }
70
+ ]}
71
+ .context=${{
72
+ exportable: true,
73
+ importable: true,
74
+ toolbar: true
75
+ }}
76
+ >
77
+ </ox-context-toolbar>
78
+ </div>
79
+ `;
80
+ export const Regular = Template.bind({});
81
+ Regular.args = {};
82
+ //# sourceMappingURL=ox-context-toolbar.stories%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-toolbar.stories copy.js","sourceRoot":"","sources":["../../stories/ox-context-toolbar.stories copy.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,4CAA4C,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAO,IAAI,EAA0B,MAAM,KAAK,CAAA;AAEvD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,QAAQ,GAAoB,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;eAyB7B;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,6BAA6B;QAC3C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,MAAM;QAC9B,QAAQ,EAAE,IAAI,CAAA;uBACD;YACT;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,MAAM;aACb;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,cAAc;aACrB;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,QAAQ;aACf;SACF;yCAC4B;KAChC;CACF;iBACU;IACT,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;CACd;;;;CAIN,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport '../src/layouts/ox-context-toolbar.js'\nimport '../src/tools/ox-page-action-context-bar.js'\nimport { TOOL_POSITION } from '@operato/layout'\n\nimport '@operato/styles'\n\nimport { css, html, render, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-context-toolbar',\n component: 'ox-context-toolbar',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = () => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/context-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n body {\n background-color: white;\n }\n </style>\n\n <div style=\"height:100px; padding: 10px; background-color: black;\">\n <ox-context-toolbar\n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\n },\n {\n position: TOOL_POSITION.CENTER,\n template: html`<ox-page-action-context-bar\n .actions=${[\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n }\n ]}\n ></ox-page-action-context-bar>`\n }\n ]}\n .context=${{\n exportable: true,\n importable: true,\n toolbar: true\n }}\n >\n </ox-context-toolbar>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -6,11 +6,7 @@ import { TemplateResult } from 'lit';
6
6
  declare const _default: {
7
7
  title: string;
8
8
  component: string;
9
- argTypes: {
10
- label: {
11
- control: string;
12
- };
13
- };
9
+ argTypes: {};
14
10
  };
15
11
  export default _default;
16
12
  interface Story<T> {
@@ -19,6 +15,5 @@ interface Story<T> {
19
15
  argTypes?: Record<string, unknown>;
20
16
  }
21
17
  interface ArgTypes {
22
- label?: string;
23
18
  }
24
19
  export declare const Regular: Story<ArgTypes>;
@@ -1,44 +1,39 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import '../src/layouts/ox-context-toolbar.js';
3
3
  import '../src/tools/ox-page-action-context-bar.js';
4
- import { CommonHeaderStyles } from '@operato/styles';
5
4
  import { TOOL_POSITION } from '@operato/layout';
6
5
  import '@operato/styles';
7
6
  import { html } from 'lit';
8
7
  export default {
9
8
  title: 'ox-context-toolbar',
10
9
  component: 'ox-context-toolbar',
11
- argTypes: {
12
- label: { control: 'string' }
13
- }
10
+ argTypes: {}
14
11
  };
15
- const Template = ({ label = '' }) => html `
12
+ const Template = () => html `
16
13
  <link href="/themes/app-theme.css" rel="stylesheet" />
17
-
18
- <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
19
- <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
20
- <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
21
-
14
+ <link href="/themes/context-theme.css" rel="stylesheet" />
15
+
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
18
+ rel="stylesheet"
19
+ />
20
+ <link
21
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
22
+ rel="stylesheet"
23
+ />
24
+ <link
25
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
26
+ rel="stylesheet"
27
+ />
28
+
22
29
  <style>
23
30
  body {
24
31
  background-color: white;
25
32
  }
26
-
27
- ${CommonHeaderStyles.cssText}
28
33
  </style>
29
34
 
30
- <div style="height:600px;">
31
- <div class="header">
32
- <div class="title">
33
- <md-icon>summarize</md-icon>
34
- ${label}
35
- </div>
36
-
37
- <div class="filters">
38
- <label>Filter</label><input type="text"></input>
39
- </div>
40
-
41
- <ox-context-toolbar class="actions"
35
+ <div style="height:100px; padding: 10px; background-color: black;">
36
+ <ox-context-toolbar
42
37
  .tools=${[
43
38
  {
44
39
  position: TOOL_POSITION.FRONT,
@@ -76,15 +71,12 @@ const Template = ({ label = '' }) => html `
76
71
  .context=${{
77
72
  exportable: true,
78
73
  importable: true,
79
- toolbar: false
74
+ toolbar: true
80
75
  }}
81
-
82
- }> </ox-context-toolbar>
83
- </div>
76
+ >
77
+ </ox-context-toolbar>
84
78
  </div>
85
79
  `;
86
80
  export const Regular = Template.bind({});
87
- Regular.args = {
88
- label: 'common header styles'
89
- };
81
+ Regular.args = {};
90
82
  //# sourceMappingURL=ox-context-toolbar.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ox-context-toolbar.stories.js","sourceRoot":"","sources":["../../stories/ox-context-toolbar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,4CAA4C,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAO,IAAI,EAA0B,MAAM,KAAK,CAAA;AAEvD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC7B;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;MAY9D,kBAAkB,CAAC,OAAO;;;;;;;UAOtB,KAAK;;;;;;;;eAQA;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,6BAA6B;QAC3C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,MAAM;QAC9B,QAAQ,EAAE,IAAI,CAAA;uBACD;YACT;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,MAAM;aACb;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,cAAc;aACrB;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,QAAQ;aACf;SACF;yCAC4B;KAChC;CACF;iBACU;IACT,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,KAAK;CACf;;;;;CAKN,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,sBAAsB;CAC9B,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport '../src/layouts/ox-context-toolbar.js'\nimport '../src/tools/ox-page-action-context-bar.js'\nimport { CommonHeaderStyles } from '@operato/styles'\nimport { TOOL_POSITION } from '@operato/layout'\n\nimport '@operato/styles'\n\nimport { css, html, render, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-context-toolbar',\n component: 'ox-context-toolbar',\n argTypes: {\n label: { control: 'string' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n label?: string\n}\n\nconst Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n \n <link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\" rel=\"stylesheet\">\n <link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\" rel=\"stylesheet\">\n <link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\" rel=\"stylesheet\">\n \n <style>\n body {\n background-color: white;\n }\n\n ${CommonHeaderStyles.cssText}\n </style>\n\n <div style=\"height:600px;\">\n <div class=\"header\">\n <div class=\"title\">\n <md-icon>summarize</md-icon>\n ${label}\n </div>\n\n <div class=\"filters\">\n <label>Filter</label><input type=\"text\"></input>\n </div>\n\n <ox-context-toolbar class=\"actions\" \n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\n },\n {\n position: TOOL_POSITION.CENTER,\n template: html`<ox-page-action-context-bar\n .actions=${[\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n }\n ]}\n ></ox-page-action-context-bar>`\n }\n ]}\n .context=${{\n exportable: true,\n importable: true,\n toolbar: false\n }}\n \n }> </ox-context-toolbar>\n </div>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'common header styles'\n}\n"]}
1
+ {"version":3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AC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport '../src/layouts/ox-context-toolbar.js'\nimport '../src/tools/ox-page-action-context-bar.js'\nimport { TOOL_POSITION } from '@operato/layout'\n\nimport '@operato/styles'\n\nimport { css, html, render, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-context-toolbar',\n component: 'ox-context-toolbar',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = () => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/context-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n body {\n background-color: white;\n }\n </style>\n\n <div style=\"height:100px; padding: 10px; background-color: black;\">\n <ox-context-toolbar\n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\n },\n {\n position: TOOL_POSITION.CENTER,\n template: html`<ox-page-action-context-bar\n .actions=${[\n {\n title: 'save',\n action: () => {},\n icon: 'save'\n },\n {\n title: 'copy',\n action: () => {},\n icon: 'content_copy'\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete'\n }\n ]}\n ></ox-page-action-context-bar>`\n }\n ]}\n .context=${{\n exportable: true,\n importable: true,\n toolbar: true\n }}\n >\n </ox-context-toolbar>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}