@operato/context 2.0.0-alpha.13 → 2.0.0-alpha.131

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 (66) hide show
  1. package/CHANGELOG.md +708 -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 -14
  5. package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
  6. package/dist/src/layouts/ox-context-toolbar.d.ts +5 -3
  7. package/dist/src/layouts/ox-context-toolbar.js +138 -73
  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 +14 -6
  12. package/dist/src/tools/ox-page-action-context-bar.js +84 -68
  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 +3 -2
  15. package/dist/src/tools/ox-page-action-overlay-template.js +38 -39
  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 +94 -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 +93 -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 +150 -0
  34. package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
  35. package/dist/stories/ox-context-toolbar-cooldown.stories.d.ts +18 -0
  36. package/dist/stories/ox-context-toolbar-cooldown.stories.js +100 -0
  37. package/dist/stories/ox-context-toolbar-cooldown.stories.js.map +1 -0
  38. package/dist/stories/ox-context-toolbar-empty.stories.d.ts +18 -0
  39. package/dist/stories/ox-context-toolbar-empty.stories.js +79 -0
  40. package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -0
  41. package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +19 -0
  42. package/dist/stories/ox-context-toolbar-overflow.stories.js +131 -0
  43. package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -0
  44. package/dist/stories/ox-context-toolbar.stories.d.ts +19 -0
  45. package/dist/stories/ox-context-toolbar.stories.js +188 -0
  46. package/dist/stories/ox-context-toolbar.stories.js.map +1 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +20 -20
  49. package/src/layouts/ox-context-page-toolbar.ts +33 -14
  50. package/src/layouts/ox-context-toolbar.ts +139 -70
  51. package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
  52. package/src/tools/ox-page-action-context-bar.ts +96 -69
  53. package/src/tools/ox-page-action-overlay-template.ts +50 -51
  54. package/src/tools/ox-page-title-bar.ts +6 -8
  55. package/src/tools/ox-title-bar.ts +6 -8
  56. package/stories/ox-context-page-toolbar-select-buttons.stories.ts +141 -0
  57. package/stories/ox-context-page-toolbar-select.stories.ts +108 -0
  58. package/stories/ox-context-page-toolbar.stories.ts +107 -0
  59. package/stories/ox-context-toolbar-complex.stories.ts +162 -0
  60. package/stories/ox-context-toolbar-cooldown.stories.ts +112 -0
  61. package/stories/ox-context-toolbar-empty.stories.ts +92 -0
  62. package/stories/ox-context-toolbar-overflow.stories.ts +143 -0
  63. package/stories/ox-context-toolbar.stories.ts +200 -0
  64. package/themes/app-theme.css +161 -0
  65. package/themes/context-theme.css +74 -0
  66. package/themes/material-theme.css +88 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ox-title-bar.js","sourceRoot":"","sources":["../../../src/tools/ox-title-bar.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,mCAAmC,CAAA;AAE1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/B,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAiEtD,MAAM;QACJ,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,IAAK,EAAU,CAAA;QACjE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,GAAG,EAAE,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,MAAM,IAAK,EAAU,CAAA;QACtG,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,IAAK,EAAU,CAAA;QACxD,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAA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C,CAAC,IAAI,CAAA,EAAE;;WAEvG;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;KACX,CAAA;IACH,CAAC;IAED,YAAY,CAAC,KAAU;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAA;IACpC,CAAC;;AA3GM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DF;CACF,AA5DY,CA4DZ;AAEgB;IAAhB,KAAK,EAAE;yCAAqB;AA/DlB,QAAQ;IADpB,aAAa,CAAC,cAAc,CAAC;GACjB,QAAQ,CA6GpB","sourcesContent":["import '@material/mwc-icon'\nimport '@operato/input/ox-input-search.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers'\n\nimport { openHelp } from '@operato/help'\nimport { store } from '@operato/shell'\n\n@customElement('ox-title-bar')\nexport class TitleBar extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n align-items: center;\n\n --help-icon-color: #fff;\n --help-icon-hover-color: #fff;\n --help-icon-opacity: 0.2;\n --help-icon-size: 20px;\n\n --mdc-icon-size: 20px;\n\n --input-search-padding: 7px;\n --input-search-border-bottom: none;\n --input-search-focus-border-bottom: none;\n --input-search-font: normal 16px var(--theme-font);\n }\n\n [titler] {\n display: flex;\n font: var(--context-toolbar-title);\n }\n\n [titler] > * {\n align-self: center;\n }\n\n [help] {\n opacity: var(--help-icon-opacity);\n font-size: var(--help-icon-size);\n color: var(--help-icon-color);\n }\n\n [help]:hover {\n cursor: help;\n opacity: var(--help-icon-hover-opacity);\n color: var(--help-icon-hover-color);\n }\n\n [search] [help] {\n color: var(--secondary-color);\n }\n\n [search] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n align-self: center;\n color: var(--secondary-color);\n background-color: var(--opacity-light-color);\n border-radius: 999em;\n padding: 0 10px;\n }\n\n [search] > * {\n align-self: center;\n }\n `\n ]\n\n @state() private context: any\n\n render() {\n var { search, filter, title, help } = this.context || ({} as any)\n var { value = '', handler: searchHandler, placeholder = '', autofocus = true } = search || ({} as any)\n const { handler: filterHandler } = filter || ({} as any)\n const { icon, text = title } = typeof title === 'object' ? title : ({} as any)\n const searchable = typeof searchHandler == 'function'\n const filterable = typeof filterHandler == 'function'\n\n if (searchable && title) {\n placeholder ||= text\n title = ''\n }\n\n return html`\n ${title ? html` <div titler>${icon ? html`<mwc-icon>${icon}</mwc-icon>&nbsp;` : html``}${text}</div> ` : html``}\n ${help && title\n ? html` &nbsp;<mwc-icon @click=${(e: MouseEvent) => openHelp(help)} help>help</mwc-icon> `\n : html``}\n ${searchable || filterable\n ? html`\n <div search>\n ${searchable\n ? html` <ox-input-search\n .placeholder=${placeholder}\n .value=${value || ''}\n ?autofocus=${autofocus}\n @change=${(e: Event) => {\n searchHandler((e.target as any).value)\n }}\n ></ox-input-search>`\n : html``}\n ${!title && help && searchable\n ? html`<mwc-icon @click=${(e: MouseEvent) => openHelp(help)} help>help</mwc-icon>`\n : html``}\n ${filterable ? html`<mwc-icon @click=${(e: MouseEvent) => filterHandler()}>tune</mwc-icon>` : html``}\n </div>\n `\n : html``}\n `\n }\n\n stateChanged(state: any) {\n this.context = state.route.context\n }\n}\n"]}
