@operato/dataset 1.0.0-alpha.3 → 1.0.0-alpha.30

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/demo/index.html +9 -95
  3. package/demo/ox-data-entry-form.html +110 -0
  4. package/demo/ox-data-item-spec.html +148 -0
  5. package/demo/ox-grist-editor-data-item-spec.html +469 -0
  6. package/dist/src/grist-editor/index.d.ts +1 -0
  7. package/dist/src/grist-editor/index.js +7 -0
  8. package/dist/src/grist-editor/index.js.map +1 -0
  9. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.d.ts +11 -0
  10. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +77 -0
  11. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -0
  12. package/dist/src/grist-editor/ox-popup-data-item-spec.d.ts +13 -0
  13. package/dist/src/grist-editor/ox-popup-data-item-spec.js +90 -0
  14. package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -0
  15. package/dist/src/index.d.ts +3 -1
  16. package/dist/src/index.js +3 -1
  17. package/dist/src/index.js.map +1 -1
  18. package/dist/src/ox-data-entry-form.d.ts +1 -24
  19. package/dist/src/ox-data-entry-form.js +58 -8
  20. package/dist/src/ox-data-entry-form.js.map +1 -1
  21. package/dist/src/ox-data-item-spec.d.ts +22 -0
  22. package/dist/src/ox-data-item-spec.js +81 -0
  23. package/dist/src/ox-data-item-spec.js.map +1 -0
  24. package/dist/src/types.d.ts +38 -0
  25. package/dist/src/types.js +2 -0
  26. package/dist/src/types.js.map +1 -0
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +16 -11
  29. package/src/grist-editor/index.ts +10 -0
  30. package/src/grist-editor/ox-grist-editor-data-item-spec.ts +92 -0
  31. package/src/grist-editor/ox-popup-data-item-spec.ts +90 -0
  32. package/src/index.ts +3 -1
  33. package/src/ox-data-entry-form.ts +59 -29
  34. package/src/ox-data-item-spec.ts +79 -0
  35. package/src/types.ts +38 -0
  36. package/themes/app-theme.css +142 -0
  37. package/themes/form-theme.css +75 -0
  38. package/themes/grist-theme.css +194 -0
  39. package/themes/oops-theme.css +26 -0
  40. package/themes/report-theme.css +47 -0
  41. package/translations/en.json +1 -0
  42. package/translations/ko.json +1 -0
  43. package/translations/ms.json +1 -0
  44. package/translations/zh.json +1 -0
@@ -1,30 +1,9 @@
1
1
  import '@operato/input/ox-input-file.js'
2
2
 
3
- import { css, html, LitElement } from 'lit'
3
+ import { LitElement, css, html } from 'lit'
4
4
  import { customElement, property } from 'lit/decorators.js'
5
5
 
6
- type SelectOption = { text: string; value: string }
7
- type SelectOptions = SelectOption[]
8
- type TypeOptions = {
9
- options?: SelectOptions
10
- [prop: string]: any
11
- }
12
-
13
- export type DataItem = {
14
- name: string
15
- description: string
16
- sequence: number
17
- tag: string
18
- type: string
19
- options: TypeOptions
20
- quota: number
21
- }
22
-
23
- export type DataSet = {
24
- name: string
25
- description: string
26
- dataItems: DataItem[]
27
- }
6
+ import { DataSet } from './types.js'
28
7
 
29
8
  @customElement('ox-data-entry-form')
