@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.
- package/CHANGELOG.md +708 -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 -14
- package/dist/src/layouts/ox-context-page-toolbar.js.map +1 -1
- package/dist/src/layouts/ox-context-toolbar.d.ts +5 -3
- package/dist/src/layouts/ox-context-toolbar.js +138 -73
- 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 +14 -6
- package/dist/src/tools/ox-page-action-context-bar.js +84 -68
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-page-action-overlay-template.d.ts +3 -2
- package/dist/src/tools/ox-page-action-overlay-template.js +38 -39
- 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 +94 -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 +93 -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 +150 -0
- package/dist/stories/ox-context-toolbar-complex.stories.js.map +1 -0
- 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 +18 -0
- package/dist/stories/ox-context-toolbar-empty.stories.js +79 -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 +131 -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 +188 -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 -14
- package/src/layouts/ox-context-toolbar.ts +139 -70
- package/src/styles/ox-context-toolbar-overlay-style.ts +2 -2
- package/src/tools/ox-page-action-context-bar.ts +96 -69
- package/src/tools/ox-page-action-overlay-template.ts +50 -51
- 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 +108 -0
- package/stories/ox-context-page-toolbar.stories.ts +107 -0
- package/stories/ox-context-toolbar-complex.stories.ts +162 -0
- package/stories/ox-context-toolbar-cooldown.stories.ts +112 -0
- package/stories/ox-context-toolbar-empty.stories.ts +92 -0
- package/stories/ox-context-toolbar-overflow.stories.ts +143 -0
- package/stories/ox-context-toolbar.stories.ts +200 -0
- package/themes/app-theme.css +161 -0
- package/themes/context-theme.css +74 -0
- package/themes/material-theme.css +88 -0
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
|
|
6
|
+
import { sleep } from '@operato/utils'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar empty',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[]}
|
|
51
|
+
.context=${{
|
|
52
|
+
exportable: true,
|
|
53
|
+
importable: true,
|
|
54
|
+
toolbar: true
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
</ox-context-toolbar>
|
|
58
|
+
|
|
59
|
+
<ox-context-toolbar
|
|
60
|
+
.tools=${[
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
64
|
+
}
|
|
65
|
+
]}
|
|
66
|
+
.context=${{
|
|
67
|
+
exportable: true,
|
|
68
|
+
importable: true,
|
|
69
|
+
toolbar: true
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
</ox-context-toolbar>
|
|
73
|
+
|
|
74
|
+
<ox-context-toolbar
|
|
75
|
+
.tools=${[
|
|
76
|
+
{
|
|
77
|
+
position: TOOL_POSITION.CENTER,
|
|
78
|
+
template: html`<ox-page-action-context-bar
|
|
79
|
+
.actions=${[
|
|
80
|
+
{
|
|
81
|
+
type: 'icon',
|
|
82
|
+
action: async () => {},
|
|
83
|
+
icon: 'check'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'short-take(0secs)',
|
|
87
|
+
action: async () => {},
|
|
88
|
+
icon: 'delete'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'long-take(3secs)',
|
|
92
|
+
action: async () => {
|
|
93
|
+
await sleep(3000)
|
|
94
|
+
},
|
|
95
|
+
icon: 'save'
|
|
96
|
+
}
|
|
97
|
+
]}
|
|
98
|
+
></ox-page-action-context-bar>`
|
|
99
|
+
}
|
|
100
|
+
]}
|
|
101
|
+
.context=${{
|
|
102
|
+
exportable: true,
|
|
103
|
+
importable: true,
|
|
104
|
+
toolbar: true
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
</ox-context-toolbar>
|
|
108
|
+
</div>
|
|
109
|
+
`
|
|
110
|
+
|
|
111
|
+
export const Regular = Template.bind({})
|
|
112
|
+
Regular.args = {}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
|
|
6
|
+
import { sleep } from '@operato/utils'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar empty',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[]}
|
|
51
|
+
.context=${{
|
|
52
|
+
exportable: true,
|
|
53
|
+
importable: true,
|
|
54
|
+
toolbar: true
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
</ox-context-toolbar>
|
|
58
|
+
|
|
59
|
+
<ox-context-toolbar
|
|
60
|
+
.tools=${[
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
64
|
+
}
|
|
65
|
+
]}
|
|
66
|
+
.context=${{
|
|
67
|
+
exportable: true,
|
|
68
|
+
importable: true,
|
|
69
|
+
toolbar: true
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
</ox-context-toolbar>
|
|
73
|
+
|
|
74
|
+
<ox-context-toolbar
|
|
75
|
+
.tools=${[
|
|
76
|
+
{
|
|
77
|
+
position: TOOL_POSITION.CENTER,
|
|
78
|
+
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
79
|
+
}
|
|
80
|
+
]}
|
|
81
|
+
.context=${{
|
|
82
|
+
exportable: true,
|
|
83
|
+
importable: true,
|
|
84
|
+
toolbar: true
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
</ox-context-toolbar>
|
|
88
|
+
</div>
|
|
89
|
+
`
|
|
90
|
+
|
|
91
|
+
export const Regular = Template.bind({})
|
|
92
|
+
Regular.args = {}
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar overflow',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="height:100px; padding: 10px; background-color: yellow;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[
|
|
51
|
+
{
|
|
52
|
+
position: TOOL_POSITION.FRONT,
|
|
53
|
+
template: html` <md-icon>download</md-icon> `,
|
|
54
|
+
context: 'exportable'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
position: TOOL_POSITION.FRONT,
|
|
58
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
59
|
+
context: 'importable'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar
|
|
64
|
+
.actions=${[
|
|
65
|
+
{
|
|
66
|
+
title: 'save',
|
|
67
|
+
action: () => {},
|
|
68
|
+
icon: 'save'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'copy',
|
|
72
|
+
action: () => {},
|
|
73
|
+
icon: 'content_copy'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'delete',
|
|
77
|
+
action: () => {},
|
|
78
|
+
icon: 'delete'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'save',
|
|
82
|
+
action: () => {},
|
|
83
|
+
icon: 'save'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'copy',
|
|
87
|
+
action: () => {},
|
|
88
|
+
icon: 'content_copy'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'delete',
|
|
92
|
+
action: () => {},
|
|
93
|
+
icon: 'delete'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'save',
|
|
97
|
+
action: () => {},
|
|
98
|
+
icon: 'save'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'copy',
|
|
102
|
+
action: () => {},
|
|
103
|
+
icon: 'content_copy'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'delete',
|
|
107
|
+
action: () => {},
|
|
108
|
+
icon: 'delete'
|
|
109
|
+
},
|
|
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
|
+
emphasis: {
|
|
125
|
+
danger: true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]}
|
|
129
|
+
></ox-page-action-context-bar>`
|
|
130
|
+
}
|
|
131
|
+
]}
|
|
132
|
+
.context=${{
|
|
133
|
+
exportable: true,
|
|
134
|
+
importable: true,
|
|
135
|
+
toolbar: true
|
|
136
|
+
}}
|
|
137
|
+
>
|
|
138
|
+
</ox-context-toolbar>
|
|
139
|
+
</div>
|
|
140
|
+
`
|
|
141
|
+
|
|
142
|
+
export const Regular = Template.bind({})
|
|
143
|
+
Regular.args = {}
|
|
@@ -0,0 +1,200 @@
|
|
|
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
|
+
|
|
6
|
+
import '@operato/styles'
|
|
7
|
+
|
|
8
|
+
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'ox-context-toolbar',
|
|
12
|
+
component: 'ox-context-toolbar',
|
|
13
|
+
argTypes: {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Story<T> {
|
|
17
|
+
(args: T): TemplateResult
|
|
18
|
+
args?: Partial<T>
|
|
19
|
+
argTypes?: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ArgTypes {}
|
|
23
|
+
|
|
24
|
+
const Template: Story<ArgTypes> = () => html`
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
+
rel="stylesheet"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
+
rel="stylesheet"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
background-color: white;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<div style="height:500px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background-color: black;">
|
|
49
|
+
<ox-context-toolbar
|
|
50
|
+
.tools=${[
|
|
51
|
+
{
|
|
52
|
+
position: TOOL_POSITION.FRONT,
|
|
53
|
+
template: html` <md-icon>download</md-icon> `,
|
|
54
|
+
context: 'exportable'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
position: TOOL_POSITION.FRONT,
|
|
58
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
59
|
+
context: 'importable'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
position: TOOL_POSITION.CENTER,
|
|
63
|
+
template: html`<ox-page-action-context-bar
|
|
64
|
+
.actions=${[
|
|
65
|
+
{
|
|
66
|
+
title: 'save',
|
|
67
|
+
action: () => {},
|
|
68
|
+
icon: 'save'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'copy',
|
|
72
|
+
action: () => {},
|
|
73
|
+
icon: 'content_copy'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'delete',
|
|
77
|
+
action: () => {},
|
|
78
|
+
icon: 'delete',
|
|
79
|
+
emphasis: {
|
|
80
|
+
raised: true,
|
|
81
|
+
outlined: false,
|
|
82
|
+
dense: false,
|
|
83
|
+
danger: true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]}
|
|
87
|
+
></ox-page-action-context-bar>`
|
|
88
|
+
}
|
|
89
|
+
]}
|
|
90
|
+
.context=${{
|
|
91
|
+
exportable: true,
|
|
92
|
+
importable: true,
|
|
93
|
+
toolbar: true
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
</ox-context-toolbar>
|
|
97
|
+
|
|
98
|
+
<ox-context-toolbar
|
|
99
|
+
.tools=${[
|
|
100
|
+
{
|
|
101
|
+
position: TOOL_POSITION.FRONT,
|
|
102
|
+
template: html` <md-icon>download</md-icon> `,
|
|
103
|
+
context: 'exportable'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
position: TOOL_POSITION.CENTER,
|
|
107
|
+
template: html`<ox-page-action-context-bar
|
|
108
|
+
.actions=${[
|
|
109
|
+
{
|
|
110
|
+
title: 'save',
|
|
111
|
+
action: () => {},
|
|
112
|
+
icon: 'save'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: 'copy',
|
|
116
|
+
action: () => {},
|
|
117
|
+
icon: 'content_copy'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'delete',
|
|
121
|
+
action: () => {},
|
|
122
|
+
icon: 'delete',
|
|
123
|
+
emphasis: {
|
|
124
|
+
raised: false,
|
|
125
|
+
outlined: false,
|
|
126
|
+
dense: false,
|
|
127
|
+
danger: true
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]}
|
|
131
|
+
></ox-page-action-context-bar>`
|
|
132
|
+
}
|
|
133
|
+
]}
|
|
134
|
+
.context=${{
|
|
135
|
+
exportable: true,
|
|
136
|
+
importable: true,
|
|
137
|
+
toolbar: true
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
</ox-context-toolbar>
|
|
141
|
+
|
|
142
|
+
<ox-context-toolbar
|
|
143
|
+
.tools=${[
|
|
144
|
+
{
|
|
145
|
+
position: TOOL_POSITION.FRONT,
|
|
146
|
+
template: html` <md-icon>download</md-icon> `,
|
|
147
|
+
context: 'exportable'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
position: TOOL_POSITION.FRONT,
|
|
151
|
+
template: html` <md-icon>upload</md-icon> `,
|
|
152
|
+
context: 'importable'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
position: TOOL_POSITION.FRONT,
|
|
156
|
+
template: html` <md-icon>restart_alt</md-icon> `,
|
|
157
|
+
context: 'resettable'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
position: TOOL_POSITION.CENTER,
|
|
161
|
+
template: html`<ox-page-action-context-bar
|
|
162
|
+
.actions=${[
|
|
163
|
+
{
|
|
164
|
+
title: 'save',
|
|
165
|
+
action: () => {},
|
|
166
|
+
icon: 'save'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: 'copy',
|
|
170
|
+
action: () => {},
|
|
171
|
+
icon: 'content_copy'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: 'delete',
|
|
175
|
+
action: () => {},
|
|
176
|
+
icon: 'delete',
|
|
177
|
+
emphasis: {
|
|
178
|
+
raised: true,
|
|
179
|
+
outlined: false,
|
|
180
|
+
dense: false,
|
|
181
|
+
danger: true
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]}
|
|
185
|
+
></ox-page-action-context-bar>`
|
|
186
|
+
}
|
|
187
|
+
]}
|
|
188
|
+
.context=${{
|
|
189
|
+
exportable: true,
|
|
190
|
+
importable: true,
|
|
191
|
+
resettable: true,
|
|
192
|
+
toolbar: true
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
195
|
+
</ox-context-toolbar>
|
|
196
|
+
</div>
|
|
197
|
+
`
|
|
198
|
+
|
|
199
|
+
export const Regular = Template.bind({})
|
|
200
|
+
Regular.args = {}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
body {
|
|
2
|
+
/***********************************************
|
|
3
|
+
* 버전: 2.2024-1
|
|
4
|
+
* 작성일: 2024-04-14
|
|
5
|
+
* 작성자: Hoppaang
|
|
6
|
+
* color속성은 앱별 차별성이 크므로 가능하면 62라인 'app layout style'이후부터 수정/복사 등을 권장합니다
|
|
7
|
+
*
|
|
8
|
+
* 주요 변경 사항:
|
|
9
|
+
* - icon style 변수 추가
|
|
10
|
+
* - material design component themes의 변수명 mdc..에서 md로 교정
|
|
11
|
+
* - button style에 변수 추가 및 기 속성값 변경
|
|
12
|
+
|
|
13
|
+
***********************************************/
|
|
14
|
+
|
|
15
|
+
/* theme color */
|
|
16
|
+
--primary-color-rgb: 130, 105, 96;
|
|
17
|
+
--primary-color: rgb(var(--primary-color-rgb));
|
|
18
|
+
--secondary-color-rgb: 78, 78, 90;
|
|
19
|
+
--secondary-color: rgb(var(--secondary-color-rgb));
|
|
20
|
+
--focus-color: var(--theme-white-color);
|
|
21
|
+
--primary-background-color: var(--secondary-color);
|
|
22
|
+
--secondary-background-color: #283644;
|
|
23
|
+
--main-section-background-color: #f5f2ee;
|
|
24
|
+
--theme-white-color: #fff;
|
|
25
|
+
--theme-black-color: rgba(0, 0, 0, 0.9);
|
|
26
|
+
|
|
27
|
+
--focus-background-color: var(--primary-color);
|
|
28
|
+
--primary-text-color: #3c3938;
|
|
29
|
+
--secondary-text-color: var(--primary-color);
|
|
30
|
+
|
|
31
|
+
--opacity-dark-color: rgba(0, 0, 0, 0.4);
|
|
32
|
+
--opacity-light-color: rgba(255, 255, 255, 0.8);
|
|
33
|
+
|
|
34
|
+
/* status color */
|
|
35
|
+
--status-success-color: #35a24a;
|
|
36
|
+
--status-warning-color: #ee8d03;
|
|
37
|
+
--status-danger-color: #d14946;
|
|
38
|
+
--status-info-color: #398ace;
|
|
39
|
+
|
|
40
|
+
/* common style */
|
|
41
|
+
--border-radius: 4px;
|
|
42
|
+
--border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
|
|
43
|
+
--border-light-color: 1px solid rgba(255, 255, 255, 0.3);
|
|
44
|
+
|
|
45
|
+
--box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
|
|
46
|
+
|
|
47
|
+
--theme-font: 'Noto', Helvetica;
|
|
48
|
+
|
|
49
|
+
--margin-default: 9px;
|
|
50
|
+
--margin-narrow: 4px;
|
|
51
|
+
--margin-wide: 15px;
|
|
52
|
+
--padding-default: var(--margin-default);
|
|
53
|
+
--padding-narrow: var(--margin-narrow);
|
|
54
|
+
--padding-wide: var(--margin-wide);
|
|
55
|
+
|
|
56
|
+
--scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
|
|
57
|
+
--scrollbar-thumb-hover-color: var(--primary-color);
|
|
58
|
+
|
|
59
|
+
--fontsize-default: 14px;
|
|
60
|
+
--fontsize-small: 13px;
|
|
61
|
+
--fontsize-large: 16px;
|
|
62
|
+
|
|
63
|
+
/* app layout style */
|
|
64
|
+
--app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
|
|
65
|
+
|
|
66
|
+
/* title & description style */
|
|
67
|
+
--title-margin: var(--margin-narrow) 0;
|
|
68
|
+
--title-font: bold 24px var(--theme-font);
|
|
69
|
+
--title-text-color: var(--secondary-color);
|
|
70
|
+
--title-font-mobile: bold 20px var(--theme-font);
|
|
71
|
+
|
|
72
|
+
--page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
|
|
73
|
+
--page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
|
|
74
|
+
--page-description-color: var(--secondary-text-color);
|
|
75
|
+
|
|
76
|
+
--subtitle-padding: 12px 5px 3px 5px;
|
|
77
|
+
--subtitle-font: bold 18px var(--theme-font);
|
|
78
|
+
--subtitle-text-color: var(--primary-color);
|
|
79
|
+
--subtitle-border-bottom: 1px solid var(--primary-color);
|
|
80
|
+
|
|
81
|
+
/* icon style */
|
|
82
|
+
--icon-tiny-size: 24px;
|
|
83
|
+
--icon-default-size: 36px;
|
|
84
|
+
--icon-big-size: 48px;
|
|
85
|
+
--icon-default-color: var(--theme-white-color);
|
|
86
|
+
--iconbtn-size: 18px; /* added by Hoppaang for new style ver */
|
|
87
|
+
|
|
88
|
+
/* material design component themes */
|
|
89
|
+
--md-theme-on-primary: var(--theme-white-color);
|
|
90
|
+
--md-theme-primary: var(--secondary-text-color);
|
|
91
|
+
--md-theme-on-secondary: var(--theme-white-color);
|
|
92
|
+
--md-theme-secondary: var(--primary-color);
|
|
93
|
+
--md-button-outline-color: var(--primary-color);
|
|
94
|
+
--md-danger-button-primary-color: var(--status-danger-color);
|
|
95
|
+
--md-danger-button-outline-color: var(--status-danger-color);
|
|
96
|
+
--md-button-outline-width: 1px;
|
|
97
|
+
|
|
98
|
+
/* button style */
|
|
99
|
+
--button-background-color: #fafbfc;
|
|
100
|
+
--button-background-focus-color: var(--primary-color);
|
|
101
|
+
--button-border: var(--border-dark-color);
|
|
102
|
+
--button-border-radius: var(--border-radius);
|
|
103
|
+
--button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
|
|
104
|
+
--button-padding: calc(var(--padding-narrow) * 1.5) var(--padding-wide); /* Modified by Hoppaang for new style ver */
|
|
105
|
+
--button-color: var(--secondary-color);
|
|
106
|
+
--button-font: 600 var(--fontsize-default) var(--theme-font); /* Modified by Hoppaang for new style ver */
|
|
107
|
+
--button-text-transform: capitalize;
|
|
108
|
+
--button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
|
109
|
+
--button-activ-border: 1px solid var(--primary-color); /* added by Hoppaang for new style ver */
|
|
110
|
+
--button-activ-background-color: var(--primary-color); /* added by Hoppaang for new style ver */
|
|
111
|
+
--button-activ-color: var(--theme-white-color); /* added by Hoppaang for new style ver */
|
|
112
|
+
--iconbtn-padding: var(--padding-narrow); /* added by Hoppaang for new style ver */
|
|
113
|
+
|
|
114
|
+
--button-primary-background-color: var(--primary-color);
|
|
115
|
+
--button-primary-active-background-color: var(--status-success-color);
|
|
116
|
+
--button-primary-padding: var(--margin-default) var(--margin-wide);
|
|
117
|
+
--button-primary-color: var(--theme-white-color);
|
|
118
|
+
--button-primary-font: bold 16px var(--theme-font);
|
|
119
|
+
|
|
120
|
+
/* table style */
|
|
121
|
+
--th-padding: var(--padding-default);
|
|
122
|
+
--th-border-top: 2px solid var(--secondary-color);
|
|
123
|
+
--th-text-transform: capitalize;
|
|
124
|
+
--th-font: bold var(--fontsize-small) var(--theme-font);
|
|
125
|
+
--th-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
126
|
+
|
|
127
|
+
--tr-background-color: var(--theme-white-color);
|
|
128
|
+
--tr-background-odd-color: rgba(255, 255, 255, 0.4);
|
|
129
|
+
--tr-background-hover-color: #e1f5fe;
|
|
130
|
+
--td-border-line: 1px solid rgba(0, 0, 0, 0.05);
|
|
131
|
+
--td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
|
|
132
|
+
--td-padding: var(--padding-default);
|
|
133
|
+
--td-font: normal 13px var(--theme-font);
|
|
134
|
+
--td-color: var(--secondary-color);
|
|
135
|
+
|
|
136
|
+
--label-cell-background-color: #f6f6f6; /* th or td common background color */
|
|
137
|
+
|
|
138
|
+
/* form style */
|
|
139
|
+
--label-font: normal var(--fontsize-default) var(--theme-font);
|
|
140
|
+
--label-color: var(--secondary-color);
|
|
141
|
+
--label-text-transform: capitalize;
|
|
142
|
+
--input-margin: var(--margin-narrow) 0;
|
|
143
|
+
--input-padding: var(--padding-default);
|
|
144
|
+
--input-min-width: 200px;
|
|
145
|
+
--input-font: normal var(--fontsize-default) var(--theme-font);
|
|
146
|
+
--input-hint-font: normal var(--fontsize-small) var(--theme-font);
|
|
147
|
+
--input-hint-color: #666;
|
|
148
|
+
--input-container-max-width: 900px;
|
|
149
|
+
--fieldset-margin: var(--padding-wide) 0;
|
|
150
|
+
--fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
|
|
151
|
+
--legend-padding: var(--padding-default) 0;
|
|
152
|
+
--legend-color: var(--secondary-text-color);
|
|
153
|
+
--legend-font: bold 16px var(--theme-font);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media only screen and (max-width: 460px) {
|
|
157
|
+
body {
|
|
158
|
+
/* subtitle style */
|
|
159
|
+
--subtitle-margin: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|