@operato/context 2.0.0-alpha.6 → 2.0.0-alpha.61

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 (28) hide show
  1. package/CHANGELOG.md +301 -0
  2. package/dist/src/layouts/ox-context-page-toolbar.d.ts +8 -3
  3. package/dist/src/layouts/ox-context-page-toolbar.js +6 -3
  4. package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
  5. package/dist/src/layouts/ox-context-toolbar.d.ts +1 -1
  6. package/dist/src/tools/ox-page-action-context-bar.d.ts +11 -3
  7. package/dist/src/tools/ox-page-action-context-bar.js +21 -18
  8. package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
  9. package/dist/src/tools/ox-page-action-overlay-template.d.ts +1 -1
  10. package/dist/src/tools/ox-page-title-bar.d.ts +1 -1
  11. package/dist/src/tools/ox-title-bar.d.ts +1 -1
  12. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.d.ts +25 -0
  13. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +101 -0
  14. package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -0
  15. package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +24 -0
  16. package/dist/stories/ox-context-page-toolbar-select.stories.js +82 -0
  17. package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -0
  18. package/dist/stories/ox-context-page-toolbar.stories.d.ts +24 -0
  19. package/dist/stories/ox-context-page-toolbar.stories.js +87 -0
  20. package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -0
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +19 -19
  23. package/src/layouts/ox-context-page-toolbar.ts +9 -3
  24. package/src/tools/ox-page-action-context-bar.ts +50 -38
  25. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +115 -0
  26. package/stories/ox-context-page-toolbar-select.stories.ts +96 -0
  27. package/stories/ox-context-page-toolbar.stories.ts +101 -0
  28. package/themes/app-theme.css +145 -0
