@neovici/cosmoz-form 3.4.0-beta.3 → 3.4.0-beta.4
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/form-dialog/form-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAU,KAAK,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,gCAAgC,CAAC;AAWxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/form-dialog/form-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAU,KAAK,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,gCAAgC,CAAC;AAWxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AAE9E,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AA+CD,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAG,UAoBhE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC3C,QAAQ,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;;;;EAKxC,CAAC"}
|
|
@@ -14,7 +14,7 @@ import buttonStyles from '../styles/button';
|
|
|
14
14
|
import { useValidatedForm$ } from '../use-validated-form$';
|
|
15
15
|
import styles from './style.css';
|
|
16
16
|
const FormDialog = (host) => {
|
|
17
|
-
const {
|
|
17
|
+
const { auto, uncancelable, hideCancelButton, saveText = t('OK') } = host, { onSave, disabled, save$, progress, ...form } = useValidatedForm$(host);
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
if (!auto) {
|
|
20
20
|
return;
|
|
@@ -24,7 +24,6 @@ const FormDialog = (host) => {
|
|
|
24
24
|
return html ` <style>
|
|
25
25
|
${buttonStyles} ${renderStyles(form)}${styles}
|
|
26
26
|
</style>
|
|
27
|
-
${when(description, () => html `<p class="description">${description}</p>`)}
|
|
28
27
|
<div class="form" part="form">${renderFields(form)}</div>
|
|
29
28
|
<div class="buttons">
|
|
30
29
|
${renderFailure$(save$)}
|
|
@@ -48,7 +47,9 @@ export const formDialog = (props) => {
|
|
|
48
47
|
const dialog = html `<cosmoz-form-dialog
|
|
49
48
|
name=${ifDefined(props.name)}
|
|
50
49
|
?allow-empty=${props.allowEmpty}
|
|
51
|
-
.
|
|
50
|
+
.title=${props.heading}
|
|
51
|
+
.subtitle=${props.description}
|
|
52
|
+
.icon=${props.icon}
|
|
52
53
|
.description=${props.description}
|
|
53
54
|
.fields=${props.fields}
|
|
54
55
|
.initial=${props.initial}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../src/form-dialog/style.css.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../src/form-dialog/style.css.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM,QAwBX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { tagged as css } from '@neovici/cosmoz-utils';
|
|
2
2
|
const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
|
|
3
|
+
:host::part(content) {
|
|
4
|
+
padding: 0;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
.description {
|
|
7
8
|
font-size: var(--cz-text-base);
|
|
8
9
|
line-height: var(--cz-text-base-line-height);
|
|
9
10
|
color: var(--cz-color-text-secondary);
|
|
10
|
-
padding-inline: var(--padding);
|
|
11
11
|
margin-block: calc(var(--cz-spacing) * 4);
|
|
12
12
|
}
|
|
13
13
|
.description * {
|
|
14
14
|
line-height: normal;
|
|
15
15
|
}
|
|
16
16
|
.form {
|
|
17
|
-
overflow-y: auto;
|
|
18
17
|
display: flex;
|
|
19
18
|
flex-direction: column;
|
|
20
|
-
padding-inline: var(--padding);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
.failure {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":";AAEA,wBAoFE"}
|
package/dist/styles/button.js
CHANGED
|
@@ -29,12 +29,11 @@ export default css `
|
|
|
29
29
|
.buttons {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: flex-end;
|
|
32
|
-
padding-
|
|
33
|
-
|
|
34
|
-
gap: var(--cz-spacing);
|
|
32
|
+
padding-block: 0 calc(var(--cz-spacing) * 5.5);
|
|
33
|
+
gap: calc(var(--cz-spacing) * 2);
|
|
35
34
|
|
|
36
35
|
& cosmoz-button {
|
|
37
|
-
|
|
36
|
+
flex: 1;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-form",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.4",
|
|
4
4
|
"description": "A pionjs component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@lit-labs/virtualizer": "^2.1.1",
|
|
71
71
|
"@neovici/cosmoz-autocomplete": "^13.7.0-beta.4",
|
|
72
72
|
"@neovici/cosmoz-button": "^1.1.0",
|
|
73
|
-
"@neovici/cosmoz-dialog": "^
|
|
73
|
+
"@neovici/cosmoz-dialog": "^5.1.0-beta.1",
|
|
74
74
|
"@neovici/cosmoz-icons": "^1.4.0",
|
|
75
75
|
"@neovici/cosmoz-input": "^6.0.0-beta.5",
|
|
76
76
|
"@neovici/cosmoz-spinner": "^1.0.2",
|