@exmg/exm-form 1.0.8 → 1.0.10

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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@exmg/exm-form",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "exports": {
8
8
  ".": "./index.js",
9
- "./exm-form.js": "./src/exm-form.js"
9
+ "./exm-form.js": "./src/exm-form.js",
10
+ "./exm-form-validate-mixin.js": "./src/exm-form-validate-mixin.js"
10
11
  },
11
12
  "description": "Form element",
12
13
  "contributors": [
@@ -29,7 +30,7 @@
29
30
  },
30
31
  "license": "MIT",
31
32
  "dependencies": {
32
- "@exmg/exm-button": "^1.0.3",
33
+ "@exmg/exm-button": "^1.0.4",
33
34
  "@material/typography": "^14.0.0",
34
35
  "lit": "^3.0.0",
35
36
  "tslib": "^2.6.2"
@@ -43,5 +44,5 @@
43
44
  "publishConfig": {
44
45
  "access": "public"
45
46
  },
46
- "gitHead": "3a8b0c37996bb46cb2466c6adeaeae8142958d4e"
47
+ "gitHead": "5747be50ecb7c46ed349c74a6e8d66895d835455"
47
48
  }
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,81 @@
1
1
  import { css } from 'lit';
2
- export const style = css `:host{display:block;--_exm-form-content-margin-left: var(--exm-form-content-margin-left, 0);--_exm-form-container-margin-top: var(--exm-form-container-margin-top, 1rem);--_exm-form-container-margin-bottom: var(--exm-form-container-margin-bottom, 1rem);--_exm-form-divider-margin-top: var(--exm-form-divider-margin-top, 2rem);--_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);--_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);--_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);--_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);--_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);--_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);--_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px)}.aside{line-height:var(--_exm-form-aside-line-height);font-size:var(--_exm-form-aside-font-size);letter-spacing:var(--_exm-form-aside-letter-spacing);font-weight:var(--_exm-form-aside-font-weight);color:var(--_exm-form-aside-color, var(--md-sys-color-on-surface));border-left:1px solid var(--md-sys-color-outline-variant);box-sizing:border-box;margin-left:var(--_exm-form-aside-margin-left);margin-right:var(--_exm-form-aside-margin-right);min-height:2rem;padding-left:1rem;vertical-align:top;height:100%;min-width:var(--_exm-form-aside-min-width);flex:0}.aside.empty{display:none}.content,.container{display:flex}.content{flex:1}.container{margin-top:var(--_exm-form-container-margin-top);margin-bottom:var(--_exm-form-container-margin-bottom)}.actions{display:flex;padding:8px 4px;justify-content:flex-end}.actions>*{margin-right:8px}.divider{margin-top:var(--_exm-form-divider-margin-top)}.content{margin-left:var(--_exm-form-content-margin-left)}.form-error{background-color:var(--_exm-form-error-background, var(--md-sys-color-error-container, red));color:var(--_exm-form-error-color, var(--md-sys-color-on-error-container, white))}.form-error>div{padding:1rem}`;
3
- export default style;
2
+ export const style = css `
3
+ :host {
4
+ display: block;
5
+ --_exm-form-content-margin-left: var(--exm-form-content-margin-left, 0);
6
+ --_exm-form-container-margin-top: var(--exm-form-container-margin-top, 1rem);
7
+ --_exm-form-container-margin-bottom: var(--exm-form-container-margin-bottom, 1rem);
8
+ --_exm-form-divider-margin-top: var(--exm-form-divider-margin-top, 2rem);
9
+ --_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);
10
+ --_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);
11
+ --_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);
12
+ --_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);
13
+ --_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);
14
+ --_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);
15
+ --_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px);
16
+ }
17
+
18
+ .aside {
19
+ line-height: var(--_exm-form-aside-line-height);
20
+ font-size: var(--_exm-form-aside-font-size);
21
+ letter-spacing: var(--_exm-form-aside-letter-spacing);
22
+ font-weight: var(--_exm-form-aside-font-weight);
23
+ color: var(--_exm-form-aside-color, var(--md-sys-color-on-surface));
24
+ border-left: 1px solid var(--md-sys-color-outline-variant);
25
+ box-sizing: border-box;
26
+ margin-left: var(--_exm-form-aside-margin-left);
27
+ margin-right: var(--_exm-form-aside-margin-right);
28
+ min-height: 2rem;
29
+ padding-left: 1rem;
30
+ vertical-align: top;
31
+ height: 100%;
32
+ min-width: var(--_exm-form-aside-min-width);
33
+ flex: 0;
34
+ }
35
+
36
+ .aside.empty {
37
+ display: none;
38
+ }
39
+
40
+ .content,
41
+ .container {
42
+ display: flex;
43
+ }
44
+
45
+ .content {
46
+ flex: 1;
47
+ }
48
+
49
+ .container {
50
+ margin-top: var(--_exm-form-container-margin-top);
51
+ margin-bottom: var(--_exm-form-container-margin-bottom);
52
+ }
53
+
54
+ .actions {
55
+ display: flex;
56
+ padding: 8px 4px;
57
+ justify-content: flex-end;
58
+ }
59
+
60
+ .actions > * {
61
+ margin-right: 8px;
62
+ }
63
+
64
+ .divider {
65
+ margin-top: var(--_exm-form-divider-margin-top);
66
+ }
67
+
68
+ .content {
69
+ margin-left: var(--_exm-form-content-margin-left);
70
+ }
71
+
72
+ .form-error {
73
+ background-color: var(--_exm-form-error-background, var(--md-sys-color-error-container, red));
74
+ color: var(--_exm-form-error-color, var(--md-sys-color-on-error-container, white));
75
+ }
76
+
77
+ .form-error > div {
78
+ padding: 1rem;
79
+ }
80
+ `;
4
81
  //# sourceMappingURL=exm-form-base-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,113 @@
