solace-ui-components 18.0.16 → 18.0.22
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/{chunk-266AAHHO.js → chunk-2CMPFNW2.js} +2 -2
- package/dist/{chunk-266AAHHO.js.map → chunk-2CMPFNW2.js.map} +1 -1
- package/dist/chunk-6BHLTTV3.modern.mjs +2 -0
- package/dist/chunk-6BHLTTV3.modern.mjs.map +1 -0
- package/dist/{chunk-LWCJ2SGT.modern.mjs → chunk-GHPNUEMK.modern.mjs} +2 -2
- package/dist/{chunk-LWCJ2SGT.modern.mjs.map → chunk-GHPNUEMK.modern.mjs.map} +1 -1
- package/dist/{chunk-IGOY34XU.js → chunk-IXGR5EW7.js} +2 -2
- package/dist/{chunk-IGOY34XU.js.map → chunk-IXGR5EW7.js.map} +1 -1
- package/dist/chunk-NT45IFR2.js +2 -0
- package/dist/chunk-NT45IFR2.js.map +1 -0
- package/dist/{chunk-NANSEALM.modern.mjs → chunk-OUM6OKBT.modern.mjs} +3 -3
- package/dist/{chunk-NANSEALM.modern.mjs.map → chunk-OUM6OKBT.modern.mjs.map} +1 -1
- package/dist/{chunk-AU2K45F2.js → chunk-X45FYPVF.js} +3 -3
- package/dist/{chunk-AU2K45F2.js.map → chunk-X45FYPVF.js.map} +1 -1
- package/dist/chunk-YJENEMV2.modern.mjs +2 -0
- package/dist/{chunk-IA5QZKDN.modern.mjs.map → chunk-YJENEMV2.modern.mjs.map} +1 -1
- package/dist/code-editor.js +2 -2
- package/dist/code-editor.modern.mjs +2 -2
- package/dist/code-editor.modern.mjs.map +1 -1
- package/dist/drag-drop.js +1 -1
- package/dist/drag-drop.modern.mjs +1 -1
- package/dist/drag-drop.modern.mjs.map +1 -1
- package/dist/index.d.mts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +53 -53
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +53 -53
- package/dist/index.modern.mjs.map +1 -1
- package/dist/json-schema-form.js +1 -1
- package/dist/json-schema-form.modern.mjs +1 -1
- package/package.json +5 -1
- package/src/resources/MRC_Autopilot/component-props.json +5914 -0
- package/src/resources/MRC_Autopilot/component-usage-guide.json +1276 -0
- package/dist/chunk-HHKIWPP5.js +0 -2
- package/dist/chunk-HHKIWPP5.js.map +0 -1
- package/dist/chunk-IA5QZKDN.modern.mjs +0 -2
- package/dist/chunk-Q6DR3MQK.modern.mjs +0 -2
- package/dist/chunk-Q6DR3MQK.modern.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkNT45IFR2_js=require('./chunk-NT45IFR2.js'),chunkKALFXZNR_js=require('./chunk-KALFXZNR.js'),jsxRuntime=require('react/jsx-runtime');var d,N=i=>{d=i;};function Z(){return jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z"})}function I(){return jsxRuntime.jsx("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",className:"SolaceOpenExternalIcon",children:jsxRuntime.jsx(Z,{})})}function A({id:i,variant:a="text","aria-label":C,"aria-labelledby":B,isDisabled:l=false,underline:V="hover",title:c="",href:n,component:H="button",type:g="button",startIcon:S,endIcon:R,onClick:$,dataQa:s,dataTags:p,children:x,dense:w=false,openLinkInNewTab:E=!!n,eventName:O,disabledFocusState:T=false}){let m=t=>{$&&$(t),d&&d({title:c,variant:a,id:i,href:n,dataQa:s,dataTags:p,eventName:O});},e=chunkKALFXZNR_js.ua();if(a==="icon"){let t=T?{}:{"&.MuiIconButton-root.Mui-focusVisible":{outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"1px",borderRadius:"3px"}};return jsxRuntime.jsx(chunkNT45IFR2_js.b,{title:c,children:jsxRuntime.jsx(chunkKALFXZNR_js.Gb,{"aria-label":C,"aria-labelledby":B,"data-qa":s,"data-tags":p,type:g,id:i,disabled:l,onClick:m,size:"large",href:n,component:n?"a":"button",sx:t,children:x})})}else if(a==="link"){let t;return !n&&!w?t={padding:`${e.spacing(6/8)} ${e.spacing(16/8)}`,borderRadius:e.spacing(4/8),minWidth:"100px",height:e.spacing(32/8),"&.Mui-focusVisible":{borderRadius:0,outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"-1px"}}:t={padding:"0",display:"inline-flex",alignItems:"center",verticalAlign:"inherit","&.Mui-focusVisible":{outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"1px"}},jsxRuntime.jsx(chunkNT45IFR2_js.b,{title:c,children:jsxRuntime.jsxs(chunkKALFXZNR_js.Re,{id:i,"data-qa":s,"data-tags":p,component:n?"a":"button",target:E?"_blank":"_self",href:n,type:g,disabled:l,underline:l?"none":V??"hover",sx:t,onClick:m,children:[jsxRuntime.jsx(chunkKALFXZNR_js.li,{sx:{marginRight:n?e.spacing(4/8):0},component:"span",children:x}),n&&E&&jsxRuntime.jsx(I,{})]})})}else {let t;(b=>(b.contained="contained",b.outlined="outlined",b.text="text"))(t||(t={}));let P={"call-to-action":"contained",outline:"outlined",text:"text"},r;return S?r=`${e.spacing(4/8)} ${e.spacing(16/8)} ${e.spacing(4/8)} ${e.spacing(6/8)}`:R?r=`${e.spacing(4/8)} ${e.spacing(6/8)} ${e.spacing(4/8)} ${e.spacing(16/8)}`:r=`${e.spacing(6/8)} ${e.spacing(16/8)}`,jsxRuntime.jsx(chunkNT45IFR2_js.b,{title:c,children:jsxRuntime.jsx(chunkKALFXZNR_js.Qc,{id:i,"data-qa":s,"data-tags":p,startIcon:S,endIcon:R,component:H,type:g,disabled:l,variant:P[a],onClick:m,sx:{padding:r},children:jsxRuntime.jsx("div",{style:{width:"100%",textAlign:"center"},children:x})})})}}var K=A;exports.a=N;exports.b=K;//# sourceMappingURL=chunk-2CMPFNW2.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-2CMPFNW2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resources/trackingapi.ts","../src/resources/icons/OpenExternalIcon.tsx","../src/components/form/SolaceButton.tsx"],"names":["dataCollectionApi","initializeDataTrackingApi","api","Container","jsx","OpenExternalIcon","SolaceButton","id","variant","ariaLabel","ariaLabelledby","isDisabled","underline","title","href","component","type","startIcon","endIcon","onClick","dataQa","dataTags","children","dense","openLinkInNewTab","eventName","disabledFocusState","handleClick","event","theme","useTheme","focusStyles","SolaceToolTip_default","IconButton_default","styles","jsxs","Link_default","Box_default","MATERIAL_VARIANTS","BUTTON_VARIANT_MAP","padding","Button_default","SolaceButton_default"],"mappings":"yJAgBA,IAAIA,CAAAA,CAMSC,CAAAA,CAA6BC,CAAAA,EAA0E,CAInHF,CAAAA,CAAoBE,EACrB,ECTA,SAASC,CAAAA,EAAY,CACpB,OACCC,cAAAA,CAAC,MAAA,CAAA,CACA,QAAA,CAAS,SAAA,CACT,QAAA,CAAS,SAAA,CACT,CAAA,CAAE,kUAAA,CACH,CAEF,CAEO,SAASC,CAAAA,EAAmB,CAClC,OACCD,cAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,MAAA,CAAa,MAAA,CAAQ,MAAA,CAAa,OAAA,CAAS,WAAA,CAAuB,SAAA,CAAU,wBAAA,CACvF,QAAA,CAAAA,cAAAA,CAACD,CAAAA,CAAA,EAAU,CAAA,CACZ,CAEF,CCYA,SAASG,CAAAA,CAAa,CACrB,EAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,MAAA,CACV,YAAA,CAAcC,CAAAA,CACd,iBAAA,CAAmBC,EACnB,UAA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AAmB/B,CAAO,CAAA,CACnC,OAAA,CAASmB,CAAAA,CACT,EAAA,CAAI,CAAE,OAAA,CAASa,CAAQ,CAAA,CAEvB,QAAA,CAAApC,cAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,CAAE,KAAA,CAAO,MAAA,CAAQ,SAAA,CAAW,QAAS,CAAA,CAAI,QAAA,CAAAkB,CAAAA,CAAS,CAAA,CAC/D,CAAA,CACD,CAEF,CACD,CAEA,IAAOoB,CAAAA,CAAQpC","file":"chunk-266AAHHO.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataCollectionApi: React.Dispatch<\n\tReact.SetStateAction<{\n\t\t[key: string]: unknown;\n\t}>\n>;\n\nexport const initializeDataTrackingApi = (api: React.Dispatch<React.SetStateAction<{ [key: string]: unknown }>>) => {\n\t// Initialize the data tracking API here\n\t// For example, you can assign an instance of the API to the `dataCollectionApi` variable\n\n\tdataCollectionApi = api;\n};\n\n// Export the dataCollectionApi variable so that it can be used by other components\nexport { dataCollectionApi };\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst SIZE = 16;\n\nfunction Container() {\n\treturn (\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z\"\n\t\t/>\n\t);\n}\n\nexport function OpenExternalIcon() {\n\treturn (\n\t\t<svg width={`${SIZE}px`} height={`${SIZE}px`} viewBox={`0 0 ${SIZE} ${SIZE}`} className=\"SolaceOpenExternalIcon\">\n\t\t\t<Container></Container>\n\t\t</svg>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button, IconButton, Link, SxProps, Theme, useTheme } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport { OpenExternalIcon } from \"../../resources/icons/OpenExternalIcon\";\nimport SolaceTooltip from \"../SolaceToolTip\";\n\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { dataCollectionApi } from \"../../resources/trackingapi\";\n\nexport interface SolaceButtonProps extends SolaceComponentProps {\n\tid?: string;\n\tvariant: \"call-to-action\" | \"outline\" | \"text\" | \"icon\" | \"link\";\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tisDisabled?: boolean;\n\tunderline?: \"none\" | \"hover\" | \"always\";\n\ttitle?: string;\n\thref?: string;\n\tcomponent?: \"button\" | \"span\";\n\ttype?: \"button\" | \"submit\" | \"reset\";\n\tstartIcon?: React.ReactElement | symbol | null;\n\tendIcon?: React.ReactElement | symbol | null;\n\tonClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n\tchildren?: string | JSX.Element;\n\tdense?: boolean; // only applicable to link variant\n\topenLinkInNewTab?: boolean;\n\tdisabledFocusState?: boolean;\n}\n\n// Todo: Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed\n// eslint-disable-next-line sonarjs/cognitive-complexity\nfunction SolaceButton({\n\tid,\n\tvariant = \"text\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tisDisabled = false,\n\tunderline = \"hover\",\n\ttitle = \"\",\n\thref,\n\tcomponent = \"button\",\n\ttype = \"button\",\n\tstartIcon,\n\tendIcon,\n\tonClick,\n\tdataQa,\n\tdataTags,\n\tchildren,\n\tdense = false,\n\topenLinkInNewTab = href ? true : false,\n\teventName,\n\tdisabledFocusState = false\n}: SolaceButtonProps): JSX.Element {\n\tconst handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n\t\tif (onClick) {\n\t\t\tonClick(event);\n\t\t}\n\t\tdataCollectionApi && dataCollectionApi({ title, variant, id, href, dataQa, dataTags, eventName });\n\t};\n\tconst theme = useTheme();\n\n\tif (variant === \"icon\") {\n\t\tconst focusStyles: SxProps<Theme> = disabledFocusState\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"&.MuiIconButton-root.Mui-focusVisible\": {\n\t\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\t\toutlineOffset: \"1px\",\n\t\t\t\t\t\tborderRadius: \"3px\"\n\t\t\t\t\t}\n\t\t\t };\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<IconButton\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\thref={href}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\tsx={focusStyles}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</IconButton>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else if (variant === \"link\") {\n\t\tlet styles;\n\t\tif (!href && !dense) {\n\t\t\tstyles = {\n\t\t\t\tpadding: `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`,\n\t\t\t\tborderRadius: theme.spacing(4 / 8),\n\t\t\t\tminWidth: \"100px\",\n\t\t\t\theight: theme.spacing(32 / 8),\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"-1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\tstyles = {\n\t\t\t\tpadding: \"0\",\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tverticalAlign: \"inherit\",\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Link\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\ttarget={openLinkInNewTab ? \"_blank\" : \"_self\"}\n\t\t\t\t\thref={href}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tunderline={isDisabled ? \"none\" : underline ?? \"hover\"}\n\t\t\t\t\tsx={styles}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t>\n\t\t\t\t\t<Box sx={{ marginRight: href ? theme.spacing(4 / 8) : 0 }} component=\"span\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t\t{href && openLinkInNewTab && <OpenExternalIcon></OpenExternalIcon>}\n\t\t\t\t</Link>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else {\n\t\tenum MATERIAL_VARIANTS {\n\t\t\tcontained = \"contained\",\n\t\t\toutlined = \"outlined\",\n\t\t\ttext = \"text\"\n\t\t}\n\n\t\tconst BUTTON_VARIANT_MAP = {\n\t\t\t\"call-to-action\": MATERIAL_VARIANTS.contained,\n\t\t\toutline: MATERIAL_VARIANTS.outlined,\n\t\t\ttext: MATERIAL_VARIANTS.text\n\t\t};\n\n\t\tlet padding;\n\t\tif (startIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)}`;\n\t\t} else if (endIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t} else {\n\t\t\tpadding = `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t}\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Button\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tstartIcon={startIcon as React.ReactNode}\n\t\t\t\t\tendIcon={endIcon as React.ReactNode}\n\t\t\t\t\tcomponent={component}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tvariant={BUTTON_VARIANT_MAP[variant]}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsx={{ padding: padding }}\n\t\t\t\t>\n\t\t\t\t\t<div style={{ width: \"100%\", textAlign: \"center\" }}>{children}</div>\n\t\t\t\t</Button>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t}\n}\n\nexport default SolaceButton;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/resources/trackingapi.ts","../src/resources/icons/OpenExternalIcon.tsx","../src/components/form/SolaceButton.tsx"],"names":["dataCollectionApi","initializeDataTrackingApi","api","Container","jsx","OpenExternalIcon","SolaceButton","id","variant","ariaLabel","ariaLabelledby","isDisabled","underline","title","href","component","type","startIcon","endIcon","onClick","dataQa","dataTags","children","dense","openLinkInNewTab","eventName","disabledFocusState","handleClick","event","theme","useTheme","focusStyles","SolaceToolTip_default","IconButton_default","styles","jsxs","Link_default","Box_default","MATERIAL_VARIANTS","BUTTON_VARIANT_MAP","padding","Button_default","SolaceButton_default"],"mappings":"yJAgBA,IAAIA,CAAAA,CAMSC,CAAAA,CAA6BC,CAAAA,EAA0E,CAInHF,CAAAA,CAAoBE,EACrB,ECTA,SAASC,CAAAA,EAAY,CACpB,OACCC,cAAAA,CAAC,MAAA,CAAA,CACA,QAAA,CAAS,SAAA,CACT,QAAA,CAAS,SAAA,CACT,CAAA,CAAE,kUAAA,CACH,CAEF,CAEO,SAASC,CAAAA,EAAmB,CAClC,OACCD,cAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,MAAA,CAAa,MAAA,CAAQ,MAAA,CAAa,OAAA,CAAS,WAAA,CAAuB,SAAA,CAAU,wBAAA,CACvF,QAAA,CAAAA,cAAAA,CAACD,CAAAA,CAAA,EAAU,CAAA,CACZ,CAEF,CCYA,SAASG,CAAAA,CAAa,CACrB,EAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,MAAA,CACV,YAAA,CAAcC,CAAAA,CACd,iBAAA,CAAmBC,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,CAAAA,CAAmB/B,CAAO,CAAA,CACnC,OAAA,CAASmB,CAAAA,CACT,EAAA,CAAI,CAAE,OAAA,CAASa,CAAQ,CAAA,CAEvB,QAAA,CAAApC,cAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,CAAE,KAAA,CAAO,MAAA,CAAQ,SAAA,CAAW,QAAS,CAAA,CAAI,QAAA,CAAAkB,CAAAA,CAAS,CAAA,CAC/D,CAAA,CACD,CAEF,CACD,CAEA,IAAOoB,CAAAA,CAAQpC","file":"chunk-2CMPFNW2.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataCollectionApi: React.Dispatch<\n\tReact.SetStateAction<{\n\t\t[key: string]: unknown;\n\t}>\n>;\n\nexport const initializeDataTrackingApi = (api: React.Dispatch<React.SetStateAction<{ [key: string]: unknown }>>) => {\n\t// Initialize the data tracking API here\n\t// For example, you can assign an instance of the API to the `dataCollectionApi` variable\n\n\tdataCollectionApi = api;\n};\n\n// Export the dataCollectionApi variable so that it can be used by other components\nexport { dataCollectionApi };\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst SIZE = 16;\n\nfunction Container() {\n\treturn (\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z\"\n\t\t/>\n\t);\n}\n\nexport function OpenExternalIcon() {\n\treturn (\n\t\t<svg width={`${SIZE}px`} height={`${SIZE}px`} viewBox={`0 0 ${SIZE} ${SIZE}`} className=\"SolaceOpenExternalIcon\">\n\t\t\t<Container></Container>\n\t\t</svg>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button, IconButton, Link, SxProps, Theme, useTheme } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport { OpenExternalIcon } from \"../../resources/icons/OpenExternalIcon\";\nimport SolaceTooltip from \"../SolaceToolTip\";\n\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { dataCollectionApi } from \"../../resources/trackingapi\";\n\nexport interface SolaceButtonProps extends SolaceComponentProps {\n\tid?: string;\n\tvariant: \"call-to-action\" | \"outline\" | \"text\" | \"icon\" | \"link\";\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tisDisabled?: boolean;\n\tunderline?: \"none\" | \"hover\" | \"always\";\n\ttitle?: string;\n\thref?: string;\n\tcomponent?: \"button\" | \"span\";\n\ttype?: \"button\" | \"submit\" | \"reset\";\n\tstartIcon?: React.ReactElement | symbol | null;\n\tendIcon?: React.ReactElement | symbol | null;\n\tonClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n\tchildren?: string | JSX.Element;\n\tdense?: boolean; // only applicable to link variant\n\topenLinkInNewTab?: boolean;\n\tdisabledFocusState?: boolean;\n}\n\n// Todo: Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed\n// eslint-disable-next-line sonarjs/cognitive-complexity\nfunction SolaceButton({\n\tid,\n\tvariant = \"text\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tisDisabled = false,\n\tunderline = \"hover\",\n\ttitle = \"\",\n\thref,\n\tcomponent = \"button\",\n\ttype = \"button\",\n\tstartIcon,\n\tendIcon,\n\tonClick,\n\tdataQa,\n\tdataTags,\n\tchildren,\n\tdense = false,\n\topenLinkInNewTab = href ? true : false,\n\teventName,\n\tdisabledFocusState = false\n}: SolaceButtonProps): JSX.Element {\n\tconst handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n\t\tif (onClick) {\n\t\t\tonClick(event);\n\t\t}\n\t\tdataCollectionApi && dataCollectionApi({ title, variant, id, href, dataQa, dataTags, eventName });\n\t};\n\tconst theme = useTheme();\n\n\tif (variant === \"icon\") {\n\t\tconst focusStyles: SxProps<Theme> = disabledFocusState\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"&.MuiIconButton-root.Mui-focusVisible\": {\n\t\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\t\toutlineOffset: \"1px\",\n\t\t\t\t\t\tborderRadius: \"3px\"\n\t\t\t\t\t}\n\t\t\t };\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<IconButton\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\thref={href}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\tsx={focusStyles}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</IconButton>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else if (variant === \"link\") {\n\t\tlet styles;\n\t\tif (!href && !dense) {\n\t\t\tstyles = {\n\t\t\t\tpadding: `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`,\n\t\t\t\tborderRadius: theme.spacing(4 / 8),\n\t\t\t\tminWidth: \"100px\",\n\t\t\t\theight: theme.spacing(32 / 8),\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"-1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\tstyles = {\n\t\t\t\tpadding: \"0\",\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tverticalAlign: \"inherit\",\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Link\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\ttarget={openLinkInNewTab ? \"_blank\" : \"_self\"}\n\t\t\t\t\thref={href}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tunderline={isDisabled ? \"none\" : underline ?? \"hover\"}\n\t\t\t\t\tsx={styles}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t>\n\t\t\t\t\t<Box sx={{ marginRight: href ? theme.spacing(4 / 8) : 0 }} component=\"span\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t\t{href && openLinkInNewTab && <OpenExternalIcon></OpenExternalIcon>}\n\t\t\t\t</Link>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else {\n\t\tenum MATERIAL_VARIANTS {\n\t\t\tcontained = \"contained\",\n\t\t\toutlined = \"outlined\",\n\t\t\ttext = \"text\"\n\t\t}\n\n\t\tconst BUTTON_VARIANT_MAP = {\n\t\t\t\"call-to-action\": MATERIAL_VARIANTS.contained,\n\t\t\toutline: MATERIAL_VARIANTS.outlined,\n\t\t\ttext: MATERIAL_VARIANTS.text\n\t\t};\n\n\t\tlet padding;\n\t\tif (startIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)}`;\n\t\t} else if (endIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t} else {\n\t\t\tpadding = `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t}\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Button\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tstartIcon={startIcon as React.ReactNode}\n\t\t\t\t\tendIcon={endIcon as React.ReactNode}\n\t\t\t\t\tcomponent={component}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tvariant={BUTTON_VARIANT_MAP[variant]}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsx={{ padding: padding }}\n\t\t\t\t>\n\t\t\t\t\t<div style={{ width: \"100%\", textAlign: \"center\" }}>{children}</div>\n\t\t\t\t</Button>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t}\n}\n\nexport default SolaceButton;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {wa,li,le,Bg,uc,ua,ni,Na}from'./chunk-PWYVYHTJ.modern.mjs';import {useState,useRef,useCallback}from'react';import {isEmpty}from'lodash';import {jsx,jsxs}from'react/jsx-runtime';import {Error16Icon}from'@SolaceDev/maas-icons';var R="text",z="overflow",M="rich",Z="html",m={text:R,overflow:z,rich:M,html:Z};var k=wa("div")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",position:"relative","&::after":{content:'""',display:"block"}}));function A({id:e,title:t,variant:o=m.text,children:l,placement:w="bottom",maxWidth:C="small",disableFocusListener:L=false,disableHoverListener:W=false,enterDelay:I=500,enterNextDelay:H=0,leaveDelay:V=0,open:X,onOpen:f,onClose:c,dataQa:_,dataTags:D}){let[F,T]=useState(false),p=useRef(null),J=useCallback(x=>{if(isEmpty(t))return;let h=true;o==="overflow"&&p.current&&p.current.scrollWidth<=p.current.clientWidth&&(h=false),h&&(T(true),f&&f(x));},[f,t,o]),O=useCallback(x=>{T(false),c&&c(x);},[c]);return jsx(Bg,{id:e,title:t??"",classes:{tooltip:`${o===m.html||o===m.rich?"htmlContent":""} ${C?C+"Width":""}`},placement:w,"data-qa":_,"data-tags":D,disableFocusListener:L,disableHoverListener:W,enterDelay:I,enterNextDelay:H,leaveDelay:V,TransitionComponent:uc,TransitionProps:{timeout:{enter:150,exit:200}},open:X??F,onOpen:J,onClose:O,children:o==="overflow"?jsx(k,{ref:p,children:l}):typeof l=="string"?jsx("span",{children:l}):l})}var ce=A;function q({children:e}){let t=ua();return jsx(le,{sx:{color:t.palette.ux.secondary.text.wMain,fontSize:t.typography.caption.fontSize,marginTop:"2px"},children:e})}var Ce=q;var Q=wa(li)(({theme:e})=>({...e.mixins.formComponent_ErrorText.container})),U=wa(le)(({theme:e})=>({...e.mixins.formComponent_ErrorText.label}));function Y({children:e}){let t=ua(),o=t.typography.subtitle1.fontSize?.toString();return jsxs(Q,{children:[jsx(Error16Icon,{sx:{fontSize:o?parseInt(o):ni.md},fill:t.palette.ux.error.wMain}),jsx(U,{children:e})]})}var ye=Y;function b({size:e,fill:t}){return jsxs(Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsx("path",{d:"M11.8746 14.996C11.9493 15.0706 12.04 15.108 12.1466 15.108H13.4426C13.56 15.108 13.6506 15.0706 13.7146 14.996C13.7893 14.9213 13.8266 14.8306 13.8266 14.724V10.396C13.8266 10.2786 13.7893 10.188 13.7146 10.124C13.6506 10.0493 13.56 10.012 13.4426 10.012H12.1466C12.04 10.012 11.9493 10.0493 11.8746 10.124C11.8 10.1986 11.7626 10.2893 11.7626 10.396V14.724C11.7626 14.8306 11.8 14.9213 11.8746 14.996Z",fill:t}),jsx("path",{d:"M11.7786 18.1C11.8533 18.1746 11.944 18.212 12.0506 18.212H13.5386C13.656 18.212 13.752 18.1746 13.8266 18.1C13.9013 18.0253 13.9386 17.9346 13.9386 17.828V16.34C13.9386 16.2226 13.9013 16.1266 13.8266 16.052C13.752 15.9773 13.656 15.94 13.5386 15.94H12.0506C11.944 15.94 11.8533 15.9773 11.7786 16.052C11.704 16.1266 11.6666 16.2226 11.6666 16.34V17.828C11.6666 17.9346 11.704 18.0253 11.7786 18.1Z",fill:t}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7919 3.79001C12.1726 3.10304 13.1604 3.10304 13.5411 3.79001L22.2358 19.4772C22.6053 20.1437 22.1233 20.962 21.3612 20.962H3.97177C3.20973 20.962 2.72771 20.1437 3.09713 19.4772L11.7919 3.79001ZM5.66936 18.962L12.6665 6.3376L19.6636 18.962H5.66936Z",fill:t})]})}var te=wa(li)(({theme:e})=>({...e.mixins.formComponent_WarningText.container})),oe=wa(le)(({theme:e})=>({...e.mixins.formComponent_WarningText.label}));function re({children:e}){let t=ua(),o=t.typography.subtitle1.fontSize?.toString();return jsxs(te,{children:[jsx(b,{size:o?parseInt(o):ni.md,fill:t.palette.ux.warning.w100}),jsx(oe,{children:e})]})}var _e=re;export{m as a,ce as b,Ce as c,ye as d,b as e,_e as f};//# sourceMappingURL=chunk-6BHLTTV3.modern.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-6BHLTTV3.modern.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/solaceTooltip.ts","../src/components/SolaceToolTip.tsx","../src/components/form/HelperText.tsx","../src/components/form/ErrorText.tsx","../src/resources/icons/WarnIcon.tsx","../src/components/form/WarningText.tsx"],"names":["text","overflow","rich","html","TooltipVariant","OverflowDiv","styled_default","SolaceTooltip","id","title","variant","children","placement","maxWidth","disableFocusListener","disableHoverListener","enterDelay","enterNextDelay","leaveDelay","open","onOpen","onClose","dataQa","dataTags","internalOpen","setInternalOpen","useState","textElementRef","useRef","handleOpen","useCallback","event","isEmpty","shouldOpen","handleClose","jsx","Tooltip_default","Fade_default","SolaceToolTip_default","HelperText","theme","useTheme","FormLabel_default","HelperText_default","ErrorTextContainer","Box_default","ErrorTextLabel","ErrorText","size","jsxs","Error16Icon","BASE_FONT_PX_SIZES","ErrorText_default","WarnIcon","fill","SvgIcon_default","WarningTextContainer","WarningTextLabel","WarningText","WarningText_default"],"mappings":"wOAgBA,IAAMA,CAAAA,CAAO,MAAA,CACPC,CAAAA,CAAW,UAAA,CACXC,CAAAA,CAAO,MAAA,CAEPC,CAAAA,CAAO,MAAA,CAEAC,CAAAA,CAAiB,CAC7B,IAAA,CAAMJ,CAAAA,CACN,SAAUC,CAAAA,CACV,IAAA,CAAMC,CAAAA,CAEN,IAAA,CAAMC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C,CACjE,IAAM6B,CAAAA,CAAQC,EAAAA,EAAS,CACjBO,CAAAA,CAAOR,CAAAA,CAAM,WAAW,SAAA,CAAU,QAAA,EAAU,QAAA,EAAS,CAC3D,OACCS,IAAAA,CAACO,EAAAA,CAAA,CACA,QAAA,CAAA,CAAArB,GAAAA,CAACkB,CAAAA,CAAA,CAAS,IAAA,CAAML,CAAAA,CAAO,QAAA,CAASA,CAAI,EAAIG,EAAAA,CAAmB,EAAA,CAAI,IAAA,CAAMX,CAAAA,CAAM,OAAA,CAAQ,EAAA,CAAG,OAAA,CAAQ,IAAA,CAAM,EACpGL,GAAAA,CAACsB,EAAAA,CAAA,CAAkB,QAAA,CAAA9C,CAAAA,CAAS,CAAA,CAAA,CAC7B,CAEF,KAEOgD,EAAAA,CAAQD","file":"chunk-6BHLTTV3.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst text = \"text\";\nconst overflow = \"overflow\";\nconst rich = \"rich\";\n/** @deprecated - as of Nov 12, 2024 the 'html variant is being deprecated in favour of using the rich variant**/\nconst html = \"html\";\n\nexport const TooltipVariant = {\n\ttext: text,\n\toverflow: overflow,\n\trich: rich,\n\t/** @deprecated [Nov 2024] the \"html\" variant for SolaceTooltip has been deprecated, please use rich variant instead */\n\thtml: html\n};\n\nexport type TooltipVariantTypes = (typeof TooltipVariant)[keyof typeof TooltipVariant];\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { styled, Tooltip } from \"@mui/material\";\nimport { Fade } from \"@mui/material\";\nimport SolaceComponentProps from \"./SolaceComponentProps\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { isEmpty } from \"lodash\";\nimport { TooltipVariant, TooltipVariantTypes } from \"../types/solaceTooltip\";\n\nexport interface SolaceTooltipProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, a randomly generated value will be used in order to make it accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Tooltip title\n\t */\n\ttitle?: string | JSX.Element;\n\t/**\n\t * Different type of tooltip, default to `text`\n\t */\n\tvariant?: TooltipVariantTypes;\n\t/**\n\t * Tooltip referenced element.\n\t */\n\tchildren: string | JSX.Element;\n\t/**\n\t * Tooltip placement, default to `bottom`\n\t */\n\tplacement?:\n\t\t| \"bottom-end\"\n\t\t| \"bottom-start\"\n\t\t| \"bottom\"\n\t\t| \"left-end\"\n\t\t| \"left-start\"\n\t\t| \"left\"\n\t\t| \"right-end\"\n\t\t| \"right-start\"\n\t\t| \"right\"\n\t\t| \"top-end\"\n\t\t| \"top-start\"\n\t\t| \"top\";\n\t/**\n\t * Tooltip maximum width, default to small\n\t */\n\tmaxWidth?: \"small\" | \"medium\" | \"full\";\n\t/**\n\t * Disable listener to show tooltip when referenced element is focused, default to false\n\t */\n\tdisableFocusListener?: boolean;\n\t/**\n\t * Disable listener to show tooltip when referenced element is hovered, default to false\n\t */\n\tdisableHoverListener?: boolean;\n\t/**\n\t * The number of milliseconds to wait before showing the tooltip. Default is 500ms\n\t */\n\tenterDelay?: number;\n\t/**\n\t * The number of milliseconds to wait before showing the tooltip when one was already recently opened. Default is 0ms\n\t */\n\tenterNextDelay?: number;\n\t/**\n\t * The number of milliseconds to wait before hiding the tooltip. Default is 0ms\n\t */\n\tleaveDelay?: number;\n\t/**\n\t * Controlled open state for tooltip. If `true`, the component is shown\n\t */\n\topen?: boolean;\n\t/**\n\t * Callback fired when the component requests to be open. Used in conjunction with `open` and `onClose`\n\t */\n\tonOpen?: (event: React.SyntheticEvent) => void;\n\t/**\n\t * Callback fired when the component requests to be closed. Used in conjunction with `open` and `onOpen`\n\t */\n\tonClose?: (event: Event | React.SyntheticEvent<Element, Event>) => void;\n}\n\nconst OverflowDiv = styled(\"div\")(() => ({\n\twhiteSpace: \"nowrap\",\n\toverflow: \"hidden\",\n\ttextOverflow: \"ellipsis\",\n\tposition: \"relative\",\n\t// adding this empty block to prevent showing tooltip twice on Safari\n\t\"&::after\": {\n\t\tcontent: '\"\"',\n\t\tdisplay: \"block\"\n\t}\n}));\n\nfunction SolaceTooltip({\n\tid,\n\ttitle,\n\tvariant = TooltipVariant.text,\n\tchildren,\n\tplacement = \"bottom\",\n\tmaxWidth = \"small\",\n\tdisableFocusListener = false,\n\tdisableHoverListener = false,\n\tenterDelay = 500,\n\tenterNextDelay = 0,\n\tleaveDelay = 0,\n\topen,\n\tonOpen,\n\tonClose,\n\tdataQa,\n\tdataTags\n}: SolaceTooltipProps) {\n\tconst [internalOpen, setInternalOpen] = useState(false);\n\tconst textElementRef = useRef<HTMLDivElement>(null);\n\n\tconst handleOpen = useCallback(\n\t\t(event: React.SyntheticEvent) => {\n\t\t\t// if empty, don't open the tooltip.\n\t\t\tif (isEmpty(title)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet shouldOpen = true;\n\t\t\tif (\n\t\t\t\tvariant === \"overflow\" &&\n\t\t\t\ttextElementRef.current &&\n\t\t\t\ttextElementRef.current.scrollWidth <= textElementRef.current.clientWidth\n\t\t\t) {\n\t\t\t\tshouldOpen = false;\n\t\t\t}\n\t\t\tif (shouldOpen) {\n\t\t\t\tsetInternalOpen(true);\n\t\t\t\tif (onOpen) {\n\t\t\t\t\tonOpen(event);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[onOpen, title, variant]\n\t);\n\n\tconst handleClose = useCallback(\n\t\t(event: Event | React.SyntheticEvent<Element, Event>) => {\n\t\t\tsetInternalOpen(false);\n\t\t\tif (onClose) {\n\t\t\t\tonClose(event);\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\treturn (\n\t\t<Tooltip\n\t\t\tid={id}\n\t\t\ttitle={title ?? \"\"}\n\t\t\tclasses={{\n\t\t\t\ttooltip: `${variant === TooltipVariant.html || variant === TooltipVariant.rich ? \"htmlContent\" : \"\"} ${\n\t\t\t\t\tmaxWidth ? maxWidth + \"Width\" : \"\"\n\t\t\t\t}`\n\t\t\t}}\n\t\t\tplacement={placement}\n\t\t\tdata-qa={dataQa}\n\t\t\tdata-tags={dataTags}\n\t\t\tdisableFocusListener={disableFocusListener}\n\t\t\tdisableHoverListener={disableHoverListener}\n\t\t\tenterDelay={enterDelay}\n\t\t\tenterNextDelay={enterNextDelay}\n\t\t\tleaveDelay={leaveDelay}\n\t\t\tTransitionComponent={Fade}\n\t\t\tTransitionProps={{ timeout: { enter: 150, exit: 200 } }}\n\t\t\topen={open ?? internalOpen}\n\t\t\tonOpen={handleOpen}\n\t\t\tonClose={handleClose}\n\t\t>\n\t\t\t{variant === \"overflow\" ? (\n\t\t\t\t<OverflowDiv ref={textElementRef}>{children}</OverflowDiv>\n\t\t\t) : typeof children === \"string\" ? (\n\t\t\t\t<span>{children}</span>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</Tooltip>\n\t);\n}\n\nexport default SolaceTooltip;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\n\nexport interface HelperTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction HelperText({ children }: HelperTextProps): JSX.Element {\n\tconst theme = useTheme();\n\treturn (\n\t\t<FormLabel\n\t\t\tsx={{\n\t\t\t\tcolor: theme.palette.ux.secondary.text.wMain,\n\t\t\t\tfontSize: theme.typography.caption.fontSize,\n\t\t\t\tmarginTop: \"2px\"\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default HelperText;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme, styled } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { Error16Icon } from \"@SolaceDev/maas-icons\";\nimport { BASE_FONT_PX_SIZES } from \"../../resources/typography\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nconst ErrorTextContainer = styled(Box)(({ theme }) => ({\n\t...(theme.mixins.formComponent_ErrorText.container as CSSProperties)\n}));\n\nconst ErrorTextLabel = styled(FormLabel)(({ theme }) => ({\n\t...(theme.mixins.formComponent_ErrorText.label as CSSProperties)\n}));\n\nexport interface ErrorTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction ErrorText({ children }: ErrorTextProps): JSX.Element {\n\tconst theme = useTheme();\n\tconst size = theme.typography.subtitle1.fontSize?.toString();\n\treturn (\n\t\t<ErrorTextContainer>\n\t\t\t<Error16Icon\n\t\t\t\tsx={{ fontSize: size ? parseInt(size) : BASE_FONT_PX_SIZES.md }}\n\t\t\t\tfill={theme.palette.ux.error.wMain}\n\t\t\t/>\n\t\t\t<ErrorTextLabel>{children}</ErrorTextLabel>\n\t\t</ErrorTextContainer>\n\t);\n}\n\nexport default ErrorText;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IconProps } from \"./IconProps\";\nimport { SvgIcon } from \"@mui/material\";\n\nexport function WarnIcon({ size, fill }: IconProps): JSX.Element {\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<path\n\t\t\t\td=\"M11.8746 14.996C11.9493 15.0706 12.04 15.108 12.1466 15.108H13.4426C13.56 15.108 13.6506 15.0706 13.7146 14.996C13.7893 14.9213 13.8266 14.8306 13.8266 14.724V10.396C13.8266 10.2786 13.7893 10.188 13.7146 10.124C13.6506 10.0493 13.56 10.012 13.4426 10.012H12.1466C12.04 10.012 11.9493 10.0493 11.8746 10.124C11.8 10.1986 11.7626 10.2893 11.7626 10.396V14.724C11.7626 14.8306 11.8 14.9213 11.8746 14.996Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M11.7786 18.1C11.8533 18.1746 11.944 18.212 12.0506 18.212H13.5386C13.656 18.212 13.752 18.1746 13.8266 18.1C13.9013 18.0253 13.9386 17.9346 13.9386 17.828V16.34C13.9386 16.2226 13.9013 16.1266 13.8266 16.052C13.752 15.9773 13.656 15.94 13.5386 15.94H12.0506C11.944 15.94 11.8533 15.9773 11.7786 16.052C11.704 16.1266 11.6666 16.2226 11.6666 16.34V17.828C11.6666 17.9346 11.704 18.0253 11.7786 18.1Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M11.7919 3.79001C12.1726 3.10304 13.1604 3.10304 13.5411 3.79001L22.2358 19.4772C22.6053 20.1437 22.1233 20.962 21.3612 20.962H3.97177C3.20973 20.962 2.72771 20.1437 3.09713 19.4772L11.7919 3.79001ZM5.66936 18.962L12.6665 6.3376L19.6636 18.962H5.66936Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t</SvgIcon>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme, styled } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { WarnIcon } from \"../../resources/icons/WarnIcon\";\nimport { BASE_FONT_PX_SIZES } from \"../../resources/typography\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nconst WarningTextContainer = styled(Box)(({ theme }) => ({\n\t...(theme.mixins.formComponent_WarningText.container as CSSProperties)\n}));\n\nconst WarningTextLabel = styled(FormLabel)(({ theme }) => ({\n\t...(theme.mixins.formComponent_WarningText.label as CSSProperties)\n}));\n\nexport interface WarningTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction WarningText({ children }: WarningTextProps): JSX.Element {\n\tconst theme = useTheme();\n\tconst size = theme.typography.subtitle1.fontSize?.toString();\n\treturn (\n\t\t<WarningTextContainer>\n\t\t\t<WarnIcon size={size ? parseInt(size) : BASE_FONT_PX_SIZES.md} fill={theme.palette.ux.warning.w100}></WarnIcon>\n\t\t\t<WarningTextLabel>{children}</WarningTextLabel>\n\t\t</WarningTextContainer>\n\t);\n}\n\nexport default WarningText;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {b}from'./chunk-6BHLTTV3.modern.mjs';import {ua,Gb,Re,li,Qc}from'./chunk-PWYVYHTJ.modern.mjs';import {jsx,jsxs}from'react/jsx-runtime';var d,N=i=>{d=i;};function Z(){return jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z"})}function I(){return jsx("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",className:"SolaceOpenExternalIcon",children:jsx(Z,{})})}function A({id:i,variant:a="text","aria-label":C,"aria-labelledby":B,isDisabled:l=false,underline:V="hover",title:c="",href:n,component:H="button",type:g="button",startIcon:S,endIcon:R,onClick:$,dataQa:s,dataTags:p,children:x,dense:w=false,openLinkInNewTab:E=!!n,eventName:O,disabledFocusState:T=false}){let m=t=>{$&&$(t),d&&d({title:c,variant:a,id:i,href:n,dataQa:s,dataTags:p,eventName:O});},e=ua();if(a==="icon"){let t=T?{}:{"&.MuiIconButton-root.Mui-focusVisible":{outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"1px",borderRadius:"3px"}};return jsx(b,{title:c,children:jsx(Gb,{"aria-label":C,"aria-labelledby":B,"data-qa":s,"data-tags":p,type:g,id:i,disabled:l,onClick:m,size:"large",href:n,component:n?"a":"button",sx:t,children:x})})}else if(a==="link"){let t;return !n&&!w?t={padding:`${e.spacing(6/8)} ${e.spacing(16/8)}`,borderRadius:e.spacing(4/8),minWidth:"100px",height:e.spacing(32/8),"&.Mui-focusVisible":{borderRadius:0,outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"-1px"}}:t={padding:"0",display:"inline-flex",alignItems:"center",verticalAlign:"inherit","&.Mui-focusVisible":{outline:`1px solid ${e.palette.ux.accent.n2.wMain}`,outlineOffset:"1px"}},jsx(b,{title:c,children:jsxs(Re,{id:i,"data-qa":s,"data-tags":p,component:n?"a":"button",target:E?"_blank":"_self",href:n,type:g,disabled:l,underline:l?"none":V??"hover",sx:t,onClick:m,children:[jsx(li,{sx:{marginRight:n?e.spacing(4/8):0},component:"span",children:x}),n&&E&&jsx(I,{})]})})}else {let t;(b=>(b.contained="contained",b.outlined="outlined",b.text="text"))(t||(t={}));let P={"call-to-action":"contained",outline:"outlined",text:"text"},r;return S?r=`${e.spacing(4/8)} ${e.spacing(16/8)} ${e.spacing(4/8)} ${e.spacing(6/8)}`:R?r=`${e.spacing(4/8)} ${e.spacing(6/8)} ${e.spacing(4/8)} ${e.spacing(16/8)}`:r=`${e.spacing(6/8)} ${e.spacing(16/8)}`,jsx(b,{title:c,children:jsx(Qc,{id:i,"data-qa":s,"data-tags":p,startIcon:S,endIcon:R,component:H,type:g,disabled:l,variant:P[a],onClick:m,sx:{padding:r},children:jsx("div",{style:{width:"100%",textAlign:"center"},children:x})})})}}var K=A;export{N as a,K as b};//# sourceMappingURL=chunk-GHPNUEMK.modern.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-GHPNUEMK.modern.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resources/trackingapi.ts","../src/resources/icons/OpenExternalIcon.tsx","../src/components/form/SolaceButton.tsx"],"names":["dataCollectionApi","initializeDataTrackingApi","api","Container","jsx","OpenExternalIcon","SolaceButton","id","variant","ariaLabel","ariaLabelledby","isDisabled","underline","title","href","component","type","startIcon","endIcon","onClick","dataQa","dataTags","children","dense","openLinkInNewTab","eventName","disabledFocusState","handleClick","event","theme","useTheme","focusStyles","SolaceToolTip_default","IconButton_default","styles","jsxs","Link_default","Box_default","MATERIAL_VARIANTS","BUTTON_VARIANT_MAP","padding","Button_default","SolaceButton_default"],"mappings":"8IAgBA,IAAIA,CAAAA,CAMSC,CAAAA,CAA6BC,CAAAA,EAA0E,CAInHF,CAAAA,CAAoBE,EACrB,ECTA,SAASC,CAAAA,EAAY,CACpB,OACCC,GAAAA,CAAC,MAAA,CAAA,CACA,QAAA,CAAS,SAAA,CACT,QAAA,CAAS,SAAA,CACT,CAAA,CAAE,kUAAA,CACH,CAEF,CAEO,SAASC,CAAAA,EAAmB,CAClC,OACCD,GAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,MAAA,CAAa,MAAA,CAAQ,MAAA,CAAa,OAAA,CAAS,WAAA,CAAuB,SAAA,CAAU,wBAAA,CACvF,QAAA,CAAAA,GAAAA,CAACD,CAAAA,CAAA,EAAU,CAAA,CACZ,CAEF,CCYA,SAASG,CAAAA,CAAa,CACrB,EAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,MAAA,CACV,YAAA,CAAcC,CAAAA,CACd,iBAAA,CAAmBC,EACnB,UAAA,CAAAC,CAAAA,CAAa,KAAA,CACb,SAAA,CAAAC,CAAAA,CAAY,OAAA,CACZ,KAAA,CAAAC,CAAAA,CAAQ,EAAA,CACR,IAAA,CAAAC,CAAAA,CACA,SAA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AA,CAAO,CAAE,KAAA,CAAO,MAAA,CAAQ,SAAA,CAAW,QAAS,CAAA,CAAI,QAAA,CAAAkB,CAAAA,CAAS,CAAA,CAC/D,CAAA,CACD,CAEF,CACD,CAEA,IAAOoB,CAAAA,CAAQpC","file":"chunk-LWCJ2SGT.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataCollectionApi: React.Dispatch<\n\tReact.SetStateAction<{\n\t\t[key: string]: unknown;\n\t}>\n>;\n\nexport const initializeDataTrackingApi = (api: React.Dispatch<React.SetStateAction<{ [key: string]: unknown }>>) => {\n\t// Initialize the data tracking API here\n\t// For example, you can assign an instance of the API to the `dataCollectionApi` variable\n\n\tdataCollectionApi = api;\n};\n\n// Export the dataCollectionApi variable so that it can be used by other components\nexport { dataCollectionApi };\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst SIZE = 16;\n\nfunction Container() {\n\treturn (\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z\"\n\t\t/>\n\t);\n}\n\nexport function OpenExternalIcon() {\n\treturn (\n\t\t<svg width={`${SIZE}px`} height={`${SIZE}px`} viewBox={`0 0 ${SIZE} ${SIZE}`} className=\"SolaceOpenExternalIcon\">\n\t\t\t<Container></Container>\n\t\t</svg>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button, IconButton, Link, SxProps, Theme, useTheme } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport { OpenExternalIcon } from \"../../resources/icons/OpenExternalIcon\";\nimport SolaceTooltip from \"../SolaceToolTip\";\n\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { dataCollectionApi } from \"../../resources/trackingapi\";\n\nexport interface SolaceButtonProps extends SolaceComponentProps {\n\tid?: string;\n\tvariant: \"call-to-action\" | \"outline\" | \"text\" | \"icon\" | \"link\";\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tisDisabled?: boolean;\n\tunderline?: \"none\" | \"hover\" | \"always\";\n\ttitle?: string;\n\thref?: string;\n\tcomponent?: \"button\" | \"span\";\n\ttype?: \"button\" | \"submit\" | \"reset\";\n\tstartIcon?: React.ReactElement | symbol | null;\n\tendIcon?: React.ReactElement | symbol | null;\n\tonClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n\tchildren?: string | JSX.Element;\n\tdense?: boolean; // only applicable to link variant\n\topenLinkInNewTab?: boolean;\n\tdisabledFocusState?: boolean;\n}\n\n// Todo: Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed\n// eslint-disable-next-line sonarjs/cognitive-complexity\nfunction SolaceButton({\n\tid,\n\tvariant = \"text\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tisDisabled = false,\n\tunderline = \"hover\",\n\ttitle = \"\",\n\thref,\n\tcomponent = \"button\",\n\ttype = \"button\",\n\tstartIcon,\n\tendIcon,\n\tonClick,\n\tdataQa,\n\tdataTags,\n\tchildren,\n\tdense = false,\n\topenLinkInNewTab = href ? true : false,\n\teventName,\n\tdisabledFocusState = false\n}: SolaceButtonProps): JSX.Element {\n\tconst handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n\t\tif (onClick) {\n\t\t\tonClick(event);\n\t\t}\n\t\tdataCollectionApi && dataCollectionApi({ title, variant, id, href, dataQa, dataTags, eventName });\n\t};\n\tconst theme = useTheme();\n\n\tif (variant === \"icon\") {\n\t\tconst focusStyles: SxProps<Theme> = disabledFocusState\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"&.MuiIconButton-root.Mui-focusVisible\": {\n\t\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\t\toutlineOffset: \"1px\",\n\t\t\t\t\t\tborderRadius: \"3px\"\n\t\t\t\t\t}\n\t\t\t };\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<IconButton\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\thref={href}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\tsx={focusStyles}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</IconButton>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else if (variant === \"link\") {\n\t\tlet styles;\n\t\tif (!href && !dense) {\n\t\t\tstyles = {\n\t\t\t\tpadding: `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`,\n\t\t\t\tborderRadius: theme.spacing(4 / 8),\n\t\t\t\tminWidth: \"100px\",\n\t\t\t\theight: theme.spacing(32 / 8),\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"-1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\tstyles = {\n\t\t\t\tpadding: \"0\",\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tverticalAlign: \"inherit\",\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Link\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\ttarget={openLinkInNewTab ? \"_blank\" : \"_self\"}\n\t\t\t\t\thref={href}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tunderline={isDisabled ? \"none\" : underline ?? \"hover\"}\n\t\t\t\t\tsx={styles}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t>\n\t\t\t\t\t<Box sx={{ marginRight: href ? theme.spacing(4 / 8) : 0 }} component=\"span\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t\t{href && openLinkInNewTab && <OpenExternalIcon></OpenExternalIcon>}\n\t\t\t\t</Link>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else {\n\t\tenum MATERIAL_VARIANTS {\n\t\t\tcontained = \"contained\",\n\t\t\toutlined = \"outlined\",\n\t\t\ttext = \"text\"\n\t\t}\n\n\t\tconst BUTTON_VARIANT_MAP = {\n\t\t\t\"call-to-action\": MATERIAL_VARIANTS.contained,\n\t\t\toutline: MATERIAL_VARIANTS.outlined,\n\t\t\ttext: MATERIAL_VARIANTS.text\n\t\t};\n\n\t\tlet padding;\n\t\tif (startIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)}`;\n\t\t} else if (endIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t} else {\n\t\t\tpadding = `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t}\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Button\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tstartIcon={startIcon as React.ReactNode}\n\t\t\t\t\tendIcon={endIcon as React.ReactNode}\n\t\t\t\t\tcomponent={component}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tvariant={BUTTON_VARIANT_MAP[variant]}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsx={{ padding: padding }}\n\t\t\t\t>\n\t\t\t\t\t<div style={{ width: \"100%\", textAlign: \"center\" }}>{children}</div>\n\t\t\t\t</Button>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t}\n}\n\nexport default SolaceButton;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/resources/trackingapi.ts","../src/resources/icons/OpenExternalIcon.tsx","../src/components/form/SolaceButton.tsx"],"names":["dataCollectionApi","initializeDataTrackingApi","api","Container","jsx","OpenExternalIcon","SolaceButton","id","variant","ariaLabel","ariaLabelledby","isDisabled","underline","title","href","component","type","startIcon","endIcon","onClick","dataQa","dataTags","children","dense","openLinkInNewTab","eventName","disabledFocusState","handleClick","event","theme","useTheme","focusStyles","SolaceToolTip_default","IconButton_default","styles","jsxs","Link_default","Box_default","MATERIAL_VARIANTS","BUTTON_VARIANT_MAP","padding","Button_default","SolaceButton_default"],"mappings":"8IAgBA,IAAIA,CAAAA,CAMSC,CAAAA,CAA6BC,CAAAA,EAA0E,CAInHF,CAAAA,CAAoBE,EACrB,ECTA,SAASC,CAAAA,EAAY,CACpB,OACCC,GAAAA,CAAC,MAAA,CAAA,CACA,QAAA,CAAS,SAAA,CACT,QAAA,CAAS,SAAA,CACT,CAAA,CAAE,kUAAA,CACH,CAEF,CAEO,SAASC,CAAAA,EAAmB,CAClC,OACCD,GAAAA,CAAC,KAAA,CAAA,CAAI,KAAA,CAAO,MAAA,CAAa,MAAA,CAAQ,MAAA,CAAa,OAAA,CAAS,WAAA,CAAuB,SAAA,CAAU,wBAAA,CACvF,QAAA,CAAAA,GAAAA,CAACD,CAAAA,CAAA,EAAU,CAAA,CACZ,CAEF,CCYA,SAASG,CAAAA,CAAa,CACrB,EAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,MAAA,CACV,YAAA,CAAcC,CAAAA,CACd,iBAAA,CAAmBC,EACnB,UAAA,CAAAC,CAAAA,CAAa,KAAA,CACb,SAAA,CAAAC,CAAAA,CAAY,OAAA,CACZ,KAAA,CAAAC,CAAAA,CAAQ,EAAA,CACR,IAAA,CAAAC,CAAAA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,CAAI,KAAA,CAAO,CAAE,KAAA,CAAO,MAAA,CAAQ,SAAA,CAAW,QAAS,CAAA,CAAI,QAAA,CAAAkB,CAAAA,CAAS,CAAA,CAC/D,CAAA,CACD,CAEF,CACD,CAEA,IAAOoB,CAAAA,CAAQpC","file":"chunk-GHPNUEMK.modern.mjs","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataCollectionApi: React.Dispatch<\n\tReact.SetStateAction<{\n\t\t[key: string]: unknown;\n\t}>\n>;\n\nexport const initializeDataTrackingApi = (api: React.Dispatch<React.SetStateAction<{ [key: string]: unknown }>>) => {\n\t// Initialize the data tracking API here\n\t// For example, you can assign an instance of the API to the `dataCollectionApi` variable\n\n\tdataCollectionApi = api;\n};\n\n// Export the dataCollectionApi variable so that it can be used by other components\nexport { dataCollectionApi };\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst SIZE = 16;\n\nfunction Container() {\n\treturn (\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8.66667 4.00008H11.1194L7.21643 7.90309L8.15924 8.8459L12 5.00514V7.33341H13.3333V2.66675H8.66667V4.00008ZM2.66667 4.00008H7.33333V5.33341H3.33333V12.6667H10.6667V8.66675H12V13.3334C12 13.7016 11.7015 14.0001 11.3333 14.0001H2.66667C2.29848 14.0001 2 13.7016 2 13.3334V4.66675C2 4.29856 2.29848 4.00008 2.66667 4.00008Z\"\n\t\t/>\n\t);\n}\n\nexport function OpenExternalIcon() {\n\treturn (\n\t\t<svg width={`${SIZE}px`} height={`${SIZE}px`} viewBox={`0 0 ${SIZE} ${SIZE}`} className=\"SolaceOpenExternalIcon\">\n\t\t\t<Container></Container>\n\t\t</svg>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button, IconButton, Link, SxProps, Theme, useTheme } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport { OpenExternalIcon } from \"../../resources/icons/OpenExternalIcon\";\nimport SolaceTooltip from \"../SolaceToolTip\";\n\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { dataCollectionApi } from \"../../resources/trackingapi\";\n\nexport interface SolaceButtonProps extends SolaceComponentProps {\n\tid?: string;\n\tvariant: \"call-to-action\" | \"outline\" | \"text\" | \"icon\" | \"link\";\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tisDisabled?: boolean;\n\tunderline?: \"none\" | \"hover\" | \"always\";\n\ttitle?: string;\n\thref?: string;\n\tcomponent?: \"button\" | \"span\";\n\ttype?: \"button\" | \"submit\" | \"reset\";\n\tstartIcon?: React.ReactElement | symbol | null;\n\tendIcon?: React.ReactElement | symbol | null;\n\tonClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n\tchildren?: string | JSX.Element;\n\tdense?: boolean; // only applicable to link variant\n\topenLinkInNewTab?: boolean;\n\tdisabledFocusState?: boolean;\n}\n\n// Todo: Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed\n// eslint-disable-next-line sonarjs/cognitive-complexity\nfunction SolaceButton({\n\tid,\n\tvariant = \"text\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tisDisabled = false,\n\tunderline = \"hover\",\n\ttitle = \"\",\n\thref,\n\tcomponent = \"button\",\n\ttype = \"button\",\n\tstartIcon,\n\tendIcon,\n\tonClick,\n\tdataQa,\n\tdataTags,\n\tchildren,\n\tdense = false,\n\topenLinkInNewTab = href ? true : false,\n\teventName,\n\tdisabledFocusState = false\n}: SolaceButtonProps): JSX.Element {\n\tconst handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n\t\tif (onClick) {\n\t\t\tonClick(event);\n\t\t}\n\t\tdataCollectionApi && dataCollectionApi({ title, variant, id, href, dataQa, dataTags, eventName });\n\t};\n\tconst theme = useTheme();\n\n\tif (variant === \"icon\") {\n\t\tconst focusStyles: SxProps<Theme> = disabledFocusState\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"&.MuiIconButton-root.Mui-focusVisible\": {\n\t\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\t\toutlineOffset: \"1px\",\n\t\t\t\t\t\tborderRadius: \"3px\"\n\t\t\t\t\t}\n\t\t\t };\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<IconButton\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\thref={href}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\tsx={focusStyles}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</IconButton>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else if (variant === \"link\") {\n\t\tlet styles;\n\t\tif (!href && !dense) {\n\t\t\tstyles = {\n\t\t\t\tpadding: `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`,\n\t\t\t\tborderRadius: theme.spacing(4 / 8),\n\t\t\t\tminWidth: \"100px\",\n\t\t\t\theight: theme.spacing(32 / 8),\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"-1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\tstyles = {\n\t\t\t\tpadding: \"0\",\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tverticalAlign: \"inherit\",\n\t\t\t\t\"&.Mui-focusVisible\": {\n\t\t\t\t\toutline: `1px solid ${theme.palette.ux.accent.n2.wMain}`,\n\t\t\t\t\toutlineOffset: \"1px\"\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Link\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tcomponent={href ? \"a\" : \"button\"}\n\t\t\t\t\ttarget={openLinkInNewTab ? \"_blank\" : \"_self\"}\n\t\t\t\t\thref={href}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tunderline={isDisabled ? \"none\" : underline ?? \"hover\"}\n\t\t\t\t\tsx={styles}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t>\n\t\t\t\t\t<Box sx={{ marginRight: href ? theme.spacing(4 / 8) : 0 }} component=\"span\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t\t{href && openLinkInNewTab && <OpenExternalIcon></OpenExternalIcon>}\n\t\t\t\t</Link>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t} else {\n\t\tenum MATERIAL_VARIANTS {\n\t\t\tcontained = \"contained\",\n\t\t\toutlined = \"outlined\",\n\t\t\ttext = \"text\"\n\t\t}\n\n\t\tconst BUTTON_VARIANT_MAP = {\n\t\t\t\"call-to-action\": MATERIAL_VARIANTS.contained,\n\t\t\toutline: MATERIAL_VARIANTS.outlined,\n\t\t\ttext: MATERIAL_VARIANTS.text\n\t\t};\n\n\t\tlet padding;\n\t\tif (startIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)}`;\n\t\t} else if (endIcon) {\n\t\t\tpadding = `${theme.spacing(4 / 8)} ${theme.spacing(6 / 8)} ${theme.spacing(4 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t} else {\n\t\t\tpadding = `${theme.spacing(6 / 8)} ${theme.spacing(16 / 8)}`;\n\t\t}\n\n\t\treturn (\n\t\t\t<SolaceTooltip title={title}>\n\t\t\t\t<Button\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-qa={dataQa}\n\t\t\t\t\tdata-tags={dataTags}\n\t\t\t\t\tstartIcon={startIcon as React.ReactNode}\n\t\t\t\t\tendIcon={endIcon as React.ReactNode}\n\t\t\t\t\tcomponent={component}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tvariant={BUTTON_VARIANT_MAP[variant]}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tsx={{ padding: padding }}\n\t\t\t\t>\n\t\t\t\t\t<div style={{ width: \"100%\", textAlign: \"center\" }}>{children}</div>\n\t\t\t\t</Button>\n\t\t\t</SolaceTooltip>\n\t\t);\n\t}\n}\n\nexport default SolaceButton;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkNT45IFR2_js=require('./chunk-NT45IFR2.js'),chunkN7ONHWWU_js=require('./chunk-N7ONHWWU.js'),chunkKALFXZNR_js=require('./chunk-KALFXZNR.js'),jsxRuntime=require('react/jsx-runtime');function ae({id:e,htmlForId:n,required:a=false,disabled:t=false,readOnly:l=false,noWrap:s=false,children:p}){return jsxRuntime.jsx(chunkKALFXZNR_js.le,{id:e,htmlFor:n,required:a,disabled:t,sx:{display:"block",whiteSpace:s?"nowrap":"normal"},className:chunkKALFXZNR_js.D({"read-only":l}),children:p})}var $=ae;var q={maxLength:255,menuItemHeight:38,menuItemHeightMultiline:58,GridListItemHeight:53,DEFAULT_NUM_OF_MENUITEM_DISPLAYED:9,closeButtonAriaLabel:"Close",actionMenuAriaLabel:"More Actions",clearButtonAriaLabel:"Clear"};var re=chunkKALFXZNR_js.wa("div",{shouldForwardProp:e=>e!=="inlineLabel"})(({theme:e,inlineLabel:n})=>({display:"flex",flexDirection:"column",flexGrow:1,maxWidth:"100%",paddingLeft:n?"36px":"0px","&.hasWarnings":{"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline":{borderColor:`${e.palette.ux.warning.w100}`}}}));function de({id:e,label:n,stackLabel:a,large:t,bold:l,required:s,disabled:p,readOnly:f,inlineLabel:u,centerInlineLabel:c,helperText:b,errorText:i,warningText:m,children:g,sx:h}){return jsxRuntime.jsxs(chunkKALFXZNR_js.Ic,{display:"flex",flexDirection:u?"row":"column",justifyContent:"space-between",alignItems:c?"flex-start":"",sx:h,children:[a&&n&&jsxRuntime.jsx("div",{style:{marginTop:c?"5.5px":""},children:jsxRuntime.jsx(chunkN7ONHWWU_js.a,{id:`${e}-label`,htmlForId:`${e}`,required:s,disabled:p,large:t,bold:l,readOnly:f,children:n})}),!a&&n&&jsxRuntime.jsx("div",{style:{marginTop:c?"5.5px":""},children:jsxRuntime.jsx($,{id:`${e}-label`,htmlForId:`${e}`,required:s,disabled:p,readOnly:f,noWrap:u,children:n})}),jsxRuntime.jsxs(re,{inlineLabel:u,className:m?"hasWarnings":"",children:[g,b&&!i&&!m&&jsxRuntime.jsx(chunkNT45IFR2_js.c,{children:b}),m&&!i&&jsxRuntime.jsx(chunkNT45IFR2_js.f,{children:m}),i&&jsxRuntime.jsx(chunkNT45IFR2_js.d,{children:i})]})]})}var N=de;function se({id:e,name:n,label:a,value:t,helperText:l,placeholder:s,maxLength:p=q.maxLength,type:f="text",size:u=50,title:c,autoFocus:b=false,hasErrors:i=false,hasWarnings:m=false,required:g=false,inlineLabel:h=false,customIcon:o,disabled:T=false,readOnly:x=false,onChange:y,onBlur:O,onKeyDown:K,onKeyUp:U,onFocus:_,dataQa:E,dataTags:z,fullWidth:G=false,width:Y,endAdornment:P,minWidth:V,inputRef:Z}){let Q=chunkKALFXZNR_js.ua(),I=o&&o.position==="end"?jsxRuntime.jsx(chunkKALFXZNR_js.Gb,{onClick:o.handleClick,"aria-label":o.ariaLabel,children:o.icon}):null,j=I||P?{endAdornment:jsxRuntime.jsxs(chunkKALFXZNR_js.Ie,{position:"end",children:[P,I]})}:{},ee=o&&o.position==="start"?{startAdornment:jsxRuntime.jsx(chunkKALFXZNR_js.Ie,{position:o.position,children:jsxRuntime.jsx(chunkKALFXZNR_js.Gb,{onClick:o.handleClick,"aria-label":o.ariaLabel,children:o.icon})})}:{},ne={sx:{height:Q.spacing(4)},disabled:T,required:g},te=L=>{y&&y({name:n,value:L.target.value});},S=()=>e||n,oe=chunkKALFXZNR_js.wa("div")(({theme:L})=>({...L.mixins.formComponent_ReadOnlyToolTipContainer.container})),le=()=>x?jsxRuntime.jsx(oe,{children:jsxRuntime.jsx(chunkNT45IFR2_js.b,{variant:"overflow",title:typeof t<"u"&&t!==null?t+"":"",dataQa:E,children:typeof t<"u"&&t!==null?t+"":""})}):jsxRuntime.jsx(chunkKALFXZNR_js._h,{id:`${S()}`,name:n,inputProps:{maxLength:p,size:u,"data-qa":E,"data-tags":z,"data-testid":E,"data-lpignore":true,readOnly:x,...l?{"aria-describedby":`${S()}-textfield-helper-text`}:{},...a?{"aria-labelledby":`${S()}-label`}:{},"aria-readonly":x,title:c,min:0},inputRef:Z,type:f,error:i,autoComplete:"off",autoFocus:b,InputProps:{...ne,...j,...ee},margin:"dense",placeholder:s,value:t,onChange:te,onBlur:O,onKeyDown:K,onKeyUp:U,onFocus:_,fullWidth:G,sx:{minWidth:V}});return jsxRuntime.jsx(N,{id:S(),label:a,helperText:l,errorText:i?l:void 0,warningText:m?l:void 0,disabled:T,readOnly:x,required:g,inlineLabel:h,centerInlineLabel:h,sx:{width:Y},children:le()})}var Me=se;exports.a=$;exports.b=N;exports.c=q;exports.d=Me;//# sourceMappingURL=chunk-IXGR5EW7.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-IXGR5EW7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/SolaceLabel.tsx","../src/constants.ts","../src/components/form/FormChildBase.tsx","../src/components/form/SolaceTextField.tsx"],"names":["SolaceLabel","id","htmlForId","required","disabled","readOnly","noWrap","children","jsx","FormLabel_default","clsx_default","SolaceLabel_default","constants","ChildrenContainer","styled_default","prop","theme","inlineLabel","FormChildBase","label","stackLabel","large","bold","centerInlineLabel","helperText","errorText","warningText","sx","jsxs","Box_default","SolaceStackLabel_default","HelperText_default","WarningText_default","ErrorText_default","FormChildBase_default","SolaceTextField","name","value","placeholder","maxLength","type","size","title","autoFocus","hasErrors","hasWarnings","customIcon","onChange","onBlur","onKeyDown","onKeyUp","onFocus","dataQa","dataTags","fullWidth","width","endAdornment","minWidth","inputRef","useTheme","endIconProps","IconButton_default","inputEndAdornment","InputAdornment_default","inputStartAdornment","defaultInputProps","handleChange","event","getId","TooltipContainer","textField","SolaceToolTip_default","TextField_default","SolaceTextField_default"],"mappings":"yMAkDA,SAASA,EAAAA,CAAY,CACpB,GAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,QAAA,CAAAC,EAAW,KAAA,CACX,MAAA,CAAAC,CAAAA,CAAS,KAAA,CACT,SAAAC,CACD,CAAA,CAAkC,CACjC,OACCC,eAACC,mBAAAA,CAAA,CACA,EAAA,CAAIR,CAAAA,CACJ,QAASC,CAAAA,CACT,QAAA,CAAUC,EACV,QAAA,CAAUC,CAAAA,CACV,GAAI,CACH,OAAA,CAAS,OAAA,CACT,UAAA,CAAYE,EAAS,QAAA,CAAW,QACjC,CAAA,CACA,SAAA,CAAWI,mBAAK,CAAE,WAAA,CAAaL,CAAS,CAAC,EAExC,QAAA,CAAAE,CAAAA,CACF,CAEF,CAEA,IAAOI,EAAQX,GC5DR,IAAMY,CAAAA,CAAY,CACxB,UAAW,GAAA,CACX,cAAA,CAAgB,GAChB,uBAAA,CAAyB,EAAA,CACzB,mBAAoB,EAAA,CACpB,iCAAA,CAAmC,CAAA,CACnC,oBAAA,CAAsB,QACtB,mBAAA,CAAqB,cAAA,CACrB,qBAAsB,OACvB,ECIA,IAAMC,EAAAA,CAAoBC,mBAAAA,CAAO,KAAA,CAAO,CACvC,kBAAoBC,CAAAA,EAASA,CAAAA,GAAS,aACvC,CAAC,EAA0B,CAAC,CAAE,MAAAC,CAAAA,CAAO,WAAA,CAAAC,CAAY,CAAA,IAAO,CACvD,OAAA,CAAS,MAAA,CACT,cAAe,QAAA,CACf,QAAA,CAAU,CAAA,CACV,QAAA,CAAU,OACV,WAAA,CAAaA,CAAAA,CAAc,MAAA,CAAS,KAAA,CACpC,gBAAiB,CAChB,gFAAA,CAAkF,CACjF,WAAA,CAAa,CAAA,EAAGD,EAAM,OAAA,CAAQ,EAA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,CAAOqC,EACP,GAAA,CAAK,CACN,CAAA,CACA,QAAA,CAAUgB,EACV,IAAA,CAAMlB,CAAAA,CACN,KAAA,CAAOI,CAAAA,CACP,aAAa,KAAA,CACb,SAAA,CAAWD,CAAAA,CACX,UAAA,CAAY,CAAE,GAAGsB,EAAAA,CAAmB,GAAGH,CAAAA,CAAmB,GAAGE,EAAoB,CAAA,CACjF,MAAA,CAAO,OAAA,CACP,WAAA,CAAa1B,EACb,KAAA,CAAOD,CAAAA,CACP,SAAU6B,EAAAA,CACV,MAAA,CAAQlB,EACR,SAAA,CAAWC,CAAAA,CACX,OAAA,CAASC,CAAAA,CACT,QAASC,CAAAA,CACT,SAAA,CAAWG,EACX,EAAA,CAAI,CAAE,SAAUG,CAAS,CAAA,CAC1B,CAAA,CAKH,OACCjD,eAAC0B,CAAAA,CAAA,CACA,EAAA,CAAIkC,CAAAA,GACJ,KAAA,CAAOjD,CAAAA,CACP,UAAA,CAAYK,CAAAA,CACZ,UAAWoB,CAAAA,CAAYpB,CAAAA,CAAa,OACpC,WAAA,CAAaqB,CAAAA,CAAcrB,EAAa,MAAA,CACxC,QAAA,CAAUpB,CAAAA,CACV,QAAA,CAAUC,EACV,QAAA,CAAUF,CAAAA,CACV,YAAac,CAAAA,CACb,iBAAA,CAAmBA,EACnB,EAAA,CAAI,CAAE,KAAA,CAAAsC,CAAM,EAEX,QAAA,CAAAe,EAAAA,GACF,CAEF,KAEOG,EAAAA,CAAQtC","file":"chunk-IGOY34XU.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nexport interface SolaceLabelProps {\n\t/**\n\t * Unique identifier of the label\n\t */\n\tid: string;\n\t/**\n\t * identifier used for specifying which form element this label is bound to\n\t */\n\thtmlForId?: string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag for readOnly labels, changes font color to 55% black\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to suppress line breaks (text wrapping) within the label\n\t */\n\tnoWrap?: boolean;\n\t/**\n\t *\n\t */\n\tchildren?: React.ReactNode;\n}\n\nfunction SolaceLabel({\n\tid,\n\thtmlForId,\n\trequired = false,\n\tdisabled = false,\n\treadOnly = false,\n\tnoWrap = false,\n\tchildren\n}: SolaceLabelProps): JSX.Element {\n\treturn (\n\t\t<FormLabel\n\t\t\tid={id}\n\t\t\thtmlFor={htmlForId}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t\tsx={{\n\t\t\t\tdisplay: \"block\",\n\t\t\t\twhiteSpace: noWrap ? \"nowrap\" : \"normal\"\n\t\t\t}}\n\t\t\tclassName={clsx({ \"read-only\": readOnly })}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default SolaceLabel;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const constants = {\n\tmaxLength: 255,\n\tmenuItemHeight: 38,\n\tmenuItemHeightMultiline: 58,\n\tGridListItemHeight: 53,\n\tDEFAULT_NUM_OF_MENUITEM_DISPLAYED: 9,\n\tcloseButtonAriaLabel: \"Close\",\n\tactionMenuAriaLabel: \"More Actions\",\n\tclearButtonAriaLabel: \"Clear\"\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Box, styled } from \"@mui/material\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport SolaceStackLabel from \"./SolaceStackLabel\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { SX } from \"../../types/sx\";\n\ninterface ChildrenContainerProps {\n\tinlineLabel: boolean;\n}\n\nconst ChildrenContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"inlineLabel\"\n})<ChildrenContainerProps>(({ theme, inlineLabel }) => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflexGrow: 1,\n\tmaxWidth: \"100%\",\n\tpaddingLeft: inlineLabel ? \"36px\" : \"0px\",\n\t\"&.hasWarnings\": {\n\t\t\"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline\": {\n\t\t\tborderColor: `${theme.palette.ux.warning.w100}`\n\t\t}\n\t}\n}));\n\nexport interface FormChildBaseProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * Boolean flag to allow labels to be rendered as SolaceStackLabel component, which provides more props, such as large, bold\n\t */\n\tstackLabel?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with larger font size of 16px (default to 14px)\n\t */\n\tlarge?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with font weight of medium (default to regular)\n\t */\n\tbold?: boolean;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string;\n\t/**\n\t * Content to display as supportive/explanatory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in error state\n\t */\n\terrorText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in warning state\n\t */\n\twarningText?: string | JSX.Element;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly: boolean;\n\t/**\n\t * Display the label horizontally\n\t */\n\tinlineLabel: boolean;\n\t/**\n\t * Center align the inline label, this will e used only for single line field label\n\t */\n\tcenterInlineLabel?: boolean;\n\n\tchildren: JSX.Element;\n\t/**\n\t * The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.\n\t */\n\tsx?: SX;\n}\n\nfunction FormChildBase({\n\tid,\n\tlabel,\n\tstackLabel,\n\tlarge,\n\tbold,\n\trequired,\n\tdisabled,\n\treadOnly,\n\tinlineLabel,\n\tcenterInlineLabel,\n\thelperText,\n\terrorText,\n\twarningText,\n\tchildren,\n\tsx\n}: FormChildBaseProps): JSX.Element {\n\treturn (\n\t\t<Box\n\t\t\tdisplay=\"flex\"\n\t\t\tflexDirection={inlineLabel ? \"row\" : \"column\"}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems={centerInlineLabel ? \"flex-start\" : \"\"}\n\t\t\tsx={sx}\n\t\t>\n\t\t\t{stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceStackLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tlarge={large}\n\t\t\t\t\t\tbold={bold}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceStackLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tnoWrap={inlineLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ChildrenContainer inlineLabel={inlineLabel} className={warningText ? \"hasWarnings\" : \"\"}>\n\t\t\t\t{children}\n\t\t\t\t{helperText && !errorText && !warningText && <HelperText>{helperText}</HelperText>}\n\t\t\t\t{warningText && !errorText && <WarningText>{warningText}</WarningText>}\n\t\t\t\t{errorText && <ErrorText>{errorText}</ErrorText>}\n\t\t\t</ChildrenContainer>\n\t\t</Box>\n\t);\n}\n\nexport default FormChildBase;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InputAdornment, IconButton, TextField, useTheme } from \"@mui/material\";\nimport React from \"react\";\nimport { constants } from \"../../constants\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport FormChildBase from \"./FormChildBase\";\nimport SolaceTooltip from \"../SolaceToolTip\";\nimport { styled } from \"@mui/material\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nexport interface SolaceTextFieldChangeEvent {\n\tname: string;\n\tvalue: string;\n}\n\nexport interface SolaceTextFieldProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the `input` element\n\t */\n\tname: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string | number;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * Short hint displayed in the `input` before user enters a value\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The maximum number of characters which can be typed as the `input` value\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The type of `input` element to render\n\t */\n\ttype?: \"text\" | \"number\" | \"password\" | \"email\" | \"url\";\n\t/**\n\t * The size/width of the `input` measured in characters\n\t */\n\tsize?: number;\n\t/**\n\t * The text to display as the tooltip hint\n\t */\n\ttitle?: string;\n\t/**\n\t * Boolean flag to control whether the `input` element is focused during first mount\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in error state\n\t */\n\thasErrors?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in warn state\n\t */\n\thasWarnings?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to control whether to stack the label on top of the `input` element (false) or place them inline to one another (true)\n\t */\n\tinlineLabel?: boolean;\n\t/**\n\t * Allows custom icon to be set at the beginning/end of the field.\n\t */\n\tcustomIcon?: {\n\t\ticon: React.ReactNode;\n\t\tposition: \"end\" | \"start\";\n\t\thandleClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n\t\tariaLabel?: string;\n\t};\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Callback function to trigger whenever the value of the `input` is changed\n\t */\n\tonChange?: (event: SolaceTextFieldChangeEvent) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` loses focus\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key down event\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key up event\n\t */\n\tonKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` is focused\n\t */\n\tonFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Custom Width of the component.\n\t */\n\twidth?: string;\n\t/**\n\t * If true, the input will take up the full width of its container.\n\t */\n\tfullWidth?: boolean;\n\t/**\n\t * optional prop to pass an array of icon or button at the end of textfield\n\t */\n\tendAdornment?: (React.ReactNode | JSX.Element)[];\n\t/**\n\t * minimum width of the component\n\t */\n\tminWidth?: string;\n\t/**\n\t * pass a ref to the input element.\n\t */\n\tinputRef?: (input: HTMLInputElement) => void;\n}\n\nfunction SolaceTextField({\n\tid,\n\tname,\n\tlabel,\n\tvalue,\n\thelperText,\n\tplaceholder,\n\tmaxLength = constants.maxLength,\n\ttype = \"text\",\n\tsize = 50,\n\ttitle,\n\tautoFocus = false,\n\thasErrors = false,\n\thasWarnings = false,\n\trequired = false,\n\tinlineLabel = false,\n\tcustomIcon,\n\tdisabled = false,\n\treadOnly = false,\n\tonChange,\n\tonBlur,\n\tonKeyDown,\n\tonKeyUp,\n\tonFocus,\n\tdataQa,\n\tdataTags,\n\tfullWidth = false,\n\twidth,\n\tendAdornment,\n\tminWidth,\n\tinputRef\n}: SolaceTextFieldProps): JSX.Element {\n\tconst theme = useTheme();\n\n\tconst endIconProps =\n\t\tcustomIcon && customIcon.position === \"end\" ? (\n\t\t\t<IconButton onClick={customIcon.handleClick} aria-label={customIcon.ariaLabel}>\n\t\t\t\t{customIcon.icon}\n\t\t\t</IconButton>\n\t\t) : null;\n\n\tconst inputEndAdornment =\n\t\tendIconProps || endAdornment\n\t\t\t? {\n\t\t\t\t\tendAdornment: (\n\t\t\t\t\t\t<InputAdornment position=\"end\">\n\t\t\t\t\t\t\t{endAdornment}\n\t\t\t\t\t\t\t{endIconProps}\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\tconst inputStartAdornment =\n\t\tcustomIcon && customIcon.position === \"start\"\n\t\t\t? {\n\t\t\t\t\tstartAdornment: (\n\t\t\t\t\t\t<InputAdornment position={customIcon.position}>\n\t\t\t\t\t\t\t<IconButton onClick={customIcon.handleClick} aria-label={customIcon.ariaLabel}>\n\t\t\t\t\t\t\t\t{customIcon.icon}\n\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\tconst defaultInputProps = {\n\t\tsx: { height: theme.spacing(4) },\n\t\tdisabled: disabled,\n\t\trequired: required\n\t};\n\n\tconst handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tif (onChange) {\n\t\t\tonChange({\n\t\t\t\tname: name,\n\t\t\t\tvalue: event.target.value\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getId = () => {\n\t\treturn id ? id : name;\n\t};\n\n\tconst TooltipContainer = styled(\"div\")(({ theme }) => ({\n\t\t...(theme.mixins.formComponent_ReadOnlyToolTipContainer.container as CSSProperties)\n\t}));\n\n\tconst textField = () => {\n\t\t/* read-only behaviour */\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<TooltipContainer>\n\t\t\t\t\t<SolaceTooltip\n\t\t\t\t\t\tvariant=\"overflow\"\n\t\t\t\t\t\ttitle={typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t\tdataQa={dataQa}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t</SolaceTooltip>\n\t\t\t\t</TooltipContainer>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<TextField\n\t\t\t\t\tid={`${getId()}`}\n\t\t\t\t\tname={name}\n\t\t\t\t\tinputProps={{\n\t\t\t\t\t\tmaxLength: maxLength,\n\t\t\t\t\t\tsize: size,\n\t\t\t\t\t\t\"data-qa\": dataQa,\n\t\t\t\t\t\t\"data-tags\": dataTags,\n\t\t\t\t\t\t\"data-testid\": dataQa,\n\t\t\t\t\t\t\"data-lpignore\": true,\n\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t...(helperText ? { \"aria-describedby\": `${getId()}-textfield-helper-text` } : {}),\n\t\t\t\t\t\t...(label ? { \"aria-labelledby\": `${getId()}-label` } : {}),\n\t\t\t\t\t\t\"aria-readonly\": readOnly,\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tmin: 0\n\t\t\t\t\t}}\n\t\t\t\t\tinputRef={inputRef}\n\t\t\t\t\ttype={type}\n\t\t\t\t\terror={hasErrors}\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\tInputProps={{ ...defaultInputProps, ...inputEndAdornment, ...inputStartAdornment }}\n\t\t\t\t\tmargin=\"dense\"\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tfullWidth={fullWidth}\n\t\t\t\t\tsx={{ minWidth: minWidth }}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<FormChildBase\n\t\t\tid={getId()}\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terrorText={hasErrors ? helperText : undefined}\n\t\t\twarningText={hasWarnings ? helperText : undefined}\n\t\t\tdisabled={disabled}\n\t\t\treadOnly={readOnly}\n\t\t\trequired={required}\n\t\t\tinlineLabel={inlineLabel}\n\t\t\tcenterInlineLabel={inlineLabel}\n\t\t\tsx={{ width }}\n\t\t>\n\t\t\t{textField()}\n\t\t</FormChildBase>\n\t);\n}\n\nexport default SolaceTextField;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/form/SolaceLabel.tsx","../src/constants.ts","../src/components/form/FormChildBase.tsx","../src/components/form/SolaceTextField.tsx"],"names":["SolaceLabel","id","htmlForId","required","disabled","readOnly","noWrap","children","jsx","FormLabel_default","clsx_default","SolaceLabel_default","constants","ChildrenContainer","styled_default","prop","theme","inlineLabel","FormChildBase","label","stackLabel","large","bold","centerInlineLabel","helperText","errorText","warningText","sx","jsxs","Box_default","SolaceStackLabel_default","HelperText_default","WarningText_default","ErrorText_default","FormChildBase_default","SolaceTextField","name","value","placeholder","maxLength","type","size","title","autoFocus","hasErrors","hasWarnings","customIcon","onChange","onBlur","onKeyDown","onKeyUp","onFocus","dataQa","dataTags","fullWidth","width","endAdornment","minWidth","inputRef","useTheme","endIconProps","IconButton_default","inputEndAdornment","InputAdornment_default","inputStartAdornment","defaultInputProps","handleChange","event","getId","TooltipContainer","textField","SolaceToolTip_default","TextField_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ACV,IAAA,CAAMlB,CAAAA,CACN,KAAA,CAAOI,CAAAA,CACP,aAAa,KAAA,CACb,SAAA,CAAWD,CAAAA,CACX,UAAA,CAAY,CAAE,GAAGsB,EAAAA,CAAmB,GAAGH,CAAAA,CAAmB,GAAGE,EAAoB,CAAA,CACjF,MAAA,CAAO,OAAA,CACP,WAAA,CAAa1B,EACb,KAAA,CAAOD,CAAAA,CACP,SAAU6B,EAAAA,CACV,MAAA,CAAQlB,EACR,SAAA,CAAWC,CAAAA,CACX,OAAA,CAASC,CAAAA,CACT,QAASC,CAAAA,CACT,SAAA,CAAWG,EACX,EAAA,CAAI,CAAE,SAAUG,CAAS,CAAA,CAC1B,CAAA,CAKH,OACCjD,eAAC0B,CAAAA,CAAA,CACA,EAAA,CAAIkC,CAAAA,GACJ,KAAA,CAAOjD,CAAAA,CACP,UAAA,CAAYK,CAAAA,CACZ,UAAWoB,CAAAA,CAAYpB,CAAAA,CAAa,OACpC,WAAA,CAAaqB,CAAAA,CAAcrB,EAAa,MAAA,CACxC,QAAA,CAAUpB,CAAAA,CACV,QAAA,CAAUC,EACV,QAAA,CAAUF,CAAAA,CACV,YAAac,CAAAA,CACb,iBAAA,CAAmBA,EACnB,EAAA,CAAI,CAAE,KAAA,CAAAsC,CAAM,EAEX,QAAA,CAAAe,EAAAA,GACF,CAEF,KAEOG,EAAAA,CAAQtC","file":"chunk-IXGR5EW7.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nexport interface SolaceLabelProps {\n\t/**\n\t * Unique identifier of the label\n\t */\n\tid: string;\n\t/**\n\t * identifier used for specifying which form element this label is bound to\n\t */\n\thtmlForId?: string;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag for readOnly labels, changes font color to 55% black\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Boolean flag to suppress line breaks (text wrapping) within the label\n\t */\n\tnoWrap?: boolean;\n\t/**\n\t *\n\t */\n\tchildren?: React.ReactNode;\n}\n\nfunction SolaceLabel({\n\tid,\n\thtmlForId,\n\trequired = false,\n\tdisabled = false,\n\treadOnly = false,\n\tnoWrap = false,\n\tchildren\n}: SolaceLabelProps): JSX.Element {\n\treturn (\n\t\t<FormLabel\n\t\t\tid={id}\n\t\t\thtmlFor={htmlForId}\n\t\t\trequired={required}\n\t\t\tdisabled={disabled}\n\t\t\tsx={{\n\t\t\t\tdisplay: \"block\",\n\t\t\t\twhiteSpace: noWrap ? \"nowrap\" : \"normal\"\n\t\t\t}}\n\t\t\tclassName={clsx({ \"read-only\": readOnly })}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default SolaceLabel;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const constants = {\n\tmaxLength: 255,\n\tmenuItemHeight: 38,\n\tmenuItemHeightMultiline: 58,\n\tGridListItemHeight: 53,\n\tDEFAULT_NUM_OF_MENUITEM_DISPLAYED: 9,\n\tcloseButtonAriaLabel: \"Close\",\n\tactionMenuAriaLabel: \"More Actions\",\n\tclearButtonAriaLabel: \"Clear\"\n};\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Box, styled } from \"@mui/material\";\nimport SolaceLabel from \"./SolaceLabel\";\nimport SolaceStackLabel from \"./SolaceStackLabel\";\nimport HelperText from \"./HelperText\";\nimport ErrorText from \"./ErrorText\";\nimport WarningText from \"./WarningText\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { SX } from \"../../types/sx\";\n\ninterface ChildrenContainerProps {\n\tinlineLabel: boolean;\n}\n\nconst ChildrenContainer = styled(\"div\", {\n\tshouldForwardProp: (prop) => prop !== \"inlineLabel\"\n})<ChildrenContainerProps>(({ theme, inlineLabel }) => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflexGrow: 1,\n\tmaxWidth: \"100%\",\n\tpaddingLeft: inlineLabel ? \"36px\" : \"0px\",\n\t\"&.hasWarnings\": {\n\t\t\"fieldset.MuiOutlinedInput-notchedOutline, fieldset.MuiInputBase-inputMultiline\": {\n\t\t\tborderColor: `${theme.palette.ux.warning.w100}`\n\t\t}\n\t}\n}));\n\nexport interface FormChildBaseProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * Boolean flag to allow labels to be rendered as SolaceStackLabel component, which provides more props, such as large, bold\n\t */\n\tstackLabel?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with larger font size of 16px (default to 14px)\n\t */\n\tlarge?: boolean;\n\t/**\n\t * Boolean flag to allow StackSolaceLabel component to be rendered with font weight of medium (default to regular)\n\t */\n\tbold?: boolean;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string;\n\t/**\n\t * Content to display as supportive/explanatory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in error state\n\t */\n\terrorText?: string | JSX.Element;\n\t/**\n\t * HelperText when the `input` in warning state\n\t */\n\twarningText?: string | JSX.Element;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired: boolean;\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly: boolean;\n\t/**\n\t * Display the label horizontally\n\t */\n\tinlineLabel: boolean;\n\t/**\n\t * Center align the inline label, this will e used only for single line field label\n\t */\n\tcenterInlineLabel?: boolean;\n\n\tchildren: JSX.Element;\n\t/**\n\t * The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.\n\t */\n\tsx?: SX;\n}\n\nfunction FormChildBase({\n\tid,\n\tlabel,\n\tstackLabel,\n\tlarge,\n\tbold,\n\trequired,\n\tdisabled,\n\treadOnly,\n\tinlineLabel,\n\tcenterInlineLabel,\n\thelperText,\n\terrorText,\n\twarningText,\n\tchildren,\n\tsx\n}: FormChildBaseProps): JSX.Element {\n\treturn (\n\t\t<Box\n\t\t\tdisplay=\"flex\"\n\t\t\tflexDirection={inlineLabel ? \"row\" : \"column\"}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems={centerInlineLabel ? \"flex-start\" : \"\"}\n\t\t\tsx={sx}\n\t\t>\n\t\t\t{stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceStackLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tlarge={large}\n\t\t\t\t\t\tbold={bold}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceStackLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!stackLabel && label && (\n\t\t\t\t<div style={{ marginTop: centerInlineLabel ? \"5.5px\" : \"\" }}>\n\t\t\t\t\t<SolaceLabel\n\t\t\t\t\t\tid={`${id}-label`}\n\t\t\t\t\t\thtmlForId={`${id}`}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tnoWrap={inlineLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</SolaceLabel>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ChildrenContainer inlineLabel={inlineLabel} className={warningText ? \"hasWarnings\" : \"\"}>\n\t\t\t\t{children}\n\t\t\t\t{helperText && !errorText && !warningText && <HelperText>{helperText}</HelperText>}\n\t\t\t\t{warningText && !errorText && <WarningText>{warningText}</WarningText>}\n\t\t\t\t{errorText && <ErrorText>{errorText}</ErrorText>}\n\t\t\t</ChildrenContainer>\n\t\t</Box>\n\t);\n}\n\nexport default FormChildBase;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InputAdornment, IconButton, TextField, useTheme } from \"@mui/material\";\nimport React from \"react\";\nimport { constants } from \"../../constants\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport FormChildBase from \"./FormChildBase\";\nimport SolaceTooltip from \"../SolaceToolTip\";\nimport { styled } from \"@mui/material\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nexport interface SolaceTextFieldChangeEvent {\n\tname: string;\n\tvalue: string;\n}\n\nexport interface SolaceTextFieldProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, `name` value will be used in order to make `label` and `helperText` accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Name attribute to assign to the `input` element\n\t */\n\tname: string;\n\t/**\n\t * the label content to display on the screen\n\t */\n\tlabel?: string | JSX.Element;\n\t/**\n\t * The value of the `input` element, required for controlled component\n\t */\n\tvalue?: string | number;\n\t/**\n\t * Content to display as supportive/explanitory text\n\t */\n\thelperText?: string | JSX.Element;\n\t/**\n\t * Short hint displayed in the `input` before user enters a value\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The maximum number of characters which can be typed as the `input` value\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The type of `input` element to render\n\t */\n\ttype?: \"text\" | \"number\" | \"password\" | \"email\" | \"url\";\n\t/**\n\t * The size/width of the `input` measured in characters\n\t */\n\tsize?: number;\n\t/**\n\t * The text to display as the tooltip hint\n\t */\n\ttitle?: string;\n\t/**\n\t * Boolean flag to control whether the `input` element is focused during first mount\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in error state\n\t */\n\thasErrors?: boolean;\n\t/**\n\t * Boolean flag to mark the `input` in warn state\n\t */\n\thasWarnings?: boolean;\n\t/**\n\t * Boolean flag used to display an indicator of whether or not this `input` is mandatory\n\t */\n\trequired?: boolean;\n\t/**\n\t * Boolean flag to control whether to stack the label on top of the `input` element (false) or place them inline to one another (true)\n\t */\n\tinlineLabel?: boolean;\n\t/**\n\t * Allows custom icon to be set at the beginning/end of the field.\n\t */\n\tcustomIcon?: {\n\t\ticon: React.ReactNode;\n\t\tposition: \"end\" | \"start\";\n\t\thandleClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n\t\tariaLabel?: string;\n\t};\n\t/**\n\t * Boolean flag to disable the `input`\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Boolean flag to set the `input` in a read-only state\n\t */\n\treadOnly?: boolean;\n\t/**\n\t * Callback function to trigger whenever the value of the `input` is changed\n\t */\n\tonChange?: (event: SolaceTextFieldChangeEvent) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` loses focus\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key down event\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` receives key up event\n\t */\n\tonKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback function to trigger whenever the element of the `input` is focused\n\t */\n\tonFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Custom Width of the component.\n\t */\n\twidth?: string;\n\t/**\n\t * If true, the input will take up the full width of its container.\n\t */\n\tfullWidth?: boolean;\n\t/**\n\t * optional prop to pass an array of icon or button at the end of textfield\n\t */\n\tendAdornment?: (React.ReactNode | JSX.Element)[];\n\t/**\n\t * minimum width of the component\n\t */\n\tminWidth?: string;\n\t/**\n\t * pass a ref to the input element.\n\t */\n\tinputRef?: (input: HTMLInputElement) => void;\n}\n\nfunction SolaceTextField({\n\tid,\n\tname,\n\tlabel,\n\tvalue,\n\thelperText,\n\tplaceholder,\n\tmaxLength = constants.maxLength,\n\ttype = \"text\",\n\tsize = 50,\n\ttitle,\n\tautoFocus = false,\n\thasErrors = false,\n\thasWarnings = false,\n\trequired = false,\n\tinlineLabel = false,\n\tcustomIcon,\n\tdisabled = false,\n\treadOnly = false,\n\tonChange,\n\tonBlur,\n\tonKeyDown,\n\tonKeyUp,\n\tonFocus,\n\tdataQa,\n\tdataTags,\n\tfullWidth = false,\n\twidth,\n\tendAdornment,\n\tminWidth,\n\tinputRef\n}: SolaceTextFieldProps): JSX.Element {\n\tconst theme = useTheme();\n\n\tconst endIconProps =\n\t\tcustomIcon && customIcon.position === \"end\" ? (\n\t\t\t<IconButton onClick={customIcon.handleClick} aria-label={customIcon.ariaLabel}>\n\t\t\t\t{customIcon.icon}\n\t\t\t</IconButton>\n\t\t) : null;\n\n\tconst inputEndAdornment =\n\t\tendIconProps || endAdornment\n\t\t\t? {\n\t\t\t\t\tendAdornment: (\n\t\t\t\t\t\t<InputAdornment position=\"end\">\n\t\t\t\t\t\t\t{endAdornment}\n\t\t\t\t\t\t\t{endIconProps}\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\tconst inputStartAdornment =\n\t\tcustomIcon && customIcon.position === \"start\"\n\t\t\t? {\n\t\t\t\t\tstartAdornment: (\n\t\t\t\t\t\t<InputAdornment position={customIcon.position}>\n\t\t\t\t\t\t\t<IconButton onClick={customIcon.handleClick} aria-label={customIcon.ariaLabel}>\n\t\t\t\t\t\t\t\t{customIcon.icon}\n\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\tconst defaultInputProps = {\n\t\tsx: { height: theme.spacing(4) },\n\t\tdisabled: disabled,\n\t\trequired: required\n\t};\n\n\tconst handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tif (onChange) {\n\t\t\tonChange({\n\t\t\t\tname: name,\n\t\t\t\tvalue: event.target.value\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getId = () => {\n\t\treturn id ? id : name;\n\t};\n\n\tconst TooltipContainer = styled(\"div\")(({ theme }) => ({\n\t\t...(theme.mixins.formComponent_ReadOnlyToolTipContainer.container as CSSProperties)\n\t}));\n\n\tconst textField = () => {\n\t\t/* read-only behaviour */\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<TooltipContainer>\n\t\t\t\t\t<SolaceTooltip\n\t\t\t\t\t\tvariant=\"overflow\"\n\t\t\t\t\t\ttitle={typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t\tdataQa={dataQa}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof value !== \"undefined\" && value !== null ? value + \"\" : \"\"}\n\t\t\t\t\t</SolaceTooltip>\n\t\t\t\t</TooltipContainer>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<TextField\n\t\t\t\t\tid={`${getId()}`}\n\t\t\t\t\tname={name}\n\t\t\t\t\tinputProps={{\n\t\t\t\t\t\tmaxLength: maxLength,\n\t\t\t\t\t\tsize: size,\n\t\t\t\t\t\t\"data-qa\": dataQa,\n\t\t\t\t\t\t\"data-tags\": dataTags,\n\t\t\t\t\t\t\"data-testid\": dataQa,\n\t\t\t\t\t\t\"data-lpignore\": true,\n\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t...(helperText ? { \"aria-describedby\": `${getId()}-textfield-helper-text` } : {}),\n\t\t\t\t\t\t...(label ? { \"aria-labelledby\": `${getId()}-label` } : {}),\n\t\t\t\t\t\t\"aria-readonly\": readOnly,\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tmin: 0\n\t\t\t\t\t}}\n\t\t\t\t\tinputRef={inputRef}\n\t\t\t\t\ttype={type}\n\t\t\t\t\terror={hasErrors}\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\tInputProps={{ ...defaultInputProps, ...inputEndAdornment, ...inputStartAdornment }}\n\t\t\t\t\tmargin=\"dense\"\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tfullWidth={fullWidth}\n\t\t\t\t\tsx={{ minWidth: minWidth }}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<FormChildBase\n\t\t\tid={getId()}\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terrorText={hasErrors ? helperText : undefined}\n\t\t\twarningText={hasWarnings ? helperText : undefined}\n\t\t\tdisabled={disabled}\n\t\t\treadOnly={readOnly}\n\t\t\trequired={required}\n\t\t\tinlineLabel={inlineLabel}\n\t\t\tcenterInlineLabel={inlineLabel}\n\t\t\tsx={{ width }}\n\t\t>\n\t\t\t{textField()}\n\t\t</FormChildBase>\n\t);\n}\n\nexport default SolaceTextField;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkKALFXZNR_js=require('./chunk-KALFXZNR.js'),react=require('react'),lodash=require('lodash'),jsxRuntime=require('react/jsx-runtime'),maasIcons=require('@SolaceDev/maas-icons');var R="text",z="overflow",M="rich",Z="html",m={text:R,overflow:z,rich:M,html:Z};var k=chunkKALFXZNR_js.wa("div")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",position:"relative","&::after":{content:'""',display:"block"}}));function A({id:e,title:t,variant:o=m.text,children:l,placement:w="bottom",maxWidth:C="small",disableFocusListener:L=false,disableHoverListener:W=false,enterDelay:I=500,enterNextDelay:H=0,leaveDelay:V=0,open:X,onOpen:f,onClose:c,dataQa:_,dataTags:D}){let[F,T]=react.useState(false),p=react.useRef(null),J=react.useCallback(x=>{if(lodash.isEmpty(t))return;let h=true;o==="overflow"&&p.current&&p.current.scrollWidth<=p.current.clientWidth&&(h=false),h&&(T(true),f&&f(x));},[f,t,o]),O=react.useCallback(x=>{T(false),c&&c(x);},[c]);return jsxRuntime.jsx(chunkKALFXZNR_js.Bg,{id:e,title:t??"",classes:{tooltip:`${o===m.html||o===m.rich?"htmlContent":""} ${C?C+"Width":""}`},placement:w,"data-qa":_,"data-tags":D,disableFocusListener:L,disableHoverListener:W,enterDelay:I,enterNextDelay:H,leaveDelay:V,TransitionComponent:chunkKALFXZNR_js.uc,TransitionProps:{timeout:{enter:150,exit:200}},open:X??F,onOpen:J,onClose:O,children:o==="overflow"?jsxRuntime.jsx(k,{ref:p,children:l}):typeof l=="string"?jsxRuntime.jsx("span",{children:l}):l})}var ce=A;function q({children:e}){let t=chunkKALFXZNR_js.ua();return jsxRuntime.jsx(chunkKALFXZNR_js.le,{sx:{color:t.palette.ux.secondary.text.wMain,fontSize:t.typography.caption.fontSize,marginTop:"2px"},children:e})}var Ce=q;var Q=chunkKALFXZNR_js.wa(chunkKALFXZNR_js.li)(({theme:e})=>({...e.mixins.formComponent_ErrorText.container})),U=chunkKALFXZNR_js.wa(chunkKALFXZNR_js.le)(({theme:e})=>({...e.mixins.formComponent_ErrorText.label}));function Y({children:e}){let t=chunkKALFXZNR_js.ua(),o=t.typography.subtitle1.fontSize?.toString();return jsxRuntime.jsxs(Q,{children:[jsxRuntime.jsx(maasIcons.Error16Icon,{sx:{fontSize:o?parseInt(o):chunkKALFXZNR_js.ni.md},fill:t.palette.ux.error.wMain}),jsxRuntime.jsx(U,{children:e})]})}var ye=Y;function b({size:e,fill:t}){return jsxRuntime.jsxs(chunkKALFXZNR_js.Na,{sx:{width:`${e}px`,height:`${e}px`},viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.8746 14.996C11.9493 15.0706 12.04 15.108 12.1466 15.108H13.4426C13.56 15.108 13.6506 15.0706 13.7146 14.996C13.7893 14.9213 13.8266 14.8306 13.8266 14.724V10.396C13.8266 10.2786 13.7893 10.188 13.7146 10.124C13.6506 10.0493 13.56 10.012 13.4426 10.012H12.1466C12.04 10.012 11.9493 10.0493 11.8746 10.124C11.8 10.1986 11.7626 10.2893 11.7626 10.396V14.724C11.7626 14.8306 11.8 14.9213 11.8746 14.996Z",fill:t}),jsxRuntime.jsx("path",{d:"M11.7786 18.1C11.8533 18.1746 11.944 18.212 12.0506 18.212H13.5386C13.656 18.212 13.752 18.1746 13.8266 18.1C13.9013 18.0253 13.9386 17.9346 13.9386 17.828V16.34C13.9386 16.2226 13.9013 16.1266 13.8266 16.052C13.752 15.9773 13.656 15.94 13.5386 15.94H12.0506C11.944 15.94 11.8533 15.9773 11.7786 16.052C11.704 16.1266 11.6666 16.2226 11.6666 16.34V17.828C11.6666 17.9346 11.704 18.0253 11.7786 18.1Z",fill:t}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7919 3.79001C12.1726 3.10304 13.1604 3.10304 13.5411 3.79001L22.2358 19.4772C22.6053 20.1437 22.1233 20.962 21.3612 20.962H3.97177C3.20973 20.962 2.72771 20.1437 3.09713 19.4772L11.7919 3.79001ZM5.66936 18.962L12.6665 6.3376L19.6636 18.962H5.66936Z",fill:t})]})}var te=chunkKALFXZNR_js.wa(chunkKALFXZNR_js.li)(({theme:e})=>({...e.mixins.formComponent_WarningText.container})),oe=chunkKALFXZNR_js.wa(chunkKALFXZNR_js.le)(({theme:e})=>({...e.mixins.formComponent_WarningText.label}));function re({children:e}){let t=chunkKALFXZNR_js.ua(),o=t.typography.subtitle1.fontSize?.toString();return jsxRuntime.jsxs(te,{children:[jsxRuntime.jsx(b,{size:o?parseInt(o):chunkKALFXZNR_js.ni.md,fill:t.palette.ux.warning.w100}),jsxRuntime.jsx(oe,{children:e})]})}var _e=re;exports.a=m;exports.b=ce;exports.c=Ce;exports.d=ye;exports.e=b;exports.f=_e;//# sourceMappingURL=chunk-NT45IFR2.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-NT45IFR2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/solaceTooltip.ts","../src/components/SolaceToolTip.tsx","../src/components/form/HelperText.tsx","../src/components/form/ErrorText.tsx","../src/resources/icons/WarnIcon.tsx","../src/components/form/WarningText.tsx"],"names":["text","overflow","rich","html","TooltipVariant","OverflowDiv","styled_default","SolaceTooltip","id","title","variant","children","placement","maxWidth","disableFocusListener","disableHoverListener","enterDelay","enterNextDelay","leaveDelay","open","onOpen","onClose","dataQa","dataTags","internalOpen","setInternalOpen","useState","textElementRef","useRef","handleOpen","useCallback","event","isEmpty","shouldOpen","handleClose","jsx","Tooltip_default","Fade_default","SolaceToolTip_default","HelperText","theme","useTheme","FormLabel_default","HelperText_default","ErrorTextContainer","Box_default","ErrorTextLabel","ErrorText","size","jsxs","Error16Icon","BASE_FONT_PX_SIZES","ErrorText_default","WarnIcon","fill","SvgIcon_default","WarningTextContainer","WarningTextLabel","WarningText","WarningText_default"],"mappings":"oMAgBA,IAAMA,CAAAA,CAAO,MAAA,CACPC,CAAAA,CAAW,UAAA,CACXC,CAAAA,CAAO,MAAA,CAEPC,CAAAA,CAAO,MAAA,CAEAC,CAAAA,CAAiB,CAC7B,IAAA,CAAMJ,CAAAA,CACN,SAAUC,CAAAA,CACV,IAAA,CAAMC,CAAAA,CAEN,IAAA,CAAMC,CACP,ECkEA,IAAME,CAAAA,CAAcC,mBAAAA,CAAO,KAAK,CAAA,CAAE,KAAO,CACxC,UAAA,CAAY,QAAA,CACZ,QAAA,CAAU,QAAA,CACV,YAAA,CAAc,WACd,QAAA,CAAU,UAAA,CAEV,UAAA,CAAY,CACX,OAAA,CAAS,IAAA,CACT,OAAA,CAAS,OACV,CACD,CAAA,CAAE,CAAA,CAEF,SAASC,CAAAA,CAAc,CACtB,EAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,EACA,OAAA,CAAAC,CAAAA,CAAUN,CAAAA,CAAe,IAAA,CACzB,QAAA,CAAAO,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,QAAA,CACZ,QAAA,CAAAC,CAAAA,CAAW,OAAA,CACX,oBAAA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CAC7B,CAEF,KAEOgD,EAAAA,CAAQD","file":"chunk-NT45IFR2.js","sourcesContent":["/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst text = \"text\";\nconst overflow = \"overflow\";\nconst rich = \"rich\";\n/** @deprecated - as of Nov 12, 2024 the 'html variant is being deprecated in favour of using the rich variant**/\nconst html = \"html\";\n\nexport const TooltipVariant = {\n\ttext: text,\n\toverflow: overflow,\n\trich: rich,\n\t/** @deprecated [Nov 2024] the \"html\" variant for SolaceTooltip has been deprecated, please use rich variant instead */\n\thtml: html\n};\n\nexport type TooltipVariantTypes = (typeof TooltipVariant)[keyof typeof TooltipVariant];\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { styled, Tooltip } from \"@mui/material\";\nimport { Fade } from \"@mui/material\";\nimport SolaceComponentProps from \"./SolaceComponentProps\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { isEmpty } from \"lodash\";\nimport { TooltipVariant, TooltipVariantTypes } from \"../types/solaceTooltip\";\n\nexport interface SolaceTooltipProps extends SolaceComponentProps {\n\t/**\n\t * Unique identifier ... if `id` is not specified, a randomly generated value will be used in order to make it accessible for screen readers\n\t */\n\tid?: string;\n\t/**\n\t * Tooltip title\n\t */\n\ttitle?: string | JSX.Element;\n\t/**\n\t * Different type of tooltip, default to `text`\n\t */\n\tvariant?: TooltipVariantTypes;\n\t/**\n\t * Tooltip referenced element.\n\t */\n\tchildren: string | JSX.Element;\n\t/**\n\t * Tooltip placement, default to `bottom`\n\t */\n\tplacement?:\n\t\t| \"bottom-end\"\n\t\t| \"bottom-start\"\n\t\t| \"bottom\"\n\t\t| \"left-end\"\n\t\t| \"left-start\"\n\t\t| \"left\"\n\t\t| \"right-end\"\n\t\t| \"right-start\"\n\t\t| \"right\"\n\t\t| \"top-end\"\n\t\t| \"top-start\"\n\t\t| \"top\";\n\t/**\n\t * Tooltip maximum width, default to small\n\t */\n\tmaxWidth?: \"small\" | \"medium\" | \"full\";\n\t/**\n\t * Disable listener to show tooltip when referenced element is focused, default to false\n\t */\n\tdisableFocusListener?: boolean;\n\t/**\n\t * Disable listener to show tooltip when referenced element is hovered, default to false\n\t */\n\tdisableHoverListener?: boolean;\n\t/**\n\t * The number of milliseconds to wait before showing the tooltip. Default is 500ms\n\t */\n\tenterDelay?: number;\n\t/**\n\t * The number of milliseconds to wait before showing the tooltip when one was already recently opened. Default is 0ms\n\t */\n\tenterNextDelay?: number;\n\t/**\n\t * The number of milliseconds to wait before hiding the tooltip. Default is 0ms\n\t */\n\tleaveDelay?: number;\n\t/**\n\t * Controlled open state for tooltip. If `true`, the component is shown\n\t */\n\topen?: boolean;\n\t/**\n\t * Callback fired when the component requests to be open. Used in conjunction with `open` and `onClose`\n\t */\n\tonOpen?: (event: React.SyntheticEvent) => void;\n\t/**\n\t * Callback fired when the component requests to be closed. Used in conjunction with `open` and `onOpen`\n\t */\n\tonClose?: (event: Event | React.SyntheticEvent<Element, Event>) => void;\n}\n\nconst OverflowDiv = styled(\"div\")(() => ({\n\twhiteSpace: \"nowrap\",\n\toverflow: \"hidden\",\n\ttextOverflow: \"ellipsis\",\n\tposition: \"relative\",\n\t// adding this empty block to prevent showing tooltip twice on Safari\n\t\"&::after\": {\n\t\tcontent: '\"\"',\n\t\tdisplay: \"block\"\n\t}\n}));\n\nfunction SolaceTooltip({\n\tid,\n\ttitle,\n\tvariant = TooltipVariant.text,\n\tchildren,\n\tplacement = \"bottom\",\n\tmaxWidth = \"small\",\n\tdisableFocusListener = false,\n\tdisableHoverListener = false,\n\tenterDelay = 500,\n\tenterNextDelay = 0,\n\tleaveDelay = 0,\n\topen,\n\tonOpen,\n\tonClose,\n\tdataQa,\n\tdataTags\n}: SolaceTooltipProps) {\n\tconst [internalOpen, setInternalOpen] = useState(false);\n\tconst textElementRef = useRef<HTMLDivElement>(null);\n\n\tconst handleOpen = useCallback(\n\t\t(event: React.SyntheticEvent) => {\n\t\t\t// if empty, don't open the tooltip.\n\t\t\tif (isEmpty(title)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet shouldOpen = true;\n\t\t\tif (\n\t\t\t\tvariant === \"overflow\" &&\n\t\t\t\ttextElementRef.current &&\n\t\t\t\ttextElementRef.current.scrollWidth <= textElementRef.current.clientWidth\n\t\t\t) {\n\t\t\t\tshouldOpen = false;\n\t\t\t}\n\t\t\tif (shouldOpen) {\n\t\t\t\tsetInternalOpen(true);\n\t\t\t\tif (onOpen) {\n\t\t\t\t\tonOpen(event);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[onOpen, title, variant]\n\t);\n\n\tconst handleClose = useCallback(\n\t\t(event: Event | React.SyntheticEvent<Element, Event>) => {\n\t\t\tsetInternalOpen(false);\n\t\t\tif (onClose) {\n\t\t\t\tonClose(event);\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\treturn (\n\t\t<Tooltip\n\t\t\tid={id}\n\t\t\ttitle={title ?? \"\"}\n\t\t\tclasses={{\n\t\t\t\ttooltip: `${variant === TooltipVariant.html || variant === TooltipVariant.rich ? \"htmlContent\" : \"\"} ${\n\t\t\t\t\tmaxWidth ? maxWidth + \"Width\" : \"\"\n\t\t\t\t}`\n\t\t\t}}\n\t\t\tplacement={placement}\n\t\t\tdata-qa={dataQa}\n\t\t\tdata-tags={dataTags}\n\t\t\tdisableFocusListener={disableFocusListener}\n\t\t\tdisableHoverListener={disableHoverListener}\n\t\t\tenterDelay={enterDelay}\n\t\t\tenterNextDelay={enterNextDelay}\n\t\t\tleaveDelay={leaveDelay}\n\t\t\tTransitionComponent={Fade}\n\t\t\tTransitionProps={{ timeout: { enter: 150, exit: 200 } }}\n\t\t\topen={open ?? internalOpen}\n\t\t\tonOpen={handleOpen}\n\t\t\tonClose={handleClose}\n\t\t>\n\t\t\t{variant === \"overflow\" ? (\n\t\t\t\t<OverflowDiv ref={textElementRef}>{children}</OverflowDiv>\n\t\t\t) : typeof children === \"string\" ? (\n\t\t\t\t<span>{children}</span>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</Tooltip>\n\t);\n}\n\nexport default SolaceTooltip;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme } from \"@mui/material\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\n\nexport interface HelperTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction HelperText({ children }: HelperTextProps): JSX.Element {\n\tconst theme = useTheme();\n\treturn (\n\t\t<FormLabel\n\t\t\tsx={{\n\t\t\t\tcolor: theme.palette.ux.secondary.text.wMain,\n\t\t\t\tfontSize: theme.typography.caption.fontSize,\n\t\t\t\tmarginTop: \"2px\"\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</FormLabel>\n\t);\n}\n\nexport default HelperText;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme, styled } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { Error16Icon } from \"@SolaceDev/maas-icons\";\nimport { BASE_FONT_PX_SIZES } from \"../../resources/typography\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nconst ErrorTextContainer = styled(Box)(({ theme }) => ({\n\t...(theme.mixins.formComponent_ErrorText.container as CSSProperties)\n}));\n\nconst ErrorTextLabel = styled(FormLabel)(({ theme }) => ({\n\t...(theme.mixins.formComponent_ErrorText.label as CSSProperties)\n}));\n\nexport interface ErrorTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction ErrorText({ children }: ErrorTextProps): JSX.Element {\n\tconst theme = useTheme();\n\tconst size = theme.typography.subtitle1.fontSize?.toString();\n\treturn (\n\t\t<ErrorTextContainer>\n\t\t\t<Error16Icon\n\t\t\t\tsx={{ fontSize: size ? parseInt(size) : BASE_FONT_PX_SIZES.md }}\n\t\t\t\tfill={theme.palette.ux.error.wMain}\n\t\t\t/>\n\t\t\t<ErrorTextLabel>{children}</ErrorTextLabel>\n\t\t</ErrorTextContainer>\n\t);\n}\n\nexport default ErrorText;\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IconProps } from \"./IconProps\";\nimport { SvgIcon } from \"@mui/material\";\n\nexport function WarnIcon({ size, fill }: IconProps): JSX.Element {\n\treturn (\n\t\t<SvgIcon sx={{ width: `${size}px`, height: `${size}px` }} viewBox=\"0 0 24 24\">\n\t\t\t<path\n\t\t\t\td=\"M11.8746 14.996C11.9493 15.0706 12.04 15.108 12.1466 15.108H13.4426C13.56 15.108 13.6506 15.0706 13.7146 14.996C13.7893 14.9213 13.8266 14.8306 13.8266 14.724V10.396C13.8266 10.2786 13.7893 10.188 13.7146 10.124C13.6506 10.0493 13.56 10.012 13.4426 10.012H12.1466C12.04 10.012 11.9493 10.0493 11.8746 10.124C11.8 10.1986 11.7626 10.2893 11.7626 10.396V14.724C11.7626 14.8306 11.8 14.9213 11.8746 14.996Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M11.7786 18.1C11.8533 18.1746 11.944 18.212 12.0506 18.212H13.5386C13.656 18.212 13.752 18.1746 13.8266 18.1C13.9013 18.0253 13.9386 17.9346 13.9386 17.828V16.34C13.9386 16.2226 13.9013 16.1266 13.8266 16.052C13.752 15.9773 13.656 15.94 13.5386 15.94H12.0506C11.944 15.94 11.8533 15.9773 11.7786 16.052C11.704 16.1266 11.6666 16.2226 11.6666 16.34V17.828C11.6666 17.9346 11.704 18.0253 11.7786 18.1Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M11.7919 3.79001C12.1726 3.10304 13.1604 3.10304 13.5411 3.79001L22.2358 19.4772C22.6053 20.1437 22.1233 20.962 21.3612 20.962H3.97177C3.20973 20.962 2.72771 20.1437 3.09713 19.4772L11.7919 3.79001ZM5.66936 18.962L12.6665 6.3376L19.6636 18.962H5.66936Z\"\n\t\t\t\tfill={fill}\n\t\t\t/>\n\t\t</SvgIcon>\n\t);\n}\n","/*\n * Copyright 2023-2025 Solace Systems. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormLabel, useTheme, styled } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport SolaceComponentProps from \"../SolaceComponentProps\";\nimport { WarnIcon } from \"../../resources/icons/WarnIcon\";\nimport { BASE_FONT_PX_SIZES } from \"../../resources/typography\";\nimport { CSSProperties } from \"@mui/styled-engine\";\n\nconst WarningTextContainer = styled(Box)(({ theme }) => ({\n\t...(theme.mixins.formComponent_WarningText.container as CSSProperties)\n}));\n\nconst WarningTextLabel = styled(FormLabel)(({ theme }) => ({\n\t...(theme.mixins.formComponent_WarningText.label as CSSProperties)\n}));\n\nexport interface WarningTextProps extends SolaceComponentProps {\n\tchildren: string | JSX.Element;\n}\n\nfunction WarningText({ children }: WarningTextProps): JSX.Element {\n\tconst theme = useTheme();\n\tconst size = theme.typography.subtitle1.fontSize?.toString();\n\treturn (\n\t\t<WarningTextContainer>\n\t\t\t<WarnIcon size={size ? parseInt(size) : BASE_FONT_PX_SIZES.md} fill={theme.palette.ux.warning.w100}></WarnIcon>\n\t\t\t<WarningTextLabel>{children}</WarningTextLabel>\n\t\t</WarningTextContainer>\n\t);\n}\n\nexport default WarningText;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b,c}from'./chunk-
|
|
1
|
+
import {b,c}from'./chunk-YJENEMV2.modern.mjs';import {Oa,ua,Ic,md,D,le,he,Kb,_h,eb}from'./chunk-PWYVYHTJ.modern.mjs';import {jsx,jsxs}from'react/jsx-runtime';import ne,{useState,useEffect}from'react';var j=Oa(jsx("path",{d:`M16.233,9.111L12,13.334L7.769,9.112c-0.157-0.157-0.412-0.157-0.57,0L6.359,9.96c-0.157,0.157-0.157,0.406,0,0.563
|
|
2
2
|
l5.361,5.361c0.155,0.155,0.406,0.155,0.561,0l5.362-5.362c0.154-0.154,0.154-0.405,0-0.559l-0.851-0.851
|
|
3
|
-
C16.637,8.957,16.387,8.957,16.233,9.111z`}),"SelectDropDownIcon");var q=Oa(jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var J=Oa(jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined");var We=Oa(jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ie=Oa(jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");var Ke=Oa(jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe=Oa(jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var Xe=Oa(jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");var oo=Oa(jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");var fo=Oa(jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var V=Oa(jsx("path",{d:"M19 13H5v-2h14z"}),"Remove");var xo=Oa(jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22zm1 14h-2v2h2zm0-6h-2v4h2z"}),"ReportProblemOutlined");var ho=Oa(jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune");function ie({id:f,htmlForId:o,required:d=false,disabled:p=false,bold:t=false,large:r=false,readOnly:l=false,children:n}){let a=ua();return jsx(le,{id:f,htmlFor:o,required:d,disabled:p,sx:{display:"block",fontSize:r?a.typography.subtitle1:a.typography.body1},className:D({"bold-label":t,"check-box-label":true,readOnly:l}),children:n})}var Te=({id:f,name:o,label:d,title:p,helperText:t,hasErrors:r=false,checked:l=false,required:n=false,disabled:a=false,indeterminate:m=false,readOnly:S=false,boldLabel:A=false,largeLabel:c=false,subTextProps:s={label:"",light:false},onChange:w,dataQa:R,dataTags:y})=>{let O=ua(),[B,P]=useState(l);useEffect(()=>{P(l);},[l]);let k=g=>{P(g.target.checked),w&&w({name:o,value:g.target.checked});},D$1=()=>jsxs(Ic,{display:"flex",children:[r&&jsx(J,{sx:{marginRight:O.spacing()}}),t]}),x=()=>f||o;return jsx(ne.Fragment,{children:jsxs(Ic,{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:"auto auto",alignItems:"center",children:[jsx(md,{id:`${x()}-checkbox`,name:o,indeterminate:m,inputProps:{...d?{"aria-labelledby":`${x()}-label`}:{},"data-qa":R,"data-tags":y},title:p,disabled:a||S,className:D({readOnly:S}),disableRipple:true,checked:B,onChange:k,checkedIcon:jsx(q,{}),indeterminateIcon:jsx(V,{})}),d&&jsx(Ic,{children:jsx(ie,{id:`${x()}-label`,htmlForId:`${x()}-checkbox`,required:n,disabled:a,bold:A||!!s.label&&!s.light,large:c,readOnly:S,children:d})}),s.label&&jsx(Ic,{gridColumn:"2",gridRow:"2",children:jsx(le,{id:`${f}-subtext`,disabled:a,className:D({"light-sub-text":s.light,"check-box-label":true}),children:s.label})}),t&&jsx(Ic,{gridColumn:"2",gridRow:"3",children:jsx(he,{error:r,component:"div",sx:{marginTop:O.spacing(.25)},children:D$1()})})]})})},bo=Te;function Se(f){let o=ua(),d={info:o.palette.ux.info.w100,error:o.palette.ux.error.w100,warning:o.palette.ux.warning.w100,success:o.palette.ux.success.w100},{variant:p="body1",children:t,color:r,...l}=f;return jsx(Kb,{variant:p,color:r&&typeof r=="string"?(a=>d[a])(r)||r:"textPrimary",...l,children:t})}function Re({id:f,name:o,label:d,value:p="",helperText:t,title:r,hasErrors:l=false,required:n=false,disabled:a=false,readOnly:m=false,inlineLabel:S=false,displayEmpty:A=false,onChange:c,getOptionDisplayValue:s,dataQa:w,dataTags:R,children:y,width:O,maxHeight:B,open:P,onOpen:k,onClose:D$1,menuAnchorOrigin:x,menuTransformOrigin:g}){let M=ua(),[L,v]=useState(p);useEffect(()=>{v(p);},[p]);let E=h=>{v(h.target.value),c&&c({name:o,value:h.target.value});},i=()=>f||o,H=()=>{let h={sx:{maxHeight:B,width:O}};return x&&(h.anchorOrigin=x),g&&(h.transformOrigin=g),h},C=()=>jsx(_h,{id:i(),name:o,inputProps:{"data-qa":w,"data-tags":R,...t?{"aria-describedby":`${i()}-select-helper-text`}:{},...d?{"aria-labelledby":`${i()}-label`}:{},"aria-readonly":m,title:r},select:true,InputProps:{sx:{height:M.spacing(4)},className:D({readOnlySelect:m,emptySelect:!L}),disabled:a&&!m,readOnly:m,required:n},title:r,autoComplete:"off",required:n,disabled:a||m,error:l,margin:"dense",value:L,onChange:E,SelectProps:{IconComponent:j,MenuProps:{TransitionComponent:eb,...H()},renderValue:s?h=>s(h):void 0,displayEmpty:A,onOpen:k,onClose:D$1,open:P},children:y});return jsx(b,{id:i(),label:d,helperText:t,errorText:l?t:void 0,disabled:a,readOnly:m,required:n,inlineLabel:S,centerInlineLabel:S,sx:{width:O},children:C()})}var Go=Re;function Oe({id:f,name:o,label:d,value:p,helperText:t,placeholder:r,maxLength:l=c.maxLength,minRows:n=4,maxRows:a=4,title:m,autoFocus:S=false,hasErrors:A=false,required:c$1=false,inlineLabel:s=false,disabled:w=false,readOnly:R=false,onChange:y,onBlur:O,onKeyDown:B,onKeyUp:P,onFocus:k,dataQa:D,dataTags:x,fullWidth:g=false,resizable:M,width:L}){let v=ua(),E=C=>{y&&y({name:o,value:C.target.value});},i=()=>{let C=f||o;return M&&(C=`${C}-resizable-${M}`),C},H=()=>jsx(_h,{id:`${i()}`,name:o,inputProps:{maxLength:l,"data-qa":D,"data-tags":x,readOnly:R,...t?{"aria-describedby":`${i()}-textfield-helper-text`}:{},...d?{"aria-labelledby":`${i()}-label`}:{},"aria-readonly":R,title:m},type:"text",autoComplete:"off",autoFocus:S,error:A,minRows:n,maxRows:a,multiline:true,InputProps:{sx:{height:v.spacing(4)},disabled:w,required:c$1,className:s?"inline-label":""},margin:"dense",placeholder:r,value:p,onChange:E,onBlur:O,onKeyDown:B,onKeyUp:P,onFocus:k,fullWidth:g});return jsx(b,{id:i(),label:d,helperText:t,errorText:A?t:void 0,disabled:w,readOnly:R,required:c$1,inlineLabel:s,sx:{width:L},children:H()})}var Jo=Oe;export{j as a,Ie as b,Ke as c,Xe as d,xo as e,We as f,J as g,qe as h,oo as i,fo as j,ho as k,bo as l,Se as m,Go as n,Jo as o};//# sourceMappingURL=chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
C16.637,8.957,16.387,8.957,16.233,9.111z`}),"SelectDropDownIcon");var q=Oa(jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var J=Oa(jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined");var We=Oa(jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ie=Oa(jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");var Ke=Oa(jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe=Oa(jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var Xe=Oa(jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");var oo=Oa(jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");var fo=Oa(jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var V=Oa(jsx("path",{d:"M19 13H5v-2h14z"}),"Remove");var xo=Oa(jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22zm1 14h-2v2h2zm0-6h-2v4h2z"}),"ReportProblemOutlined");var ho=Oa(jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune");function ie({id:f,htmlForId:o,required:d=false,disabled:p=false,bold:t=false,large:r=false,readOnly:l=false,children:n}){let a=ua();return jsx(le,{id:f,htmlFor:o,required:d,disabled:p,sx:{display:"block",fontSize:r?a.typography.subtitle1:a.typography.body1},className:D({"bold-label":t,"check-box-label":true,readOnly:l}),children:n})}var Te=({id:f,name:o,label:d,title:p,helperText:t,hasErrors:r=false,checked:l=false,required:n=false,disabled:a=false,indeterminate:m=false,readOnly:S=false,boldLabel:A=false,largeLabel:c=false,subTextProps:s={label:"",light:false},onChange:w,dataQa:R,dataTags:y})=>{let O=ua(),[B,P]=useState(l);useEffect(()=>{P(l);},[l]);let k=g=>{P(g.target.checked),w&&w({name:o,value:g.target.checked});},D$1=()=>jsxs(Ic,{display:"flex",children:[r&&jsx(J,{sx:{marginRight:O.spacing()}}),t]}),x=()=>f||o;return jsx(ne.Fragment,{children:jsxs(Ic,{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:"auto auto",alignItems:"center",children:[jsx(md,{id:`${x()}-checkbox`,name:o,indeterminate:m,inputProps:{...d?{"aria-labelledby":`${x()}-label`}:{},"data-qa":R,"data-tags":y},title:p,disabled:a||S,className:D({readOnly:S}),disableRipple:true,checked:B,onChange:k,checkedIcon:jsx(q,{}),indeterminateIcon:jsx(V,{})}),d&&jsx(Ic,{children:jsx(ie,{id:`${x()}-label`,htmlForId:`${x()}-checkbox`,required:n,disabled:a,bold:A||!!s.label&&!s.light,large:c,readOnly:S,children:d})}),s.label&&jsx(Ic,{gridColumn:"2",gridRow:"2",children:jsx(le,{id:`${f}-subtext`,disabled:a,className:D({"light-sub-text":s.light,"check-box-label":true}),children:s.label})}),t&&jsx(Ic,{gridColumn:"2",gridRow:"3",children:jsx(he,{error:r,component:"div",sx:{marginTop:O.spacing(.25)},children:D$1()})})]})})},bo=Te;function Se(f){let o=ua(),d={info:o.palette.ux.info.w100,error:o.palette.ux.error.w100,warning:o.palette.ux.warning.w100,success:o.palette.ux.success.w100},{variant:p="body1",children:t,color:r,...l}=f;return jsx(Kb,{variant:p,color:r&&typeof r=="string"?(a=>d[a])(r)||r:"textPrimary",...l,children:t})}function Re({id:f,name:o,label:d,value:p="",helperText:t,title:r,hasErrors:l=false,required:n=false,disabled:a=false,readOnly:m=false,inlineLabel:S=false,displayEmpty:A=false,onChange:c,getOptionDisplayValue:s,dataQa:w,dataTags:R,children:y,width:O,maxHeight:B,open:P,onOpen:k,onClose:D$1,menuAnchorOrigin:x,menuTransformOrigin:g}){let M=ua(),[L,v]=useState(p);useEffect(()=>{v(p);},[p]);let E=h=>{v(h.target.value),c&&c({name:o,value:h.target.value});},i=()=>f||o,H=()=>{let h={sx:{maxHeight:B,width:O}};return x&&(h.anchorOrigin=x),g&&(h.transformOrigin=g),h},C=()=>jsx(_h,{id:i(),name:o,inputProps:{"data-qa":w,"data-tags":R,...t?{"aria-describedby":`${i()}-select-helper-text`}:{},...d?{"aria-labelledby":`${i()}-label`}:{},"aria-readonly":m,title:r},select:true,InputProps:{sx:{height:M.spacing(4)},className:D({readOnlySelect:m,emptySelect:!L}),disabled:a&&!m,readOnly:m,required:n},title:r,autoComplete:"off",required:n,disabled:a||m,error:l,margin:"dense",value:L,onChange:E,SelectProps:{IconComponent:j,MenuProps:{TransitionComponent:eb,...H()},renderValue:s?h=>s(h):void 0,displayEmpty:A,onOpen:k,onClose:D$1,open:P},children:y});return jsx(b,{id:i(),label:d,helperText:t,errorText:l?t:void 0,disabled:a,readOnly:m,required:n,inlineLabel:S,centerInlineLabel:S,sx:{width:O},children:C()})}var Go=Re;function Oe({id:f,name:o,label:d,value:p,helperText:t,placeholder:r,maxLength:l=c.maxLength,minRows:n=4,maxRows:a=4,title:m,autoFocus:S=false,hasErrors:A=false,required:c$1=false,inlineLabel:s=false,disabled:w=false,readOnly:R=false,onChange:y,onBlur:O,onKeyDown:B,onKeyUp:P,onFocus:k,dataQa:D,dataTags:x,fullWidth:g=false,resizable:M,width:L}){let v=ua(),E=C=>{y&&y({name:o,value:C.target.value});},i=()=>{let C=f||o;return M&&(C=`${C}-resizable-${M}`),C},H=()=>jsx(_h,{id:`${i()}`,name:o,inputProps:{maxLength:l,"data-qa":D,"data-tags":x,readOnly:R,...t?{"aria-describedby":`${i()}-textfield-helper-text`}:{},...d?{"aria-labelledby":`${i()}-label`}:{},"aria-readonly":R,title:m},type:"text",autoComplete:"off",autoFocus:S,error:A,minRows:n,maxRows:a,multiline:true,InputProps:{sx:{height:v.spacing(4)},disabled:w,required:c$1,className:s?"inline-label":""},margin:"dense",placeholder:r,value:p,onChange:E,onBlur:O,onKeyDown:B,onKeyUp:P,onFocus:k,fullWidth:g});return jsx(b,{id:i(),label:d,helperText:t,errorText:A?t:void 0,disabled:w,readOnly:R,required:c$1,inlineLabel:s,sx:{width:L},children:H()})}var Jo=Oe;export{j as a,Ie as b,Ke as c,Xe as d,xo as e,We as f,J as g,qe as h,oo as i,fo as j,ho as k,bo as l,Se as m,Go as n,Jo as o};//# sourceMappingURL=chunk-OUM6OKBT.modern.mjs.map
|
|
4
|
+
//# sourceMappingURL=chunk-OUM6OKBT.modern.mjs.map
|