30
9
  export class OxDataEntryForm extends LitElement {
@@ -35,9 +14,56 @@ export class OxDataEntryForm extends LitElement {
35
14
  }
36
15
 
37
16
  form {
17
+ flex: 1;
18
+
38
19
  display: flex;
39
20
  flex-direction: column;
40
21
  }
22
+ label {
23
+ display: grid;
24
+ grid-template-columns: repeat(12, 1fr);
25
+ gap: 9px;
26
+ align-items: center;
27
+ margin-bottom: var(--margin-default);
28
+ }
29
+ label:nth-child(even) {
30
+ background-color: var(--main-section-background-color);
31
+ padding: var(--padding-default) 0;
32
+ }
33
+
34
+ div[name] {
35
+ grid-column: span 2 / auto;
36
+ font: var(--label-font);
37
+ color: var(--label-color);
38
+ text-align: right;
39
+ }
40
+ div[elements] {
41
+ grid-column: span 10 / auto;
42
+ display: flex;
43
+ flex-direction: row;
44
+ flex-wrap: wrap;
45
+ gap: 10px;
46
+ padding-right: var(--padding-default);
47
+ }
48
+ div[elements] * {
49
+ flex: 1;
50
+ }
51
+ div[elements] input,
52
+ div[elements] select {
53
+ border: var(--input-field-border);
54
+ border-radius: var(--input-field-border-radius);
55
+ padding: var(--input-field-padding);
56
+ font: var(--input-field-font);
57
+ }
58
+
59
+ @media only screen and (max-width: 460px) {
60
+ div[name] {
61
+ grid-column: span 3 / auto;
62
+ }
63
+ div[elements] {
64
+ grid-column: span 9 / auto;
65
+ }
66
+ }
41
67
  `
42
68
 
43
69
  @property({ type: Object }) dataSet?: DataSet
@@ -48,13 +74,13 @@ export class OxDataEntryForm extends LitElement {
48
74
  }
49
75
 
50
76
  private onChange(e: Event) {
51
- const value = this.buildValue()
77
+ this.value = this.buildValue()
52
78
 
53
79
  this.dispatchEvent(
54
80
  new CustomEvent('change', {
55
81
  bubbles: true,
56
82
  composed: true,
57
- detail: value
83
+ detail: this.value
58
84
  })
59
85
  )
60
86
  }
@@ -63,17 +89,18 @@ export class OxDataEntryForm extends LitElement {
63
89
  const dataItems = this.dataSet!.dataItems
64
90
 
65
91
  return (dataItems || []).map(dataItem => {
66
- const { name, description, tag, type, quota = 1, options = {} } = dataItem
92
+ const { name, description, tag, type, quota = 1, options = {}, unit } = dataItem
67
93
 
68
94
  const samples = new Array(quota).fill(0)
69
- const value = this.value?.[tag]
95
+ const value = this.value && this.value[tag]
70
96
 
71
97
  const elements = samples.map((_, idx) => {
72
- const v = quota <= 1 ? value : value instanceof Array && value[idx]
98
+ const v = quota <= 1 ? value : value instanceof Array ? value[idx] : undefined
73
99
 
74
100
  switch (type) {
75
101
  case 'select':
76
102
  return html` <select .name=${tag}>
103
+ <option value=""></option>
77
104
  ${(options.options || []).map(
78
105
  option => html`<option value=${option.value} ?selected=${option.value === v}>${option.text}</option>`
79
106
  )}
@@ -103,7 +130,10 @@ export class OxDataEntryForm extends LitElement {
103
130
  }
104
131
  })
105
132
 
106
- return html`<label .title=${description}>${name}${elements}</label>`
133
+ return html` <label .title=${description}>
134
+ <div name>${name}${unit ? `(${unit})` : ''}</div>
135
+ <div elements>${elements}</div>
136
+ </label>`
107
137
  })
108
138
  }
109
139
 
