@elliemae/ds-form-layout-blocks 1.61.10 → 1.61.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +1 -1
- package/cjs/form-layout-block-item/propTypes.js.map +1 -1
- package/cjs/form-layout-block-item/styles.js.map +1 -1
- package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +1 -1
- package/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +1 -1
- package/cjs/form-layout-checkbox-group/defaultProps.js.map +1 -1
- package/cjs/form-layout-checkbox-group/propTypes.js.map +1 -1
- package/cjs/form-layout-checkbox-group/styles.js.map +1 -1
- package/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +1 -1
- package/esm/form-layout-block-item/propTypes.js.map +1 -1
- package/esm/form-layout-block-item/styles.js.map +1 -1
- package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +1 -1
- package/esm/form-layout-checkbox-group/config/useValidateProps.js.map +1 -1
- package/esm/form-layout-checkbox-group/defaultProps.js.map +1 -1
- package/esm/form-layout-checkbox-group/propTypes.js.map +1 -1
- package/esm/form-layout-checkbox-group/styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSFormLayoutBlockItem.js","sources":["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport type { DSFormLayoutBlockItemPropsT as Props } from './index.d';\nimport { propTypes } from './propTypes';\nimport { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from './styles';\n\nconst DSFormLayoutBlockItem = (props: Props): JSX.Element => {\n const {\n label,\n feedbackMessage,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup = false,\n } = props;\n\n const instanceUID = useMemo(() => uid(6), []);\n\n return (\n <StyledContainer\n leftLabel={leftLabel}\n fitContent={fitContent}\n hideLabel={hideLabel}\n withHighlight={withHighlight}\n as={isGroup ? 'fieldset' : 'div'}\n isGroup={isGroup}\n aria-describedby={`${inputID || instanceUID}_feedback_message`}\n >\n <StyledLabel htmlFor={inputID} leftLabel={leftLabel} hideLabel={hideLabel} aria-hidden={isGroup}>\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n {isGroup && <ScreenReaderOnly as=\"legend\">{label}</ScreenReaderOnly>}\n {children}\n {feedbackMessage && !hasError && (\n <StyledMessage\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n id={`${inputID || instanceUID}_feedback_message`}\n >\n {feedbackMessage}\n </StyledMessage>\n )}\n {validationMessage && hasError && (\n <StyledMessage hasError={hasError} leftLabel={leftLabel} hideLabel={hideLabel} role=\"alert\">\n {validationMessage}\n </StyledMessage>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],"names":["DSFormLayoutBlockItem","props","label","feedbackMessage","validationMessage","inputID","children","hasError","leftLabel","required","optional","hideLabel","fitContent","withHighlight","isGroup","instanceUID","useMemo","uid","React","StyledContainer","StyledLabel","StyledMark","ScreenReaderOnly","StyledMessage","propTypes","DSFormLayoutBlockItemWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAQMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA+B;
|
|
1
|
+
{"version":3,"file":"DSFormLayoutBlockItem.js","sources":["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport type { DSFormLayoutBlockItemPropsT as Props } from './index.d';\nimport { propTypes } from './propTypes';\nimport { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from './styles';\n\nconst DSFormLayoutBlockItem = (props: Props): JSX.Element => {\n const {\n label,\n feedbackMessage,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup = false,\n } = props;\n\n const instanceUID = useMemo(() => uid(6), []);\n\n return (\n <StyledContainer\n leftLabel={leftLabel}\n fitContent={fitContent}\n hideLabel={hideLabel}\n withHighlight={withHighlight}\n as={isGroup ? 'fieldset' : 'div'}\n isGroup={isGroup}\n aria-describedby={`${inputID || instanceUID}_feedback_message`}\n >\n <StyledLabel htmlFor={inputID} leftLabel={leftLabel} hideLabel={hideLabel} aria-hidden={isGroup}>\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n {isGroup && <ScreenReaderOnly as=\"legend\">{label}</ScreenReaderOnly>}\n {children}\n {feedbackMessage && !hasError && (\n <StyledMessage\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n id={`${inputID || instanceUID}_feedback_message`}\n >\n {feedbackMessage}\n </StyledMessage>\n )}\n {validationMessage && hasError && (\n <StyledMessage hasError={hasError} leftLabel={leftLabel} hideLabel={hideLabel} role=\"alert\">\n {validationMessage}\n </StyledMessage>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],"names":["DSFormLayoutBlockItem","props","label","feedbackMessage","validationMessage","inputID","children","hasError","leftLabel","required","optional","hideLabel","fitContent","withHighlight","isGroup","instanceUID","useMemo","uid","React","StyledContainer","StyledLabel","StyledMark","ScreenReaderOnly","StyledMessage","propTypes","DSFormLayoutBlockItemWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAQMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA+B;EAC3D,IACEC,KADF,GAcID,KAdJ,CACEC,KADF;MAEEC,eAFF,GAcIF,KAdJ,CAEEE,eAFF;MAGEC,iBAHF,GAcIH,KAdJ,CAGEG,iBAHF;MAIEC,OAJF,GAcIJ,KAdJ,CAIEI,OAJF;MAKEC,QALF,GAcIL,KAdJ,CAKEK,QALF;MAMEC,QANF,GAcIN,KAdJ,CAMEM,QANF;MAOEC,SAPF,GAcIP,KAdJ,CAOEO,SAPF;MAQEC,QARF,GAcIR,KAdJ,CAQEQ,QARF;MASEC,QATF,GAcIT,KAdJ,CASES,QATF;MAUEC,SAVF,GAcIV,KAdJ,CAUEU,SAVF;MAWEC,UAXF,GAcIX,KAdJ,CAWEW,UAXF;MAYEC,aAZF,GAcIZ,KAdJ,CAYEY,aAZF;uBAcIZ,KAdJ,CAaEa,OAbF;MAaEA,OAbF,+BAaY,KAbZ;EAgBA,IAAMC,WAAW,GAAGC,aAAO,CAAC;IAAA,OAAMC,OAAG,CAAC,CAAD,CAAT;GAAD,EAAe,EAAf,CAA3B;EAEA,oBACEC,wCAACC,0CAAD;IACE,SAAS,EAAEX,SADb;IAEE,UAAU,EAAEI,UAFd;IAGE,SAAS,EAAED,SAHb;IAIE,aAAa,EAAEE,aAJjB;IAKE,EAAE,EAAEC,OAAO,GAAG,UAAH,GAAgB,KAL7B;IAME,OAAO,EAAEA,OANX;IAOE,8BAAqBT,OAAO,IAAIU,WAAhC;kBAEAG,wCAACE,sCAAD;IAAa,OAAO,EAAEf,OAAtB;IAA+B,SAAS,EAAEG,SAA1C;IAAqD,SAAS,EAAEG,SAAhE;IAA2E,eAAaG;KACrFZ,KADH,EAEG,CAACO,QAAQ,IAAIC,QAAb,kBAA0BQ,wCAACG,qCAAD;IAAY,QAAQ,EAAEZ;IAFnD,CATF,EAaGK,OAAO,iBAAII,wCAACI,2CAAD;IAAkB,EAAE,EAAC;KAAUpB,KAA/B,CAbd,EAcGI,QAdH,EAeGH,eAAe,IAAI,CAACI,QAApB,iBACCW,wCAACK,wCAAD;IACE,SAAS,EAAEf,SADb;IAEE,SAAS,EAAEG,SAFb;IAGE,eAAaG,OAHf;IAIE,EAAE,YAAKT,OAAO,IAAIU,WAAhB;KAEDZ,eANH,CAhBJ,EAyBGC,iBAAiB,IAAIG,QAArB,iBACCW,wCAACK,wCAAD;IAAe,QAAQ,EAAEhB,QAAzB;IAAmC,SAAS,EAAEC,SAA9C;IAAyD,SAAS,EAAEG,SAApE;IAA+E,IAAI,EAAC;KACjFP,iBADH,CA1BJ,CADF;AAiCD;;AAEDJ,qBAAqB,CAACwB,SAAtB,GAAkCA,uCAAlC;IACMC,+BAA+B,GAAGC,kBAAQ,CAAC1B,qBAAD;AAChDyB,+BAA+B,CAACD,SAAhC,GAA4CA,uCAA5C;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-block-item/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.isRequired.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.isRequired.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),\n validationMessage: PropTypes.string.description(\n 'Validation message to show below the input component. It requires hasError property set to true to be visible.',\n ),\n hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),\n leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),\n hideLabel: PropTypes.bool.description(\n 'Hides the input label. It still requires label and labelFor property for accesibility purposes',\n ),\n withHighlight: PropTypes.bool.description(\n 'Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.',\n ),\n isGroup: PropTypes.bool.description(\n 'Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.',\n ),\n};\n"],"names":["propTypes","children","PropTypes","node","isRequired","description","label","string","inputID","feedbackMessage","validationMessage","hasError","bool","required","optional","fitContent","leftLabel","hideLabel","withHighlight","isGroup"],"mappings":";;;;;;IAEaA,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-block-item/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.isRequired.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.isRequired.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),\n validationMessage: PropTypes.string.description(\n 'Validation message to show below the input component. It requires hasError property set to true to be visible.',\n ),\n hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),\n leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),\n hideLabel: PropTypes.bool.description(\n 'Hides the input label. It still requires label and labelFor property for accesibility purposes',\n ),\n withHighlight: PropTypes.bool.description(\n 'Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.',\n ),\n isGroup: PropTypes.bool.description(\n 'Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.',\n ),\n};\n"],"names":["propTypes","children","PropTypes","node","isRequired","description","label","string","inputID","feedbackMessage","validationMessage","hasError","bool","required","optional","fitContent","leftLabel","hideLabel","withHighlight","isGroup"],"mappings":";;;;;;IAEaA,SAAS,GAAG;EACvBC,QAAQ,EAAEC,mBAAS,CAACC,IAAV,CAAeC,UAAf,CAA0BC,WAA1B,CAAsC,mBAAtC,CADa;EAEvBC,KAAK,EAAEJ,mBAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACL,8FADK,CAFgB;EAKvBG,OAAO,EAAEN,mBAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACP,oGADO,CALc;EAQvBI,eAAe,EAAEP,mBAAS,CAACK,MAAV,CAAiBF,WAAjB,CAA6B,qDAA7B,CARM;EASvBK,iBAAiB,EAAER,mBAAS,CAACK,MAAV,CAAiBF,WAAjB,CACjB,gHADiB,CATI;EAYvBM,QAAQ,EAAET,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAZa;EAavBQ,QAAQ,EAAEX,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAba;EAcvBS,QAAQ,EAAEZ,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAda;EAevBU,UAAU,EAAEb,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAfW;EAgBvBW,SAAS,EAAEd,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,oDAA3B,CAhBY;EAiBvBY,SAAS,EAAEf,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACT,gGADS,CAjBY;EAoBvBa,aAAa,EAAEhB,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACb,sGADa,CApBQ;EAuBvBc,OAAO,EAAEjB,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACP,gHADO;AAvBc;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-block-item/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type {\n DSFormLayoutBlockItemStyledContainerT,\n DSFormLayoutBlockItemStyledLabelT,\n DSFormLayoutBlockItemStyledMessageT,\n DSFormLayoutBlockItemStyledMarkT,\n} from './index.d';\n\nexport const StyledContainer = styled.div<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined)}\n align-items: center;\n ${({ theme, withHighlight }) =>\n withHighlight\n ? `\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n `\n : undefined}\n`;\n\nexport const StyledLabel = styled.label<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxs};` : undefined)}\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n`;\n\nexport const StyledMessage = styled.div<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n font-style: italic;\n text-align: right;\n line-height: 15px;\n height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined)}\n`;\n\nexport const StyledMark = styled.span<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["StyledContainer","styled","div","fitContent","undefined","isGroup","leftLabel","hideLabel","theme","withHighlight","space","xxs","xxxs","xs","StyledLabel","label","StyledMessage","fontSizes","microText","hasError","colors","danger","neutral","StyledMark","span","required","brand","ScreenReaderOnly"],"mappings":";;;;;;;;;;IAQaA,eAAe,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-block-item/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type {\n DSFormLayoutBlockItemStyledContainerT,\n DSFormLayoutBlockItemStyledLabelT,\n DSFormLayoutBlockItemStyledMessageT,\n DSFormLayoutBlockItemStyledMarkT,\n} from './index.d';\n\nexport const StyledContainer = styled.div<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined)}\n align-items: center;\n ${({ theme, withHighlight }) =>\n withHighlight\n ? `\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n `\n : undefined}\n`;\n\nexport const StyledLabel = styled.label<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxs};` : undefined)}\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n`;\n\nexport const StyledMessage = styled.div<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n font-style: italic;\n text-align: right;\n line-height: 15px;\n height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined)}\n`;\n\nexport const StyledMark = styled.span<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["StyledContainer","styled","div","fitContent","undefined","isGroup","leftLabel","hideLabel","theme","withHighlight","space","xxs","xxxs","xs","StyledLabel","label","StyledMessage","fontSizes","microText","hasError","colors","danger","neutral","StyledMark","span","required","brand","ScreenReaderOnly"],"mappings":";;;;;;;;;;IAQaA,eAAe,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,iGAKxB;EAAA,IAAGC,UAAH,QAAGA,UAAH;EAAA,OAAqBA,UAAU,GAAG,qBAAH,GAA2BC,SAA1D;AAAA,CALwB,EAMxB;EAAA,IAAGC,OAAH,SAAGA,OAAH;EAAA,OAAkBA,OAAO,GAAG,cAAH,GAAoB,EAA7C;AAAA,CANwB,EAOxB;EAAA,IAAGC,SAAH,SAAGA,SAAH;MAAcC,SAAd,SAAcA,SAAd;EAAA,OAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,0CAA1B,GAAuEH,SAAtG;AAAA,CAPwB,EASxB;EAAA,IAAGI,KAAH,SAAGA,KAAH;MAAUC,aAAV,SAAUA,aAAV;EAAA,OACAA,aAAa,+FAKAD,KAAK,CAACE,KAAN,CAAYC,GALZ,8BAMDH,KAAK,CAACE,KAAN,CAAYE,IANX,iEAQYJ,KAAK,CAACE,KAAN,CAAYG,EARxB,8CAScL,KAAK,CAACE,KAAN,CAAYC,GAT1B,uUAoBIH,KAAK,CAACE,KAAN,CAAYC,GApBhB,kCAqBGH,KAAK,CAACE,KAAN,CAAYE,IArBf,yEAuBgBJ,KAAK,CAACE,KAAN,CAAYG,EAvB5B,kDAwBkBL,KAAK,CAACE,KAAN,CAAYC,GAxB9B,iNAgCTP,SAjCJ;AAAA,CATwB;IA6CfU,WAAW,gBAAGb,0BAAM,CAACc,KAAV;EAAA;AAAA,+BAEpB;EAAA,IAAGP,KAAH,SAAGA,KAAH;MAAUF,SAAV,SAAUA,SAAV;EAAA,OAA2BA,SAAS,4BAAqBE,KAAK,CAACE,KAAN,CAAYC,GAAjC,SAA0CP,SAA9E;AAAA,CAFoB,EAGpB;EAAA,IAAGG,SAAH,SAAGA,SAAH;EAAA,OACAA,SAAS,oNAWLH,SAZJ;AAAA,CAHoB;IAkBXY,aAAa,gBAAGf,0BAAM,CAACC,GAAV;EAAA;AAAA,8IACX;EAAA,IAAGM,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,SAAN,CAAgBC,SAAhB,CAA0B,GAA1B,CAAf;AAAA,CADW,EAQf;EAAA,IAAGV,KAAH,SAAGA,KAAH;MAAUW,QAAV,SAAUA,QAAV;EAAA,OAA0BA,QAAQ,GAAGX,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAAH,GAA8Bb,KAAK,CAACY,MAAN,CAAaE,OAAb,CAAqB,GAArB,CAAhE;AAAA,CARe,EAStB;EAAA,IAAGhB,SAAH,SAAGA,SAAH;MAAcC,SAAd,SAAcA,SAAd;EAAA,OAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,mBAA1B,GAAgDH,SAA/E;AAAA,CATsB;IAYbmB,UAAU,gBAAGtB,0BAAM,CAACuB,IAAV;EAAA;AAAA,qEAIN;EAAA,IAAGhB,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAACE,KAAN,CAAYE,IAA3B;AAAA,CAJM,EAKnB;EAAA,IAAGJ,KAAH,UAAGA,KAAH;MAAUiB,QAAV,UAAUA,QAAV;EAAA,OACAA,QAAQ,mCAEUjB,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAFV,6CAKUb,KAAK,CAACY,MAAN,CAAaM,KAAb,CAAmB,GAAnB,CALV,UADR;AAAA,CALmB;IAeVC,gBAAgB,gBAAG1B,0BAAM,CAACC,GAAV;EAAA;AAAA;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSFormLayoutCheckboxGroup.js","sources":["../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes';\nimport { StyledContainer } from './styles';\nimport { defaultProps } from './defaultProps';\nimport type { DSControlledCheckboxGroupT } from './index.d';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst DSFormLayoutCheckboxGroup = (props: DSControlledCheckboxGroupT): JSX.Element => {\n useValidateProps(props);\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n return <StyledContainer direction={propsWithDefault.direction}>{propsWithDefault.children}</StyledContainer>;\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],"names":["DSFormLayoutCheckboxGroup","props","useValidateProps","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","React","StyledContainer","direction","children","propTypes","DSFormLayoutCheckboxGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;IASMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAoD;
|
|
1
|
+
{"version":3,"file":"DSFormLayoutCheckboxGroup.js","sources":["../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes';\nimport { StyledContainer } from './styles';\nimport { defaultProps } from './defaultProps';\nimport type { DSControlledCheckboxGroupT } from './index.d';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst DSFormLayoutCheckboxGroup = (props: DSControlledCheckboxGroupT): JSX.Element => {\n useValidateProps(props);\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n return <StyledContainer direction={propsWithDefault.direction}>{propsWithDefault.children}</StyledContainer>;\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],"names":["DSFormLayoutCheckboxGroup","props","useValidateProps","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","React","StyledContainer","direction","children","propTypes","DSFormLayoutCheckboxGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;IASMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAoD;EACpFC,gEAAgB,CAACD,KAAD,CAAhB;EACA,IAAME,gBAAgB,GAAGC,2CAA4B,CAACH,KAAD,EAAQI,iDAAR,CAArD;EAEA,oBAAOC,wCAACC,8CAAD;IAAiB,SAAS,EAAEJ,gBAAgB,CAACK;KAAYL,gBAAgB,CAACM,QAA1E,CAAP;AACD;;AAEDT,yBAAyB,CAACU,SAA1B,GAAsCA,2CAAtC;IACMC,mCAAmC,GAAGC,kBAAQ,CAACZ,yBAAD;AACpDW,mCAAmC,CAACD,SAApC,GAAgDA,2CAAhD;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx"],"sourcesContent":["import React from 'react';\nimport type { DSControlledCheckboxGroupT } from '../index.d';\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwCheckboxGroupDirectionError = (invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: \"horizontal\" or \"vertical\" (string)\n `,\n );\n};\n\nconst throwCheckboxGroupChildrenError = (): void => {\n throw new Error(\n `You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n `,\n );\n};\n\nexport const useValidateProps = (props: DSControlledCheckboxGroupT): void => {\n if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {\n throwCheckboxGroupDirectionError(props.direction);\n }\n if (!React.Children.count(props.children)) {\n throwCheckboxGroupChildrenError();\n }\n};\n"],"names":["getVariableType","arg","Array","isArray","undefined","throwCheckboxGroupDirectionError","invalidProp","Error","throwCheckboxGroupChildrenError","useValidateProps","props","direction","React","Children","count","children"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx"],"sourcesContent":["import React from 'react';\nimport type { DSControlledCheckboxGroupT } from '../index.d';\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwCheckboxGroupDirectionError = (invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: \"horizontal\" or \"vertical\" (string)\n `,\n );\n};\n\nconst throwCheckboxGroupChildrenError = (): void => {\n throw new Error(\n `You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n `,\n );\n};\n\nexport const useValidateProps = (props: DSControlledCheckboxGroupT): void => {\n if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {\n throwCheckboxGroupDirectionError(props.direction);\n }\n if (!React.Children.count(props.children)) {\n throwCheckboxGroupChildrenError();\n }\n};\n"],"names":["getVariableType","arg","Array","isArray","undefined","throwCheckboxGroupDirectionError","invalidProp","Error","throwCheckboxGroupChildrenError","useValidateProps","props","direction","React","Children","count","children"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;EAChD,IAAIC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAJ,EAAwB,OAAO,OAAP;EACxB,IAAIA,GAAG,KAAK,IAAZ,EAAkB,OAAO,MAAP;EAClB,IAAIA,GAAG,KAAKG,SAAZ,EAAuB,OAAO,WAAP;EACvB,mCAAcH,GAAd;AACD,CALD;;AAOA,IAAMI,gCAAgC,GAAG,SAAnCA,gCAAmC,CAACC,WAAD,EAAgC;EACvE,MAAM,IAAIC,KAAJ,6IAGMD,WAHN,eAGsBN,eAAe,CAACM,WAAD,CAHrC,gEAAN;AAOD,CARD;;AAUA,IAAME,+BAA+B,GAAG,SAAlCA,+BAAkC,GAAY;EAClD,MAAM,IAAID,KAAJ,6KAAN;AAOD,CARD;;IAUaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6C;EAC3E,IAAIA,KAAK,CAACC,SAAN,KAAoBP,SAApB,IAAiCM,KAAK,CAACC,SAAN,KAAoB,UAArD,IAAmED,KAAK,CAACC,SAAN,KAAoB,YAA3F,EAAyG;IACvGN,gCAAgC,CAACK,KAAK,CAACC,SAAP,CAAhC;;;EAEF,IAAI,CAACC,yBAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBJ,KAAK,CAACK,QAA3B,CAAL,EAA2C;IACzCP,+BAA+B;;AAElC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../../src/form-layout-checkbox-group/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n direction: 'horizontal',\n};\n"],"names":["defaultProps","direction"],"mappings":";;;;IAAaA,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"defaultProps.js","sources":["../../../src/form-layout-checkbox-group/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n direction: 'horizontal',\n};\n"],"names":["defaultProps","direction"],"mappings":";;;;IAAaA,YAAY,GAAG;EAC1BC,SAAS,EAAE;AADe;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-checkbox-group/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n"],"names":["propTypes","direction","PropTypes","oneOf","description"],"mappings":";;;;;;IAEaA,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-checkbox-group/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n"],"names":["propTypes","direction","PropTypes","oneOf","description"],"mappings":";;;;;;IAEaA,SAAS,GAAG;EACvBC,SAAS,EAAEC,mBAAS,CAACC,KAAV,CAAgB,CAAC,YAAD,EAAe,UAAf,CAAhB,EAA4CC,WAA5C,CAAwD,uCAAxD;AADY;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-checkbox-group/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { DSControlledCheckboxGroupStyledContainerT } from './index.d';\n\nexport const StyledContainer = styled.div<DSControlledCheckboxGroupStyledContainerT>`\n display: inline-flex;\n flex-wrap: wrap;\n flex-direction: ${({ direction }) => (direction === 'horizontal' ? 'row' : 'column')};\n margin-left: ${({ theme }) => theme.space.xs};\n margin-right: ${({ theme }) => theme.space.xs};\n margin-top: ${({ theme }) => theme.space.xxs};\n & div {\n padding: 0;\n margin-bottom: ${({ theme }) => theme.space.xxs};\n }\n & div:not(:last-child) {\n margin-right: ${({ theme, direction }) => (direction === 'horizontal' ? theme.space.s : '0')};\n }\n`;\n"],"names":["StyledContainer","styled","div","direction","theme","space","xs","xxs","s"],"mappings":";;;;;;;;;;IAGaA,eAAe,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-checkbox-group/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { DSControlledCheckboxGroupStyledContainerT } from './index.d';\n\nexport const StyledContainer = styled.div<DSControlledCheckboxGroupStyledContainerT>`\n display: inline-flex;\n flex-wrap: wrap;\n flex-direction: ${({ direction }) => (direction === 'horizontal' ? 'row' : 'column')};\n margin-left: ${({ theme }) => theme.space.xs};\n margin-right: ${({ theme }) => theme.space.xs};\n margin-top: ${({ theme }) => theme.space.xxs};\n & div {\n padding: 0;\n margin-bottom: ${({ theme }) => theme.space.xxs};\n }\n & div:not(:last-child) {\n margin-right: ${({ theme, direction }) => (direction === 'horizontal' ? theme.space.s : '0')};\n }\n`;\n"],"names":["StyledContainer","styled","div","direction","theme","space","xs","xxs","s"],"mappings":";;;;;;;;;;IAGaA,eAAe,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,iMAGR;EAAA,IAAGC,SAAH,QAAGA,SAAH;EAAA,OAAoBA,SAAS,KAAK,YAAd,GAA6B,KAA7B,GAAqC,QAAzD;AAAA,CAHQ,EAIX;EAAA,IAAGC,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CAJW,EAKV;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CALU,EAMZ;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CANY,EASP;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CATO,EAYR;EAAA,IAAGH,KAAH,SAAGA,KAAH;MAAUD,SAAV,SAAUA,SAAV;EAAA,OAA2BA,SAAS,KAAK,YAAd,GAA6BC,KAAK,CAACC,KAAN,CAAYG,CAAzC,GAA6C,GAAxE;AAAA,CAZQ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSFormLayoutBlockItem.js","sources":["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport type { DSFormLayoutBlockItemPropsT as Props } from './index.d';\nimport { propTypes } from './propTypes';\nimport { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from './styles';\n\nconst DSFormLayoutBlockItem = (props: Props): JSX.Element => {\n const {\n label,\n feedbackMessage,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup = false,\n } = props;\n\n const instanceUID = useMemo(() => uid(6), []);\n\n return (\n <StyledContainer\n leftLabel={leftLabel}\n fitContent={fitContent}\n hideLabel={hideLabel}\n withHighlight={withHighlight}\n as={isGroup ? 'fieldset' : 'div'}\n isGroup={isGroup}\n aria-describedby={`${inputID || instanceUID}_feedback_message`}\n >\n <StyledLabel htmlFor={inputID} leftLabel={leftLabel} hideLabel={hideLabel} aria-hidden={isGroup}>\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n {isGroup && <ScreenReaderOnly as=\"legend\">{label}</ScreenReaderOnly>}\n {children}\n {feedbackMessage && !hasError && (\n <StyledMessage\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n id={`${inputID || instanceUID}_feedback_message`}\n >\n {feedbackMessage}\n </StyledMessage>\n )}\n {validationMessage && hasError && (\n <StyledMessage hasError={hasError} leftLabel={leftLabel} hideLabel={hideLabel} role=\"alert\">\n {validationMessage}\n </StyledMessage>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],"names":["DSFormLayoutBlockItem","props","label","feedbackMessage","validationMessage","inputID","children","hasError","leftLabel","required","optional","hideLabel","fitContent","withHighlight","isGroup","instanceUID","useMemo","uid","propTypes","DSFormLayoutBlockItemWithSchema","describe"],"mappings":";;;;;;;AAAA;;IAQMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA+B;
|
|
1
|
+
{"version":3,"file":"DSFormLayoutBlockItem.js","sources":["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport type { DSFormLayoutBlockItemPropsT as Props } from './index.d';\nimport { propTypes } from './propTypes';\nimport { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from './styles';\n\nconst DSFormLayoutBlockItem = (props: Props): JSX.Element => {\n const {\n label,\n feedbackMessage,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup = false,\n } = props;\n\n const instanceUID = useMemo(() => uid(6), []);\n\n return (\n <StyledContainer\n leftLabel={leftLabel}\n fitContent={fitContent}\n hideLabel={hideLabel}\n withHighlight={withHighlight}\n as={isGroup ? 'fieldset' : 'div'}\n isGroup={isGroup}\n aria-describedby={`${inputID || instanceUID}_feedback_message`}\n >\n <StyledLabel htmlFor={inputID} leftLabel={leftLabel} hideLabel={hideLabel} aria-hidden={isGroup}>\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n {isGroup && <ScreenReaderOnly as=\"legend\">{label}</ScreenReaderOnly>}\n {children}\n {feedbackMessage && !hasError && (\n <StyledMessage\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n id={`${inputID || instanceUID}_feedback_message`}\n >\n {feedbackMessage}\n </StyledMessage>\n )}\n {validationMessage && hasError && (\n <StyledMessage hasError={hasError} leftLabel={leftLabel} hideLabel={hideLabel} role=\"alert\">\n {validationMessage}\n </StyledMessage>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],"names":["DSFormLayoutBlockItem","props","label","feedbackMessage","validationMessage","inputID","children","hasError","leftLabel","required","optional","hideLabel","fitContent","withHighlight","isGroup","instanceUID","useMemo","uid","propTypes","DSFormLayoutBlockItemWithSchema","describe"],"mappings":";;;;;;;AAAA;;IAQMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA+B;EAC3D,IACEC,KADF,GAcID,KAdJ,CACEC,KADF;MAEEC,eAFF,GAcIF,KAdJ,CAEEE,eAFF;MAGEC,iBAHF,GAcIH,KAdJ,CAGEG,iBAHF;MAIEC,OAJF,GAcIJ,KAdJ,CAIEI,OAJF;MAKEC,QALF,GAcIL,KAdJ,CAKEK,QALF;MAMEC,QANF,GAcIN,KAdJ,CAMEM,QANF;MAOEC,SAPF,GAcIP,KAdJ,CAOEO,SAPF;MAQEC,QARF,GAcIR,KAdJ,CAQEQ,QARF;MASEC,QATF,GAcIT,KAdJ,CASES,QATF;MAUEC,SAVF,GAcIV,KAdJ,CAUEU,SAVF;MAWEC,UAXF,GAcIX,KAdJ,CAWEW,UAXF;MAYEC,aAZF,GAcIZ,KAdJ,CAYEY,aAZF;uBAcIZ,KAdJ,CAaEa,OAbF;MAaEA,OAbF,+BAaY,KAbZ;EAgBA,IAAMC,WAAW,GAAGC,OAAO,CAAC;IAAA,OAAMC,GAAG,CAAC,CAAD,CAAT;GAAD,EAAe,EAAf,CAA3B;EAEA,oBACE,oBAAC,eAAD;IACE,SAAS,EAAET,SADb;IAEE,UAAU,EAAEI,UAFd;IAGE,SAAS,EAAED,SAHb;IAIE,aAAa,EAAEE,aAJjB;IAKE,EAAE,EAAEC,OAAO,GAAG,UAAH,GAAgB,KAL7B;IAME,OAAO,EAAEA,OANX;IAOE,8BAAqBT,OAAO,IAAIU,WAAhC;kBAEA,oBAAC,WAAD;IAAa,OAAO,EAAEV,OAAtB;IAA+B,SAAS,EAAEG,SAA1C;IAAqD,SAAS,EAAEG,SAAhE;IAA2E,eAAaG;KACrFZ,KADH,EAEG,CAACO,QAAQ,IAAIC,QAAb,kBAA0B,oBAAC,UAAD;IAAY,QAAQ,EAAED;IAFnD,CATF,EAaGK,OAAO,iBAAI,oBAAC,gBAAD;IAAkB,EAAE,EAAC;KAAUZ,KAA/B,CAbd,EAcGI,QAdH,EAeGH,eAAe,IAAI,CAACI,QAApB,iBACC,oBAAC,aAAD;IACE,SAAS,EAAEC,SADb;IAEE,SAAS,EAAEG,SAFb;IAGE,eAAaG,OAHf;IAIE,EAAE,YAAKT,OAAO,IAAIU,WAAhB;KAEDZ,eANH,CAhBJ,EAyBGC,iBAAiB,IAAIG,QAArB,iBACC,oBAAC,aAAD;IAAe,QAAQ,EAAEA,QAAzB;IAAmC,SAAS,EAAEC,SAA9C;IAAyD,SAAS,EAAEG,SAApE;IAA+E,IAAI,EAAC;KACjFP,iBADH,CA1BJ,CADF;AAiCD;;AAEDJ,qBAAqB,CAACkB,SAAtB,GAAkCA,SAAlC;IACMC,+BAA+B,GAAGC,QAAQ,CAACpB,qBAAD;AAChDmB,+BAA+B,CAACD,SAAhC,GAA4CA,SAA5C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-block-item/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.isRequired.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.isRequired.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),\n validationMessage: PropTypes.string.description(\n 'Validation message to show below the input component. It requires hasError property set to true to be visible.',\n ),\n hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),\n leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),\n hideLabel: PropTypes.bool.description(\n 'Hides the input label. It still requires label and labelFor property for accesibility purposes',\n ),\n withHighlight: PropTypes.bool.description(\n 'Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.',\n ),\n isGroup: PropTypes.bool.description(\n 'Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.',\n ),\n};\n"],"names":["propTypes","children","PropTypes","node","isRequired","description","label","string","inputID","feedbackMessage","validationMessage","hasError","bool","required","optional","fitContent","leftLabel","hideLabel","withHighlight","isGroup"],"mappings":";;IAEaA,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-block-item/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.isRequired.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.isRequired.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),\n validationMessage: PropTypes.string.description(\n 'Validation message to show below the input component. It requires hasError property set to true to be visible.',\n ),\n hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),\n leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),\n hideLabel: PropTypes.bool.description(\n 'Hides the input label. It still requires label and labelFor property for accesibility purposes',\n ),\n withHighlight: PropTypes.bool.description(\n 'Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.',\n ),\n isGroup: PropTypes.bool.description(\n 'Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.',\n ),\n};\n"],"names":["propTypes","children","PropTypes","node","isRequired","description","label","string","inputID","feedbackMessage","validationMessage","hasError","bool","required","optional","fitContent","leftLabel","hideLabel","withHighlight","isGroup"],"mappings":";;IAEaA,SAAS,GAAG;EACvBC,QAAQ,EAAEC,SAAS,CAACC,IAAV,CAAeC,UAAf,CAA0BC,WAA1B,CAAsC,mBAAtC,CADa;EAEvBC,KAAK,EAAEJ,SAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACL,8FADK,CAFgB;EAKvBG,OAAO,EAAEN,SAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACP,oGADO,CALc;EAQvBI,eAAe,EAAEP,SAAS,CAACK,MAAV,CAAiBF,WAAjB,CAA6B,qDAA7B,CARM;EASvBK,iBAAiB,EAAER,SAAS,CAACK,MAAV,CAAiBF,WAAjB,CACjB,gHADiB,CATI;EAYvBM,QAAQ,EAAET,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAZa;EAavBQ,QAAQ,EAAEX,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAba;EAcvBS,QAAQ,EAAEZ,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAda;EAevBU,UAAU,EAAEb,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAfW;EAgBvBW,SAAS,EAAEd,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,oDAA3B,CAhBY;EAiBvBY,SAAS,EAAEf,SAAS,CAACU,IAAV,CAAeP,WAAf,CACT,gGADS,CAjBY;EAoBvBa,aAAa,EAAEhB,SAAS,CAACU,IAAV,CAAeP,WAAf,CACb,sGADa,CApBQ;EAuBvBc,OAAO,EAAEjB,SAAS,CAACU,IAAV,CAAeP,WAAf,CACP,gHADO;AAvBc;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-block-item/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type {\n DSFormLayoutBlockItemStyledContainerT,\n DSFormLayoutBlockItemStyledLabelT,\n DSFormLayoutBlockItemStyledMessageT,\n DSFormLayoutBlockItemStyledMarkT,\n} from './index.d';\n\nexport const StyledContainer = styled.div<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined)}\n align-items: center;\n ${({ theme, withHighlight }) =>\n withHighlight\n ? `\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n `\n : undefined}\n`;\n\nexport const StyledLabel = styled.label<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxs};` : undefined)}\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n`;\n\nexport const StyledMessage = styled.div<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n font-style: italic;\n text-align: right;\n line-height: 15px;\n height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined)}\n`;\n\nexport const StyledMark = styled.span<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["StyledContainer","styled","div","fitContent","undefined","isGroup","leftLabel","hideLabel","theme","withHighlight","space","xxs","xxxs","xs","StyledLabel","label","StyledMessage","fontSizes","microText","hasError","colors","danger","neutral","StyledMark","span","required","brand","ScreenReaderOnly"],"mappings":";;IAQaA,eAAe,gBAAGC,MAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-block-item/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type {\n DSFormLayoutBlockItemStyledContainerT,\n DSFormLayoutBlockItemStyledLabelT,\n DSFormLayoutBlockItemStyledMessageT,\n DSFormLayoutBlockItemStyledMarkT,\n} from './index.d';\n\nexport const StyledContainer = styled.div<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined)}\n align-items: center;\n ${({ theme, withHighlight }) =>\n withHighlight\n ? `\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n `\n : undefined}\n`;\n\nexport const StyledLabel = styled.label<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxs};` : undefined)}\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n`;\n\nexport const StyledMessage = styled.div<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n font-style: italic;\n text-align: right;\n line-height: 15px;\n height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined)}\n`;\n\nexport const StyledMark = styled.span<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["StyledContainer","styled","div","fitContent","undefined","isGroup","leftLabel","hideLabel","theme","withHighlight","space","xxs","xxxs","xs","StyledLabel","label","StyledMessage","fontSizes","microText","hasError","colors","danger","neutral","StyledMark","span","required","brand","ScreenReaderOnly"],"mappings":";;IAQaA,eAAe,gBAAGC,MAAM,CAACC,GAAV;EAAA;AAAA,iGAKxB;EAAA,IAAGC,UAAH,QAAGA,UAAH;EAAA,OAAqBA,UAAU,GAAG,qBAAH,GAA2BC,SAA1D;AAAA,CALwB,EAMxB;EAAA,IAAGC,OAAH,SAAGA,OAAH;EAAA,OAAkBA,OAAO,GAAG,cAAH,GAAoB,EAA7C;AAAA,CANwB,EAOxB;EAAA,IAAGC,SAAH,SAAGA,SAAH;MAAcC,SAAd,SAAcA,SAAd;EAAA,OAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,0CAA1B,GAAuEH,SAAtG;AAAA,CAPwB,EASxB;EAAA,IAAGI,KAAH,SAAGA,KAAH;MAAUC,aAAV,SAAUA,aAAV;EAAA,OACAA,aAAa,+FAKAD,KAAK,CAACE,KAAN,CAAYC,GALZ,8BAMDH,KAAK,CAACE,KAAN,CAAYE,IANX,iEAQYJ,KAAK,CAACE,KAAN,CAAYG,EARxB,8CAScL,KAAK,CAACE,KAAN,CAAYC,GAT1B,uUAoBIH,KAAK,CAACE,KAAN,CAAYC,GApBhB,kCAqBGH,KAAK,CAACE,KAAN,CAAYE,IArBf,yEAuBgBJ,KAAK,CAACE,KAAN,CAAYG,EAvB5B,kDAwBkBL,KAAK,CAACE,KAAN,CAAYC,GAxB9B,iNAgCTP,SAjCJ;AAAA,CATwB;IA6CfU,WAAW,gBAAGb,MAAM,CAACc,KAAV;EAAA;AAAA,+BAEpB;EAAA,IAAGP,KAAH,SAAGA,KAAH;MAAUF,SAAV,SAAUA,SAAV;EAAA,OAA2BA,SAAS,4BAAqBE,KAAK,CAACE,KAAN,CAAYC,GAAjC,SAA0CP,SAA9E;AAAA,CAFoB,EAGpB;EAAA,IAAGG,SAAH,SAAGA,SAAH;EAAA,OACAA,SAAS,oNAWLH,SAZJ;AAAA,CAHoB;IAkBXY,aAAa,gBAAGf,MAAM,CAACC,GAAV;EAAA;AAAA,8IACX;EAAA,IAAGM,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,SAAN,CAAgBC,SAAhB,CAA0B,GAA1B,CAAf;AAAA,CADW,EAQf;EAAA,IAAGV,KAAH,SAAGA,KAAH;MAAUW,QAAV,SAAUA,QAAV;EAAA,OAA0BA,QAAQ,GAAGX,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAAH,GAA8Bb,KAAK,CAACY,MAAN,CAAaE,OAAb,CAAqB,GAArB,CAAhE;AAAA,CARe,EAStB;EAAA,IAAGhB,SAAH,SAAGA,SAAH;MAAcC,SAAd,SAAcA,SAAd;EAAA,OAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,mBAA1B,GAAgDH,SAA/E;AAAA,CATsB;IAYbmB,UAAU,gBAAGtB,MAAM,CAACuB,IAAV;EAAA;AAAA,qEAIN;EAAA,IAAGhB,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAACE,KAAN,CAAYE,IAA3B;AAAA,CAJM,EAKnB;EAAA,IAAGJ,KAAH,UAAGA,KAAH;MAAUiB,QAAV,UAAUA,QAAV;EAAA,OACAA,QAAQ,mCAEUjB,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAFV,6CAKUb,KAAK,CAACY,MAAN,CAAaM,KAAb,CAAmB,GAAnB,CALV,UADR;AAAA,CALmB;IAeVC,gBAAgB,gBAAG1B,MAAM,CAACC,GAAV;EAAA;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSFormLayoutCheckboxGroup.js","sources":["../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes';\nimport { StyledContainer } from './styles';\nimport { defaultProps } from './defaultProps';\nimport type { DSControlledCheckboxGroupT } from './index.d';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst DSFormLayoutCheckboxGroup = (props: DSControlledCheckboxGroupT): JSX.Element => {\n useValidateProps(props);\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n return <StyledContainer direction={propsWithDefault.direction}>{propsWithDefault.children}</StyledContainer>;\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],"names":["DSFormLayoutCheckboxGroup","props","useValidateProps","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","direction","children","propTypes","DSFormLayoutCheckboxGroupWithSchema","describe"],"mappings":";;;;;;;;;;IASMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAoD;
|
|
1
|
+
{"version":3,"file":"DSFormLayoutCheckboxGroup.js","sources":["../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes';\nimport { StyledContainer } from './styles';\nimport { defaultProps } from './defaultProps';\nimport type { DSControlledCheckboxGroupT } from './index.d';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst DSFormLayoutCheckboxGroup = (props: DSControlledCheckboxGroupT): JSX.Element => {\n useValidateProps(props);\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n return <StyledContainer direction={propsWithDefault.direction}>{propsWithDefault.children}</StyledContainer>;\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],"names":["DSFormLayoutCheckboxGroup","props","useValidateProps","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","direction","children","propTypes","DSFormLayoutCheckboxGroupWithSchema","describe"],"mappings":";;;;;;;;;;IASMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAoD;EACpFC,gBAAgB,CAACD,KAAD,CAAhB;EACA,IAAME,gBAAgB,GAAGC,4BAA4B,CAACH,KAAD,EAAQI,YAAR,CAArD;EAEA,oBAAO,oBAAC,eAAD;IAAiB,SAAS,EAAEF,gBAAgB,CAACG;KAAYH,gBAAgB,CAACI,QAA1E,CAAP;AACD;;AAEDP,yBAAyB,CAACQ,SAA1B,GAAsCA,SAAtC;IACMC,mCAAmC,GAAGC,QAAQ,CAACV,yBAAD;AACpDS,mCAAmC,CAACD,SAApC,GAAgDA,SAAhD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx"],"sourcesContent":["import React from 'react';\nimport type { DSControlledCheckboxGroupT } from '../index.d';\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwCheckboxGroupDirectionError = (invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: \"horizontal\" or \"vertical\" (string)\n `,\n );\n};\n\nconst throwCheckboxGroupChildrenError = (): void => {\n throw new Error(\n `You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n `,\n );\n};\n\nexport const useValidateProps = (props: DSControlledCheckboxGroupT): void => {\n if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {\n throwCheckboxGroupDirectionError(props.direction);\n }\n if (!React.Children.count(props.children)) {\n throwCheckboxGroupChildrenError();\n }\n};\n"],"names":["getVariableType","arg","Array","isArray","undefined","throwCheckboxGroupDirectionError","invalidProp","Error","throwCheckboxGroupChildrenError","useValidateProps","props","direction","React","Children","count","children"],"mappings":";;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx"],"sourcesContent":["import React from 'react';\nimport type { DSControlledCheckboxGroupT } from '../index.d';\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwCheckboxGroupDirectionError = (invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: \"horizontal\" or \"vertical\" (string)\n `,\n );\n};\n\nconst throwCheckboxGroupChildrenError = (): void => {\n throw new Error(\n `You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n `,\n );\n};\n\nexport const useValidateProps = (props: DSControlledCheckboxGroupT): void => {\n if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {\n throwCheckboxGroupDirectionError(props.direction);\n }\n if (!React.Children.count(props.children)) {\n throwCheckboxGroupChildrenError();\n }\n};\n"],"names":["getVariableType","arg","Array","isArray","undefined","throwCheckboxGroupDirectionError","invalidProp","Error","throwCheckboxGroupChildrenError","useValidateProps","props","direction","React","Children","count","children"],"mappings":";;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;EAChD,IAAIC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAJ,EAAwB,OAAO,OAAP;EACxB,IAAIA,GAAG,KAAK,IAAZ,EAAkB,OAAO,MAAP;EAClB,IAAIA,GAAG,KAAKG,SAAZ,EAAuB,OAAO,WAAP;EACvB,eAAcH,GAAd;AACD,CALD;;AAOA,IAAMI,gCAAgC,GAAG,SAAnCA,gCAAmC,CAACC,WAAD,EAAgC;EACvE,MAAM,IAAIC,KAAJ,6IAGMD,WAHN,eAGsBN,eAAe,CAACM,WAAD,CAHrC,gEAAN;AAOD,CARD;;AAUA,IAAME,+BAA+B,GAAG,SAAlCA,+BAAkC,GAAY;EAClD,MAAM,IAAID,KAAJ,6KAAN;AAOD,CARD;;IAUaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6C;EAC3E,IAAIA,KAAK,CAACC,SAAN,KAAoBP,SAApB,IAAiCM,KAAK,CAACC,SAAN,KAAoB,UAArD,IAAmED,KAAK,CAACC,SAAN,KAAoB,YAA3F,EAAyG;IACvGN,gCAAgC,CAACK,KAAK,CAACC,SAAP,CAAhC;;;EAEF,IAAI,CAACC,KAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBJ,KAAK,CAACK,QAA3B,CAAL,EAA2C;IACzCP,+BAA+B;;AAElC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../../src/form-layout-checkbox-group/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n direction: 'horizontal',\n};\n"],"names":["defaultProps","direction"],"mappings":"IAAaA,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"defaultProps.js","sources":["../../../src/form-layout-checkbox-group/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n direction: 'horizontal',\n};\n"],"names":["defaultProps","direction"],"mappings":"IAAaA,YAAY,GAAG;EAC1BC,SAAS,EAAE;AADe;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-checkbox-group/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n"],"names":["propTypes","direction","PropTypes","oneOf","description"],"mappings":";;IAEaA,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"propTypes.js","sources":["../../../src/form-layout-checkbox-group/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n"],"names":["propTypes","direction","PropTypes","oneOf","description"],"mappings":";;IAEaA,SAAS,GAAG;EACvBC,SAAS,EAAEC,SAAS,CAACC,KAAV,CAAgB,CAAC,YAAD,EAAe,UAAf,CAAhB,EAA4CC,WAA5C,CAAwD,uCAAxD;AADY;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-checkbox-group/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { DSControlledCheckboxGroupStyledContainerT } from './index.d';\n\nexport const StyledContainer = styled.div<DSControlledCheckboxGroupStyledContainerT>`\n display: inline-flex;\n flex-wrap: wrap;\n flex-direction: ${({ direction }) => (direction === 'horizontal' ? 'row' : 'column')};\n margin-left: ${({ theme }) => theme.space.xs};\n margin-right: ${({ theme }) => theme.space.xs};\n margin-top: ${({ theme }) => theme.space.xxs};\n & div {\n padding: 0;\n margin-bottom: ${({ theme }) => theme.space.xxs};\n }\n & div:not(:last-child) {\n margin-right: ${({ theme, direction }) => (direction === 'horizontal' ? theme.space.s : '0')};\n }\n`;\n"],"names":["StyledContainer","styled","div","direction","theme","space","xs","xxs","s"],"mappings":";;IAGaA,eAAe,gBAAGC,MAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/form-layout-checkbox-group/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { DSControlledCheckboxGroupStyledContainerT } from './index.d';\n\nexport const StyledContainer = styled.div<DSControlledCheckboxGroupStyledContainerT>`\n display: inline-flex;\n flex-wrap: wrap;\n flex-direction: ${({ direction }) => (direction === 'horizontal' ? 'row' : 'column')};\n margin-left: ${({ theme }) => theme.space.xs};\n margin-right: ${({ theme }) => theme.space.xs};\n margin-top: ${({ theme }) => theme.space.xxs};\n & div {\n padding: 0;\n margin-bottom: ${({ theme }) => theme.space.xxs};\n }\n & div:not(:last-child) {\n margin-right: ${({ theme, direction }) => (direction === 'horizontal' ? theme.space.s : '0')};\n }\n`;\n"],"names":["StyledContainer","styled","div","direction","theme","space","xs","xxs","s"],"mappings":";;IAGaA,eAAe,gBAAGC,MAAM,CAACC,GAAV;EAAA;AAAA,iMAGR;EAAA,IAAGC,SAAH,QAAGA,SAAH;EAAA,OAAoBA,SAAS,KAAK,YAAd,GAA6B,KAA7B,GAAqC,QAAzD;AAAA,CAHQ,EAIX;EAAA,IAAGC,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CAJW,EAKV;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CALU,EAMZ;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CANY,EASP;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CATO,EAYR;EAAA,IAAGH,KAAH,SAAGA,KAAH;MAAUD,SAAV,SAAUA,SAAV;EAAA,OAA2BA,SAAS,KAAK,YAAd,GAA6BC,KAAK,CAACC,KAAN,CAAYG,CAAzC,GAA6C,GAAxE;AAAA,CAZQ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-layout-blocks",
|
|
3
|
-
"version": "1.61.
|
|
3
|
+
"version": "1.61.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Form Layout Blocks",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"build": "node ../../scripts/build/build.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-props-helpers": "1.61.
|
|
19
|
+
"@elliemae/ds-props-helpers": "1.61.13",
|
|
20
20
|
"react-desc": "^4.1.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|