@operato/context 7.1.30 → 7.1.32

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.
@@ -1,166 +0,0 @@
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
-
8
- import '@operato/styles'
9
-
10
- import { css, html, render, TemplateResult } from 'lit'
11
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
12
-
13
- export default {
14
- title: 'ox-context-page-toolbar select buttons',
15
- component: 'ox-context-page-toolbar',
16
- argTypes: {
17
- label: { control: 'string' }
18
- }
19
- }
20
-
21
- interface Story<T> {
22
- (args: T): TemplateResult
23
- args?: Partial<T>
24
- argTypes?: Record<string, unknown>
25
- }
26
-
27
- interface ArgTypes {
28
- label?: string
29
- }
30
-
31
- const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
32
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
33
-
34
- <link href="/themes/light.css" rel="stylesheet" />
35
- <link href="/themes/dark.css" rel="stylesheet" />
36
- <link href="/themes/spacing.css" rel="stylesheet" />
37
-
38
- <link
39
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
40
- rel="stylesheet"
41
- />
42
- <link
43
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
44
- rel="stylesheet"
45
- />
46
- <link
47
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
48
- rel="stylesheet"
49
- />
50
-
51
- <style>
52
- ${MDTypeScaleStyles.cssText}
53
- </style>
54
-
55
- <style>
56
- .container {
57
- height: 500px;
58
- text-align: center;
59
- padding: 20px;
60
- background-color: var(--md-sys-color-primary-container);
61
- color: var(--md-sys-color-on-primary-container);
62
-
63
- padding: 20px;
64
- }
65
-
66
- ox-buttons-radio {
67
- padding: 20px;
68
- }
69
- </style>
70
-
71
- <div class="container md-typescale-body-large-prominent">
72
- <div class="header">
73
- <div class="title">${label}</div>
74
-
75
- <div class="filters">
76
- <label>Filter-X</label><input type="text" name="name" />
77
- <ox-input-select-buttons
78
- @change=${(e: Event) => {
79
- console.log((e.target as HTMLInputElement).value)
80
- }}
81
- name="wearables"
82
- .value=${'Gloves'}
83
- .options=${[
84
- { display: 'SHOOSE', value: 'Shoose' },
85
- { display: 'CHOTHES', value: 'Clothes' },
86
- { display: 'GLOVES', value: 'Gloves' }
87
- ]}
88
- multiple
89
- ></ox-input-select-buttons>
90
- </div>
91
-
92
- <ox-context-page-toolbar
93
- class="actions"
94
- .tools=${[
95
- {
96
- position: TOOL_POSITION.FRONT,
97
- template: html` <md-icon>download</md-icon> `,
98
- context: 'exportable'
99
- },
100
- {
101
- position: TOOL_POSITION.FRONT,
102
- template: html` <md-icon>upload</md-icon> `,
103
- context: 'importable'
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
- emphasis: {
119
- outlined: true
120
- }
121
- },
122
- {
123
- title: 'edit',
124
- action: () => {},
125
- icon: 'content_copy',
126
- emphasis: {
127
- outlined: true
128
- }
129
- },
130
- {
131
- title: 'hoppaang',
132
- action: () => {},
133
- icon: '',
134
- emphasis: {
135
- outlined: true
136
- }
137
- },
138
- {
139
- title: 'delete',
140
- action: () => {},
141
- icon: 'delete',
142
- emphasis: {
143
- danger: true,
144
- filled: true
145
- }
146
- }
147
- ]}
148
- ></ox-page-action-context-bar>`
149
- }
150
- ]}
151
- .context=${{
152
- exportable: true,
153
- importable: true,
154
- toolbar: false
155
- }}
156
- }
157
- >
158
- </ox-context-page-toolbar>
159
- </div>
160
- </div>
161
- `
162
-
163
- export const Regular = Template.bind({})
164
- Regular.args = {
165
- label: 'common header styles'
166
- }
@@ -1,129 +0,0 @@
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 { TOOL_POSITION } from '@operato/layout'
5
- import { sleep } from '@operato/utils'
6
-
7
- import '@operato/styles'
8
-
9
- import { css, html, render, TemplateResult } from 'lit'
10
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
11
-
12
- export default {
13
- title: 'ox-context-page-toolbar-select',
14
- component: 'ox-context-page-toolbar',
15
- argTypes: {
16
- label: { control: 'string' }
17
- }
18
- }
19
-
20
- interface Story<T> {
21
- (args: T): TemplateResult
22
- args?: Partial<T>
23
- argTypes?: Record<string, unknown>
24
- }
25
-
26
- interface ArgTypes {
27
- label?: string
28
- }
29
-
30
- const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
31
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
32
-
33
- <link href="/themes/light.css" rel="stylesheet" />
34
- <link href="/themes/dark.css" rel="stylesheet" />
35
- <link href="/themes/spacing.css" rel="stylesheet" />
36
-
37
- <link
38
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
39
- rel="stylesheet"
40
- />
41
- <link
42
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
43
- rel="stylesheet"
44
- />
45
- <link
46
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
47
- rel="stylesheet"
48
- />
49
-
50
- <style>
51
- ${MDTypeScaleStyles.cssText}
52
- </style>
53
-
54
- <style>
55
- .container {
56
- height: 500px;
57
- text-align: center;
58
- padding: 20px;
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
-
62
- padding: 20px;
63
- }
64
-
65
- ox-buttons-radio {
66
- padding: 20px;
67
- }
68
- </style>
69
-
70
- <div class="container md-typescale-body-large-prominent">
71
- <div class="header">
72
- <div class="title">${label}</div>
73
-
74
- <div class="filters"><label>Filter</label><input type="text" /></div>
75
-
76
- <ox-context-page-toolbar
77
- class="actions"
78
- .tools=${[
79
- {
80
- position: TOOL_POSITION.FRONT,
81
- template: html` <md-icon>download</md-icon> `,
82
- context: 'exportable'
83
- },
84
- {
85
- position: TOOL_POSITION.FRONT,
86
- template: html` <md-icon>upload</md-icon> `,
87
- context: 'importable'
88
- },
89
- {
90
- position: TOOL_POSITION.CENTER,
91
- template: html`<ox-page-action-context-bar
92
- .actions=${[
93
- {
94
- type: 'icon',
95
- title: 'favorite',
96
- icon: 'favorite',
97
- action: async () => {
98
- await sleep(1000)
99
- }
100
- },
101
- {
102
- title: 'smile',
103
- action: () => {},
104
- select: ['', 'delete', 'hahaha', 'hohoho']
105
- },
106
- {
107
- title: 'save',
108
- action: () => {},
109
- icon: 'save'
110
- }
111
- ]}
112
- ></ox-page-action-context-bar>`
113
- }
114
- ]}
115
- .context=${{
116
- exportable: true,
117
- importable: true,
118
- toolbar: false
119
- }}
120
- >
121
- </ox-context-page-toolbar>
122
- </div>
123
- </div>
124
- `
125
-
126
- export const Regular = Template.bind({})
127
- Regular.args = {
128
- label: 'common header styles'
129
- }
@@ -1,130 +0,0 @@
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
-
7
- import '@operato/styles'
8
-
9
- import { css, html, render, TemplateResult } from 'lit'
10
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
11
-
12
- export default {
13
- title: 'ox-context-page-toolbar',
14
- component: 'ox-context-page-toolbar',
15
- argTypes: {
16
- label: { control: 'string' }
17
- }
18
- }
19
-
20
- interface Story<T> {
21
- (args: T): TemplateResult
22
- args?: Partial<T>
23
- argTypes?: Record<string, unknown>
24
- }
25
-
26
- interface ArgTypes {
27
- label?: string
28
- }
29
-
30
- const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
31
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
32
-
33
- <link href="/themes/light.css" rel="stylesheet" />
34
- <link href="/themes/dark.css" rel="stylesheet" />
35
- <link href="/themes/spacing.css" rel="stylesheet" />
36
-
37
- <link
38
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
39
- rel="stylesheet"
40
- />
41
- <link
42
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
43
- rel="stylesheet"
44
- />
45
- <link
46
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
47
- rel="stylesheet"
48
- />
49
-
50
- <style>
51
- ${MDTypeScaleStyles.cssText}
52
- </style>
53
-
54
- <style>
55
- .container {
56
- height: 500px;
57
- text-align: center;
58
- padding: 20px;
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
-
62
- padding: 20px;
63
- }
64
-
65
- ox-buttons-radio {
66
- padding: 20px;
67
- }
68
- </style>
69
-
70
- <div class="container md-typescale-body-large-prominent">
71
- <div class="header">
72
- <div class="title">${label}</div>
73
-
74
- <div class="filters"><label>Filter</label><input type="text" /></div>
75
-
76
- <ox-context-page-toolbar
77
- class="actions"
78
- .tools=${[
79
- {
80
- position: TOOL_POSITION.FRONT,
81
- template: html` <md-icon>download</md-icon> `,
82
- context: 'exportable'
83
- },
84
- {
85
- position: TOOL_POSITION.FRONT,
86
- template: html` <md-icon>upload</md-icon> `,
87
- context: 'importable'
88
- },
89
- {
90
- position: TOOL_POSITION.CENTER,
91
- template: html`<ox-page-action-context-bar
92
- .actions=${[
93
- {
94
- title: 'save',
95
- action: () => {},
96
- icon: 'save'
97
- },
98
- {
99
- title: 'copy',
100
- action: () => {},
101
- icon: 'content_copy'
102
- },
103
- {
104
- title: 'delete',
105
- action: () => {},
106
- icon: 'delete',
107
- emphasis: {
108
- danger: true
109
- }
110
- }
111
- ]}
112
- ></ox-page-action-context-bar>`
113
- }
114
- ]}
115
- .context=${{
116
- exportable: true,
117
- importable: true,
118
- toolbar: false
119
- }}
120
- }
121
- >
122
- </ox-context-page-toolbar>
123
- </div>
124
- </div>
125
- `
126
-
127
- export const Regular = Template.bind({})
128
- Regular.args = {
129
- label: 'common header styles'
130
- }
@@ -1,181 +0,0 @@
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
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
10
-
11
- export default {
12
- title: 'ox-context-toolbar complex',
13
- component: 'ox-context-toolbar',
14
- argTypes: {
15
- theme: { control: 'select', options: ['light', 'dark'] }
16
- }
17
- }
18
-
19
- interface Story<T> {
20
- (args: T): TemplateResult
21
- args?: Partial<T>
22
- argTypes?: Record<string, unknown>
23
- }
24
-
25
- interface ArgTypes {}
26
-
27
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
28
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
29
-
30
- <link href="/themes/light.css" rel="stylesheet" />
31
- <link href="/themes/dark.css" rel="stylesheet" />
32
- <link href="/themes/spacing.css" rel="stylesheet" />
33
-
34
- <link
35
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
36
- rel="stylesheet"
37
- />
38
- <link
39
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
40
- rel="stylesheet"
41
- />
42
- <link
43
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
44
- rel="stylesheet"
45
- />
46
-
47
- <style>
48
- ${MDTypeScaleStyles.cssText}
49
- </style>
50
-
51
- <style>
52
- .container {
53
- height: 500px;
54
- text-align: center;
55
- padding: 20px;
56
- background-color: var(--md-sys-color-primary-container);
57
- color: var(--md-sys-color-on-primary-container);
58
-
59
- padding: 20px;
60
- }
61
-
62
- ox-buttons-radio {
63
- padding: 20px;
64
- }
65
- </style>
66
-
67
- <div class="container md-typescale-body-large-prominent">
68
- <ox-context-toolbar
69
- .tools=${[
70
- {
71
- position: TOOL_POSITION.FRONT_END,
72
- template: html` <md-icon>download</md-icon> `,
73
- context: 'exportable'
74
- },
75
- {
76
- position: TOOL_POSITION.FRONT_END,
77
- template: html` <md-icon>upload</md-icon> `,
78
- context: 'importable'
79
- },
80
- {
81
- position: TOOL_POSITION.FRONT,
82
- template: html` <md-icon>download</md-icon> `,
83
- context: 'exportable'
84
- },
85
- {
86
- position: TOOL_POSITION.FRONT,
87
- template: html` <md-icon>upload</md-icon> `,
88
- context: 'importable'
89
- },
90
- {
91
- position: TOOL_POSITION.CENTER,
92
- template: html`<ox-page-action-context-bar
93
- .actions=${[
94
- {
95
- title: 'save',
96
- action: () => {},
97
- icon: 'save'
98
- },
99
- {
100
- title: 'copy',
101
- action: () => {},
102
- icon: 'content_copy'
103
- },
104
- {
105
- title: 'delete',
106
- action: () => {},
107
- icon: 'delete',
108
- emphasis: {
109
- danger: true
110
- }
111
- }
112
- ]}
113
- ></ox-page-action-context-bar>`
114
- },
115
- {
116
- position: TOOL_POSITION.REAR,
117
- template: html`<ox-page-action-context-bar
118
- .actions=${[
119
- {
120
- title: 'save',
121
- action: () => {},
122
- icon: 'save'
123
- },
124
- {
125
- title: 'copy',
126
- action: () => {},
127
- icon: 'content_copy'
128
- },
129
- {
130
- title: 'delete',
131
- action: () => {},
132
- icon: 'delete'
133
- }
134
- ]}
135
- ></ox-page-action-context-bar>`
136
- },
137
- {
138
- position: TOOL_POSITION.REAR_END,
139
- template: html`<ox-page-action-context-bar
140
- .actions=${[
141
- {
142
- title: 'save',
143
- action: () => {},
144
- icon: 'save'
145
- },
146
- {
147
- title: 'copy',
148
- action: () => {},
149
- icon: 'content_copy'
150
- },
151
- {
152
- title: 'delete',
153
- action: () => {},
154
- icon: 'delete'
155
- }
156
- ]}
157
- ></ox-page-action-context-bar>`
158
- },
159
- {
160
- position: TOOL_POSITION.REAR_END,
161
- template: html` <md-icon>download</md-icon> `,
162
- context: 'exportable'
163
- },
164
- {
165
- position: TOOL_POSITION.REAR_END,
166
- template: html` <md-icon>upload</md-icon> `,
167
- context: 'importable'
168
- }
169
- ]}
170
- .context=${{
171
- exportable: true,
172
- importable: true,
173
- toolbar: true
174
- }}
175
- >
176
- </ox-context-toolbar>
177
- </div>
178
- `
179
-
180
- export const Regular = Template.bind({})
181
- Regular.args = {}