1
1
  import { css } from 'lit';
2
- export const style = css `.section-title{line-height:1.5rem;font-size:1rem;letter-spacing:.00625em;font-weight:500;color:var(--_exm-form-title-color, var(--md-sys-color-on-surface));padding-bottom:8px}.aside{--_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);--_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);--_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);--_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);--_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);--_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);--_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px);line-height:var(--_exm-form-aside-line-height);font-size:var(--_exm-form-aside-font-size);letter-spacing:var(--_exm-form-aside-letter-spacing);font-weight:var(--_exm-form-aside-font-weight);color:var(--md-sys-color-on-surface);border-left:1px solid var(--md-sys-color-outline-variant);box-sizing:border-box;margin-left:var(--_exm-form-aside-margin-left);margin-right:var(--_exm-form-aside-margin-right);min-height:2rem;padding-left:1rem;vertical-align:top;height:100%;min-width:var(--_exm-form-aside-min-width);flex:0}form{margin:0 1rem;width:100%}form .row{display:flex;gap:6px;height:76px;align-items:flex-start}form .row>*{flex:1;height:fit-content}form{display:flex;flex-direction:column;gap:12px;margin-top:.5rem}form>*{display:contents}.actions>*{margin-right:8px}.no-flex{display:block}.extra-margin{margin-top:2rem;display:block}label.checkbox{display:flex;justify-content:flex-start;align-items:center;font-size:1rem;font-weight:500;margin:.5rem 1rem}label.checkbox md-checkbox{margin-right:1rem}.toolbar{display:flex;align-items:center;padding:8px 4px 8px 16px;height:56px;box-sizing:border-box}.toolbar .title{line-height:1.5rem;font-size:1rem;letter-spacing:.00625em;font-weight:500;color:var(--md-sys-color-on-surface);box-sizing:border-box;overflow-wrap:break-word}a{color:var(--md-sys-color-primary)}`;
3
- export default style;
2
+ export const style = css `
3
+ .section-title {
4
+ line-height: 1.5rem;
5
+ font-size: 1rem;
6
+ letter-spacing: 0.00625em;
7
+ font-weight: 500;
8
+ color: var(--_exm-form-title-color, var(--md-sys-color-on-surface));
9
+ padding-bottom: 8px;
10
+ }
11
+
12
+ .aside {
13
+ --_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);
14
+ --_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);
15
+ --_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);
16
+ --_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);
17
+ --_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);
18
+ --_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);
19
+ --_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px);
20
+ line-height: var(--_exm-form-aside-line-height);
21
+ font-size: var(--_exm-form-aside-font-size);
22
+ letter-spacing: var(--_exm-form-aside-letter-spacing);
23
+ font-weight: var(--_exm-form-aside-font-weight);
24
+ color: var(--md-sys-color-on-surface);
25
+ border-left: 1px solid var(--md-sys-color-outline-variant);
26
+ box-sizing: border-box;
27
+ margin-left: var(--_exm-form-aside-margin-left);
28
+ margin-right: var(--_exm-form-aside-margin-right);
29
+ min-height: 2rem;
30
+ padding-left: 1rem;
31
+ vertical-align: top;
32
+ height: 100%;
33
+ min-width: var(--_exm-form-aside-min-width);
34
+ flex: 0;
35
+ }
36
+
37
+ form {
38
+ margin: 0 1rem;
39
+ width: 100%;
40
+ }
41
+
42
+ form .row {
43
+ display: flex;
44
+ gap: 6px;
45
+ height: 76px;
46
+ align-items: flex-start;
47
+ }
48
+
49
+ form .row > * {
50
+ flex: 1;
51
+ height: fit-content;
52
+ }
53
+
54
+ form {
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: 12px;
58
+ margin-top: 0.5rem;
59
+ }
60
+
61
+ form > * {
62
+ display: contents;
63
+ }
64
+
65
+ .actions > * {
66
+ margin-right: 8px;
67
+ }
68
+
69
+ .no-flex {
70
+ display: block;
71
+ }
72
+
73
+ .extra-margin {
74
+ margin-top: 2rem;
75
+ display: block;
76
+ }
77
+
78
+ label.checkbox {
79
+ display: flex;
80
+ justify-content: flex-start;
81
+ align-items: center;
82
+ font-size: 1rem;
83
+ font-weight: 500;
84
+ margin: 0.5rem 1rem;
85
+ }
86
+
87
+ label.checkbox md-checkbox {
88
+ margin-right: 1rem;
89
+ }
90
+
91
+ .toolbar {
92
+ display: flex;
93
+ align-items: center;
94
+ padding: 8px 4px 8px 16px;
95
+ height: 56px;
96
+ box-sizing: border-box;
97
+ }
98
+
99
+ .toolbar .title {
100
+ line-height: 1.5rem;
101
+ font-size: 1rem;
102
+ letter-spacing: 0.00625em;
103
+ font-weight: 500;
104
+ color: var(--md-sys-color-on-surface);
105
+ box-sizing: border-box;
106
+ overflow-wrap: break-word;
107
+ }
108
+
109
+ a {
110
+ color: var(--md-sys-color-primary);
111
+ }
112
+ `;
4
113
  //# sourceMappingURL=exm-form-css.js.map
