@operato/context 2.0.0-alpha.7 → 2.0.0-alpha.71
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.
- package/CHANGELOG.md +374 -0
- package/demo/index.html +13 -2
- package/dist/src/layouts/ox-context-page-toolbar.d.ts +9 -4
- package/dist/src/layouts/ox-context-page-toolbar.js +30 -10
- package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
- package/dist/src/layouts/ox-context-toolbar.d.ts +2 -2
- package/dist/src/layouts/ox-context-toolbar.js +98 -70
- package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
- package/dist/src/styles/ox-context-toolbar-overlay-style.js +2 -2
- package/dist/src/styles/ox-context-toolbar-overlay-style.js.map +1 -1
- package/dist/src/tools/ox-page-action-context-bar.d.ts +12 -5
- package/dist/src/tools/ox-page-action-context-bar.js +74 -45
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-page-action-overlay-template.d.ts +2 -2
- package/dist/src/tools/ox-page-action-overlay-template.js +27 -21
- package/dist/src/tools/ox-page-action-overlay-template.js.map +1 -1
- package/dist/src/tools/ox-page-title-bar.d.ts +2 -2
- package/dist/src/tools/ox-page-title-bar.js +6 -8
- package/dist/src/tools/ox-page-title-bar.js.map +1 -1
- package/dist/src/tools/ox-title-bar.d.ts +2 -2
- package/dist/src/tools/ox-title-bar.js +6 -8
- package/dist/src/tools/ox-title-bar.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.d.ts +25 -0
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +127 -0
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js +85 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -0
- package/dist/stories/ox-context-page-toolbar.stories.d.ts +24 -0
- package/dist/stories/ox-context-page-toolbar.stories.js +90 -0
- package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-complex.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js +146 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-empty.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js +48 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.js +127 -0
- package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar.stories.d.ts +19 -0
- package/dist/stories/ox-context-toolbar.stories.js +82 -0
- package/dist/stories/ox-context-toolbar.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/layouts/ox-context-page-toolbar.ts +33 -10
- package/src/layouts/ox-context-toolbar.ts +98 -70
- package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
- package/src/tools/ox-page-action-context-bar.ts +102 -64
- package/src/tools/ox-page-action-overlay-template.ts +47 -41
- package/src/tools/ox-page-title-bar.ts +6 -8
- package/src/tools/ox-title-bar.ts +6 -8
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +141 -0
- package/stories/ox-context-page-toolbar-select.stories.ts +99 -0
- package/stories/ox-context-page-toolbar.stories.ts +104 -0
- package/stories/ox-context-toolbar-complex.stories.ts +158 -0
- package/stories/ox-context-toolbar-empty.stories.ts +61 -0
- package/stories/ox-context-toolbar-overflow.stories.ts +139 -0
- package/stories/ox-context-toolbar.stories.ts +94 -0
- package/themes/app-theme.css +145 -0
- package/themes/context-theme.css +74 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-page-action-overlay-template.js","sourceRoot":"","sources":["../../../src/tools/ox-page-action-overlay-template.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ox-page-action-overlay-template.js","sourceRoot":"","sources":["../../../src/tools/ox-page-action-overlay-template.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAmB,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAA;AAGnF,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAAlE;;QAgDY,YAAO,GAAU,EAAE,CAAA;IAwDtC,CAAC;IAvGC,MAAM,KAAK,MAAM;QACf,OAAO;YACL,eAAe;YACf,0BAA0B;YAC1B,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCF;SACF,CAAA;IACH,CAAC;IAID,MAAM;QACJ,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;YAClC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAc,CAAA;YAC1E,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;YAEhE,OAAO,IAAI,IAAI,MAAM;gBACnB,CAA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,CAAC;IAED,YAAY,CAAC,KAAU;;QACrB,IAAI,CAAC,OAAO,GAAG,CAAA,MAAA,MAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,OAAO,0CAAE,OAAO,0CAAE,MAAM,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,EAAE,CAAA;IACvF,CAAC;CACF,CAAA;AAxDkB;IAAhB,KAAK,EAAE;0DAA4B;AAhDzB,yBAAyB;IADrC,aAAa,CAAC,iCAAiC,CAAC;GACpC,yBAAyB,CAwGrC","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers'\n\nimport { store } from '@operato/shell'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { sleep } from '@operato/utils'\n\nimport { ContextToolbarOverlayStyle } from '../styles/ox-context-toolbar-overlay-style.js'\n\n@customElement('ox-page-action-overlay-template')\nexport class PageActionOverlayTemplate extends connect(store)(LitElement) {\n static get styles() {\n return [\n ScrollbarStyles,\n ContextToolbarOverlayStyle,\n css`\n :host {\n display: flex;\n flex-wrap: wrap;\n gap: var(--margin-narrow);\n }\n :host *:focus {\n outline: none;\n }\n\n button {\n background-color: var(--main-section-background-color);\n border-radius: var(--context-action-bar-more-button-border-radius);\n }\n\n [danger] {\n --md-theme-primary: var(--md-danger-button-primary-color);\n --md-button-outline-color: var(--md-danger-button-outline-color);\n }\n\n [filled] {\n font-variation-settings: 'FILL' 1;\n }\n\n @media screen and (max-width: 460px) {\n button {\n --md-button-horizontal-padding: var(--padding-default);\n border-radius: 4px;\n }\n }\n\n @keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n `\n ]\n }\n\n @state() private actions: any[] = []\n\n render() {\n return html`\n ${this.actions.map(($action, idx) => {\n let { type, title, icon, action, select, href, emphasis } = $action as any\n let { outlined, raised, dense, danger, filled } = emphasis || {}\n\n return type == 'text'\n ? html` <span>${title}</span> `\n : type == 'select' || (select && select.length > 0)\n ? html`\n <select @change=${action}>\n ${select.map((option: any) => html` <option>${option}</option> `)}\n </select>\n `\n : type == 'link'\n ? html` <a href=${href}>${title}</a> `\n : html`\n <button\n ?dense=${dense}\n ?raised=${raised}\n ?outlined=${outlined}\n ?danger=${danger}\n ?filled=${filled}\n @click=${async (e: MouseEvent) => {\n /* all actions should be bloked for a second */\n const button = e.currentTarget as any\n button.icon = 'rotate_right'\n button.setAttribute('working', true)\n button.disabled = true\n\n try {\n action()\n } finally {\n await sleep(1000)\n button.disabled = false\n /* because icon can be changed after sleep, don't use closure 'icon'. */\n button.icon = this.actions[idx]?.icon || 'done_all'\n button.removeAttribute('working')\n\n window.history.back()\n }\n }}\n >\n <md-icon>${icon || 'done_all'}</md-icon>\n ${title}\n </button>\n `\n })}\n `\n }\n\n stateChanged(state: any) {\n this.actions = state.route?.context?.actions?.filter((action: any) => !!action) || []\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@operato/input/ox-input-search.js';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
4
|
declare const PageTitleBar_base: (new (...args: any[]) => {
|
|
@@ -12,7 +12,7 @@ export declare class PageTitleBar extends PageTitleBar_base {
|
|
|
12
12
|
static styles: import("lit").CSSResult[];
|
|
13
13
|
private context;
|
|
14
14
|
mobile: boolean;
|
|
15
|
-
render(): import("lit").TemplateResult<1>;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
16
|
stateChanged(state: any): void;
|
|
17
17
|
}
|
|
18
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
3
|
import '@operato/input/ox-input-search.js';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { customElement, state } from 'lit/decorators.js';
|
|
@@ -24,10 +24,8 @@ let PageTitleBar = class PageTitleBar extends connect(store)(LitElement) {
|
|
|
24
24
|
title = '';
|
|
25
25
|
}
|
|
26
26
|
return html `
|
|
27
|
-
${title ? html ` <div titler>${icon ? html `<
|
|
28
|
-
${help && title
|
|
29
|
-
? html ` <mwc-icon @click=${(e) => openHelp(help)} help>help</mwc-icon> `
|
|
30
|
-
: html ``}
|
|
27
|
+
${title ? html ` <div titler>${icon ? html `<md-icon>${icon}</md-icon> ` : html ``}${text}</div> ` : html ``}
|
|
28
|
+
${help && title ? html ` <md-icon @click=${(e) => openHelp(help)} help>help</md-icon> ` : html ``}
|
|
31
29
|
${searchable || filterable
|
|
32
30
|
? html `
|
|
33
31
|
<div search>
|
|
@@ -42,9 +40,9 @@ let PageTitleBar = class PageTitleBar extends connect(store)(LitElement) {
|
|
|
42
40
|
></ox-input-search>`
|
|
43
41
|
: html ``}
|
|
44
42
|
${!title && help && searchable
|
|
45
|
-
? html `<
|
|
43
|
+
? html `<md-icon @click=${(e) => openHelp(help)} help>help</md-icon>`
|
|
46
44
|
: html ``}
|
|
47
|
-
${filterable ? html `<
|
|
45
|
+
${filterable ? html `<md-icon @click=${(e) => filterHandler()}>unfold_more</md-icon>` : html ``}
|
|
48
46
|
</div>
|
|
49
47
|
`
|
|
50
48
|
: html ``}
|
|
@@ -65,7 +63,7 @@ PageTitleBar.styles = [
|
|
|
65
63
|
--help-icon-opacity: 0.2;
|
|
66
64
|
--help-icon-size: 20px;
|
|
67
65
|
|
|
68
|
-
--
|
|
66
|
+
--md-icon-size: 20px;
|
|
69
67
|
|
|
70
68
|
--input-search-padding: var(--padding-narrow);
|
|
71
69
|
--input-search-font: normal 14px var(--theme-font);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-page-title-bar.js","sourceRoot":"","sources":["../../../src/tools/ox-page-title-bar.ts"],"names":[],"mappings":";AAAA,OAAO,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B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAA;IACpC,CAAC;;AA5GM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2DF;CACF,AA7DY,CA6DZ;AAEgB;IAAhB,KAAK,EAAE;6CAAqB;AAhElB,YAAY;IADxB,aAAa,CAAC,mBAAmB,CAAC;GACtB,YAAY,CA8GxB","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'\nimport { isMobileDevice } from '@operato/utils'\n\n@customElement('ox-page-title-bar')\nexport class PageTitleBar extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n align-items: center;\n\n --help-icon-color: var(--primary-text-color);\n --help-icon-hover-color: var(--secondary-text-color);\n --help-icon-opacity: 0.2;\n --help-icon-size: 20px;\n\n --md-icon-size: 20px;\n\n --input-search-padding: var(--padding-narrow);\n --input-search-font: normal 14px var(--theme-font);\n }\n\n [titler] {\n display: flex;\n padding: var(--padding-default) var(--padding-narrow) var(--padding-narrow) var(--padding-narrow);\n font: var(--context-toolbar-title);\n color: var(--title-text-color);\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 margin-left: auto;\n padding: 0 10px;\n }\n\n [search] > * {\n align-self: center;\n }\n `\n ]\n\n @state() private context: any\n\n mobile = isMobileDevice()\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 (this.mobile && searchable && title) {\n placeholder ||= title\n title = ''\n }\n\n return html`\n ${title ? html` <div titler>${icon ? html`<md-icon>${icon}</md-icon> ` : html``}${text}</div> ` : html``}\n ${help && title ? html` <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()}>unfold_more</md-icon>` : html``}\n </div>\n `\n : html``}\n `\n }\n\n stateChanged(state: any) {\n this.context = state.route.context\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@operato/input/ox-input-search.js';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
4
|
declare const TitleBar_base: (new (...args: any[]) => {
|
|
@@ -11,7 +11,7 @@ declare const TitleBar_base: (new (...args: any[]) => {
|
|
|
11
11
|
export declare class TitleBar extends TitleBar_base {
|
|
12
12
|
static styles: import("lit").CSSResult[];
|
|
13
13
|
private context;
|
|
14
|
-
render(): import("lit").TemplateResult<1>;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
15
|
stateChanged(state: any): void;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
3
|
import '@operato/input/ox-input-search.js';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { customElement, state } from 'lit/decorators.js';
|
|
@@ -19,10 +19,8 @@ let TitleBar = class TitleBar extends connect(store)(LitElement) {
|
|
|
19
19
|
title = '';
|
|
20
20
|
}
|
|
21
21
|
return html `
|
|
22
|
-
${title ? html ` <div titler>${icon ? html `<
|
|
23
|
-
${help && title
|
|
24
|
-
? html ` <mwc-icon @click=${(e) => openHelp(help)} help>help</mwc-icon> `
|
|
25
|
-
: html ``}
|
|
22
|
+
${title ? html ` <div titler>${icon ? html `<md-icon>${icon}</md-icon> ` : html ``}${text}</div> ` : html ``}
|
|
23
|
+
${help && title ? html ` <md-icon @click=${(e) => openHelp(help)} help>help</md-icon> ` : html ``}
|
|
26
24
|
${searchable || filterable
|
|
27
25
|
? html `
|
|
28
26
|
<div search>
|
|
@@ -37,9 +35,9 @@ let TitleBar = class TitleBar extends connect(store)(LitElement) {
|
|
|
37
35
|
></ox-input-search>`
|
|
38
36
|
: html ``}
|
|
39
37
|
${!title && help && searchable
|
|
40
|
-
? html `<
|
|
38
|
+
? html `<md-icon @click=${(e) => openHelp(help)} help>help</md-icon>`
|
|
41
39
|
: html ``}
|
|
42
|
-
${filterable ? html `<
|
|
40
|
+
${filterable ? html `<md-icon @click=${(e) => filterHandler()}>tune</md-icon>` : html ``}
|
|
43
41
|
</div>
|
|
44
42
|
`
|
|
45
43
|
: html ``}
|
|
@@ -60,7 +58,7 @@ TitleBar.styles = [
|
|
|
60
58
|
--help-icon-opacity: 0.2;
|
|
61
59
|
--help-icon-size: 20px;
|
|
62
60
|
|
|
63
|
-
--
|
|
61
|
+
--md-icon-size: 20px;
|
|
64
62
|
|
|
65
63
|
--input-search-padding: 7px;
|
|
66
64
|
--input-search-border-bottom: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-title-bar.js","sourceRoot":"","sources":["../../../src/tools/ox-title-bar.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
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,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,CAAC,CAAE,EAAU,CAAA;QAC9E,MAAM,UAAU,GAAG,OAAO,aAAa,IAAI,UAAU,CAAA;QACrD,MAAM,UAAU,GAAG,OA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,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> ` : html``}${text}</div> ` : html``}\n ${help && title ? html` <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
|
+
|
|
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
|
+
<md-icon>apps</md-icon>
|
|
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,EAA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AAQ,EAAE,IAAI;iBACf;aACF;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,EAAE;gBACR,QAAQ,EAAE;oBACR,QAAQ,EAAE,IAAI;iBACf;aACF;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;gBAChB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE;oBACR,MAAM,EAAE,IAAI;oBACZ,MAAM,EAAE,IAAI;iBACb;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-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 \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>apps</md-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` <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,85 @@
|
|
|
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-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
|
+
|
|
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
|
+
|
|
22
|
+
<style>
|
|
23
|
+
body {
|
|
24
|
+
background-color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
${CommonHeaderStyles.cssText}
|
|
28
|
+
</style>
|
|
29
|
+
|
|
30
|
+
<div style="height:600px;">
|
|
31
|
+
<div class="header">
|
|
32
|
+
<div class="title">
|
|
33
|
+
<md-icon>apps</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-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: 'smile',
|
|
59
|
+
action: () => { },
|
|
60
|
+
select: ['', 'delete', 'hahaha', 'hohoho']
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: 'save',
|
|
64
|
+
action: () => { },
|
|
65
|
+
icon: 'save'
|
|
66
|
+
}
|
|
67
|
+
]}
|
|
68
|
+
></ox-page-action-context-bar>`
|
|
69
|
+
}
|
|
70
|
+
]}
|
|
71
|
+
.context=${{
|
|
72
|
+
exportable: true,
|
|
73
|
+
importable: true,
|
|
74
|
+
toolbar: false
|
|
75
|
+
}}
|
|
76
|
+
|
|
77
|
+
}> </ox-context-page-toolbar>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
81
|
+
export const Regular = Template.bind({});
|
|
82
|
+
Regular.args = {
|
|
83
|
+
label: 'common header styles'
|
|
84
|
+
};
|
|
85
|
+
//# 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;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;;;;;;;;;;;;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,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'\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\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>apps</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-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: '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,90 @@
|
|
|
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
|
+
|
|
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
|
+
|
|
22
|
+
<style>
|
|
23
|
+
body {
|
|
24
|
+
background-color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
${CommonHeaderStyles.cssText}
|
|
28
|
+
</style>
|
|
29
|
+
|
|
30
|
+
<div style="height:600px;">
|
|
31
|
+
<div class="header">
|
|
32
|
+
<div class="title">
|
|
33
|
+
<md-icon>apps</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-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
|
+
}
|
|
72
|
+
]}
|
|
73
|
+
></ox-page-action-context-bar>`
|
|
74
|
+
}
|
|
75
|
+
]}
|
|
76
|
+
.context=${{
|
|
77
|
+
exportable: true,
|
|
78
|
+
importable: true,
|
|
79
|
+
toolbar: false
|
|
80
|
+
}}
|
|
81
|
+
|
|
82
|
+
}> </ox-context-page-toolbar>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`;
|
|
86
|
+
export const Regular = Template.bind({});
|
|
87
|
+
Regular.args = {
|
|
88
|
+
label: 'common header styles'
|
|
89
|
+
};
|
|
90
|
+
//# 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,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;;;;;;;;;;;;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-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 \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>apps</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-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 }\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"]}
|