@@ -0,0 +1,101 @@
1
+ import '@material/mwc-icon';
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
+ import '@operato/styles';
8
+ import { html } from 'lit';
9
+ export default {
10
+ title: 'ox-context-page-toolbar select buttons',
11
+ component: 'ox-context-page-toolbar',
12
+ argTypes: {
13
+ label: { control: 'string' }
14
+ }
15
+ };
16
+ const Template = ({ label = '' }) => html `
17
+ <link href="/themes/app-theme.css" rel="stylesheet" />
18
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
19
+
20
+ <style>
21
+ body {
22
+ background-color: white;
23
+ }
24
+
25
+ ${CommonHeaderStyles.cssText}
26
+ </style>
27
+
28
+ <div style="height:600px;">
29
+ <div class="header">
30
+ <div class="title">
31
+ <mwc-icon>summarize</mwc-icon>
32
+ ${label}
33
+ </div>
34
+
35
+ <div class="filters">
36
+ <label>Filter-X</label><input type="text" name="name"></input>
37
+ <ox-input-select-buttons
38
+ @change=${(e) => {
39
+ console.log(e.target.value);
40
+ }}
41
+ name="wearables"
42
+ .value=${'Gloves'}
43
+ .options=${[
44
+ { display: 'SHOOSE', value: 'Shoose' },
45
+ { display: 'CHOTHES', value: 'Clothes' },
46
+ { display: 'GLOVES', value: 'Gloves' }
47
+ ]}
48
+ multiple
49
+ ></ox-input-select-buttons>
50
+ </div>
51
+
52
+ <ox-context-page-toolbar class="actions"
53
+ .tools=${[
54
+ {
55
+ position: TOOL_POSITION.FRONT,
56
+ template: html ` <mwc-icon>download</mwc-icon> `,
57
+ context: 'exportable'
58
+ },
59
+ {
60
+ position: TOOL_POSITION.FRONT,
61
+ template: html ` <mwc-icon>upload</mwc-icon> `,
62
+ context: 'importable'
63
+ },
64
+ {
65
+ position: TOOL_POSITION.CENTER,
66
+ template: html `<ox-page-action-context-bar
67
+ .actions=${[
68
+ {
69
+ title: 'save',
70
+ action: () => { },
71
+ icon: 'save'
72
+ },
73
+ {
74
+ title: 'copy',
75
+ action: () => { },
76
+ icon: 'content_copy'
77
+ },
78
+ {
79
+ title: 'delete',
80
+ action: () => { },
81
+ icon: 'delete'
82
+ }
83
+ ]}
84
+ ></ox-page-action-context-bar>`
85
+ }
86
+ ]}
87
+ .context=${{
88
+ exportable: true,
89
+ importable: true,
90
+ toolbar: false
91
+ }}
92
+
93
+ }> </ox-context-page-toolbar>
94
+ </div>
95
+ </div>
96
+ `;
97
+ export const Regular = Template.bind({});
98
+ Regular.args = {
99
+ label: 'common header styles'
100
+ };
101
+ //# sourceMappingURL=ox-context-page-toolbar-select-buttons.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-page-toolbar-select-buttons.stories.js","sourceRoot":"","sources":["../../stories/ox-context-page-toolbar-select-buttons.stories.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,2CAA2C,CAAA;AAClD,OAAO,4CAA4C,CAAA;AACnD,OAAO,2CAA2C,CAAA;AAClD,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,wCAAwC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,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;;;;;;;;;MAS9D,kBAAkB,CAAC,OAAO;;;;;;;UAOtB,KAAK;;;;;;kBAMG,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;;iBAEQ,QAAQ;mBACN;IACT,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACvC;;;;;;eAMM;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,iCAAiC;QAC/C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,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/mwc-icon'\nimport '../src/layouts/ox-context-page-toolbar.js'\nimport '../src/tools/ox-page-action-context-bar.js'\nimport '@operato/input/ox-input-select-buttons.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-page-toolbar select buttons',\n component: 'ox-context-page-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 <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" 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 <mwc-icon>summarize</mwc-icon>\n ${label}\n </div>\n\n <div class=\"filters\">\n <label>Filter-X</label><input type=\"text\" name=\"name\"></input>\n <ox-input-select-buttons\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=\"wearables\"\n .value=${'Gloves'}\n .options=${[\n { display: 'SHOOSE', value: 'Shoose' },\n { display: 'CHOTHES', value: 'Clothes' },\n { display: 'GLOVES', value: 'Gloves' }\n ]}\n multiple\n ></ox-input-select-buttons>\n </div>\n\n <ox-context-page-toolbar class=\"actions\" \n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>download</mwc-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>upload</mwc-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-page-toolbar>\n </div>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'common header styles'\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import '@material/mwc-icon';
2
+ import '../src/layouts/ox-context-page-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
+ label: {
11
+ control: string;
12
+ };
13
+ };
14
+ };
15
+ export default _default;
16
+ interface Story<T> {
17
+ (args: T): TemplateResult;
18
+ args?: Partial<T>;
19
+ argTypes?: Record<string, unknown>;
20
+ }
21
+ interface ArgTypes {
22
+ label?: string;
23
+ }
24
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,82 @@
1
+ import '@material/mwc-icon';
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
+ import '@operato/styles';
7
+ import { html } from 'lit';
8
+ export default {
9
+ title: 'ox-context-page-toolbar-select',
10
+ component: 'ox-context-page-toolbar',
11
+ argTypes: {
12
+ label: { control: 'string' }
13
+ }
14
+ };
15
+ const Template = ({ label = '' }) => html `
16
+ <link href="/themes/app-theme.css" rel="stylesheet" />
17
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
18
+
19
+ <style>
20
+ body {
21
+ background-color: white;
22
+ }
23
+
24
+ ${CommonHeaderStyles.cssText}
25
+ </style>
26
+
27
+ <div style="height:600px;">
28
+ <div class="header">
29
+ <div class="title">
30
+ <mwc-icon>summarize</mwc-icon>
31
+ ${label}
32
+ </div>
33
+
34
+ <div class="filters">
35
+ <label>Filter</label><input type="text"></input>
36
+ </div>
37
+
38
+ <ox-context-page-toolbar class="actions"
39
+ .tools=${[
40
+ {
41
+ position: TOOL_POSITION.FRONT,
42
+ template: html ` <mwc-icon>download</mwc-icon> `,
43
+ context: 'exportable'
44
+ },
45
+ {
46
+ position: TOOL_POSITION.FRONT,
47
+ template: html ` <mwc-icon>upload</mwc-icon> `,
48
+ context: 'importable'
49
+ },
50
+ {
51
+ position: TOOL_POSITION.CENTER,
52
+ template: html `<ox-page-action-context-bar
53
+ .actions=${[
54
+ {
55
+ title: 'smile',
56
+ action: () => { },
57
+ select: ['', 'delete', 'hahaha', 'hohoho']
58
+ },
59
+ {
60
+ title: 'save',
61
+ action: () => { },
62
+ icon: 'save'
63
+ }
64
+ ]}
65
+ ></ox-page-action-context-bar>`
66
+ }
67
+ ]}
68
+ .context=${{
69
+ exportable: true,
70
+ importable: true,
71
+ toolbar: false
72
+ }}
73
+
74
+ }> </ox-context-page-toolbar>
75
+ </div>
76
+ </div>
77
+ `;
78
+ export const Regular = Template.bind({});
79
+ Regular.args = {
80
+ label: 'common header styles'
81
+ };
82
+ //# sourceMappingURL=ox-context-page-toolbar-select.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-page-toolbar-select.stories.js","sourceRoot":"","sources":["../../stories/ox-context-page-toolbar-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,2CAA2C,CAAA;AAClD,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,gCAAgC;IACvC,SAAS,EAAE,yBAAyB;IACpC,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;;;;;;;;;MAS9D,kBAAkB,CAAC,OAAO;;;;;;;UAOtB,KAAK;;;;;;;;eAQA;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,iCAAiC;QAC/C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,MAAM;QAC9B,QAAQ,EAAE,IAAI,CAAA;uBACD;YACT;gBACE,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;aAC3C;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,MAAM;aACb;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/mwc-icon'\nimport '../src/layouts/ox-context-page-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-page-toolbar-select',\n component: 'ox-context-page-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 <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" 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 <mwc-icon>summarize</mwc-icon>\n ${label}\n </div>\n\n <div class=\"filters\">\n <label>Filter</label><input type=\"text\"></input>\n </div>\n\n <ox-context-page-toolbar class=\"actions\" \n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>download</mwc-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>upload</mwc-icon> `,\n context: 'importable'\n },\n {\n position: TOOL_POSITION.CENTER,\n template: html`<ox-page-action-context-bar\n .actions=${[\n {\n title: 'smile',\n action: () => {},\n select: ['', 'delete', 'hahaha', 'hohoho']\n },\n {\n title: 'save',\n action: () => {},\n icon: 'save'\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-page-toolbar>\n </div>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'common header styles'\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import '@material/mwc-icon';
2
+ import '../src/layouts/ox-context-page-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
+ label: {
11
+ control: string;
12
+ };
13
+ };
14
+ };
15
+ export default _default;
16
+ interface Story<T> {
17
+ (args: T): TemplateResult;
18
+ args?: Partial<T>;
19
+ argTypes?: Record<string, unknown>;
20
+ }
21
+ interface ArgTypes {
22
+ label?: string;
23
+ }
24
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,87 @@
1
+ import '@material/mwc-icon';
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
+ import '@operato/styles';
7
+ import { html } from 'lit';
8
+ export default {
9
+ title: 'ox-context-page-toolbar',
10
+ component: 'ox-context-page-toolbar',
11
+ argTypes: {
12
+ label: { control: 'string' }
13
+ }
14
+ };
15
+ const Template = ({ label = '' }) => html `
16
+ <link href="/themes/app-theme.css" rel="stylesheet" />
17
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
18
+
19
+ <style>
20
+ body {
21
+ background-color: white;
22
+ }
23
+
24
+ ${CommonHeaderStyles.cssText}
25
+ </style>
26
+
27
+ <div style="height:600px;">
28
+ <div class="header">
29
+ <div class="title">
30
+ <mwc-icon>summarize</mwc-icon>
31
+ ${label}
32
+ </div>
33
+
34
+ <div class="filters">
35
+ <label>Filter</label><input type="text"></input>
36
+ </div>
37
+
38
+ <ox-context-page-toolbar class="actions"
39
+ .tools=${[
40
+ {
41
+ position: TOOL_POSITION.FRONT,
42
+ template: html ` <mwc-icon>download</mwc-icon> `,
43
+ context: 'exportable'
44
+ },
45
+ {
46
+ position: TOOL_POSITION.FRONT,
47
+ template: html ` <mwc-icon>upload</mwc-icon> `,
48
+ context: 'importable'
49
+ },
50
+ {
51
+ position: TOOL_POSITION.CENTER,
52
+ template: html `<ox-page-action-context-bar
53
+ .actions=${[
54
+ {
55
+ title: 'save',
56
+ action: () => { },
57
+ icon: 'save'
58
+ },
59
+ {
60
+ title: 'copy',
61
+ action: () => { },
62
+ icon: 'content_copy'
63
+ },
64
+ {
65
+ title: 'delete',
66
+ action: () => { },
67
+ icon: 'delete'
68
+ }
69
+ ]}
70
+ ></ox-page-action-context-bar>`
71
+ }
72
+ ]}
73
+ .context=${{
74
+ exportable: true,
75
+ importable: true,
76
+ toolbar: false
77
+ }}
78
+
79
+ }> </ox-context-page-toolbar>
80
+ </div>
81
+ </div>
82
+ `;
83
+ export const Regular = Template.bind({});
84
+ Regular.args = {
85
+ label: 'common header styles'
86
+ };
87
+ //# sourceMappingURL=ox-context-page-toolbar.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-page-toolbar.stories.js","sourceRoot":"","sources":["../../stories/ox-context-page-toolbar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,2CAA2C,CAAA;AAClD,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,yBAAyB;IAChC,SAAS,EAAE,yBAAyB;IACpC,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;;;;;;;;;MAS9D,kBAAkB,CAAC,OAAO;;;;;;;UAOtB,KAAK;;;;;;;;eAQA;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,iCAAiC;QAC/C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,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/mwc-icon'\nimport '../src/layouts/ox-context-page-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-page-toolbar',\n component: 'ox-context-page-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 <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" 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 <mwc-icon>summarize</mwc-icon>\n ${label}\n </div>\n\n <div class=\"filters\">\n <label>Filter</label><input type=\"text\"></input>\n </div>\n\n <ox-context-page-toolbar class=\"actions\" \n .tools=${[\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>download</mwc-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT,\n template: html` <mwc-icon>upload</mwc-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-page-toolbar>\n </div>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'common header styles'\n}\n"]}