@@ -1,79 +0,0 @@
1
- :host {
2
- display: block;
3
-
4
- --_exm-form-content-margin-left: var(--exm-form-content-margin-left, 0);
5
- --_exm-form-container-margin-top: var(--exm-form-container-margin-top, 1rem);
6
- --_exm-form-container-margin-bottom: var(--exm-form-container-margin-bottom, 1rem);
7
- --_exm-form-divider-margin-top: var(--exm-form-divider-margin-top, 2rem);
8
-
9
- // Aside
10
- --_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);
11
- --_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);
12
- --_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);
13
- --_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);
14
- --_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);
15
- --_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);
16
- --_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px);
17
- }
18
-
19
- .aside {
20
- line-height: var(--_exm-form-aside-line-height);
21
- font-size: var(--_exm-form-aside-font-size);
22
- letter-spacing: var(--_exm-form-aside-letter-spacing);
23
- font-weight: var(--_exm-form-aside-font-weight);
24
- color: var(--_exm-form-aside-color, var(--md-sys-color-on-surface));
25
- border-left: 1px solid var(--md-sys-color-outline-variant);
26
- box-sizing: border-box;
27
- margin-left: var(--_exm-form-aside-margin-left);
28
- margin-right: var(--_exm-form-aside-margin-right);
29
- min-height: 2rem;
30
- padding-left: 1rem;
31
- vertical-align: top;
32
- height: 100%;
33
- min-width: var(--_exm-form-aside-min-width);
34
- flex: 0;
35
- }
36
-
37
- .aside.empty {
38
- display: none;
39
- }
40
-
41
- .content,
42
- .container {
43
- display: flex;
44
- }
45
- .content {
46
- flex: 1;
47
- }
48
-
49
- .container {
50
- margin-top: var(--_exm-form-container-margin-top);
51
- margin-bottom: var(--_exm-form-container-margin-bottom);
52
- }
53
-
54
- .actions {
55
- display: flex;
56
- padding: 8px 4px;
57
- justify-content: flex-end;
58
- }
59
-
60
- .actions > * {
61
- margin-right: 8px;
62
- }
63
-
64
- .divider {
65
- margin-top: var(--_exm-form-divider-margin-top);
66
- }
67
-
68
- .content {
69
- margin-left: var(--_exm-form-content-margin-left);
70
- }
71
-
72
- .form-error {
73
- background-color: var(--_exm-form-error-background, var(--md-sys-color-error-container, red));
74
- color: var(--_exm-form-error-color, var(--md-sys-color-on-error-container, white));
75
- }
76
-
77
- .form-error > div {
78
- padding: 1rem;
79
- }
@@ -1,108 +0,0 @@
1
- .section-title {
2
- line-height: 1.5rem;
3
- font-size: 1rem;
4
- letter-spacing: 0.00625em;
5
- font-weight: 500;
6
- color: var(--_exm-form-title-color, var(--md-sys-color-on-surface));
7
- padding-bottom: 8px;
8
- }
9
-
10
- .aside {
11
- --_exm-form-aside-font-size: var(--exm-form-aside-font-size, 0.875rem);
12
- --_exm-form-aside-line-height: var(--exm-form-aside-line-height, 1.25rem);
13
- --_exm-form-aside-letter-spacing: var(--exm-form-aside-letter-spacing, 0.0142857143em);
14
- --_exm-form-aside-font-weight: var(--exm-form-aside-font-weight, 400);
15
- --_exm-form-aside-margin-left: var(--exm-form-aside-margin-left, 1rem);
16
- --_exm-form-aside-margin-right: var(--exm-form-aside-margin-right, 5rem);
17
- --_exm-form-aside-min-width: var(--exm-form-aside-min-width, 180px);
18
- line-height: var(--_exm-form-aside-line-height);
19
- font-size: var(--_exm-form-aside-font-size);
20
- letter-spacing: var(--_exm-form-aside-letter-spacing);
21
- font-weight: var(--_exm-form-aside-font-weight);
22
- color: var(--md-sys-color-on-surface);
23
- border-left: 1px solid var(--md-sys-color-outline-variant);
24
- box-sizing: border-box;
25
- margin-left: var(--_exm-form-aside-margin-left);
26
- margin-right: var(--_exm-form-aside-margin-right);
27
- min-height: 2rem;
28
- padding-left: 1rem;
29
- vertical-align: top;
30
- height: 100%;
31
- min-width: var(--_exm-form-aside-min-width);
32
- flex: 0;
33
- }
34
-
35
- form {
36
- margin: 0 1rem;
37
- width: 100%;
38
- }
39
-
40
- form .row {
41
- display: flex;
42
- gap: 6px;
43
- height: 76px;
44
- align-items: flex-start;
45
- }
46
-
47
- form .row > * {
48
- flex: 1;
49
- height: fit-content;
50
- }
51
-
52
- form {
53
- display: flex;
54
- flex-direction: column;
55
- gap: 12px;
56
- margin-top: 0.5rem;
57
- }
58
-
59
- form > * {
60
- display: contents;
61
- }
62
-
63
- .actions > * {
64
- margin-right: 8px;
65
- }
66
-
67
- .no-flex {
68
- display: block;
69
- }
70
-
71
- .extra-margin {
72
- margin-top: 2rem;
73
- display: block;
74
- }
75
-
76
- label.checkbox {
77
- display: flex;
78
- justify-content: flex-start;
79
- align-items: center;
80
- font-size: 1rem;
81
- font-weight: 500;
82
- margin: 0.5rem 1rem;
83
- md-checkbox {
84
- margin-right: 1rem;
85
- }
86
- }
87
-
88
- .toolbar {
89
- display: flex;
90
- align-items: center;
91
- padding: 8px 4px 8px 16px;
92
- height: 56px;
93
- box-sizing: border-box;
94
- }
95
-
96
- .toolbar .title {
97
- line-height: 1.5rem;
98
- font-size: 1rem;
99
- letter-spacing: 0.00625em;
100
- font-weight: 500;
101
- color: var(--md-sys-color-on-surface);
102
- box-sizing: border-box;
103
- overflow-wrap: break-word;
104
- }
105
-
106
- a {
107
- color: var(--md-sys-color-primary);
108
- }