@operato/context 2.0.0-alpha.98 → 2.0.0-beta.0
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 +462 -0
- package/dist/src/layouts/ox-context-page-toolbar.js +15 -13
- package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
- package/dist/src/layouts/ox-context-toolbar.js +21 -25
- package/dist/src/layouts/ox-context-toolbar.js.map +1 -1
- package/dist/src/tools/ox-page-action-context-bar.d.ts +3 -2
- package/dist/src/tools/ox-page-action-context-bar.js +74 -49
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-page-action-overlay-template.d.ts +1 -0
- package/dist/src/tools/ox-page-action-overlay-template.js +29 -21
- package/dist/src/tools/ox-page-action-overlay-template.js.map +1 -1
- package/dist/src/tools/ox-page-title-bar.js +9 -8
- package/dist/src/tools/ox-page-title-bar.js.map +1 -1
- package/dist/src/tools/ox-title-bar.js +13 -12
- package/dist/src/tools/ox-title-bar.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.d.ts +5 -0
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js +59 -30
- package/dist/stories/ox-context-page-toolbar-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar-select.stories.d.ts +5 -0
- package/dist/stories/ox-context-page-toolbar-select.stories.js +60 -25
- package/dist/stories/ox-context-page-toolbar-select.stories.js.map +1 -1
- package/dist/stories/ox-context-page-toolbar.stories.d.ts +5 -0
- package/dist/stories/ox-context-page-toolbar.stories.js +53 -26
- package/dist/stories/ox-context-page-toolbar.stories.js.map +1 -1
- package/dist/stories/ox-context-toolbar-complex.stories.d.ts +7 -1
- package/dist/stories/ox-context-toolbar-complex.stories.js +31 -8
- package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -1
- package/dist/stories/ox-context-toolbar-cooldown.stories.d.ts +18 -0
- package/dist/stories/ox-context-toolbar-cooldown.stories.js +100 -0
- package/dist/stories/ox-context-toolbar-cooldown.stories.js.map +1 -0
- package/dist/stories/ox-context-toolbar-empty.stories.d.ts +7 -2
- package/dist/stories/ox-context-toolbar-empty.stories.js +32 -18
- package/dist/stories/ox-context-toolbar-empty.stories.js.map +1 -1
- package/dist/stories/ox-context-toolbar-overflow.stories.d.ts +7 -1
- package/dist/stories/ox-context-toolbar-overflow.stories.js +35 -9
- package/dist/stories/ox-context-toolbar-overflow.stories.js.map +1 -1
- package/dist/stories/ox-context-toolbar.stories.d.ts +1 -0
- package/dist/stories/ox-context-toolbar.stories.js +32 -7
- package/dist/stories/ox-context-toolbar.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/layouts/ox-context-page-toolbar.ts +15 -13
- package/src/layouts/ox-context-toolbar.ts +21 -25
- package/src/tools/ox-page-action-context-bar.ts +76 -48
- package/src/tools/ox-page-action-overlay-template.ts +30 -22
- package/src/tools/ox-page-title-bar.ts +9 -8
- package/src/tools/ox-title-bar.ts +13 -12
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +122 -91
- package/stories/ox-context-page-toolbar-select.stories.ts +93 -57
- package/stories/ox-context-page-toolbar.stories.ts +92 -63
- package/stories/ox-context-toolbar-complex.stories.ts +34 -9
- package/stories/ox-context-toolbar-cooldown.stories.ts +112 -0
- package/stories/ox-context-toolbar-empty.stories.ts +36 -19
- package/stories/ox-context-toolbar-overflow.stories.ts +38 -10
- package/stories/ox-context-toolbar.stories.ts +35 -8
- package/themes/dark-hc.css +51 -0
- package/themes/dark-mc.css +51 -0
- package/themes/dark.css +51 -0
- package/themes/light-hc.css +51 -0
- package/themes/light-mc.css +51 -0
- package/themes/light.css +57 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/spacing.css +13 -0
- package/themes/state-color.css +6 -0
- package/themes/app-theme.css +0 -161
- package/themes/context-theme.css +0 -74
- package/themes/material-theme.css +0 -88
|
@@ -2,58 +2,86 @@ import '@material/web/icon/icon.js';
|
|
|
2
2
|
import '../src/layouts/ox-context-page-toolbar.js';
|
|
3
3
|
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
4
|
import '@operato/input/ox-input-select-buttons.js';
|
|
5
|
-
import { CommonHeaderStyles } from '@operato/styles';
|
|
6
5
|
import { TOOL_POSITION } from '@operato/layout';
|
|
7
6
|
import '@operato/styles';
|
|
8
7
|
import { html } from 'lit';
|
|
8
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
9
9
|
export default {
|
|
10
10
|
title: 'ox-context-page-toolbar select buttons',
|
|
11
11
|
component: 'ox-context-page-toolbar',
|
|
12
12
|
argTypes: {
|
|
13
|
-
label: { control: 'string' }
|
|
13
|
+
label: { control: 'string' },
|
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
|
-
const Template = ({ label = '' }) => html `
|
|
17
|
-
<link href="/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<link href="
|
|
21
|
-
<link href="
|
|
22
|
-
|
|
17
|
+
const Template = ({ label = '', theme = 'light' }) => html `
|
|
18
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
19
|
+
|
|
20
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
21
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
22
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
23
|
+
|
|
24
|
+
<link
|
|
25
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
<link
|
|
33
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
+
rel="stylesheet"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
${MDTypeScaleStyles.cssText}
|
|
39
|
+
</style>
|
|
23
40
|
|
|
24
41
|
<style>
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
.container {
|
|
43
|
+
height: 500px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
padding: 20px;
|
|
46
|
+
background-color: var(--md-sys-color-primary-container);
|
|
47
|
+
color: var(--md-sys-color-on-primary-container);
|
|
48
|
+
|
|
49
|
+
padding: 20px;
|
|
27
50
|
}
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
ox-buttons-radio {
|
|
53
|
+
padding: 20px;
|
|
54
|
+
}
|
|
30
55
|
</style>
|
|
31
56
|
|
|
32
|
-
<
|
|
57
|
+
<script>
|
|
58
|
+
document.body.classList.add('${theme}')
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<div class="container md-typescale-body-large-prominent">
|
|
33
62
|
<div class="header">
|
|
34
|
-
<div class="title">
|
|
35
|
-
${label}
|
|
36
|
-
</div>
|
|
63
|
+
<div class="title">${label}</div>
|
|
37
64
|
|
|
38
65
|
<div class="filters">
|
|
39
|
-
<label>Filter-X</label><input type="text" name="name"
|
|
66
|
+
<label>Filter-X</label><input type="text" name="name" />
|
|
40
67
|
<ox-input-select-buttons
|
|
41
|
-
|
|
68
|
+
@change=${(e) => {
|
|
42
69
|
console.log(e.target.value);
|
|
43
70
|
}}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
71
|
+
name="wearables"
|
|
72
|
+
.value=${'Gloves'}
|
|
73
|
+
.options=${[
|
|
47
74
|
{ display: 'SHOOSE', value: 'Shoose' },
|
|
48
75
|
{ display: 'CHOTHES', value: 'Clothes' },
|
|
49
76
|
{ display: 'GLOVES', value: 'Gloves' }
|
|
50
77
|
]}
|
|
51
|
-
|
|
52
|
-
|
|
78
|
+
multiple
|
|
79
|
+
></ox-input-select-buttons>
|
|
53
80
|
</div>
|
|
54
81
|
|
|
55
|
-
<ox-context-page-toolbar
|
|
56
|
-
|
|
82
|
+
<ox-context-page-toolbar
|
|
83
|
+
class="actions"
|
|
84
|
+
.tools=${[
|
|
57
85
|
{
|
|
58
86
|
position: TOOL_POSITION.FRONT,
|
|
59
87
|
template: html ` <md-icon>download</md-icon> `,
|
|
@@ -67,7 +95,7 @@ const Template = ({ label = '' }) => html `
|
|
|
67
95
|
{
|
|
68
96
|
position: TOOL_POSITION.CENTER,
|
|
69
97
|
template: html `<ox-page-action-context-bar
|
|
70
|
-
|
|
98
|
+
.actions=${[
|
|
71
99
|
{
|
|
72
100
|
title: 'save',
|
|
73
101
|
action: () => { },
|
|
@@ -107,16 +135,17 @@ const Template = ({ label = '' }) => html `
|
|
|
107
135
|
}
|
|
108
136
|
}
|
|
109
137
|
]}
|
|
110
|
-
|
|
138
|
+
></ox-page-action-context-bar>`
|
|
111
139
|
}
|
|
112
140
|
]}
|
|
113
|
-
|
|
141
|
+
.context=${{
|
|
114
142
|
exportable: true,
|
|
115
143
|
importable: true,
|
|
116
144
|
toolbar: false
|
|
117
145
|
}}
|
|
118
|
-
|
|
119
|
-
|
|
146
|
+
}
|
|
147
|
+
>
|
|
148
|
+
</ox-context-page-toolbar>
|
|
120
149
|
</div>
|
|
121
150
|
</div>
|
|
122
151
|
`;
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"ox-context-page-toolbar-select-buttons.stories.js","sourceRoot":"","sources":["../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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'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-context-page-toolbar select buttons',\n component: 'ox-context-page-toolbar',\n argTypes: {\n label: { control: 'string' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ label = '', theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.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 ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n\n padding: 20px;\n }\n\n ox-buttons-radio {\n padding: 20px;\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <div class=\"header\">\n <div class=\"title\">${label}</div>\n\n <div class=\"filters\">\n <label>Filter-X</label><input type=\"text\" name=\"name\" />\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\n 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 >\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"]}
|
|
@@ -10,6 +10,10 @@ declare const _default: {
|
|
|
10
10
|
label: {
|
|
11
11
|
control: string;
|
|
12
12
|
};
|
|
13
|
+
theme: {
|
|
14
|
+
control: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
13
17
|
};
|
|
14
18
|
};
|
|
15
19
|
export default _default;
|
|
@@ -20,5 +24,6 @@ interface Story<T> {
|
|
|
20
24
|
}
|
|
21
25
|
interface ArgTypes {
|
|
22
26
|
label?: string;
|
|
27
|
+
theme?: string;
|
|
23
28
|
}
|
|
24
29
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -1,45 +1,72 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
2
|
import '../src/layouts/ox-context-page-toolbar.js';
|
|
3
3
|
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
-
import { CommonHeaderStyles } from '@operato/styles';
|
|
5
4
|
import { TOOL_POSITION } from '@operato/layout';
|
|
5
|
+
import { sleep } from '@operato/utils';
|
|
6
6
|
import '@operato/styles';
|
|
7
7
|
import { html } from 'lit';
|
|
8
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
8
9
|
export default {
|
|
9
10
|
title: 'ox-context-page-toolbar-select',
|
|
10
11
|
component: 'ox-context-page-toolbar',
|
|
11
12
|
argTypes: {
|
|
12
|
-
label: { control: 'string' }
|
|
13
|
+
label: { control: 'string' },
|
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
13
15
|
}
|
|
14
16
|
};
|
|
15
|
-
const Template = ({ label = '' }) => html `
|
|
16
|
-
<link href="/
|
|
17
|
-
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
17
|
+
const Template = ({ label = '', theme = 'light' }) => html `
|
|
18
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
18
19
|
|
|
19
|
-
<link href="
|
|
20
|
-
<link href="
|
|
21
|
-
<link href="
|
|
20
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
21
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
22
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
23
|
+
|
|
24
|
+
<link
|
|
25
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
<link
|
|
29
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
<link
|
|
33
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
+
rel="stylesheet"
|
|
35
|
+
/>
|
|
22
36
|
|
|
23
37
|
<style>
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
${MDTypeScaleStyles.cssText}
|
|
39
|
+
</style>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
.container {
|
|
43
|
+
height: 500px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
padding: 20px;
|
|
46
|
+
background-color: var(--md-sys-color-primary-container);
|
|
47
|
+
color: var(--md-sys-color-on-primary-container);
|
|
48
|
+
|
|
49
|
+
padding: 20px;
|
|
26
50
|
}
|
|
27
51
|
|
|
28
|
-
|
|
52
|
+
ox-buttons-radio {
|
|
53
|
+
padding: 20px;
|
|
54
|
+
}
|
|
29
55
|
</style>
|
|
30
56
|
|
|
31
|
-
<
|
|
57
|
+
<script>
|
|
58
|
+
document.body.classList.add('${theme}')
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<div class="container md-typescale-body-large-prominent">
|
|
32
62
|
<div class="header">
|
|
33
|
-
<div class="title">
|
|
34
|
-
${label}
|
|
35
|
-
</div>
|
|
63
|
+
<div class="title">${label}</div>
|
|
36
64
|
|
|
37
|
-
<div class="filters">
|
|
38
|
-
<label>Filter</label><input type="text"></input>
|
|
39
|
-
</div>
|
|
65
|
+
<div class="filters"><label>Filter</label><input type="text" /></div>
|
|
40
66
|
|
|
41
|
-
<ox-context-page-toolbar
|
|
42
|
-
|
|
67
|
+
<ox-context-page-toolbar
|
|
68
|
+
class="actions"
|
|
69
|
+
.tools=${[
|
|
43
70
|
{
|
|
44
71
|
position: TOOL_POSITION.FRONT,
|
|
45
72
|
template: html ` <md-icon>download</md-icon> `,
|
|
@@ -53,7 +80,15 @@ const Template = ({ label = '' }) => html `
|
|
|
53
80
|
{
|
|
54
81
|
position: TOOL_POSITION.CENTER,
|
|
55
82
|
template: html `<ox-page-action-context-bar
|
|
56
|
-
|
|
83
|
+
.actions=${[
|
|
84
|
+
{
|
|
85
|
+
type: 'icon',
|
|
86
|
+
title: 'favorite',
|
|
87
|
+
icon: 'favorite',
|
|
88
|
+
action: async () => {
|
|
89
|
+
await sleep(1000);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
57
92
|
{
|
|
58
93
|
title: 'smile',
|
|
59
94
|
action: () => { },
|
|
@@ -65,16 +100,16 @@ const Template = ({ label = '' }) => html `
|
|
|
65
100
|
icon: 'save'
|
|
66
101
|
}
|
|
67
102
|
]}
|
|
68
|
-
|
|
103
|
+
></ox-page-action-context-bar>`
|
|
69
104
|
}
|
|
70
105
|
]}
|
|
71
|
-
|
|
106
|
+
.context=${{
|
|
72
107
|
exportable: true,
|
|
73
108
|
importable: true,
|
|
74
109
|
toolbar: false
|
|
75
110
|
}}
|
|
76
|
-
|
|
77
|
-
|
|
111
|
+
>
|
|
112
|
+
</ox-context-page-toolbar>
|
|
78
113
|
</div>
|
|
79
114
|
</div>
|
|
80
115
|
`;
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"ox-context-page-toolbar-select.stories.js","sourceRoot":"","sources":["../../stories/ox-context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ChB,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;2CAC4B;KAChC;CACF;mBACU;IACT,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,KAAK;CACf;;;;;CAKR,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 { TOOL_POSITION } from '@operato/layout'\nimport { sleep } from '@operato/utils'\n\nimport '@operato/styles'\n\nimport { css, html, render, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-context-page-toolbar-select',\n component: 'ox-context-page-toolbar',\n argTypes: {\n label: { control: 'string' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ label = '', theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.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 ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n\n padding: 20px;\n }\n\n ox-buttons-radio {\n padding: 20px;\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <div class=\"header\">\n <div class=\"title\">${label}</div>\n\n <div class=\"filters\"><label>Filter</label><input type=\"text\" /></div>\n\n <ox-context-page-toolbar\n 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"]}
|
|
@@ -10,6 +10,10 @@ declare const _default: {
|
|
|
10
10
|
label: {
|
|
11
11
|
control: string;
|
|
12
12
|
};
|
|
13
|
+
theme: {
|
|
14
|
+
control: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
13
17
|
};
|
|
14
18
|
};
|
|
15
19
|
export default _default;
|
|
@@ -20,5 +24,6 @@ interface Story<T> {
|
|
|
20
24
|
}
|
|
21
25
|
interface ArgTypes {
|
|
22
26
|
label?: string;
|
|
27
|
+
theme?: string;
|
|
23
28
|
}
|
|
24
29
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -1,45 +1,71 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
2
|
import '../src/layouts/ox-context-page-toolbar.js';
|
|
3
3
|
import '../src/tools/ox-page-action-context-bar.js';
|
|
4
|
-
import { CommonHeaderStyles } from '@operato/styles';
|
|
5
4
|
import { TOOL_POSITION } from '@operato/layout';
|
|
6
5
|
import '@operato/styles';
|
|
7
6
|
import { html } from 'lit';
|
|
7
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
8
8
|
export default {
|
|
9
9
|
title: 'ox-context-page-toolbar',
|
|
10
10
|
component: 'ox-context-page-toolbar',
|
|
11
11
|
argTypes: {
|
|
12
|
-
label: { control: 'string' }
|
|
12
|
+
label: { control: 'string' },
|
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
|
-
const Template = ({ label = '' }) => html `
|
|
16
|
-
<link href="/
|
|
17
|
-
|
|
16
|
+
const Template = ({ label = '', theme = 'light' }) => html `
|
|
17
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
18
|
+
|
|
19
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
20
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
21
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
22
|
+
|
|
23
|
+
<link
|
|
24
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
25
|
+
rel="stylesheet"
|
|
26
|
+
/>
|
|
27
|
+
<link
|
|
28
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
29
|
+
rel="stylesheet"
|
|
30
|
+
/>
|
|
31
|
+
<link
|
|
32
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
33
|
+
rel="stylesheet"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
${MDTypeScaleStyles.cssText}
|
|
38
|
+
</style>
|
|
18
39
|
|
|
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
40
|
<style>
|
|
24
|
-
|
|
25
|
-
|
|
41
|
+
.container {
|
|
42
|
+
height: 500px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
padding: 20px;
|
|
45
|
+
background-color: var(--md-sys-color-primary-container);
|
|
46
|
+
color: var(--md-sys-color-on-primary-container);
|
|
47
|
+
|
|
48
|
+
padding: 20px;
|
|
26
49
|
}
|
|
27
50
|
|
|
28
|
-
|
|
51
|
+
ox-buttons-radio {
|
|
52
|
+
padding: 20px;
|
|
53
|
+
}
|
|
29
54
|
</style>
|
|
30
55
|
|
|
31
|
-
<
|
|
56
|
+
<script>
|
|
57
|
+
document.body.classList.add('${theme}')
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div class="container md-typescale-body-large-prominent">
|
|
32
61
|
<div class="header">
|
|
33
|
-
<div class="title">
|
|
34
|
-
${label}
|
|
35
|
-
</div>
|
|
62
|
+
<div class="title">${label}</div>
|
|
36
63
|
|
|
37
|
-
<div class="filters">
|
|
38
|
-
<label>Filter</label><input type="text"></input>
|
|
39
|
-
</div>
|
|
64
|
+
<div class="filters"><label>Filter</label><input type="text" /></div>
|
|
40
65
|
|
|
41
|
-
<ox-context-page-toolbar
|
|
42
|
-
|
|
66
|
+
<ox-context-page-toolbar
|
|
67
|
+
class="actions"
|
|
68
|
+
.tools=${[
|
|
43
69
|
{
|
|
44
70
|
position: TOOL_POSITION.FRONT,
|
|
45
71
|
template: html ` <md-icon>download</md-icon> `,
|
|
@@ -53,7 +79,7 @@ const Template = ({ label = '' }) => html `
|
|
|
53
79
|
{
|
|
54
80
|
position: TOOL_POSITION.CENTER,
|
|
55
81
|
template: html `<ox-page-action-context-bar
|
|
56
|
-
|
|
82
|
+
.actions=${[
|
|
57
83
|
{
|
|
58
84
|
title: 'save',
|
|
59
85
|
action: () => { },
|
|
@@ -73,16 +99,17 @@ const Template = ({ label = '' }) => html `
|
|
|
73
99
|
}
|
|
74
100
|
}
|
|
75
101
|
]}
|
|
76
|
-
|
|
102
|
+
></ox-page-action-context-bar>`
|
|
77
103
|
}
|
|
78
104
|
]}
|
|
79
|
-
|
|
105
|
+
.context=${{
|
|
80
106
|
exportable: true,
|
|
81
107
|
importable: true,
|
|
82
108
|
toolbar: false
|
|
83
109
|
}}
|
|
84
|
-
|
|
85
|
-
|
|
110
|
+
}
|
|
111
|
+
>
|
|
112
|
+
</ox-context-page-toolbar>
|
|
86
113
|
</div>
|
|
87
114
|
</div>
|
|
88
115
|
`;
|
|
@@ -1 +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;
|
|
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;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAO,IAAI,EAA0B,MAAM,KAAK,CAAA;AACvD,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqB/E,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;mCAoBI,KAAK;;;;;2BAKb,KAAK;;;;;;iBAMf;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;yBACD;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;gBACd,QAAQ,EAAE;oBACR,MAAM,EAAE,IAAI;iBACb;aACF;SACF;2CAC4B;KAChC;CACF;mBACU;IACT,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,KAAK;CACf;;;;;;CAMR,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'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-context-page-toolbar',\n component: 'ox-context-page-toolbar',\n argTypes: {\n label: { control: 'string' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ label = '', theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.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 ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n\n padding: 20px;\n }\n\n ox-buttons-radio {\n padding: 20px;\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <div class=\"header\">\n <div class=\"title\">${label}</div>\n\n <div class=\"filters\"><label>Filter</label><input type=\"text\" /></div>\n\n <ox-context-page-toolbar\n 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 >\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"]}
|
|
@@ -6,7 +6,12 @@ import { TemplateResult } from 'lit';
|
|
|
6
6
|
declare const _default: {
|
|
7
7
|
title: string;
|
|
8
8
|
component: string;
|
|
9
|
-
argTypes: {
|
|
9
|
+
argTypes: {
|
|
10
|
+
theme: {
|
|
11
|
+
control: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
10
15
|
};
|
|
11
16
|
export default _default;
|
|
12
17
|
interface Story<T> {
|
|
@@ -15,5 +20,6 @@ interface Story<T> {
|
|
|
15
20
|
argTypes?: Record<string, unknown>;
|
|
16
21
|
}
|
|
17
22
|
interface ArgTypes {
|
|
23
|
+
theme?: string;
|
|
18
24
|
}
|
|
19
25
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -4,15 +4,20 @@ import '../src/tools/ox-page-action-context-bar.js';
|
|
|
4
4
|
import { TOOL_POSITION } from '@operato/layout';
|
|
5
5
|
import '@operato/styles';
|
|
6
6
|
import { html } from 'lit';
|
|
7
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
7
8
|
export default {
|
|
8
9
|
title: 'ox-context-toolbar complex',
|
|
9
10
|
component: 'ox-context-toolbar',
|
|
10
|
-
argTypes: {
|
|
11
|
+
argTypes: {
|
|
12
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
|
13
|
+
}
|
|
11
14
|
};
|
|
12
|
-
const Template = () => html `
|
|
13
|
-
<link href="/
|
|
14
|
-
|
|
15
|
-
<link href="/themes/
|
|
15
|
+
const Template = ({ theme = 'light' }) => html `
|
|
16
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
17
|
+
|
|
18
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
19
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
20
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
16
21
|
|
|
17
22
|
<link
|
|
18
23
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
@@ -28,12 +33,30 @@ const Template = () => html `
|
|
|
28
33
|
/>
|
|
29
34
|
|
|
30
35
|
<style>
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
${MDTypeScaleStyles.cssText}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
.container {
|
|
41
|
+
height: 500px;
|
|
42
|
+
text-align: center;
|
|
43
|
+
padding: 20px;
|
|
44
|
+
background-color: var(--md-sys-color-primary-container);
|
|
45
|
+
color: var(--md-sys-color-on-primary-container);
|
|
46
|
+
|
|
47
|
+
padding: 20px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ox-buttons-radio {
|
|
51
|
+
padding: 20px;
|
|
33
52
|
}
|
|
34
53
|
</style>
|
|
35
54
|
|
|
36
|
-
<
|
|
55
|
+
<script>
|
|
56
|
+
document.body.classList.add('${theme}')
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<div class="container md-typescale-body-large-prominent">
|
|
37
60
|
<ox-context-toolbar
|
|
38
61
|
.tools=${[
|
|
39
62
|
{
|