@operato/styles 7.1.27 → 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,194 +0,0 @@
1
- import { css } from 'lit'
2
-
3
- export const CommonHeaderStyles = css`
4
- .header {
5
- display: grid;
6
- grid-template-areas:
7
- 'title actions'
8
- 'filters filters';
9
- gap: var(--spacing-small) var(--spacing-medium);
10
- padding: calc(var(--spacing-medium) / 2) var(--spacing-medium);
11
-
12
- align-items: center;
13
-
14
- .title {
15
- grid-area: title;
16
- display: flex;
17
- flex-direction: row;
18
- align-items: center;
19
- gap: var(--spacing-small);
20
-
21
- font: var(--subtitle-font);
22
- color: var(--md-sys-color-on-secondary-container);
23
- text-transform: capitalize;
24
- }
25
-
26
- .filters {
27
- grid-area: filters;
28
- border: none;
29
- border-radius: var(--md-sys-shape-corner-small, 5px);
30
- background-color: var(--md-sys-color-surface);
31
- padding: var(--spacing-medium) var(--spacing-large);
32
- display: flex;
33
- flex-direction: row;
34
- align-items: center;
35
- gap: var(--spacing-large);
36
-
37
- .filter {
38
- display: flex;
39
- flex-direction: row;
40
-
41
- align-items: center;
42
- gap: var(--spacing-small);
43
- }
44
-
45
- label {
46
- font: var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500))
47
- var(--fontsize-default) var(--theme-font);
48
- color: var(--md-sys-color-primary);
49
- }
50
- }
51
-
52
- .filters:empty {
53
- display: none;
54
- }
55
-
56
- .actions {
57
- grid-area: actions;
58
- margin-left: auto;
59
- display: flex;
60
- flex-direction: row-reverse;
61
- align-items: center;
62
- gap: var(--spacing-small);
63
-
64
- * {
65
- cursor: pointer;
66
- }
67
-
68
- .textbtn,
69
- .iconbtn {
70
- background-color: var(--md-sys-color-secondary-container);
71
- border: var(--button-border);
72
- border-radius: var(--button-border-radius);
73
-
74
- color: var(--md-sys-color-on-secondary-container);
75
- font: var(--button-font);
76
-
77
- &:hover {
78
- border: var(--button-activ-border);
79
- background-color: var(--button-activ-background-color);
80
- box-shadow: var(--button-active-box-shadow);
81
-
82
- color: var(--md-sys-color-on-secondary);
83
- }
84
- }
85
-
86
- .iconbtn {
87
- line-height: 0.9;
88
-
89
- md-icon {
90
- --md-icon-size: var(--icon-size-medium);
91
- }
92
- }
93
-
94
- button {
95
- display: flex;
96
- flex-direction: row;
97
- align-items: center;
98
- gap: var(--spacing-small);
99
- padding: var(--spacing-tiny) var(--spacing-small);
100
- }
101
- }
102
-
103
- :empty {
104
- padding: 0;
105
- }
106
- }
107
-
108
- .footer {
109
- display: flex;
110
- flex-direction: row;
111
- text-align: right;
112
- background-color: var(--md-sys-color-surface-variant);
113
- padding: 0;
114
-
115
- button {
116
- display: flex;
117
- gap: var(--spacing-medium);
118
- align-items: center;
119
- justify-content: center;
120
- padding: var(--spacing-tiny) var(--spacing-medium);
121
- background-color: transparent;
122
- color: var(--md-sys-color-on-surface);
123
- font-size: var(--md-sys-typescale-title-medium-size, 1rem);
124
- line-height: 2;
125
- border-width: 0;
126
- border-radius: 0;
127
- border-left: 1px solid var(--md-sys-color-surface);
128
- }
129
-
130
- button[ok],
131
- button[done] {
132
- color: var(--md-sys-color-on-primary);
133
- background-color: var(--md-sys-color-primary);
134
- }
135
-
136
- [filler] {
137
- margin-left: auto;
138
- }
139
- }
140
-
141
- [danger],
142
- button[danger],
143
- md-assist-chip[danger] {
144
- --md-assist-chip-outline-color: var(--md-sys-color-error);
145
- --md-assist-chip-elevated-container-color: var(--md-sys-color-error);
146
-
147
- --md-assist-chip-label-text-color: var(--md-sys-color-on-error);
148
- --md-assist-chip-leading-icon-color: var(--md-sys-color-on-error);
149
-
150
- --md-assist-chip-hover-label-text-color: var(--md-sys-color-error);
151
- --md-assist-chip-hover-leading-icon-color: var(--md-sys-color-error);
152
-
153
- color: var(--md-sys-color-on-error);
154
- background-color: var(--md-sys-color-error);
155
- border-color: var(--md-sys-color-error);
156
-
157
- &:hover {
158
- --md-assist-chip-outline-color: var(--md-sys-color-error);
159
- --md-assist-chip-elevated-container-color: var(--md-sys-color-on-error);
160
-
161
- --md-assist-chip-label-text-color: var(--md-sys-color-error);
162
- --md-assist-chip-leading-icon-color: var(--md-sys-color-error);
163
-
164
- color: var(--md-sys-color-error);
165
- background-color: var(--md-sys-color-on-error);
166
- }
167
- }
168
-
169
- @media only screen and (max-width: 460px) {
170
- .header {
171
- padding: 0;
172
- gap: 0;
173
-
174
- grid-template-areas:
175
- 'actions'
176
- 'filters';
177
-
178
- .title {
179
- display: none;
180
- }
181
-
182
- .filters {
183
- flex-wrap: wrap;
184
- gap: var(--spacing-medium);
185
- border: none;
186
- }
187
-
188
- .actions {
189
- background-color: var(--md-sys-color-on-secondary-container);
190
- margin: 0;
191
- }
192
- }
193
- }
194
- `
@@ -1,15 +0,0 @@
1
- import { css } from 'lit'
2
-
3
- export const HeadroomStyles = css`
4
- .headroom {
5
- transition: transform 200ms linear;
6
- }
7
-
8
- .headroom--pinned {
9
- transform: translateY(0%);
10
- }
11
-
12
- .headroom--unpinned {
13
- transform: translateY(-100%);
14
- }
15
- `
package/src/index.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from './headroom-styles'
2
- export * from './scrollbar-styles'
3
- export * from './spinner-styles'
4
- export * from './common-button-styles'
5
- export * from './common-grist-styles'
6
- export * from './button-container-styles'
7
- export * from './common-header-styles'
@@ -1,32 +0,0 @@
1
- import { css } from 'lit'
2
-
3
- export const ScrollbarStyles = css`
4
- ::-webkit-scrollbar {
5
- width: var(--scrollbar-width, 5px);
6
- height: var(--scrollbar-height, 5px);
7
- }
8
- ::-webkit-scrollbar-track {
9
- background-color: transparent;
10
- }
11
- ::-webkit-scrollbar-thumb {
12
- background-color: var(--scrollbar-thumb-color, var(--md-sys-color-outline));
13
- border-radius: var(--scrollbar-thumb-border-radius, 0);
14
- }
15
- ::-webkit-scrollbar-thumb:hover {
16
- background-color: var(--scrollbar-thumb-hover-color, var(--md-sys-color-outline-variant));
17
- }
18
-
19
- :host::-webkit-scrollbar {
20
- width: var(--scrollbar-width, 5px);
21
- height: var(--scrollbar-height, 5px);
22
- }
23
- :host::-webkit-scrollbar-track {
24
- background-color: transparent;
25
- }
26
- :host::-webkit-scrollbar-thumb {
27
- background-color: var(--scrollbar-thumb-color, var(--md-sys-color-outline));
28
- }
29
- :host::-webkit-scrollbar-thumb:hover {
30
- background-color: var(--scrollbar-thumb-hover-color, var(--md-sys-color-outline-variant));
31
- }
32
- `
@@ -1,32 +0,0 @@
1
- import { css } from 'lit'
2
-
3
- export const SpinnerStyles = css`
4
- #spinner {
5
- display: none;
6
- position: absolute;
7
- left: 50%;
8
- top: 50%;
9
- transform: translate(-50%, -50%);
10
-
11
- width: 70px;
12
- height: 70px;
13
- margin: 0 auto;
14
- background: var(--oops-spinner-image) 0 0 no-repeat;
15
- background-size: 700%;
16
- animation: spinner steps(6) 2s infinite both;
17
- z-index: 10;
18
- }
19
-
20
- #spinner[show] {
21
- display: block;
22
- }
23
-
24
- @keyframes spinner {
25
- 0% {
26
- background-position: 0%;
27
- }
28
- 100% {
29
- background-position: 100%;
30
- }
31
- }
32
- `
@@ -1,88 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import { ButtonContainerStyles } from '../src/button-container-styles.js'
3
-
4
- import { css, html, render, TemplateResult } from 'lit'
5
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
6
-
7
- export default {
8
- title: 'button-container-styles-pure',
9
- component: 'div',
10
- argTypes: {}
11
- }
12
-
13
- interface Story<T> {
14
- (args: T): TemplateResult
15
- args?: Partial<T>
16
- argTypes?: Record<string, unknown>
17
- }
18
-
19
- interface ArgTypes {}
20
-
21
- const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
22
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
23
-
24
- <link href="/themes/light.css" rel="stylesheet" />
25
- <link href="/themes/dark.css" rel="stylesheet" />
26
- <link href="/themes/spacing.css" rel="stylesheet" />
27
-
28
- <link
29
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined: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+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
34
- rel="stylesheet"
35
- />
36
- <link
37
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
38
- rel="stylesheet"
39
- />
40
-
41
- <style>
42
- body {
43
- width: 100%;
44
- height: 500px;
45
- text-align: center;
46
-
47
-
48
- background-color: var(--md-sys-color-background);
49
- color: var(--md-sys-color-on-background);
50
- }
51
-
52
- .container {
53
- padding: var(--spacing-medium);
54
- background-color: var(--md-sys-color-primary-container);
55
- color: var(--md-sys-color-on-primary-container);
56
-
57
- display: flex;
58
- flex-direction: column;
59
- gap: 10px;
60
- }
61
-
62
- ${MDTypeScaleStyles.cssText}
63
- ${ButtonContainerStyles.cssText}
64
- </style>
65
-
66
- <div class="container md-typescale-body-medium">
67
- <div class="button-container" style="background-color: white;">
68
- <button raised><md-icon>save</md-icon>save</button>
69
- <button outlined><md-icon>launch</md-icon>remove</button>
70
- <button danger><md-icon>delete</md-icon>delete</button>
71
- </div>
72
-
73
- <div class="button-container" style="background-color: white;">
74
- <button danger><md-icon>cancel</md-icon>cancel</button>
75
- <button><md-icon>done</md-icon>confirm</button>
76
- </div>
77
-
78
- <div class="button-container" style="background-color: white;margin-left: unset;">
79
- <button danger><md-icon>restart_alt</md-icon>reset</button>
80
- <div filler></div>
81
- <button danger><md-icon>cancel</md-icon>cancel</button>
82
- <button><md-icon>done</md-icon>confirm</button>
83
- </div>
84
- </div>
85
- `
86
-
87
- export const Regular = Template.bind({})
88
- Regular.args = {}
@@ -1,115 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import '@operato/context/ox-context-page-toolbar.js'
3
-
4
- import { CommonHeaderStyles } from '../src/common-header-styles.js'
5
-
6
- import { css, html, render, TemplateResult } from 'lit'
7
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
8
-
9
- export default {
10
- title: 'common-header-styles-actions',
11
- component: 'div',
12
- argTypes: {
13
- label: { control: 'string' }
14
- }
15
- }
16
-
17
- interface Story<T> {
18
- (args: T): TemplateResult
19
- args?: Partial<T>
20
- argTypes?: Record<string, unknown>
21
- }
22
-
23
- interface ArgTypes {
24
- label?: string
25
- }
26
-
27
- const Template: Story<ArgTypes> = ({ label = '' }: 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
- body {
49
- width: 100%;
50
- height: 500px;
51
- text-align: center;
52
-
53
- background-color: var(--md-sys-color-background);
54
- color: var(--md-sys-color-on-background);
55
- }
56
-
57
- .container {
58
- padding: var(--spacing-medium);
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
-
62
- display: flex;
63
- flex-direction: column;
64
- gap: var(--spacing-medium);
65
- }
66
-
67
- ${MDTypeScaleStyles.cssText}
68
- ${CommonHeaderStyles.cssText}
69
- </style>
70
-
71
- <div class="container md-typescale-body-medium">
72
- <div class="header">
73
- <div class="title">${label}</div>
74
-
75
- <div class="filters"><label>Filter</label><input type="text" /></div>
76
-
77
- <ox-context-page-toolbar
78
- class="actions"
79
- .context=${{
80
- exportable: {
81
- // name: i18next.t('title.data-set list'),
82
- // data: this.exportHandler.bind(this)
83
- },
84
- importable: {
85
- // handler: this.importHandler.bind(this)
86
- },
87
- actions: [
88
- {
89
- title: 'save',
90
- // action: this._updateDataSet.bind(this),
91
- icon: 'save'
92
- },
93
- {
94
- title: 'copy',
95
- // action: this._copyDataSet.bind(this),
96
- icon: 'content_copy'
97
- },
98
- {
99
- title: 'delete',
100
- // action: this._deleteDataSet.bind(this),
101
- icon: 'delete'
102
- }
103
- ],
104
- toolbar: false
105
- }}
106
- >
107
- </ox-context-page-toolbar>
108
- </div>
109
- </div>
110
- `
111
-
112
- export const Regular = Template.bind({})
113
- Regular.args = {
114
- label: 'common header styles'
115
- }
@@ -1,91 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import { CommonHeaderStyles } from '../src/common-header-styles.js'
3
-
4
- import { css, html, render, TemplateResult } from 'lit'
5
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
6
-
7
- export default {
8
- title: 'common-header-styles-pure',
9
- component: 'div',
10
- argTypes: {
11
- label: { control: 'string' }
12
- }
13
- }
14
-
15
- interface Story<T> {
16
- (args: T): TemplateResult
17
- args?: Partial<T>
18
- argTypes?: Record<string, unknown>
19
- }
20
-
21
- interface ArgTypes {
22
- label?: string
23
- }
24
-
25
- const Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`
26
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
27
-
28
- <link href="/themes/light.css" rel="stylesheet" />
29
- <link href="/themes/dark.css" rel="stylesheet" />
30
- <link href="/themes/spacing.css" rel="stylesheet" />
31
-
32
- <link
33
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
34
- rel="stylesheet"
35
- />
36
- <link
37
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
38
- rel="stylesheet"
39
- />
40
- <link
41
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
42
- rel="stylesheet"
43
- />
44
-
45
- <style>
46
- body {
47
- width: 100%;
48
- height: 500px;
49
- text-align: center;
50
-
51
- background-color: var(--md-sys-color-background);
52
- color: var(--md-sys-color-on-background);
53
- }
54
-
55
- .container {
56
- padding: var(--spacing-medium);
57
- background-color: var(--md-sys-color-primary-container);
58
- color: var(--md-sys-color-on-primary-container);
59
-
60
- display: flex;
61
- flex-direction: column;
62
- gap: 10px;
63
- }
64
-
65
- ${MDTypeScaleStyles.cssText}
66
- ${CommonHeaderStyles.cssText}
67
- </style>
68
-
69
- <div class="container md-typescale-body-medium">
70
- <div class="header">
71
- <div class="title">${label}</div>
72
-
73
- <div class="filters">
74
- <div class="filter"><label>Filter</label><input type="text" /></div>
75
- <div class="filter"><label>Filter</label><input type="text" /></div>
76
- <div class="filter"><label>Filter</label><input type="text" /></div>
77
- </div>
78
-
79
- <div class="actions">
80
- <div class="textbtn">Action</div>
81
- <div class="iconbtn"><md-icon>save</md-icon></div>
82
- <div class="iconbtn"><md-icon>delete</md-icon></div>
83
- </div>
84
- </div>
85
- </div>
86
- `
87
-
88
- export const Regular = Template.bind({})
89
- Regular.args = {
90
- label: 'common header styles'
91
- }
package/tsconfig.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2017", "dom"],
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "allowSyntheticDefaultImports": true,
11
- "experimentalDecorators": true,
12
- "useDefineForClassFields": false,
13
- "importHelpers": true,
14
- "outDir": "dist",
15
- "sourceMap": true,
16
- "inlineSources": true,
17
- "rootDir": "./",
18
- "declaration": true,
19
- "incremental": true,
20
- "skipLibCheck": true,
21
- "types": ["node", "mocha"]
22
- },
23
- "include": ["**/*.ts", "*.d.ts"]
24
- }
@@ -1,27 +0,0 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- open: '/demo/',
8
- /** Use regular watch mode if HMR is not enabled. */
9
- watch: !hmr,
10
- /** Resolve bare module imports */
11
- nodeResolve: {
12
- exportConditions: ['browser', 'development'],
13
- },
14
-
15
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
16
- // esbuildTarget: 'auto'
17
-
18
- /** Set appIndex to enable SPA routing */
19
- // appIndex: 'demo/index.html',
20
-
21
- plugins: [
22
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
23
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
24
- ],
25
-
26
- // See documentation for all available options
27
- });