@saasquatch/mint-components 1.14.7-11 → 1.14.7-13
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/{ShadowViewAddon-f86d2739.js → ShadowViewAddon-f6ee902d.js} +12 -5
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-lead-checkbox-field-view-47675f42.js → sqm-lead-checkbox-field-view-34d94919.js} +7 -3
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +11 -5
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field-view.js +7 -3
- package/dist/esm/{ShadowViewAddon-fea70c8c.js → ShadowViewAddon-10313487.js} +12 -5
- package/dist/esm/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm/{sqm-lead-checkbox-field-view-05823885.js → sqm-lead-checkbox-field-view-a8c1c78e.js} +7 -3
- package/dist/esm/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/ShadowViewAddon-10313487.js +1 -0
- package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-05823885.js → sqm-lead-checkbox-field-view-a8c1c78e.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.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-00df0cac.js +1 -0
- package/dist/mint-components/{p-c1a65f6e.system.entry.js → p-0b4cac9f.system.entry.js} +1 -1
- package/dist/mint-components/p-10b4f74d.system.js +1 -0
- package/dist/mint-components/{p-268363a8.entry.js → p-1611f491.entry.js} +1 -1
- package/dist/mint-components/{p-d450ee65.system.entry.js → p-19b714d7.system.entry.js} +1 -1
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-ccddb56d.entry.js → p-48c69c2d.entry.js} +1 -1
- package/dist/mint-components/p-53ed4249.js +394 -0
- package/dist/mint-components/{p-14f86024.system.js → p-95b88eb6.system.js} +1 -1
- package/dist/mint-components/{p-5640d160.system.entry.js → p-b29a605b.system.entry.js} +1 -1
- package/dist/mint-components/{p-06180ec8.entry.js → p-e148296c.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/cjs/sqm-lead-checkbox-field-view-bb9b7c6c.js +0 -79
- package/dist/esm/sqm-lead-checkbox-field-view-269af7ba.js +0 -77
- package/dist/esm-es5/ShadowViewAddon-fea70c8c.js +0 -1
- package/dist/esm-es5/sqm-lead-checkbox-field-view-269af7ba.js +0 -1
- package/dist/mint-components/p-20fb7d34.system.js +0 -1
- package/dist/mint-components/p-9def94f6.js +0 -394
- package/dist/mint-components/p-dddeeff2.js +0 -1
- package/dist/mint-components/sqm-lead-checkbox-field-view-17027655.system.js +0 -1
- package/dist/mint-components/sqm-lead-checkbox-field-view-269af7ba.js +0 -77
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./p-f708da7b.js";import{i as a}from"./p-65069b66.js";import{j as l,a as o}from"./p-cef45012.js";l.setup(o());const n=l.createStyleSheet({ErrorStyle:{"&::part(control)":{borderColor:"var(--sl-color-danger-500)",outline:"var(--sl-color-danger-500)"},"&:host":{"--focus-ring":"0 0 0 var(--sl-focus-ring-width) red !important"}},ErrorMessageStyle:{margin:0,marginTop:"5px",color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)",fontFamily:"var(--sl-font-sans)",fontWeight:"var(--sl-font-weight-normal)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),r=n.toString();function t(l){var o,t,s,i,d;const{states:c,content:b}=l,p=null===(o=null==c?void 0:c.leadFormState)||void 0===o?void 0:o.validationErrors;return e("div",{class:n.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-checkbox::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-normal);\n line-height: 20px;\n}\nsl-checkbox::part(base){\n align-items: start;\n}\n",r),e("sl-checkbox",Object.assign({exportparts:"label: input-label, base: input-base",name:`/${b.checkboxName}`,"onSl-change":e=>{e.target.value=e.target.checked}},b.checkboxOptional?{required:!0}:{required:!1},{disabled:(null===(t=c.leadFormState)||void 0===t?void 0:t.loading)||(null===(s=c.leadFormState)||void 0===s?void 0:s.disabled)},(null===(d=null===(i=c.leadFormState)||void 0===i?void 0:i.validationErrors)||void 0===d?void 0:d[b.checkboxName])?{class:n.classes.ErrorStyle}:[]),a.formatMessage({id:b.checkboxName+"-message",defaultMessage:b.checkboxLabel},{labelLink:e("a",{href:b.checkboxLabelLink,target:"_blank"},b.checkboxLabelLinkText||b.checkboxLabelLink)})),(null==p?void 0:p[b.checkboxName])&&e("p",{class:n.classes.ErrorMessageStyle},(({checkboxLabel:e})=>a.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:b.errorMessage},{checkboxLabel:e}))({checkboxLabel:b.checkboxLabel})))}export{t as L}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./index-58b78d6d.system.js","./global-01c26158.system.js","./jss-preset-default.esm-62a04d6d.system.js"],(function(e){"use strict";var a,t,r,o;return{setters:[function(e){a=e.h},function(e){t=e.i},function(e){r=e.j;o=e.a}],execute:function(){e("L",c);var s={ErrorStyle:{"&::part(control)":{borderColor:"var(--sl-color-danger-500)",outline:"var(--sl-color-danger-500)"},"&:host":{"--focus-ring":"0 0 0 var(--sl-focus-ring-width) red !important"}},ErrorMessageStyle:{margin:0,marginTop:"5px",color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)",fontFamily:"var(--sl-font-sans)",fontWeight:"var(--sl-font-weight-normal)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}};var l="\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-checkbox::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-normal);\n line-height: 20px;\n}\nsl-checkbox::part(base){\n align-items: start;\n}\n";r.setup(o());var n=r.createStyleSheet(s);var i=n.toString();function c(e){var r,o,s,c,d;var b=e.states,u=e.content;var v=(r=b===null||b===void 0?void 0:b.leadFormState)===null||r===void 0?void 0:r.validationErrors;var g=function(e){var a=e.checkboxLabel;return t.formatMessage({id:"requiredFieldErrorMessage-"+a,defaultMessage:u.errorMessage},{checkboxLabel:a})};return a("div",{class:n.classes.FieldContainer,part:"sqm-base"},a("style",{type:"text/css"},l,i),a("sl-checkbox",Object.assign({exportparts:"label: input-label, base: input-base",name:"/"+u.checkboxName,"onSl-change":function(e){e.target.value=e.target.checked}},!u.checkboxOptional?{required:false}:{required:true},{disabled:((o=b.leadFormState)===null||o===void 0?void 0:o.loading)||((s=b.leadFormState)===null||s===void 0?void 0:s.disabled)},((d=(c=b.leadFormState)===null||c===void 0?void 0:c.validationErrors)===null||d===void 0?void 0:d[u.checkboxName])?{class:n.classes.ErrorStyle}:[]),t.formatMessage({id:u.checkboxName+"-message",defaultMessage:u.checkboxLabel},{labelLink:a("a",{href:u.checkboxLabelLink,target:"_blank"},u.checkboxLabelLinkText||u.checkboxLabelLink)})),(v===null||v===void 0?void 0:v[u.checkboxName])&&a("p",{class:n.classes.ErrorMessageStyle},g({checkboxLabel:u.checkboxLabel})))}}}}));
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { h } from './index-9c0e3f6c.js';
|
|
2
|
-
import { i as intl } from './global-74148d5d.js';
|
|
3
|
-
import { j as jss, a as create } from './jss-preset-default.esm-c36417f8.js';
|
|
4
|
-
|
|
5
|
-
const style = {
|
|
6
|
-
ErrorStyle: {
|
|
7
|
-
"&::part(control)": {
|
|
8
|
-
borderColor: "var(--sl-color-danger-500)",
|
|
9
|
-
outline: "var(--sl-color-danger-500)",
|
|
10
|
-
},
|
|
11
|
-
"&:host": {
|
|
12
|
-
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
ErrorMessageStyle: {
|
|
16
|
-
margin: 0,
|
|
17
|
-
marginTop: "5px",
|
|
18
|
-
color: "var(--sl-color-danger-500)",
|
|
19
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
20
|
-
fontFamily: "var(--sl-font-sans)",
|
|
21
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
22
|
-
},
|
|
23
|
-
FieldContainer: {
|
|
24
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const vanillaStyle = `
|
|
28
|
-
:host {
|
|
29
|
-
margin: 0 auto;
|
|
30
|
-
width: 100%;
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
sl-checkbox::part(label){
|
|
34
|
-
font-size: var(--sl-input-label-font-size-small);
|
|
35
|
-
font-weight: var(--sl-font-weight-normal);
|
|
36
|
-
line-height: 20px;
|
|
37
|
-
}
|
|
38
|
-
sl-checkbox::part(base){
|
|
39
|
-
align-items: start;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
jss.setup(create());
|
|
43
|
-
const sheet = jss.createStyleSheet(style);
|
|
44
|
-
const styleString = sheet.toString();
|
|
45
|
-
function LeadCheckboxFieldView(props) {
|
|
46
|
-
var _a, _b, _c, _d, _e;
|
|
47
|
-
const { states, content } = props;
|
|
48
|
-
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.leadFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
49
|
-
const getRequiredFieldErrorMessage = ({ checkboxLabel, }) => intl.formatMessage({
|
|
50
|
-
id: `requiredFieldErrorMessage-${checkboxLabel}`,
|
|
51
|
-
defaultMessage: content.errorMessage,
|
|
52
|
-
}, {
|
|
53
|
-
checkboxLabel,
|
|
54
|
-
});
|
|
55
|
-
return (h("div", { class: sheet.classes.FieldContainer, part: "sqm-base" },
|
|
56
|
-
h("style", { type: "text/css" },
|
|
57
|
-
vanillaStyle,
|
|
58
|
-
styleString),
|
|
59
|
-
h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, "onSl-change": (e) => {
|
|
60
|
-
e.target.value = e.target.checked;
|
|
61
|
-
} }, (!content.checkboxOptional
|
|
62
|
-
? { required: false }
|
|
63
|
-
: { required: true }), { disabled: ((_b = states.leadFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.leadFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.leadFormState) === null || _d === void 0 ? void 0 : _d.validationErrors) === null || _e === void 0 ? void 0 : _e[content.checkboxName]) ? {
|
|
64
|
-
class: sheet.classes.ErrorStyle,
|
|
65
|
-
}
|
|
66
|
-
: [])), intl.formatMessage({
|
|
67
|
-
id: content.checkboxName + "-message",
|
|
68
|
-
defaultMessage: content.checkboxLabel,
|
|
69
|
-
}, {
|
|
70
|
-
labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
71
|
-
})),
|
|
72
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName]) && (h("p", { class: sheet.classes.ErrorMessageStyle }, getRequiredFieldErrorMessage({
|
|
73
|
-
checkboxLabel: content.checkboxLabel,
|
|
74
|
-
})))));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { LeadCheckboxFieldView as L };
|