1
+ {"version":3,"file":"ox-title-bar.js","sourceRoot":"","sources":["../../../src/tools/ox-title-bar.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAE1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,M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xB,CAAC,CAAC,IAAI,CAAA;;gBAEE,UAAU;gBACV,CAAC,CAAC,IAAI,CAAA;mCACa,WAAW;6BACjB,KAAK,IAAI,EAAE;iCACP,SAAS;8BACZ,CAAC,CAAQ,EAAE,EAAE;oBACrB,aAAa,CAAE,CAAC,CAAC,MAAc,CAAC,KAAK,CAAC,CAAA;gBACxC,CAAC;sCACiB;gBACtB,CAAC,CAAC,IAAI,CAAA,EAAE;gBACR,CAAC,KAAK,IAAI,IAAI,IAAI,UAAU;gBAC5B,CAAC,CAAC,IAAI,CAAA,mBAAmB,CAAC,CAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB;gBAChF,CAAC,CAAC,IAAI,CAAA,EAAE;gBACR,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,CAAC,CAAa,EAAE,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE;;WAErG;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;KACX,CAAA;IACH,CAAC;IAED,YAAY,CAAC,KAAU;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAA;IACpC,CAAC;;AAzGM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DF;CACF,AA5DY,CA4DZ;AAEgB;IAAhB,KAAK,EAAE;yCAAqB;AA/DlB,QAAQ;IADpB,aAAa,CAAC,cAAc,CAAC;GACjB,QAAQ,CA2GpB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-search.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers'\n\nimport { openHelp } from '@operato/help'\nimport { store } from '@operato/shell'\n\n@customElement('ox-title-bar')\nexport class TitleBar extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n align-items: center;\n\n --help-icon-color: #fff;\n --help-icon-hover-color: #fff;\n --help-icon-opacity: 0.2;\n --help-icon-size: 20px;\n\n --md-icon-size: 20px;\n\n --input-search-padding: 7px;\n --input-search-border-bottom: none;\n --input-search-focus-border-bottom: none;\n --input-search-font: normal 16px var(--theme-font);\n }\n\n [titler] {\n display: flex;\n font: var(--context-toolbar-title);\n }\n\n [titler] > * {\n align-self: center;\n }\n\n [help] {\n opacity: var(--help-icon-opacity);\n font-size: var(--help-icon-size);\n color: var(--help-icon-color);\n }\n\n [help]:hover {\n cursor: help;\n opacity: var(--help-icon-hover-opacity);\n color: var(--help-icon-hover-color);\n }\n\n [search] [help] {\n color: var(--secondary-color);\n }\n\n [search] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n align-self: center;\n color: var(--secondary-color);\n background-color: var(--opacity-light-color);\n border-radius: 999em;\n padding: 0 10px;\n }\n\n [search] > * {\n align-self: center;\n }\n `\n ]\n\n @state() private context: any\n\n render() {\n var { search, filter, title, help } = this.context || ({} as any)\n var { value = '', handler: searchHandler, placeholder = '', autofocus = true } = search || ({} as any)\n const { handler: filterHandler } = filter || ({} as any)\n const { icon, text = title } = typeof title === 'object' ? title : ({} as any)\n const searchable = typeof searchHandler == 'function'\n const filterable = typeof filterHandler == 'function'\n\n if (searchable && title) {\n placeholder ||= text\n title = ''\n }\n\n return html`\n ${title ? html` <div titler>${icon ? html`<md-icon>${icon}</md-icon>&nbsp;` : html``}${text}</div> ` : html``}\n ${help && title ? html` &nbsp;<md-icon @click=${(e: MouseEvent) => openHelp(help)} help>help</md-icon> ` : html``}\n ${searchable || filterable\n ? html`\n <div search>\n ${searchable\n ? html` <ox-input-search\n .placeholder=${placeholder}\n .value=${value || ''}\n ?autofocus=${autofocus}\n @change=${(e: Event) => {\n searchHandler((e.target as any).value)\n }}\n ></ox-input-search>`\n : html``}\n ${!title && help && searchable\n ? html`<md-icon @click=${(e: MouseEvent) => openHelp(help)} help>help</md-icon>`\n : html``}\n ${filterable ? html`<md-icon @click=${(e: MouseEvent) => filterHandler()}>tune</md-icon>` : html``}\n </div>\n `\n : html``}\n `\n }\n\n stateChanged(state: any) {\n this.context = state.route.context\n }\n}\n"]}
@@ -0,0 +1,25 @@
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 '@operato/styles';
6
+ import { TemplateResult } from 'lit';
7
+ declare const _default: {
8
+ title: string;
9
+ component: string;
10
+ argTypes: {
11
+ label: {
12
+ control: string;
13
+ };
14
+ };
15
+ };
16
+ export default _default;
17
+ interface Story<T> {
18
+ (args: T): TemplateResult;
19
+ args?: Partial<T>;
20
+ argTypes?: Record<string, unknown>;
21
+ }
22
+ interface ArgTypes {
23
+ label?: string;
24
+ }
25
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,127 @@
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
+ 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="/themes/material-theme.css" rel="stylesheet" />
19
+
20
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
21
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
22
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
23
+
24
+ <style>
25
+ body {
26
+ background-color: white;
27
+ }
28
+
29
+ ${CommonHeaderStyles.cssText}
30
+ </style>
31
+
32
+ <div style="height:600px;">
33
+ <div class="header">
34
+ <div class="title">
35
+ ${label}
36
+ </div>
37
+
38
+ <div class="filters">
39
+ <label>Filter-X</label><input type="text" name="name"></input>
40
+ <ox-input-select-buttons
41
+ @change=${(e) => {
42
+ console.log(e.target.value);
43
+ }}
44
+ name="wearables"
45
+ .value=${'Gloves'}
46
+ .options=${[
47
+ { display: 'SHOOSE', value: 'Shoose' },
48
+ { display: 'CHOTHES', value: 'Clothes' },
49
+ { display: 'GLOVES', value: 'Gloves' }
50
+ ]}
51
+ multiple
52
+ ></ox-input-select-buttons>
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
+ emphasis: {
81
+ outlined: true
82
+ }
83
+ },
84
+ {
85
+ title: 'edit',
86
+ action: () => { },
87
+ icon: 'content_copy',
88
+ emphasis: {
89
+ outlined: true
90
+ }
91
+ },
92
+ {
93
+ title: 'hoppaang',
94
+ action: () => { },
95
+ icon: '',
96
+ emphasis: {
97
+ outlined: true
98
+ }
99
+ },
100
+ {
101
+ title: 'delete',
102
+ action: () => { },
103
+ icon: 'delete',
104
+ emphasis: {
105
+ danger: true,
106
+ filled: true
107
+ }
108
+ }
109
+ ]}
110
+ ></ox-page-action-context-bar>`
111
+ }
112
+ ]}
113
+ .context=${{
114
+ exportable: true,
115
+ importable: true,
116
+ toolbar: false
117
+ }}
118
+
119
+ }> </ox-context-page-toolbar>
120
+ </div>
121
+ </div>
122
+ `;
123
+ export const Regular = Template.bind({});
124
+ Regular.args = {
125
+ label: 'common header styles'
126
+ };
127
+ //# 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,4BAA4B,CAAA;AACnC,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;;;;;;;;;;;;;MAa9D,kBAAkB,CAAC,OAAO;;;;;;UAMtB,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,E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AE,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-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=\"/themes/material-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 ${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` <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 emphasis: {\n outlined: true\n }\n },\n {\n title: 'edit',\n action: () => {},\n icon: 'content_copy',\n emphasis: {\n outlined: true\n }\n },\n {\n title: 'hoppaang',\n action: () => {},\n icon: '',\n emphasis: {\n outlined: true\n }\n },\n {\n title: 'delete',\n action: () => {},\n icon: 'delete',\n emphasis: {\n danger: true,\n filled: true\n }\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/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/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,94 @@
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
+ import { sleep } from '@operato/utils';
7
+ import '@operato/styles';
8
+ import { html } from 'lit';
9
+ export default {
10
+ title: 'ox-context-page-toolbar-select',
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="/themes/material-theme.css" rel="stylesheet" />
19
+
20
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
21
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
22
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
23
+
24
+ <style>
25
+ body {
26
+ background-color: white;
27
+ }
28
+
29
+ ${CommonHeaderStyles.cssText}
30
+ </style>
31
+
32
+ <div style="height:600px;">
33
+ <div class="header">
34
+ <div class="title">
35
+ ${label}
36
+ </div>
37
+
38
+ <div class="filters">
39
+ <label>Filter</label><input type="text"></input>
40
+ </div>
41
+
42
+ <ox-context-page-toolbar class="actions"
43
+ .tools=${[
44
+ {
45
+ position: TOOL_POSITION.FRONT,
46
+ template: html ` <md-icon>download</md-icon> `,
47
+ context: 'exportable'
48
+ },
49
+ {
50
+ position: TOOL_POSITION.FRONT,
51
+ template: html ` <md-icon>upload</md-icon> `,
52
+ context: 'importable'
53
+ },
54
+ {
55
+ position: TOOL_POSITION.CENTER,
56
+ template: html `<ox-page-action-context-bar
57
+ .actions=${[
58
+ {
59
+ type: 'icon',
60
+ title: 'favorite',
61
+ icon: 'favorite',
62
+ action: async () => {
63
+ await sleep(1000);
64
+ }
65
+ },
66
+ {
67
+ title: 'smile',
68
+ action: () => { },
69
+ select: ['', 'delete', 'hahaha', 'hohoho']
70
+ },
71
+ {
72
+ title: 'save',
73
+ action: () => { },
74
+ icon: 'save'
75
+ }
76
+ ]}
77
+ ></ox-page-action-context-bar>`
78
+ }
79
+ ]}
80
+ .context=${{
81
+ exportable: true,
82
+ importable: true,
83
+ toolbar: false
84
+ }}
85
+
86
+ }> </ox-context-page-toolbar>
87
+ </div>
88
+ </div>
89
+ `;
90
+ export const Regular = Template.bind({});
91
+ Regular.args = {
92
+ label: 'common header styles'
93
+ };
94
+ //# 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,4BAA4B,CAAA;AACnC,OAAO,2CAA2C,CAAA;AAClD,OAAO,4CAA4C,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,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;;;;;;;;;;;;;MAa9D,kBAAkB,CAAC,OAAO;;;;;;UAMtB,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,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,KAAK,IAAI,EAAE;oBACjB,MAAM,KAAK,CAAC,IAAI,CAAC,CAAA;gBACnB,CAAC;aACF;YACD;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/web/icon/icon.js'\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'\nimport { sleep } from '@operato/utils'\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=\"/themes/material-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 ${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` <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 type: 'icon',\n title: 'favorite',\n icon: 'favorite',\n action: async () => {\n await sleep(1000)\n }\n },\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/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/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,93 @@
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
+ 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="/themes/material-theme.css" rel="stylesheet" />
18
+
19
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
20
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
21
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1" rel="stylesheet">
22
+
23
+ <style>
24
+ body {
25
+ background-color: white;
26
+ }
27
+
28
+ ${CommonHeaderStyles.cssText}
29
+ </style>
30
+
31
+ <div style="height:600px;">
32
+ <div class="header">
33
+ <div class="title">
34
+ ${label}
35
+ </div>
36
+
37
+ <div class="filters">
38
+ <label>Filter</label><input type="text"></input>
39
+ </div>
40
+
41
+ <ox-context-page-toolbar class="actions"
42
+ .tools=${[
43
+ {
44
+ position: TOOL_POSITION.FRONT,
45
+ template: html ` <md-icon>download</md-icon> `,
46
+ context: 'exportable'
47
+ },
48
+ {
49
+ position: TOOL_POSITION.FRONT,
50
+ template: html ` <md-icon>upload</md-icon> `,
51
+ context: 'importable'
52
+ },
53
+ {
54
+ position: TOOL_POSITION.CENTER,
55
+ template: html `<ox-page-action-context-bar
56
+ .actions=${[
57
+ {
58
+ title: 'save',
59
+ action: () => { },
60
+ icon: 'save'
61
+ },
62
+ {
63
+ title: 'copy',
64
+ action: () => { },
65
+ icon: 'content_copy'
66
+ },
67
+ {
68
+ title: 'delete',
69
+ action: () => { },
70
+ icon: 'delete',
71
+ emphasis: {
72
+ danger: true
73
+ }
74
+ }
75
+ ]}
76
+ ></ox-page-action-context-bar>`
77
+ }
78
+ ]}
79
+ .context=${{
80
+ exportable: true,
81
+ importable: true,
82
+ toolbar: false
83
+ }}
84
+
85
+ }> </ox-context-page-toolbar>
86
+ </div>
87
+ </div>
88
+ `;
89
+ export const Regular = Template.bind({});
90
+ Regular.args = {
91
+ label: 'common header styles'
92
+ };
93
+ //# 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,4BAA4B,CAAA;AACnC,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,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,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-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=\"/themes/material-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 ${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` <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 emphasis: {\n danger: true\n }\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,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,150 @@
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 complex',
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/material-theme.css" rel="stylesheet" />
15
+ <link href="/themes/context-theme.css" rel="stylesheet" />
16
+
17
+ <link
18
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
19
+ rel="stylesheet"
20
+ />
21
+ <link
22
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
23
+ rel="stylesheet"
24
+ />
25
+ <link
26
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
27
+ rel="stylesheet"
28
+ />
29
+
30
+ <style>
31
+ body {
32
+ background-color: white;
33
+ }
34
+ </style>
35
+
36
+ <div style="height:100px; padding: 10px; background-color: black;">
37
+ <ox-context-toolbar
38
+ .tools=${[
39
+ {
40
+ position: TOOL_POSITION.FRONT_END,
41
+ template: html ` <md-icon>download</md-icon> `,
42
+ context: 'exportable'
43
+ },
44
+ {
45
+ position: TOOL_POSITION.FRONT_END,
46
+ template: html ` <md-icon>upload</md-icon> `,
47
+ context: 'importable'
48
+ },
49
+ {
50
+ position: TOOL_POSITION.FRONT,
51
+ template: html ` <md-icon>download</md-icon> `,
52
+ context: 'exportable'
53
+ },
54
+ {
55
+ position: TOOL_POSITION.FRONT,
56
+ template: html ` <md-icon>upload</md-icon> `,
57
+ context: 'importable'
58
+ },
59
+ {
60
+ position: TOOL_POSITION.CENTER,
61
+ template: html `<ox-page-action-context-bar
62
+ .actions=${[
63
+ {
64
+ title: 'save',
65
+ action: () => { },
66
+ icon: 'save'
67
+ },
68
+ {
69
+ title: 'copy',
70
+ action: () => { },
71
+ icon: 'content_copy'
72
+ },
73
+ {
74
+ title: 'delete',
75
+ action: () => { },
76
+ icon: 'delete',
77
+ emphasis: {
78
+ danger: true
79
+ }
80
+ }
81
+ ]}
82
+ ></ox-page-action-context-bar>`
83
+ },
84
+ {
85
+ position: TOOL_POSITION.REAR,
86
+ template: html `<ox-page-action-context-bar
87
+ .actions=${[
88
+ {
89
+ title: 'save',
90
+ action: () => { },
91
+ icon: 'save'
92
+ },
93
+ {
94
+ title: 'copy',
95
+ action: () => { },
96
+ icon: 'content_copy'
97
+ },
98
+ {
99
+ title: 'delete',
100
+ action: () => { },
101
+ icon: 'delete'
102
+ }
103
+ ]}
104
+ ></ox-page-action-context-bar>`
105
+ },
106
+ {
107
+ position: TOOL_POSITION.REAR_END,
108
+ template: html `<ox-page-action-context-bar
109
+ .actions=${[
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
+ position: TOOL_POSITION.REAR_END,
130
+ template: html ` <md-icon>download</md-icon> `,
131
+ context: 'exportable'
132
+ },
133
+ {
134
+ position: TOOL_POSITION.REAR_END,
135
+ template: html ` <md-icon>upload</md-icon> `,
136
+ context: 'importable'
137
+ }
138
+ ]}
139
+ .context=${{
140
+ exportable: true,
141
+ importable: true,
142
+ toolbar: true
143
+ }}
144
+ >
145
+ </ox-context-toolbar>
146
+ </div>
147
+ `;
148
+ export const Regular = Template.bind({});
149
+ Regular.args = {};
150
+ //# sourceMappingURL=ox-context-toolbar-complex.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-context-toolbar-complex.stories.js","sourceRoot":"","sources":["../../stories/ox-context-toolbar-complex.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,4BAA4B;IACnC,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,QAAQ,GAAoB,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;eA0B7B;IACP;QACE,QAAQ,EAAE,aAAa,CAAC,SAAS;QACjC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,QAAQ;aACf;SACF;yCAC4B;KAChC;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,QAAQ;QAChC,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;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,QAAQ;QAChC,QAAQ,EAAE,IAAI,CAAA,+BAA+B;QAC7C,OAAO,EAAE,YAAY;KACtB;IACD;QACE,QAAQ,EAAE,aAAa,CAAC,QAAQ;QAChC,QAAQ,EAAE,IAAI,CAAA,6BAA6B;QAC3C,OAAO,EAAE,YAAY;KACtB;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 complex',\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/material-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_END,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.FRONT_END,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\n },\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 emphasis: {\n danger: true\n }\n }\n ]}\n ></ox-page-action-context-bar>`\n },\n {\n position: TOOL_POSITION.REAR,\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 position: TOOL_POSITION.REAR_END,\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 position: TOOL_POSITION.REAR_END,\n template: html` <md-icon>download</md-icon> `,\n context: 'exportable'\n },\n {\n position: TOOL_POSITION.REAR_END,\n template: html` <md-icon>upload</md-icon> `,\n context: 'importable'\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"]}