@@ -0,0 +1,79 @@
1
+ import '@operato/property-editor/ox-properties-dynamic-view.js'
2
+
3
+ import { css, html, LitElement, PropertyValues } from 'lit'
4
+ import { customElement, property, queryAll, state } from 'lit/decorators.js'
5
+
6
+ import { DataItem, DataItemSpecSet, DataItemSpecSetProvider } from './types.js'
7
+
8
+ @customElement('ox-data-item-spec')
9
+ export class OxDataItemSpec extends LitElement {
10
+ static registry: { [name: string]: DataItemSpecSetProvider } = {}
11
+
12
+ public static registerProvider(name: string, provider: DataItemSpecSetProvider) {
13
+ OxDataItemSpec.registry[name] = provider
14
+ }
15
+
16
+ static styles = css`
17
+ :host {
18
+ display: flex;
19
+ flex-direction: row;
20
+ border-bottom: var(--border-dark-color);
21
+ padding: var(--margin-default) 0;
22
+ }
23
+ [specName] {
24
+ font: var(--legend-font);
25
+ color: var(--legend-text-color);
26
+ }
27
+ [description] {
28
+ font: var(--form-sublabel-font);
29
+ opacity: 0.8;
30
+ }
31
+
32
+ form {
33
+ flex: 1;
34
+ }
35
+ `
36
+
37
+ @property({ type: Object }) value?: { [specSetName: string]: any }
38
+ @property({ type: Object }) dataItem?: DataItem
39
+
40
+ @state() dataItemSpecSets: DataItemSpecSet[] = []
41
+
42
+ @queryAll('ox-properties-dynamic-view') specSetViews!: NodeListOf<HTMLElement & { value: any }>
43
+
44
+ render() {
45
+ return html`<form @property-change=${(e: Event) => this.onChange(e)}>
46
+ ${this.dataItemSpecSets.map(
47
+ ({ name, description, specs }) => html` <div specName>${name}</div>
48
+ <div description>${description}</div>
49
+ <ox-properties-dynamic-view data-name=${name} .props=${specs} .value=${this.value?.[name]}>
50
+ </ox-properties-dynamic-view>`
51
+ )}
52
+ </form>`
53
+ }
54
+
55
+ updated(changes: PropertyValues<this>) {
56
+ if (changes.has('dataItem')) {
57
+ this.dataItemSpecSets = Object.values(OxDataItemSpec.registry).map(provider => provider(this.dataItem!))
58
+ }
59
+ }
60
+
61
+ private onChange(e: Event) {
62
+ this.value = this.buildValue()
63
+
64
+ this.dispatchEvent(
65
+ new CustomEvent('change', {
66
+ bubbles: true,
67
+ composed: true,
68
+ detail: { ...this.value }
69
+ })
70
+ )
71
+ }
72
+
73
+ private buildValue() {
74
+ var value = {} as any
75
+ this.specSetViews.forEach(view => (value[view.getAttribute('data-name')!] = view.value))
76
+
77
+ return value
78
+ }
79
+ }
package/src/types.ts ADDED
@@ -0,0 +1,38 @@
1
+ export type SelectOption = { text: string; value: string }
2
+ export type SelectOptions = SelectOption[]
3
+ export type TypeOptions = {
4
+ options?: SelectOptions
5
+ [prop: string]: any
6
+ }
7
+
8
+ export type DataItem = {
9
+ name: string
10
+ description: string
11
+ sequence: number
12
+ tag: string
13
+ type: string
14
+ options: TypeOptions
15
+ unit: string
16
+ quota: number
17
+ }
18
+
19
+ export type DataSet = {
20
+ name: string
21
+ description: string
22
+ dataItems: DataItem[]
23
+ }
24
+
25
+ export type DataItemSpec = {
26
+ type: string
27
+ label: string
28
+ name: string
29
+ property: { [option: string]: any }
30
+ }
31
+
32
+ export type DataItemSpecSet = {
33
+ name: string
34
+ description: string
35
+ specs: DataItemSpec[]
36
+ }
37
+
38
+ export type DataItemSpecSetProvider = (dataItem: DataItem) => DataItemSpecSet
@@ -0,0 +1,142 @@
1
+ body {
2
+ /* theme color */
3
+ --primary-color-rgb: 56, 162, 91;
4
+ --primary-color: rgb(var(--primary-color-rgb));
5
+ --secondary-color-rgb: 71, 97, 114;
6
+ --secondary-color: rgb(var(--secondary-color-rgb));
7
+ --focus-color: var(--theme-white-color);
8
+ --primary-background-color: var(--secondary-color);
9
+ --secondary-background-color: #183936;
10
+ --main-section-background-color: #f7f6f4;
11
+ --theme-white-color: #fff;
12
+ --theme-black-color: rgba(0, 0, 0, 0.9);
13
+
14
+ --focus-background-color: var(--primary-color);
15
+ --primary-text-color: var(--theme-black-color);
16
+ --secondary-text-color: #218f62;
17
+
18
+ --opacity-dark-color: rgba(0, 0, 0, 0.4);
19
+ --opacity-light-color: rgba(255, 255, 255, 0.8);
20
+
21
+ /* status color */
22
+ --status-success-color: #35a24a;
23
+ --status-warning-color: #ee8d03;
24
+ --status-danger-color: #d14946;
25
+ --status-info-color: #398ace;
26
+
27
+ /* common style */
28
+ --border-radius: 4px;
29
+ --border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
30
+ --border-light-color: 1px solid rgba(255, 255, 255, 0.3);
31
+
32
+ --box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
33
+
34
+ --theme-font: 'Noto', Helvetica;
35
+
36
+ --margin-default: 9px;
37
+ --margin-narrow: 4px;
38
+ --margin-wide: 15px;
39
+ --padding-default: var(--margin-default);
40
+ --padding-narrow: var(--margin-narrow);
41
+ --padding-wide: var(--margin-wide);
42
+
43
+ --scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
44
+ --scrollbar-thumb-hover-color: var(--primary-color);
45
+
46
+ --fontsize-default: 14px;
47
+ --fontsize-small: 13px;
48
+ --fontsize-large: 16px;
49
+
50
+ /* app layout style */
51
+ --app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
52
+
53
+ /* title & description style */
54
+ --title-margin: var(--margin-narrow) 0;
55
+ --title-font: bold 24px var(--theme-font);
56
+ --title-text-color: var(--secondary-color);
57
+ --title-font-mobile: bold 20px var(--theme-font);
58
+
59
+ --page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
60
+ --page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
61
+ --page-description-color: var(--secondary-text-color);
62
+
63
+ --subtitle-padding: 12px 5px 3px 5px;
64
+ --subtitle-font: bold 18px var(--theme-font);
65
+ --subtitle-text-color: var(--primary-color);
66
+ --subtitle-border-bottom: 1px solid var(--primary-color);
67
+
68
+ /* icon style */
69
+ --icon-tiny-size: 24px;
70
+ --icon-default-size: 36px;
71
+ --icon-big-size: 48px;
72
+ --icon-default-color: var(--theme-white-color);
73
+
74
+ /* material design component themes */
75
+ --mdc-theme-on-primary: var(--theme-white-color);
76
+ --mdc-theme-primary: var(--secondary-text-color);
77
+ --mdc-theme-on-secondary: var(--theme-white-color);
78
+ --mdc-theme-secondary: var(--primary-color);
79
+ --mdc-button-outline-color: var(--primary-color);
80
+ --mdc-danger-button-primary-color: var(--status-danger-color);
81
+ --mdc-danger-button-outline-color: var(--status-danger-color);
82
+ --mdc-button-outline-width: 1px;
83
+ --mdc-button-horizontal-padding: 16px;
84
+
85
+ /* button style */
86
+ --button-background-color: #fafbfc;
87
+ --button-background-focus-color: var(--primary-color);
88
+ --button-border: var(--border-dark-color);
89
+ --button-border-radius: var(--border-radius);
90
+ --button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
91
+ --button-padding: var(--padding-default);
92
+ --button-color: var(--secondary-color);
93
+ --button-font: normal 15px var(--theme-font);
94
+ --button-text-transform: capitalize;
95
+ --button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
96
+ --button-activ-border: 1px solid var(--primary-color);
97
+
98
+ --button-primary-background-color: var(--primary-color);
99
+ --button-primary-active-background-color: var(--status-success-color);
100
+ --button-primary-padding: var(--margin-default) var(--margin-wide);
101
+ --button-primary-color: var(--theme-white-color);
102
+ --button-primary-font: bold 16px var(--theme-font);
103
+
104
+ /* table style */
105
+ --th-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
106
+ --th-border-top: 2px solid var(--secondary-color);
107
+ --th-text-transform: capitalize;
108
+ --th-font: bold var(--fontsize-small) var(--theme-font);
109
+ --th-color: rgba(var(--secondary-color-rgb), 0.8);
110
+
111
+ --tr-background-color: var(--theme-white-color);
112
+ --tr-background-odd-color: rgba(255, 255, 255, 0.4);
113
+ --tr-background-hover-color: #e1f5fe;
114
+ --td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
115
+ --td-padding: var(--padding-default);
116
+ --td-font: normal 13px var(--theme-font);
117
+ --td-color: var(--secondary-color);
118
+
119
+ /* form style */
120
+ --label-font: normal var(--fontsize-default) var(--theme-font);
121
+ --label-color: var(--secondary-color);
122
+ --label-text-transform: capitalize;
123
+ --input-margin: var(--margin-narrow) 0;
124
+ --input-padding: var(--padding-default);
125
+ --input-min-width: 200px;
126
+ --input-font: normal var(--fontsize-default) var(--theme-font);
127
+ --input-hint-font: normal var(--fontsize-small) var(--theme-font);
128
+ --input-hint-color: #666;
129
+ --input-container-max-width: 900px;
130
+ --fieldset-margin: var(--padding-wide) 0;
131
+ --fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
132
+ --legend-padding: var(--padding-default) 0;
133
+ --legend-color: var(--secondary-text-color);
134
+ --legend-font: bold 16px var(--theme-font);
135
+ }
136
+
137
+ @media only screen and (max-width: 460px) {
138
+ body {
139
+ /* subtitle style */
140
+ --subtitle-margin: 0;
141
+ }
142
+ }
@@ -0,0 +1,75 @@
1
+ body {
2
+ --form-border: none;
3
+ --form-margin: var(--margin-wide);
4
+ --form-max-width: 700px;
5
+ --form-multi-column-max-width: 100%;
6
+ --form-sublabel-font: normal 13px var(--theme-font);
7
+ --form-sublabel-color: var(--secondary-color);
8
+ --form-grid-gap: 12px 5px;
9
+
10
+ --legend-padding: var(--padding-default) 0;
11
+ --legend-font: bold 16px var(--theme-font);
12
+ --legend-text-color: var(--secondary-text-color);
13
+ --legend-border-bottom: 1px solid var(--primary-color);
14
+
15
+ --label-padding: 3px 0;
16
+ --label-font: normal 14px var(--theme-font);
17
+ --label-color: var(--secondary-color);
18
+
19
+ --input-field-border: 1px solid rgba(0, 0, 0, 0.2);
20
+ --input-field-border-radius: var(--border-radius);
21
+ --input-field-padding: 2px 9px;
22
+ --input-field-font: normal 14px var(--theme-font);
23
+
24
+ --search-panel-background-color: rgba(0, 0, 0, 0.1);
25
+ --search-panel-search-iconbutton-size: var(--icon-default-size);
26
+ --search-form-icon-color: var(--primary-color);
27
+ --search-form-box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.15);
28
+ --search-form-box-padding: 15px 30px 15px 15px;
29
+ --search-form-background-color: #fff;
30
+ --search-form-narrow-background-color: var(--primary-color);
31
+ --search-form-narrow-text-color: #fff;
32
+
33
+ --file-uploader-border: 1px solid rgba(0, 0, 0, 0.1);
34
+ --file-uploader-background-color: var(--main-section-background-color);
35
+ --file-uploader-font: normal 12px/20px var(--theme-font);
36
+ --file-uploader-color: var(--secondary-color);
37
+ --file-uploader-icon-color: var(--primary-color);
38
+ --file-uploader-candrop-background-color: #fffde9;
39
+ --file-uploader-label-padding: 3px 20px;
40
+ --file-uploader-label-border-radius: var(--border-radius);
41
+ --file-uploader-label-background-color: var(--secondary-color);
42
+ --file-uploader-label-font: normal 12px var(--theme-font);
43
+ --file-uploader-label-color: #fff;
44
+ --file-uploader-li-padding: 2px 5px 0px 5px;
45
+ --file-uploader-li-border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
46
+ --file-uploader-li-icon-margin: 2px 0 2px 5px;
47
+ --file-uploader-li-icon-font: normal 15px var(--mdc-icon-font, 'Material Icons');
48
+ --file-uploader-li-icon-focus-color: var(--primary-color);
49
+ }
50
+
51
+ @media screen and (max-width: 480px) {
52
+ body {
53
+ --label-font: normal 15px var(--theme-font);
54
+ }
55
+ }
56
+
57
+ @media (min-width: 481px) and (max-width: 1024px) {
58
+ body {
59
+ --form-margin: 15px 0;
60
+ --form-multi-column-max-width: 100%;
61
+ --form-container-padding: 0 9px 12px 9px;
62
+ --label-font: normal 14px var(--theme-font);
63
+ --input-field-font: normal 15px var(--theme-font);
64
+ --input-field-padding: 3px 5px;
65
+ }
66
+ }
67
+
68
+ @media only screen and (max-width: 925px) {
69
+ body {
70
+ --form-margin: 14px 0;
71
+ --form-multi-column-max-width: 100%;
72
+ --form-container-padding: 0 9px 12px 9px;
73
+ --input-field-padding: 3px 5px;
74
+ }
75
+ }
@@ -0,0 +1,194 @@
1
+ body {
2
+ --grid-container-border-color: 1px solid rgba(0, 0, 0, 0.09);
3
+ --grid-container-border-width: 1px 0;
4
+
5
+ --grist-background-color: var(--main-section-background-color);
6
+ --grist-title-margin: 0 0 0 10px;
7
+ --grist-title-border: none;
8
+ --grist-title-font: bold 16px var(--theme-font);
9
+ --grist-title-color: var(--secondary-color);
10
+ --grist-title-font: bold 16px var(--theme-font);
11
+ --grist-title-icon-color: var(--primary-color);
12
+ --grist-title-icon-margin: 0 3px 2px 0;
13
+ --grist-title-icon-size: var(--fontsize-default);
14
+ --grist-title-with-grid-padding: 0;
15
+
16
+ --grist-object-editor-font: normal 1em var(--theme-font);
17
+ --grist-object-editor-color: var(--secondary-color);
18
+
19
+ --grist-input-zoom: 1;
20
+ --grist-input-progress-border: 1px solid rgba(255, 255, 255, 0.5);
21
+ --grist-input-progress-background: rgba(121, 110, 110, 0.1);
22
+ --grist-input-progress-bar-background: #4ac5fd;
23
+ --grist-input-progress-bar-color: var(--theme-white-color);
24
+
25
+ --grid-header-background-color: transparent;
26
+ --grid-header-top-border: 2px solid rgba(var(--secondary-color-rgb), 0.7);
27
+ --grid-header-bottom-border: var(--grid-container-border-color);
28
+ --grid-header-border-color: rgba(var(--primary-color-rgb), 0.3);
29
+ --grid-header-padding: var(--padding-default) 0 var(--padding-narrow) var(--padding-default);
30
+ --grid-header-sorter-size: 18px;
31
+ --grid-header-splitter-border: var(--grid-container-border-color);
32
+ --grid-header-splitter-border-hover: 1px solid var(--primary-color);
33
+ --grid-header-color: rgba(var(--secondary-color-rgb), 0.8);
34
+ --grid-header-font: bold var(--fontsize-small) var(--theme-font);
35
+ --grid-header-filter-title-color: var(--primary-text-color);
36
+ --grid-header-filter-title-font: normal 12px var(--theme-font);
37
+ --grid-header-filter-title-icon-color: var(--primary-color);
38
+
39
+ --grid-record-background-color: var(--theme-white-color);
40
+ --grid-record-odd-background-color: rgba(255, 255, 255, 0.4);
41
+ --grid-record-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
42
+ --grid-record-color: var(--secondary-color);
43
+ --grid-record-color-hover: var(--primary-color);
44
+ --grid-record-wide-fontsize: var(--fontsize-small);
45
+ --grid-record-selected-background-color: #f1f8e9;
46
+ --grid-record-selected-color: var(--grid-record-color);
47
+ --grid-record-focused-background-color: rgba(var(--primary-color-rgb), 0.2);
48
+ --grid-record-focused-border: 1px solid var(--primary-color);
49
+ --grid-record-focused-cell-background-color: rgba(var(--primary-color-rgb), 0.25);
50
+ --grid-record-focused-cell-border: 1px dashed var(--primary-color);
51
+ --grid-record-focused-color: var(--grid-record-color);
52
+ --grid-record-focused-box-shadow: 0px 2px 0px 0px rgb(0 0 0 / 10%);
53
+ --grid-record-emphasized-background-color: var(--primary-color);
54
+ --grid-record-emphasized-color: var(--theme-white-color);
55
+ --grid-record-editing-background-color: var(--theme-white-color);
56
+ --grid-record-editing-border: 1px dashed rgba(var(--primary-color-rgb), 0.4);
57
+ --grid-record-fontsize: var(--fontsize-large);
58
+ --grid-record-border-bottom: var(--grid-container-border-color);
59
+
60
+ --grid-record-dirty-border-top: 24px solid rgba(var(--primary-color-rgb), 0.6);
61
+ --grid-record-dirty-border-left: 24px solid transparent;
62
+ --grid-record-dirty-icon-font: bold 10px/12px var(--mdc-icon-font, 'Material Icons');
63
+ --grid-record-dirty-icon-size: var(--fontsize-large);
64
+ --grid-record-dirty-color: var(--theme-white-color);
65
+
66
+ --grid-footer-background-color: transparent;
67
+ --grid-footer-font-size: var(--fontsize-default);
68
+ --grid-footer-color: var(--secondary-color);
69
+ --grid-footer-limit-color: rgba(var(--secondary-color-rgb), 0.6);
70
+ --grid-footer-inactive-color: var(--grid-footer-limit-color);
71
+ --grid-footer-padding: var(--padding-default) var(--padding-narrow);
72
+
73
+ --data-list-background-color: var(--main-section-background-color);
74
+ --data-list-item-margin: var(--margin-default) 0 var(--margin-default) var(--margin-wide);
75
+ --data-list-item-padding: var(--padding-default) var(--padding-wide);
76
+ --data-list-item-border-bottom: var(--grid-container-border-color);
77
+ --data-list-item-name-font: bold 1em/1em var(--theme-font);
78
+ --data-list-item-name-color: var(--secondary-color);
79
+ --data-list-item-disc-font: normal 0.9em/1em var(--theme-font);
80
+ --data-list-item-disc-color: var(--secondary-text-color);
81
+ --data-list-item-etc-label-font: bold 1em/1em var(--theme-font);
82
+ --data-list-item-etc-font: normal 0.8em/1em var(--theme-font);
83
+ --data-list-item-etc-color: #585858;
84
+ --data-list-item-icon-font: normal 1em/1em;
85
+ --data-list-item-icon-color: var(--secondary-text-color);
86
+ --data-list-selected-background-color: var(--grid-record-selected-background-color);
87
+ --data-list-fab-position-horizontal: 15px;
88
+ --data-list-fab-position-vertical: 15px;
89
+ --data-list-fab-color: var(--primary-color);
90
+ --data-list-fab-shadow: var(--box-shadow);
91
+
92
+ --data-card-background-color: var(--main-section-background-color);
93
+ --data-card-record-card-background-color: var(--theme-white-color);
94
+ --data-card-record-card-border: var(--border-dark-color);
95
+ --data-card-record-card-border-hover: 1px solid var(--primary-color);
96
+ --data-card-record-card-boxshadow-hover: 1px 1px 2px 1px rgba(0, 0, 0, 0.15);
97
+ --data-card-record-card-selected-border: 1px solid var(--primary-color);
98
+ --data-card-record-card-border-radius: var(--border-radius);
99
+ --data-card-item-margin: var(--margin-default) 0 var(--margin-default) var(--margin-wide);
100
+ --data-card-item-padding: var(--padding-default) var(--padding-wide);
101
+ --data-card-item-border-bottom: var(--grid-container-border-color);
102
+ --data-card-item-name-font: bold 1.2em/1em var(--theme-font);
103
+ --data-card-item-name-color: var(--secondary-text-color);
104
+ --data-card-item-name-label-font: normal 0.65em/0.8em var(--theme-font);
105
+ --data-card-item-name-label-color: rgba(var(--secondary-color-rgb), 0.8);
106
+ --data-card-item-disc-font: normal 0.9em/1em var(--theme-font);
107
+ --data-card-item-disc-color: var(--primary-color);
108
+ --data-card-item-etc-label-font: normal 1em/1em var(--theme-font);
109
+ --data-card-item-etc-font: bold 0.8em/1em var(--theme-font);
110
+ --data-card-item-etc-color: var(--secondary-color);
111
+ --data-card-item-icon-font: normal 1em/1em;
112
+ --data-card-item-icon-color: var(--secondary-text-color);
113
+ --data-card-item-btn-border: var(--border-dark-color);
114
+ --data-card-item-btn-border-radius: var(--border-radius);
115
+ --data-card-item-btn-padding: var(--padding-narrow);
116
+ --data-card-selected-background-color: var(--grid-record-selected-background-color);
117
+ --data-card-fab-position-horizontal: 15px;
118
+ --data-card-fab-position-vertical: 15px;
119
+ --data-card-fab-color: var(--primary-color);
120
+ --data-card-fab-shadow: var(--box-shadow);
121
+ --data-card-template: repeat(3, minmax(auto, 100%));
122
+ --data-card-thumbnail-height: 140px;
123
+ --data-card-thumbnail-border-bottom: var(--border-dark-color);
124
+ --data-card-attachimg-height: 70px;
125
+
126
+ --record-view-background-color: var(--main-section-background-color);
127
+ --record-view-gap: var(--margin-narrow) 0;
128
+ --record-view-padding: var(--padding-default);
129
+ --record-view-label-font: bold 15px var(--theme-font);
130
+ --record-view-label-color: var(--secondary-color);
131
+ --record-view-label-icon-size: var(--fontsize-small);
132
+ --record-view-font: normal 15px var(--theme-font);
133
+ --record-view-color: var(--secondary-color);
134
+ --record-view-focus-color: var(--primary-color);
135
+ --record-view-border-bottom: 1px solid rgba(0, 0, 0, 0.1);
136
+ --record-view-edit-border-bottom: 2px solid var(--primary-color);
137
+ --record-view-item-padding: var(--padding-default);
138
+
139
+ --record-view-footer-background: #586272;
140
+ --record-view-footer-button-border: 1px solid rgba(0, 0, 0, 0.3);
141
+ --record-view-footer-button-border-width: 0 0 0 1px;
142
+ --record-view-footer-button-font: 17px;
143
+ --record-view-footer-button-color: var(--theme-white-color);
144
+ --record-view-footer-iconbutton-size: 35px;
145
+ --record-view-footer-focus-background: var(--primary-color);
146
+
147
+ --ox-grist-padding: var(--padding-default) var(--padding-default) 0 var(--padding-default);
148
+ }
149
+
150
+ @media print {
151
+ body {
152
+ --grist-input-zoom: 0.7;
153
+ }
154
+ }
155
+
156
+ @media only screen and (max-width: 460px) {
157
+ body {
158
+ --record-view-label-font: bold 15px/32px var(--theme-font);
159
+ --record-view-font: normal 15px/32px var(--theme-font);
160
+ --data-card-template: repeat(1, minmax(auto, 100%));
161
+ --ox-grist-padding: 0;
162
+ }
163
+ }
164
+ @media (min-width: 461px) and (max-width: 700px) {
165
+ body {
166
+ --data-card-template: repeat(2, minmax(auto, 100%));
167
+ --ox-grist-padding: 0;
168
+ }
169
+ }
170
+ @media (min-width: 461px) and (max-width: 1024px) {
171
+ body {
172
+ --data-card-create-form-padding: 7px;
173
+ }
174
+ }
175
+ @media (min-width: 1025px) and (max-width: 1400px) {
176
+ body {
177
+ --data-card-template: repeat(4, minmax(auto, 100%));
178
+ }
179
+ }
180
+ @media (min-width: 1401px) and (max-width: 1800px) {
181
+ body {
182
+ --data-card-template: repeat(5, minmax(auto, 100%));
183
+ }
184
+ }
185
+ @media (min-width: 1801px) and (max-width: 2200px) {
186
+ body {
187
+ --data-card-template: repeat(6, minmax(auto, 100%));
188
+ }
189
+ }
190
+ @media only screen and (min-width: 2201px) {
191
+ body {
192
+ --data-card-template: repeat(7, minmax(auto, 100%));
193
+ }
194
+ }
@@ -0,0 +1,26 @@
1
+ body {
2
+ /* oops spinner style */
3
+
4
+ --oops-spinner-image: url(/assets/images/spinner.png);
5
+
6
+ /* oops note style */
7
+ --oops-note-icon-font: normal 24px var(--mdc-icon-font, 'Material Icons');
8
+ --oops-note-icon-color: rgba(var(--secondary-color-rgb), 0.3);
9
+ --oops-note-icon-border: 2px solid rgba(var(--secondary-color-rgb), 0.3);
10
+ --oops-note-icon-border-radius: 50px;
11
+ --oops-note-icon-padding: var(--padding-default);
12
+ --oops-note-title-margin: 7px 0 2px 0;
13
+ --oops-note-title-font: bold 14px var(--theme-font);
14
+ --oops-note-title-color: var(--secondary-color);
15
+ --oops-note-description-font: normal 12px var(--theme-font);
16
+ --oops-note-description-color: var(--primary-color);
17
+ }
18
+ @media only screen and (max-width: 460px) {
19
+ body {
20
+ --oops-note-icon-padding: var(--padding-narrow);
21
+ --oops-note-icon-font: normal 18px var(--mdc-icon-font, 'Material Icons');
22
+ --oops-note-title-font: bold 13px var(--theme-font);
23
+ --oops-note-title-margin: var(--margin-narrow) 0 2px 0;
24
+ --oops-note-description-font: normal 0px var(--theme-font);
25
+ }
26
+ }