@saasquatch/mint-components 1.5.3-4 → 1.5.3-5
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/dist/cjs/sqm-big-stat_35.cjs.entry.js +7 -3
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +2 -2
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +2 -1
- package/dist/collection/utils/RequiredPropsError.js +6 -2
- package/dist/esm/sqm-big-stat_35.entry.js +7 -3
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-436da6b8.system.js +1 -1
- package/dist/mint-components/{p-58704085.entry.js → p-4bf2f76f.entry.js} +1 -1
- package/dist/mint-components/p-bd39e245.system.entry.js +1 -0
- package/dist/mint-components/{p-0284a378.entry.js → p-e77873f3.entry.js} +1 -1
- package/dist/mint-components/{p-6e3f8914.system.entry.js → p-f31aa58a.system.entry.js} +1 -1
- package/dist/types/utils/RequiredPropsError.d.ts +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-2e4453e2.system.entry.js +0 -1
|
@@ -141,10 +141,13 @@ const style = {
|
|
|
141
141
|
Alert: {
|
|
142
142
|
margin: "28px",
|
|
143
143
|
},
|
|
144
|
+
Children: {
|
|
145
|
+
display: "none",
|
|
146
|
+
},
|
|
144
147
|
};
|
|
145
148
|
const sheet = JSS.createStyleSheet(style);
|
|
146
149
|
const styleString = sheet.toString();
|
|
147
|
-
function RequiredPropsError({ missingProps }) {
|
|
150
|
+
function RequiredPropsError({ missingProps }, children) {
|
|
148
151
|
if (!missingProps)
|
|
149
152
|
return false;
|
|
150
153
|
const host = index_module.P();
|
|
@@ -165,7 +168,8 @@ function RequiredPropsError({ missingProps }) {
|
|
|
165
168
|
`<${host.tagName.toLowerCase()}>`,
|
|
166
169
|
". Values for the following attributes are missing:"),
|
|
167
170
|
index.h("ul", null, missingProps.map((prop) => (index.h("li", null,
|
|
168
|
-
index.h("strong", null, prop.attribute))))))
|
|
171
|
+
index.h("strong", null, prop.attribute)))))),
|
|
172
|
+
index.h("div", { class: sheet.classes.Children }, children)));
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
const FORM_VALIDATION_CONTEXT = "sq:validation-state";
|
|
@@ -351,7 +355,7 @@ const DropdownField = class {
|
|
|
351
355
|
},
|
|
352
356
|
]);
|
|
353
357
|
if (!index_module.jn() && missingProps) {
|
|
354
|
-
return index.h(RequiredPropsError, { missingProps: missingProps });
|
|
358
|
+
return (index.h(RequiredPropsError, { missingProps: missingProps }, index.h("slot", null)));
|
|
355
359
|
}
|
|
356
360
|
const content = {
|
|
357
361
|
...utils.getProps(this),
|
|
@@ -10042,7 +10042,7 @@ const MultipleCheckboxes = createHookStory(() => {
|
|
|
10042
10042
|
index.h("sqm-name-fields", { slot: "formData" }),
|
|
10043
10043
|
index.h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "error-message": "Cannot be a robot", "checkbox-name": "isHuman" }),
|
|
10044
10044
|
index.h("div", { slot: "terms" },
|
|
10045
|
-
index.h("sqm-checkbox-field",
|
|
10045
|
+
index.h("sqm-checkbox-field", { "checkbox-name": "otherCheckbox" }))));
|
|
10046
10046
|
});
|
|
10047
10047
|
const OptionalCheckboxes = createHookStory(() => {
|
|
10048
10048
|
setupGraphQL$9();
|
|
@@ -10050,7 +10050,7 @@ const OptionalCheckboxes = createHookStory(() => {
|
|
|
10050
10050
|
index.h("sqm-name-fields", { slot: "formData" }),
|
|
10051
10051
|
index.h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "checkbox-optional": "true", "checkbox-name": "isHuman" }),
|
|
10052
10052
|
index.h("div", { slot: "terms" },
|
|
10053
|
-
index.h("sqm-checkbox-field",
|
|
10053
|
+
index.h("sqm-checkbox-field", { "checkbox-name": "required" }))));
|
|
10054
10054
|
});
|
|
10055
10055
|
const MissingName = createHookStory(() => {
|
|
10056
10056
|
setupGraphQL$9();
|
|
@@ -50,7 +50,7 @@ export const MultipleCheckboxes = createHookStory(() => {
|
|
|
50
50
|
h("sqm-name-fields", { slot: "formData" }),
|
|
51
51
|
h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "error-message": "Cannot be a robot", "checkbox-name": "isHuman" }),
|
|
52
52
|
h("div", { slot: "terms" },
|
|
53
|
-
h("sqm-checkbox-field",
|
|
53
|
+
h("sqm-checkbox-field", { "checkbox-name": "otherCheckbox" }))));
|
|
54
54
|
});
|
|
55
55
|
export const OptionalCheckboxes = createHookStory(() => {
|
|
56
56
|
setupGraphQL();
|
|
@@ -58,7 +58,7 @@ export const OptionalCheckboxes = createHookStory(() => {
|
|
|
58
58
|
h("sqm-name-fields", { slot: "formData" }),
|
|
59
59
|
h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "checkbox-optional": "true", "checkbox-name": "isHuman" }),
|
|
60
60
|
h("div", { slot: "terms" },
|
|
61
|
-
h("sqm-checkbox-field",
|
|
61
|
+
h("sqm-checkbox-field", { "checkbox-name": "required" }))));
|
|
62
62
|
});
|
|
63
63
|
export const MissingName = createHookStory(() => {
|
|
64
64
|
setupGraphQL();
|
|
@@ -35,7 +35,8 @@ export class DropdownField {
|
|
|
35
35
|
},
|
|
36
36
|
]);
|
|
37
37
|
if (!isDemo() && missingProps) {
|
|
38
|
-
return h(RequiredPropsError, { missingProps: missingProps }
|
|
38
|
+
return (h(RequiredPropsError, { missingProps: missingProps },
|
|
39
|
+
h("slot", null)));
|
|
39
40
|
}
|
|
40
41
|
const content = {
|
|
41
42
|
...getProps(this),
|
|
@@ -20,10 +20,13 @@ const style = {
|
|
|
20
20
|
Alert: {
|
|
21
21
|
margin: "28px",
|
|
22
22
|
},
|
|
23
|
+
Children: {
|
|
24
|
+
display: "none",
|
|
25
|
+
},
|
|
23
26
|
};
|
|
24
27
|
const sheet = createStyleSheet(style);
|
|
25
28
|
const styleString = sheet.toString();
|
|
26
|
-
export function RequiredPropsError({ missingProps }) {
|
|
29
|
+
export function RequiredPropsError({ missingProps }, children) {
|
|
27
30
|
if (!missingProps)
|
|
28
31
|
return false;
|
|
29
32
|
const host = useHost();
|
|
@@ -44,5 +47,6 @@ export function RequiredPropsError({ missingProps }) {
|
|
|
44
47
|
`<${host.tagName.toLowerCase()}>`,
|
|
45
48
|
". Values for the following attributes are missing:"),
|
|
46
49
|
h("ul", null, missingProps.map((prop) => (h("li", null,
|
|
47
|
-
h("strong", null, prop.attribute))))))
|
|
50
|
+
h("strong", null, prop.attribute)))))),
|
|
51
|
+
h("div", { class: sheet.classes.Children }, children)));
|
|
48
52
|
}
|
|
@@ -137,10 +137,13 @@ const style = {
|
|
|
137
137
|
Alert: {
|
|
138
138
|
margin: "28px",
|
|
139
139
|
},
|
|
140
|
+
Children: {
|
|
141
|
+
display: "none",
|
|
142
|
+
},
|
|
140
143
|
};
|
|
141
144
|
const sheet = createStyleSheet(style);
|
|
142
145
|
const styleString = sheet.toString();
|
|
143
|
-
function RequiredPropsError({ missingProps }) {
|
|
146
|
+
function RequiredPropsError({ missingProps }, children) {
|
|
144
147
|
if (!missingProps)
|
|
145
148
|
return false;
|
|
146
149
|
const host = P();
|
|
@@ -161,7 +164,8 @@ function RequiredPropsError({ missingProps }) {
|
|
|
161
164
|
`<${host.tagName.toLowerCase()}>`,
|
|
162
165
|
". Values for the following attributes are missing:"),
|
|
163
166
|
h$1("ul", null, missingProps.map((prop) => (h$1("li", null,
|
|
164
|
-
h$1("strong", null, prop.attribute))))))
|
|
167
|
+
h$1("strong", null, prop.attribute)))))),
|
|
168
|
+
h$1("div", { class: sheet.classes.Children }, children)));
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
const FORM_VALIDATION_CONTEXT = "sq:validation-state";
|
|
@@ -347,7 +351,7 @@ const DropdownField = class {
|
|
|
347
351
|
},
|
|
348
352
|
]);
|
|
349
353
|
if (!jn() && missingProps) {
|
|
350
|
-
return h$1(RequiredPropsError, { missingProps: missingProps });
|
|
354
|
+
return (h$1(RequiredPropsError, { missingProps: missingProps }, h$1("slot", null)));
|
|
351
355
|
}
|
|
352
356
|
const content = {
|
|
353
357
|
...getProps(this),
|
|
@@ -10038,7 +10038,7 @@ const MultipleCheckboxes = createHookStory(() => {
|
|
|
10038
10038
|
h("sqm-name-fields", { slot: "formData" }),
|
|
10039
10039
|
h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "error-message": "Cannot be a robot", "checkbox-name": "isHuman" }),
|
|
10040
10040
|
h("div", { slot: "terms" },
|
|
10041
|
-
h("sqm-checkbox-field",
|
|
10041
|
+
h("sqm-checkbox-field", { "checkbox-name": "otherCheckbox" }))));
|
|
10042
10042
|
});
|
|
10043
10043
|
const OptionalCheckboxes = createHookStory(() => {
|
|
10044
10044
|
setupGraphQL$9();
|
|
@@ -10046,7 +10046,7 @@ const OptionalCheckboxes = createHookStory(() => {
|
|
|
10046
10046
|
h("sqm-name-fields", { slot: "formData" }),
|
|
10047
10047
|
h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "checkbox-optional": "true", "checkbox-name": "isHuman" }),
|
|
10048
10048
|
h("div", { slot: "terms" },
|
|
10049
|
-
h("sqm-checkbox-field",
|
|
10049
|
+
h("sqm-checkbox-field", { "checkbox-name": "required" }))));
|
|
10050
10050
|
});
|
|
10051
10051
|
const MissingName = createHookStory(() => {
|
|
10052
10052
|
setupGraphQL$9();
|